@openmrs/esm-form-engine-app 13.0.2-pre.12945 → 13.0.2-pre.12952
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/.turbo/turbo-build.log +2 -2
- package/dist/{9894.css.map → 2809.css.map} +1 -1
- package/dist/{9894.js → 2809.js} +12 -12
- package/dist/2809.js.map +1 -0
- package/dist/openmrs-esm-form-engine-app.js +2 -2
- package/dist/openmrs-esm-form-engine-app.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +2 -2
- package/dist/9894.js.map +0 -1
- /package/dist/{9894.css → 2809.css} +0 -0
package/dist/{9894.js → 2809.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(globalThis.webpackChunk_openmrs_esm_form_engine_app=globalThis.webpackChunk_openmrs_esm_form_engine_app||[]).push([["9894"],{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)}]`}},885(e,t,n){"use strict";let r,a,o,i,s,l,u,c,d,m,p,f;n.r(t),n.d(t,{GenderUnknownIcon:()=>c8,evaluateAsNumber:()=>iM,getImportMapOverrideMap:()=>oT,StockManagementPictogram:()=>DK,ChemistryIcon:()=>cH,BabyIcon:()=>c$,DashboardExtension:()=>d7,openmrsComponentDecorator:()=>lz,tryRegisterExtension:()=>ce,pictogramIds:()=>Dh,ActivityIcon:()=>ck,compile:()=>iL,removeRouteMapOverride:()=>o6,TableBatchActions:()=>cg,getAsyncLifecycle:()=>lZ,subscribeOpenmrsEvent:()=>il,PasswordIcon:()=>dE,Assessment2Pictogram:()=>Db,CloseIcon:()=>cY,setupRouteMapOverrides:()=>o8,useFeatureFlag:()=>ug,reset:()=>sz,ConceptDictionaryPictogram:()=>DE,LabOrderIcon:()=>du,VisitMode:()=>ih,useLocations:()=>uI,getLifecycle:()=>lK,formatDatetime:()=>wp,getVisitsForPatient:()=>iE,formatPartialDate:()=>wu,CustomOverflowMenu:()=>cE,LocationIcon:()=>dd,GroupIcon:()=>de,createUseStore:()=>lf,VisitStatus:()=>ig,getSessionLocation:()=>oa,getCurrentImportMap:()=>oV,usePatient:()=>uH,useRenderableExtensions:()=>uZ,getOpenedWindowIndexByWorkspace:()=>s1,setLeftNav:()=>sZ,clearHistory:()=>aZ,clearConfigErrors:()=>nh,formatTime:()=>wm,isDevEnabled:()=>op,CohortsPictogram:()=>DD,closeWorkspaceGroup2:()=>Eu,getCurrentRouteMap:()=>o0,ConfigurableLink:()=>ls,sessionStore:()=>a2,setSessionLocale:()=>oi,subscribeSnackbarShown:()=>C,getLoggedInUser:()=>or,GenderMaleIcon:()=>c5,getExtensionSlotConfigFromStore:()=>tR,evaluateAsNumberAsync:()=>iA,getImportMapDefaultMap:()=>ok,unregisterExtensionRendering:()=>sd,implementerToolsConfigStore:()=>tW,Type:()=>tg,InPatientPictogram:()=>DN,cleanupObsoleteFeatureFlags:()=>i5,getAttachmentsUrl:()=>ir,showSnackbar:()=>D9,PatientBannerActionsMenu:()=>Dl,PatientSearchPictogram:()=>DL,DocumentAttachmentIcon:()=>cQ,Snackbar:()=>D4,CardiologyPictogram:()=>Dx,ImageMedicalIcon:()=>dr,ActionableNotificationComponent:()=>xI,DiagnosisTags:()=>xm,openChildWorkspaceInWindow:()=>Ey,iconIds:()=>cC,PatientsPictogram:()=>DF,interpolateUrl:()=>aF,setupHistory:()=>aH,subscribeToastShown:()=>S,detachAll:()=>sB,convertToLocaleCalendar:()=>wf,DocumentIcon:()=>cX,configInternalStore:()=>t_,ActionMenuButton2:()=>EX,setupDynamicOfflineDataHandler:()=>_m,makeUrl:()=>a0,oneOf:()=>nD,selectPreferredName:()=>x5,MobileCheckIcon:()=>dy,createErrorHandler:()=>T,parseDate:()=>wr,getAttachmentByUuid:()=>ie,LeftNavMenu:()=>xb,getExtensionRegistration:()=>sj,ShoppingCartAddItemIcon:()=>d5,ReferralOrderIcon:()=>dT,ReportIcon:()=>dO,dispatchToastShown:()=>D,getImportMapNextPageMap:()=>oP,registerExtension:()=>sI,setupOfflineSync:()=>_d,DownloadIcon:()=>c0,useConnectivity:()=>_y,provide:()=>t6,ShoppingCartArrowDownIcon:()=>dL,featureFlagsStore:()=>i3,jsep:()=>iS,GeriatricsPictogram:()=>DR,SearchIcon:()=>dM,reportError:()=>P,slugify:()=>oL,isOmrsDateToday:()=>we,getExtensionStore:()=>sm,BloodBankPictogram:()=>Dw,TriagePictogram:()=>DY,Workspace2:()=>Ek,refetchCurrentUser:()=>oe,CheckmarkOutlineIcon:()=>cW,registerExtensionSlot:()=>sH,AllergiesIcon:()=>d4,ArrowDownIcon:()=>cT,useOpenmrsInfinite:()=>uS,getExtensionConfigFromExtensionSlotStore:()=>t$,OpenmrsDatePicker:()=>w4,getExtensionConfigFromStore:()=>tN,getDynamicOfflineDataEntries:()=>_p,getLocaleDisplayName:()=>bk,messageOmrsServiceWorker:()=>_h,navigate:()=>aV,launchWorkspace2:()=>Ec,getGroupByWindowName:()=>s0,CustomOverflowMenuItem:()=>c_,isUrl:()=>nx,CaretDownIcon:()=>cj,ArrowLeftIcon:()=>cR,FacilityPictogram:()=>DT,ViewOffIcon:()=>dQ,updateInternalExtensionStore:()=>so,dispatchActionableNotificationShown:()=>w,resetRouteMapOverrides:()=>o5,formatDurationBetween:()=>wD,defaultVisitCustomRepresentation:()=>iy,getBreadcrumbsFor:()=>nO,useOpenmrsPagination:()=>uv,Pagination:()=>x1,CheckmarkFilledIcon:()=>cU,clearCurrentUser:()=>ot,showModal:()=>x$,ChevronUpIcon:()=>cG,saveVisit:()=>ix,useAttachments:()=>ue,Pictogram:()=>D0,useExtensionSlot:()=>lw,ChevronDownIcon:()=>cz,OpenmrsDateRangePicker:()=>w2,deleteAttachmentPermanently:()=>io,getVisitTypes:()=>ip,OverflowMenuHorizontalIcon:()=>dx,EventScheduleIcon:()=>c2,getSessionStore:()=>a8,ProcedureOrderIcon:()=>dk,preloadImport:()=>oB,registerWorkspaceWindows2:()=>s2,useOnVisible:()=>uF,setSessionLocation:()=>oo,userHasAccess:()=>on,ChartAverageIcon:()=>cB,getFeatureFlag:()=>i9,UserAvatarIcon:()=>dY,renderExtension:()=>ln,useFhirInfinite:()=>uR,toVisitTypeObject:()=>id,useSession:()=>uG,EmergencyDepartmentPictogram:()=>DP,Notification:()=>xA,dispatchSnackbarShown:()=>x,formatDate:()=>wc,workspace2StoreActions:()=>Ew,SwitcherIcon:()=>dj,esmStyleGuideSchema:()=>cp,getImportMapDisabledOverrides:()=>oR,useAssignedExtensionIds:()=>l8,CaretRightIcon:()=>cL,evaluateAsType:()=>ij,PageHeader:()=>xQ,TranslateIcon:()=>dz,setUserProperties:()=>os,MovementIcon:()=>dw,renderInlineNotifications:()=>xH,subscribePrecacheStaticDependencies:()=>_g,PaymentsDeskPictogram:()=>DB,usePrimaryIdentifierCode:()=>uz,useLayoutType:()=>uN,getCurrentUser:()=>a9,closeWorkspaceInWindow:()=>Eg,XrayPictogram:()=>Dq,CaretUpIcon:()=>cF,renderActionableNotifications:()=>xK,OpenmrsAppContext:()=>l2,setupModals:()=>xN,getDefaultsFromConfigSchema:()=>function e(t){let n={};for(let r of Object.keys(t))if(_o(t[r])&&t[r].hasOwnProperty("_default"))n[r]=t[r]._default;else{if(r.startsWith("_"))continue;_o(t[r])?n[r]=e(t[r]):n[r]=t[r]}return n},subscribeTo:()=>z,recordConfigDerivationError:()=>tV,useAbortController:()=>l6,Extension:()=>ll,getFhirServerPaginationHandlers:()=>uD,useConnectedExtensions:()=>ui,registerApp:()=>cn,HospitalBedIcon:()=>dn,useExtensionInternalStore:()=>up,configExtensionStore:()=>tC,getSynchronizationItems:()=>_f,getExtensionSlotsConfigStore:()=>tP,registerExtensionRendering:()=>sc,RenderIfValueIsTruthy:()=>l3,registerFeatureFlag:()=>i6,useFhirFetchAll:()=>uT,restBaseUrl:()=>aJ,CalendarHeatMapIcon:()=>cM,isImportMapOverrideDisabled:()=>oO,resetConfigSystem:()=>ng,getExtensionInternalStore:()=>sr,registerGlobalStore:()=>W,evaluateAsBoolean:()=>iN,PatientBannerPatientInfo:()=>Di,addRouteMapOverride:()=>o3,getDefaultCalendar:()=>ws,SettingsIcon:()=>dA,DrugOrderIcon:()=>c1,ProgramsIcon:()=>dP,useAssignedExtensions:()=>lb,CloseFilledIcon:()=>cq,canAccessStorage:()=>_a,registerDefaultCalendar:()=>wi,TreeViewAltIcon:()=>dZ,OverflowMenuVerticalIcon:()=>dD,clearConfigDerivationError:()=>tU,getConfigStore:()=>tk,InformationSquareIcon:()=>ds,EmptyCard:()=>xg,ChevronLeftIcon:()=>cK,RadiologyIcon:()=>d6,useCandidateExtensions:()=>l7,renderToasts:()=>En,isDesktop:()=>u$,integrateBreakpoints:()=>cs,RegistrationPictogram:()=>DW,CardHeader:()=>cc,getExtensionRegistrationFrom:()=>sA,InformationIcon:()=>da,SystemAdministrationPictogram:()=>DZ,TrashCanIcon:()=>dK,useShallowStableValue:()=>lu,PatientDocumentsPictogram:()=>DI,useOpenmrsSWR:()=>uB,Assessment1Pictogram:()=>Dv,finishRegisteringAllApps:()=>cr,importDynamic:()=>oF,useFhirPagination:()=>ux,useVisitContextStore:()=>u4,ArrowUpIcon:()=>cN,showActionableNotification:()=>xZ,useForceUpdate:()=>uy,useVisit:()=>u2,PatientBannerPatientIdentifiers:()=>Dn,TransferPictogram:()=>DG,usePagination:()=>uV,Breakpoint:()=>ca,PatientBannerToggleContactDetailsButton:()=>EQ,CloseOutlineIcon:()=>cJ,ObstetricsPictogram:()=>Dj,parseDateInput:()=>wg,ReportsPictogram:()=>DH,getConfig:()=>t9,attach:()=>sL,getLocale:()=>bP,isUrlWithTemplateParameters:()=>nw,useEmrConfiguration:()=>ud,useLeftNav:()=>uM,ToolsIcon:()=>dH,ErrorState:()=>xy,detach:()=>sF,setCurrentVisit:()=>iw,ConditionsIcon:()=>d3,SaveIcon:()=>d$,useConfig:()=>uo,validator:()=>ty,CalendarIcon:()=>cA,getHistory:()=>az,StickyNoteAddIcon:()=>dF,useWorkspace2Store:()=>Ex,getPatientName:()=>x4,getVisitStore:()=>ib,getCoreTranslation:()=>aL,registerModuleWithConfigSystem:()=>t1,updateOpenedWorkspaceInWindow:()=>Ev,registerModuleLoad:()=>t4,getBreadcrumbs:()=>nP,extractVariableNames:()=>i1,translateFrom:()=>aI,useStoreWithActions:()=>lp,EditIcon:()=>c4,getCandidateExtensions:()=>sW,shallowEqual:()=>O,subscribeNotificationShown:()=>E,MaximizeIcon:()=>dp,promptForClosingWorkspaces:()=>Ef,WarningIcon:()=>d1,fhirBaseUrl:()=>aX,matchLocale:()=>_r,usePatientPhoto:()=>Dd,registerBreadcrumb:()=>nC,EventsIcon:()=>c3,createGlobalStore:()=>V,subscribeToFeatureFlag:()=>i8,useExtensionStore:()=>uh,createAttachment:()=>ia,useLeftNavStore:()=>uA,TableIcon:()=>dU,Icon:()=>d8,InformationFilledIcon:()=>di,getCurrentPageMap:()=>oC,LaboratoryPictogram:()=>D$,temporaryConfigStore:()=>tS,toDateObjectStrict:()=>wt,defineConfigSchema:()=>t0,filterBreadcrumbs:()=>nR,invalidateImplementerToolsConfig:()=>tF,PatientBannerContactDetails:()=>E6,getAssignedExtensions:()=>sU,promptForClosingWorkspacesInWindow:()=>Eh,PatientPhoto:()=>Df,MaterialOrderIcon:()=>dm,MicroscopeIcon:()=>dg,visitTypesUrl:()=>im,getOpenedWindowWidth:()=>E_,scheduleRecomputation:()=>sy,PharmacyPictogram:()=>DV,AttachmentIcon:()=>d2,MoneyIcon:()=>dv,getAttachments:()=>it,PageHeaderContent:()=>x0,MedicationIcon:()=>df,PrinterIcon:()=>dC,PatientListsPictogram:()=>DX,useAppContext:()=>l5,isOpenmrsRoutes:()=>oH,AppointmentsAltPictogram:()=>Dy,GenericOrderTypeIcon:()=>c7,batchExtensionUpdates:()=>sh,useExtensionSlotStore:()=>ly,ViewIcon:()=>d0,formattedName:()=>x6,sessionEndpoint:()=>aQ,duration:()=>ww,resetImportMapOverrides:()=>oM,TableOfContentsIcon:()=>dV,CaretLeftIcon:()=>cI,getTranslationOverrides:()=>t8,isVersionSatisfied:()=>_l,EmptyCardIllustration:()=>xh,PenIcon:()=>dS,verifyTotpCode:()=>ol,validators:()=>nE,setupImportMapOverrides:()=>oI,showToast:()=>Er,useDefineAppContext:()=>l4,getGlobalStore:()=>H,useOnClickOutside:()=>uL,getWindowByWorkspaceName:()=>sQ,ArrowRightIcon:()=>cO,loadLifeCycles:()=>u9,registerBreadcrumbs:()=>nk,MotherIcon:()=>db,fetchCurrentPatient:()=>ii,Toast:()=>D8,MessageQueueIcon:()=>dh,TwoFactorAuthenticationIcon:()=>dG,Pharmacy2Pictogram:()=>DU,goBackInHistory:()=>aK,GroupAccessIcon:()=>dt,getExtensionRenderingsStore:()=>sa,setImplementerToolsConfigRecomputer:()=>tL,getAsyncExtensionLifecycle:()=>lY,setupApiModule:()=>oh,renderLoadingSpinner:()=>E5,showNotification:()=>xz,getModalRegistration:()=>sJ,ListCheckedIcon:()=>dc,ResponsiveWrapper:()=>D1,GynaecologyPictogram:()=>DO,ShoppingCartIcon:()=>dI,getRouteMapNextPageMap:()=>o4,MetadataExportPictogram:()=>DA,updateVisit:()=>iD,backendDependencies:()=>of,MaybePictogram:()=>DQ,createParcelMounter:()=>le,openmrsFetch:()=>a1,useStore:()=>lm,isOpenmrsAppRoutes:()=>oW,ExportedWorkspace:()=>EK,DentistryPictogram:()=>DC,HomePictogram:()=>DJ,ServiceQueuesPictogram:()=>Dz,createExportedWorkspaceWindow:()=>EC,setFeatureFlag:()=>i7,toLanguageTag:()=>bC,DigitalTrustPictogram:()=>Dk,NumericObservation:()=>xJ,attachmentUrl:()=>o7,interpolateString:()=>aB,inRange:()=>nb,useExtensionSlotMeta:()=>uf,AppointmentsPictogram:()=>Dg,renderSnackbars:()=>D5,getRegisteredWorkspace2Names:()=>EE,logout:()=>ou,toLocationObject:()=>iu,ChartLineIcon:()=>cV,UserHasAccess:()=>uY,evaluateAsBooleanAsync:()=>i$,createDashboard:()=>me,getLocations:()=>ic,useExtensionContext:()=>um,getExtensionsConfigStore:()=>tO,getRouteMapDefaultMap:()=>o1,age:()=>x8,isOmrsDateStrict:()=>b7,registerWorkspaceGroups2:()=>s4,usePaginationInfo:()=>uU,evaluateAsync:()=>iO,useOpenmrsFetchAll:()=>uk,removeImportMapOverride:()=>o$,useVisitTypes:()=>u6,ageAsDuration:()=>x9,getExtensionNameFromId:()=>sM,DataEntryPictogram:()=>DS,renderParcel:()=>s7,ResetIcon:()=>dN,RenewIcon:()=>dR,useWorkspace2Context:()=>ED,subscribeActionableNotificationShown:()=>_,ErrorCard:()=>xv,GenderFemaleIcon:()=>c6,enableImportMapOverride:()=>oA,retry:()=>_u,ComponentContext:()=>lo,ExtensionSlot:()=>lD,unsetLeftNav:()=>sG,addImportMapOverride:()=>oN,MaybeIcon:()=>d9,useCustomOverflowMenu:()=>cD,PedestrianFamilyIcon:()=>d_,CtScanPictogram:()=>D_,dispatchNotificationShown:()=>b,leftNavStore:()=>sK,OpenmrsFetchError:()=>a4,UserFollowIcon:()=>dq,launchWorkspaceGroup2:()=>El,ChevronRightIcon:()=>cZ,UserXrayIcon:()=>dJ,GenderOtherIcon:()=>c9,formatDuration:()=>wh,toOmrsIsoString:()=>wn,Labs2Pictogram:()=>DM,workspace2Store:()=>sX,setUserLanguage:()=>a7,useBodyScrollLock:()=>ut,SyringeIcon:()=>dB,LocationPicker:()=>xw,useDebounce:()=>us,TimeIcon:()=>dW,getExtensionSlotConfig:()=>tT,AddIcon:()=>cP,getRouteMapOverrideMap:()=>o2,processConfig:()=>t7,InventoryManagementIcon:()=>dl,registerWorkspaces2:()=>s3,UserIcon:()=>dX,formatPatientName:()=>x3,fireOpenmrsEvent:()=>is,registerModal:()=>sq,registerTranslationNamespace:()=>t2,displayName:()=>x2,createLocalStore:()=>U,evaluate:()=>iR,defineExtensionConfigSchema:()=>t3,getSyncLifecycle:()=>lG,renderWorkspaceWindowsAndMenu:()=>_e,evaluateAsTypeAsync:()=>iI});let h="openmrs:notification-shown",g="openmrs:actionable-notification-shown",y="openmrs:toast-shown",v="openmrs:snack-bar-shown";function b(e){window.dispatchEvent(new CustomEvent(h,{detail:e}))}function w(e){window.dispatchEvent(new CustomEvent(g,{detail:e}))}function x(e){window.dispatchEvent(new CustomEvent(v,{detail:e}))}function D(e){window.dispatchEvent(new CustomEvent(y,{detail:e}))}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 C(e){let t=t=>e(t.detail);return window.addEventListener(v,t),()=>window.removeEventListener(v,t)}function k(e,t){let{message:n}=R(e);return"string"==typeof n&&n?n:t}function P(e){let t=R(e);setTimeout(()=>{throw t})}function T(){let e=Error();return t=>{let n=R(t);n.stack+=`
|
|
1
|
+
(globalThis.webpackChunk_openmrs_esm_form_engine_app=globalThis.webpackChunk_openmrs_esm_form_engine_app||[]).push([["2809"],{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)}]`}},3088(e,t,n){"use strict";let r,a,o,i,s,l,u,c,d,m,p,f;n.r(t),n.d(t,{GenderUnknownIcon:()=>dl,evaluateAsNumber:()=>iW,getImportMapOverrideMap:()=>oL,StockManagementPictogram:()=>D1,ChemistryIcon:()=>cQ,BabyIcon:()=>cU,DashboardExtension:()=>ml,openmrsComponentDecorator:()=>l0,tryRegisterExtension:()=>cu,pictogramIds:()=>D_,ActivityIcon:()=>cj,compile:()=>iZ,removeRouteMapOverride:()=>io,TableBatchActions:()=>cS,getAsyncLifecycle:()=>l4,subscribeOpenmrsEvent:()=>iv,PasswordIcon:()=>dN,Assessment2Pictogram:()=>DP,CloseIcon:()=>c3,setupRouteMapOverrides:()=>il,useFeatureFlag:()=>uS,reset:()=>s0,ConceptDictionaryPictogram:()=>DN,LabOrderIcon:()=>dv,VisitMode:()=>i_,isTranslationInspectorRecording:()=>aU,useLocations:()=>uK,getLifecycle:()=>l1,formatDatetime:()=>wD,getVisitsForPatient:()=>iN,formatPartialDate:()=>wv,CustomOverflowMenu:()=>cN,LocationIcon:()=>dw,GroupIcon:()=>dc,createUseStore:()=>lE,VisitStatus:()=>iS,getSessionLocation:()=>op,getCurrentImportMap:()=>oq,usePatient:()=>uQ,useRenderableExtensions:()=>u4,getOpenedWindowIndexByWorkspace:()=>le,setLeftNav:()=>s4,clearHistory:()=>a4,clearConfigErrors:()=>nh,formatTime:()=>wx,isDevEnabled:()=>oD,CohortsPictogram:()=>DO,closeWorkspaceGroup2:()=>Ev,getCurrentRouteMap:()=>o7,ConfigurableLink:()=>lg,sessionStore:()=>on,setSessionLocale:()=>oh,subscribeSnackbarShown:()=>C,getLoggedInUser:()=>om,GenderMaleIcon:()=>di,getExtensionSlotConfigFromStore:()=>tR,evaluateAsNumberAsync:()=>iH,getImportMapDefaultMap:()=>oj,unregisterExtensionRendering:()=>sw,implementerToolsConfigStore:()=>tW,Type:()=>tg,InPatientPictogram:()=>DV,cleanupObsoleteFeatureFlags:()=>so,getAttachmentsUrl:()=>im,showSnackbar:()=>Ei,PatientBannerActionsMenu:()=>Dy,PatientSearchPictogram:()=>DZ,DocumentAttachmentIcon:()=>c8,Snackbar:()=>Et,CardiologyPictogram:()=>DR,ImageMedicalIcon:()=>dp,ActionableNotificationComponent:()=>xK,DiagnosisTags:()=>xx,openChildWorkspaceInWindow:()=>EC,iconIds:()=>cA,PatientsPictogram:()=>DG,interpolateUrl:()=>aG,setupHistory:()=>aQ,subscribeToastShown:()=>S,detachAll:()=>sY,convertToLocaleCalendar:()=>wE,DocumentIcon:()=>c9,configInternalStore:()=>t_,ActionMenuButton2:()=>E9,setupDynamicOfflineDataHandler:()=>_x,makeUrl:()=>a7,oneOf:()=>nD,selectPreferredName:()=>Do,MobileCheckIcon:()=>dC,createErrorHandler:()=>T,parseDate:()=>wm,getAttachmentByUuid:()=>ic,LeftNavMenu:()=>xP,getExtensionRegistration:()=>sz,dispatchToastShown:()=>D,ShoppingCartAddItemIcon:()=>mo,ReferralOrderIcon:()=>dL,ReportIcon:()=>dB,getImportMapNextPageMap:()=>oI,registerExtension:()=>sK,setupOfflineSync:()=>_w,DownloadIcon:()=>c7,useConnectivity:()=>_C,provide:()=>t6,ShoppingCartArrowDownIcon:()=>dZ,featureFlagsStore:()=>sr,jsep:()=>iM,GeriatricsPictogram:()=>DF,SearchIcon:()=>dW,reportError:()=>P,slugify:()=>oZ,isOmrsDateToday:()=>wu,getExtensionStore:()=>sx,BloodBankPictogram:()=>DT,TriagePictogram:()=>D3,Workspace2:()=>Ej,refetchCurrentUser:()=>ou,CheckmarkOutlineIcon:()=>cX,registerExtensionSlot:()=>sQ,AllergiesIcon:()=>mt,ArrowDownIcon:()=>cL,useOpenmrsInfinite:()=>uM,getExtensionConfigFromExtensionSlotStore:()=>t$,OpenmrsDatePicker:()=>xt,getExtensionConfigFromStore:()=>tN,getDynamicOfflineDataEntries:()=>_D,getLocaleDisplayName:()=>bj,messageOmrsServiceWorker:()=>__,navigate:()=>aq,launchWorkspace2:()=>Eb,getGroupByWindowName:()=>s7,CustomOverflowMenuItem:()=>c$,isUrl:()=>nx,CaretDownIcon:()=>cz,ArrowLeftIcon:()=>cF,FacilityPictogram:()=>DL,ViewOffIcon:()=>d8,updateInternalExtensionStore:()=>sf,dispatchActionableNotificationShown:()=>w,resetRouteMapOverrides:()=>ii,formatDurationBetween:()=>wO,defaultVisitCustomRepresentation:()=>iC,getBreadcrumbsFor:()=>nO,useOpenmrsPagination:()=>uk,Pagination:()=>De,CheckmarkFilledIcon:()=>cJ,clearCurrentUser:()=>oc,showModal:()=>xU,ChevronUpIcon:()=>c2,saveVisit:()=>iR,useAttachments:()=>uu,Pictogram:()=>D7,useExtensionSlot:()=>lT,ChevronDownIcon:()=>c0,OpenmrsDateRangePicker:()=>xn,deleteAttachmentPermanently:()=>ih,getVisitTypes:()=>iE,OverflowMenuHorizontalIcon:()=>dR,EventScheduleIcon:()=>dn,getSessionStore:()=>os,ProcedureOrderIcon:()=>dj,preloadImport:()=>oY,registerWorkspaceWindows2:()=>ln,useOnVisible:()=>uG,setSessionLocation:()=>of,userHasAccess:()=>od,ChartAverageIcon:()=>cY,getFeatureFlag:()=>si,UserAvatarIcon:()=>d3,renderExtension:()=>ld,useFhirInfinite:()=>uF,toVisitTypeObject:()=>ix,useSession:()=>u2,EmergencyDepartmentPictogram:()=>DI,Notification:()=>xH,dispatchSnackbarShown:()=>x,formatDate:()=>wb,workspace2StoreActions:()=>ET,SwitcherIcon:()=>dz,esmStyleGuideSchema:()=>cD,getImportMapDisabledOverrides:()=>oF,useAssignedExtensionIds:()=>us,CaretRightIcon:()=>cZ,evaluateAsType:()=>iz,PageHeader:()=>x8,TranslateIcon:()=>d0,setUserProperties:()=>og,MovementIcon:()=>dT,renderInlineNotifications:()=>xQ,subscribePrecacheStaticDependencies:()=>_S,PaymentsDeskPictogram:()=>DY,usePrimaryIdentifierCode:()=>u0,useLayoutType:()=>uV,getCurrentUser:()=>oi,closeWorkspaceInWindow:()=>ES,XrayPictogram:()=>D6,CaretUpIcon:()=>cG,renderActionableNotifications:()=>x1,OpenmrsAppContext:()=>un,setupModals:()=>xV,getDefaultsFromConfigSchema:()=>function e(t){let n={};for(let r of Object.keys(t))if(_f(t[r])&&t[r].hasOwnProperty("_default"))n[r]=t[r]._default;else{if(r.startsWith("_"))continue;_f(t[r])?n[r]=e(t[r]):n[r]=t[r]}return n},subscribeTo:()=>z,recordConfigDerivationError:()=>tV,useAbortController:()=>ua,Extension:()=>ly,getFhirServerPaginationHandlers:()=>uO,useConnectedExtensions:()=>uh,registerApp:()=>cd,HospitalBedIcon:()=>dm,useExtensionInternalStore:()=>uD,configExtensionStore:()=>tC,getSynchronizationItems:()=>_E,getExtensionSlotsConfigStore:()=>tP,registerExtensionRendering:()=>sb,RenderIfValueIsTruthy:()=>ur,registerFeatureFlag:()=>sa,useFhirFetchAll:()=>uL,restBaseUrl:()=>a5,CalendarHeatMapIcon:()=>cW,isImportMapOverrideDisabled:()=>oB,resetConfigSystem:()=>ng,getExtensionInternalStore:()=>sm,registerGlobalStore:()=>W,evaluateAsBoolean:()=>iV,PatientBannerPatientInfo:()=>Dh,addRouteMapOverride:()=>ia,getDefaultCalendar:()=>wg,SettingsIcon:()=>dH,DrugOrderIcon:()=>de,ProgramsIcon:()=>dI,useAssignedExtensions:()=>lP,CloseFilledIcon:()=>c6,canAccessStorage:()=>_p,registerDefaultCalendar:()=>wh,TreeViewAltIcon:()=>d4,OverflowMenuVerticalIcon:()=>dO,clearConfigDerivationError:()=>tU,getConfigStore:()=>tk,InformationSquareIcon:()=>dg,EmptyCard:()=>xS,ChevronLeftIcon:()=>c1,RadiologyIcon:()=>ma,useCandidateExtensions:()=>ul,renderToasts:()=>Ed,isDesktop:()=>uU,integrateBreakpoints:()=>cg,RegistrationPictogram:()=>DX,CardHeader:()=>cb,getExtensionRegistrationFrom:()=>sH,InformationIcon:()=>df,SystemAdministrationPictogram:()=>D4,TrashCanIcon:()=>d1,useShallowStableValue:()=>lv,PatientDocumentsPictogram:()=>DK,useOpenmrsSWR:()=>uY,Assessment1Pictogram:()=>Dk,finishRegisteringAllApps:()=>cm,importDynamic:()=>oG,useFhirPagination:()=>uR,useVisitContextStore:()=>ct,ArrowUpIcon:()=>cV,matchTranslations:()=>aH,showActionableNotification:()=>x4,useForceUpdate:()=>uC,useVisit:()=>cn,PatientBannerPatientIdentifiers:()=>Dd,TransferPictogram:()=>D2,usePagination:()=>uq,Breakpoint:()=>cp,PatientBannerToggleContactDetailsButton:()=>E8,CloseOutlineIcon:()=>c5,ObstetricsPictogram:()=>Dz,parseDateInput:()=>wS,ReportsPictogram:()=>DQ,getConfig:()=>t9,attach:()=>sZ,getLocale:()=>bI,isUrlWithTemplateParameters:()=>nw,useEmrConfiguration:()=>uw,useLeftNav:()=>uW,ToolsIcon:()=>dQ,ErrorState:()=>xC,detach:()=>sG,setCurrentVisit:()=>iT,ConditionsIcon:()=>mr,SaveIcon:()=>dU,useConfig:()=>uf,validator:()=>ty,CalendarIcon:()=>cH,getHistory:()=>a0,StickyNoteAddIcon:()=>dG,useWorkspace2Store:()=>ER,getPatientName:()=>Dt,getVisitStore:()=>iP,getCoreTranslation:()=>aZ,registerModuleWithConfigSystem:()=>t1,updateOpenedWorkspaceInWindow:()=>Ek,registerModuleLoad:()=>t4,getBreadcrumbs:()=>nP,extractVariableNames:()=>se,translateFrom:()=>aK,useStoreWithActions:()=>lD,EditIcon:()=>dt,getCandidateExtensions:()=>sX,shallowEqual:()=>O,subscribeNotificationShown:()=>E,MaximizeIcon:()=>dD,promptForClosingWorkspaces:()=>EE,WarningIcon:()=>me,fhirBaseUrl:()=>a9,matchLocale:()=>_m,usePatientPhoto:()=>Dw,registerBreadcrumb:()=>nC,EventsIcon:()=>dr,createGlobalStore:()=>V,subscribeToFeatureFlag:()=>ss,useExtensionStore:()=>u_,createAttachment:()=>ip,useLeftNavStore:()=>uH,TableIcon:()=>dJ,Icon:()=>ms,InformationFilledIcon:()=>dh,getCurrentPageMap:()=>oA,LaboratoryPictogram:()=>DU,temporaryConfigStore:()=>tS,toDateObjectStrict:()=>wc,defineConfigSchema:()=>t0,filterBreadcrumbs:()=>nR,invalidateImplementerToolsConfig:()=>tF,PatientBannerContactDetails:()=>_a,getAssignedExtensions:()=>sJ,promptForClosingWorkspacesInWindow:()=>E_,PatientPhoto:()=>DE,MaterialOrderIcon:()=>dx,MicroscopeIcon:()=>dS,visitTypesUrl:()=>iD,getOpenedWindowWidth:()=>E$,scheduleRecomputation:()=>sC,PharmacyPictogram:()=>Dq,AttachmentIcon:()=>mn,MoneyIcon:()=>dk,getAttachments:()=>id,PageHeaderContent:()=>x7,MedicationIcon:()=>dE,PrinterIcon:()=>dA,PatientListsPictogram:()=>D9,useAppContext:()=>uo,isOpenmrsRoutes:()=>oQ,AppointmentsAltPictogram:()=>DC,GenericOrderTypeIcon:()=>du,batchExtensionUpdates:()=>s_,useExtensionSlotStore:()=>lC,ViewIcon:()=>d7,formattedName:()=>Da,sessionEndpoint:()=>a8,duration:()=>wT,resetImportMapOverrides:()=>oW,TableOfContentsIcon:()=>dq,CaretLeftIcon:()=>cK,getTranslationOverrides:()=>t8,isVersionSatisfied:()=>_y,EmptyCardIllustration:()=>x_,PenIcon:()=>dM,recordTranslationSighting:()=>aW,validators:()=>nE,setupImportMapOverrides:()=>oK,showToast:()=>Em,useDefineAppContext:()=>ut,verifyTotpCode:()=>oy,getGlobalStore:()=>H,useOnClickOutside:()=>uZ,getWindowByWorkspaceName:()=>s8,ArrowRightIcon:()=>cB,disableTranslationInspector:()=>aV,loadLifeCycles:()=>ci,registerBreadcrumbs:()=>nk,MotherIcon:()=>dP,extensionNamespaceSeparator:()=>aI,fetchCurrentPatient:()=>ig,Toast:()=>Es,MessageQueueIcon:()=>d_,TwoFactorAuthenticationIcon:()=>d2,Pharmacy2Pictogram:()=>DJ,goBackInHistory:()=>a1,GroupAccessIcon:()=>dd,getExtensionRenderingsStore:()=>sp,setImplementerToolsConfigRecomputer:()=>tL,getAsyncExtensionLifecycle:()=>l3,setupApiModule:()=>o_,renderLoadingSpinner:()=>_o,showNotification:()=>x0,getModalRegistration:()=>s5,ListCheckedIcon:()=>db,ResponsiveWrapper:()=>Ee,GynaecologyPictogram:()=>DB,ShoppingCartIcon:()=>dK,getRouteMapNextPageMap:()=>it,MetadataExportPictogram:()=>DH,updateVisit:()=>iO,backendDependencies:()=>oE,MaybePictogram:()=>D8,createParcelMounter:()=>lu,openmrsFetch:()=>oe,useStore:()=>lx,isOpenmrsAppRoutes:()=>oX,ExportedWorkspace:()=>E1,DentistryPictogram:()=>DA,HomePictogram:()=>D5,ServiceQueuesPictogram:()=>D0,createExportedWorkspaceWindow:()=>EA,setFeatureFlag:()=>sl,toLanguageTag:()=>bA,DigitalTrustPictogram:()=>Dj,NumericObservation:()=>x5,attachmentUrl:()=>iu,interpolateString:()=>aY,inRange:()=>nb,useExtensionSlotMeta:()=>uE,AppointmentsPictogram:()=>DS,renderSnackbars:()=>Eo,getRegisteredWorkspace2Names:()=>EN,logout:()=>ov,toLocationObject:()=>ib,ChartLineIcon:()=>cq,UserHasAccess:()=>u3,evaluateAsBooleanAsync:()=>iU,createDashboard:()=>mu,getLocations:()=>iw,useExtensionContext:()=>ux,getExtensionsConfigStore:()=>tO,getRouteMapDefaultMap:()=>ie,age:()=>Ds,isOmrsDateStrict:()=>wl,registerWorkspaceGroups2:()=>lt,usePaginationInfo:()=>uJ,evaluateAsync:()=>iB,useOpenmrsFetchAll:()=>uj,removeImportMapOverride:()=>oU,useVisitTypes:()=>ca,ageAsDuration:()=>Di,getExtensionNameFromId:()=>sW,DataEntryPictogram:()=>DM,renderParcel:()=>ll,ResetIcon:()=>dV,RenewIcon:()=>dF,useWorkspace2Context:()=>EO,subscribeActionableNotificationShown:()=>_,ErrorCard:()=>xk,GenderFemaleIcon:()=>da,enableImportMapOverride:()=>oH,enableTranslationInspector:()=>aB,retry:()=>_v,ComponentContext:()=>lf,ExtensionSlot:()=>lO,unsetLeftNav:()=>s2,addImportMapOverride:()=>oV,MaybeIcon:()=>mi,useCustomOverflowMenu:()=>cO,PedestrianFamilyIcon:()=>d$,CtScanPictogram:()=>D$,dispatchNotificationShown:()=>b,leftNavStore:()=>s1,OpenmrsFetchError:()=>ot,UserFollowIcon:()=>d6,launchWorkspaceGroup2:()=>Ey,ChevronRightIcon:()=>c4,UserXrayIcon:()=>d5,GenderOtherIcon:()=>ds,formatDuration:()=>w_,toOmrsIsoString:()=>wd,Labs2Pictogram:()=>DW,workspace2Store:()=>s9,setUserLanguage:()=>ol,useBodyScrollLock:()=>uc,SyringeIcon:()=>dY,LocationPicker:()=>xT,useDebounce:()=>ug,TimeIcon:()=>dX,getExtensionSlotConfig:()=>tT,AddIcon:()=>cI,getRouteMapOverrideMap:()=>ir,processConfig:()=>t7,InventoryManagementIcon:()=>dy,registerWorkspaces2:()=>lr,UserIcon:()=>d9,formatPatientName:()=>Dr,fireOpenmrsEvent:()=>iy,registerModal:()=>s6,registerTranslationNamespace:()=>t2,displayName:()=>Dn,createLocalStore:()=>U,evaluate:()=>iF,defineExtensionConfigSchema:()=>t3,getSyncLifecycle:()=>l2,renderWorkspaceWindowsAndMenu:()=>_u,evaluateAsTypeAsync:()=>iK});let h="openmrs:notification-shown",g="openmrs:actionable-notification-shown",y="openmrs:toast-shown",v="openmrs:snack-bar-shown";function b(e){window.dispatchEvent(new CustomEvent(h,{detail:e}))}function w(e){window.dispatchEvent(new CustomEvent(g,{detail:e}))}function x(e){window.dispatchEvent(new CustomEvent(v,{detail:e}))}function D(e){window.dispatchEvent(new CustomEvent(y,{detail:e}))}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 C(e){let t=t=>e(t.detail);return window.addEventListener(v,t),()=>window.removeEventListener(v,t)}function k(e,t){let{message:n}=R(e);return"string"==typeof n&&n?n:t}function P(e){let t=R(e);setTimeout(()=>{throw t})}function T(){let e=Error();return t=>{let n=R(t);n.stack+=`
|
|
2
2
|
Async stacktrace:
|
|
3
3
|
${e.stack}`,P(t)}}function R(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 O(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),D({description:k(a,"Oops! An unexpected error occurred."),kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(e){console.error("Unhandled rejection: ",e.reason),D({description:k(e.reason,"Oops! An unhandled promise rejection occurred."),kind:"error",title:"Error"})};let $=e=>t=>{try{let n=e(t);if(n instanceof Promise)return n;return{then:e=>$(e)(n),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>$(t)(e)}}},M=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},A=e=>e?M(e):M;function j(){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 I={},L=Symbol.for("openmrs.esm-state.instanceCount"),F=globalThis,B=(F[L]??0)+1;function V(e,t,n="none"){let r=I[e];if(r)return r.active?j()||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=K(e,t,n);return I[e]={value:r,active:!0},r}}function U(e){return A()(()=>e)}function W(e,t){let n=I[e];return n?(n.active?j()||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):(I[e]={value:t,active:!0},t)}function H(e,t,n="none"){let r=I[e];if(!r){let r=K(e,t??{},n);return I[e]={value:r,active:!1},r}return r.value}function z(...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);O(i,t)||(i=t,a(t))})}function K(e,t,n){return"sessionStorage"===n?A()(((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=$(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.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 $(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)})):A()(()=>t)}F[L]=B,B>1&&!j()&&console.error(`Detected ${B} 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=I)},1e3);let Z=function(e){return void 0===e};var G,Y,q,J,X,Q,ee,et,en,er,ea,eo,ei=n(7361),es=n(4878),el=n(7313),eu=Object.prototype,ec=Function.prototype.toString,ed=eu.hasOwnProperty,em=ec.call(Object);let ep=function(e){if(!(0,el.A)(e)||"[object Object]"!=(0,ei.A)(e))return!1;var t=(0,es.A)(e);if(null===t)return!0;var n=ed.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&ec.call(n)==em};var ef=n(1050),eh=n(9271),eg=n(6979);let ey=function(e,t,n){(void 0===n||(0,eg.A)(e[t],n))&&(void 0!==n||t in e)||(0,eh.A)(e,t,n)},ev=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 eb=n(521),ew=n(5246),ex=n(84),eD=n(2458),eE=n(6770),e_=n(6956),eS=n(1475),eC=n(1917),ek=n(405),eP=n(7942),eT=n(480);let eR=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};var eO=n(8078),eN=n(3513);let e$=function(e,t,n,r,a,o,i){var s=eR(e,n),l=eR(t,n),u=i.get(l);if(u)return void ey(e,n,u);var c=o?o(s,l,n+"",e,t,i):void 0,d=void 0===c;if(d){var m=(0,e_.A)(l),p=!m&&(0,eC.A)(l),f=!m&&!p&&(0,eT.A)(l);(c=l,m||p||f)?(0,e_.A)(s)?c=s:(0,el.A)(s)&&(0,eS.A)(s)?c=(0,ex.A)(s):p?(d=!1,c=(0,eb.A)(l,!0)):f?(d=!1,c=(0,ew.A)(l,!0)):c=[]:ep(l)||(0,eE.A)(l)?(c=s,(0,eE.A)(s))?c=(0,eO.A)(s,(0,eN.A)(s)):(!(0,eP.A)(s)||(0,ek.A)(s))&&(c=(0,eD.A)(l)):d=!1}d&&(i.set(l,c),a(c,l,r,o,i),i.delete(l)),ey(e,n,c)},eM=function e(t,n,r,a,o){t!==n&&ev(n,function(i,s){if(o||(o=new ef.A),(0,eP.A)(i))e$(t,n,s,r,e,a,o);else{var l=a?a(eR(t,s),i,s+"",t,n,o):void 0;void 0===l&&(l=i),ey(t,s,l)}},eN.A)},eA=function(e){return e},ej=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 eI=Math.max;let eL=function(e,t,n){return t=eI(void 0===t?e.length-1:t,0),function(){for(var r=arguments,a=-1,o=eI(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),ej(e,this,s)}};var eF=n(1758),eB=eF.A?function(e,t){return(0,eF.A)(e,"toString",{configurable:!0,enumerable:!1,value:function(){return t},writable:!0})}:eA,eV=Date.now,eU=(G=0,Y=0,function(){var e=eV(),t=16-(e-Y);if(Y=e,t>0){if(++G>=800)return arguments[0]}else G=0;return eB.apply(void 0,arguments)}),eW=n(5378);let eH=function(e,t,n){if(!(0,eP.A)(n))return!1;var r=typeof t;return("number"==r?!!((0,eS.A)(n)&&(0,eW.A)(t,n.length)):"string"==r&&t in n)&&(0,eg.A)(n[t],e)},ez=function(e){var t;return eU(eL(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&&eH(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,eA),t+"")};var eK=ez(function(e,t,n,r){eM(e,t,n,r)}),eZ=n(7685);let eG=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 eY=n(1736),eq=n(4089),eJ=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,eX=/^\w*$/;let eQ=function(e,t){if((0,e_.A)(e))return!1;var n=typeof e;return!!("number"==n||"symbol"==n||"boolean"==n||null==e||(0,eq.A)(e))||eX.test(e)||!eJ.test(e)||null!=t&&e in Object(t)};var e0=n(257);function e1(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(e1.Cache||e0.A),n}e1.Cache=e0.A;var e4=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,e2=/\\(\\)?/g,e3=(J=(q=e1(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(e4,function(e,n,r,a){t.push(r?a.replace(e2,"$1"):n||e)}),t},function(e){return 500===J.size&&J.clear(),e})).cache,q),e6=n(3516),e5=1/0,e9=e6.A?e6.A.prototype:void 0,e8=e9?e9.toString:void 0;let e7=function e(t){if("string"==typeof t)return t;if((0,e_.A)(t))return eG(t,e)+"";if((0,eq.A)(t))return e8?e8.call(t):"";var n=t+"";return"0"==n&&1/t==-e5?"-0":n},te=function(e,t){return(0,e_.A)(e)?e:eQ(e,t)?[e]:e3(null==e?"":e7(e))},tt=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};var tn=1/0;let tr=function(e){if("string"==typeof e||(0,eq.A)(e))return e;var t=e+"";return"0"==t&&1/e==-tn?"-0":t},ta=function(e,t){t=te(t,e);for(var n=0,r=t.length;null!=e&&n<r;)e=e[tr(t[n++])];return n&&n==r?e:void 0},to=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 ti=Object.prototype.hasOwnProperty;let ts=function(e,t){t=te(t,e);var n,r=-1,a=t.length;if(!a)return!0;for(;++r<a;){var o=tr(t[r]);if("__proto__"===o&&!ti.call(e,"__proto__")||("constructor"===o||"prototype"===o)&&r<a-1)return!1}var i=(n=t).length<2?e:ta(e,to(n,0,-1));return null==i||delete i[tr(tt(t))]},tl=function(e){return ep(e)?void 0:e};var tu=n(3271),tc=e6.A?e6.A.isConcatSpreadable:void 0;let td=function(e){return(0,e_.A)(e)||(0,eE.A)(e)||!!(tc&&e&&e[tc])},tm=function e(t,n,r,a,o){var i=-1,s=t.length;for(r||(r=td),o||(o=[]);++i<s;){var l=t[i];n>0&&r(l)?n>1?e(l,n-1,r,a,o):(0,tu.A)(o,l):a||(o[o.length]=l)}return o};var tp=n(7096),tf=eU(eL(X=function(e,t){var n={};if(null==e)return n;var r=!1;t=eG(t,function(t){return t=te(t,e),r||(r=t.length>1),t}),(0,eO.A)(e,(0,tp.A)(e),n),r&&(n=(0,eY.A)(n,7,tl));for(var a=t.length;a--;)ts(n,t[a]);return n},void 0,function(e){return(null==e?0:e.length)?tm(e,1):[]}),X+""),th=n(3322),tg=((Q={}).Array="Array",Q.Boolean="Boolean",Q.ConceptUuid="ConceptUuid",Q.Number="Number",Q.Object="Object",Q.String="String",Q.UUID="UUID",Q.PersonAttributeTypeUuid="PersonAttributeTypeUuid",Q.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid",Q);function ty(e,t){return n=>{if(!e(n))if("function"==typeof t)return t(n);else return t}}let tv=ty(e=>Array.isArray(e),"must be an array"),tb=ty(e=>"boolean"==typeof e,"must be a boolean"),tw=ty(e=>"number"==typeof e,"must be a number"),tx=ty(e=>"string"==typeof e,"must be a string"),tD=ty(e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,"must be an object (not an array or null)"),tE=ty(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"),t_=V("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{},moduleStarted:{}}),tS=V("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});tS.subscribe(e=>{var t=e.config;try{localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}catch(e){}});let tC=V("config-store-of-extension-state",{mountedExtensions:[]});function tk(e){return H(`config-module-${e}`,{config:null,loaded:!1,translationOverridesLoaded:!1})}function tP(){return H("config-extension-slots",{slots:{}})}function tT(e){return tR(tP().getState(),e)}function tR(e,t){return e.slots[t]??{loaded:!1,config:{}}}function tO(){return H("config-extensions",{configs:{}})}function tN(e,t,n){return e.configs[t]?.[n]??{loaded:!1,config:null}}function t$(e,t,n){return e.configure?.[n]??null}let tM=A()(()=>({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=W("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 eK({},e,t,tH)}let tK=[],tZ=new Set,tG=null,tY=new WeakMap;function tq(){r=()=>{var e,t;let n,r;return e=t_.getState(),t=tS.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=nn.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"}:np(t)?Object.keys(t).reduce((n,r)=>(n[r]=e(t[r]),n),{}):{}}((0,th.A)(r));nn.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=nt.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 np(t)?Object.keys(t).reduce((r,a)=>(r[a]=e(t[a],n),r),{}):{_value:t,_source:n}}(n,e)))}),nt.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))},tJ(),tK.push(t_.subscribe(tJ),tS.subscribe(tJ),tC.subscribe(tJ))}function tJ(){tU();try{!function(){let e=t_.getState(),t=tS.getState(),n=tC.getState();if(tG?.configState===e&&tG.tempConfigState===t)return tQ(e,n,t,tG.slotConfigs,!0);!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=tX.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=no(e,nr(t,n));ns(r,a,e);let o=nd(r,a);return nl(r,o,e),delete o.extensionSlots,o}(n,e,t):function(e,t,n){let r=nd(nv,no(e,nr(t,n)));return nl(nv,r,e),delete r.extensionSlots,r}(n,e,t);r={translationOverridesLoaded:!0,loaded:i,config:a},tX.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=ni(nr(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&&nf(r,a+`' contains invalid keys '${o.join("', '")}'`),!e.add||Array.isArray(e.add)&&e.add.every(e=>"string"==typeof e)||nf(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)||nf(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)||nf(r,a+".order' is invalid. Must be an array of strings (extension IDs)"),e.configure&&!np(e.configure)&&nf(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]:ni(t);o[e].configure!==n&&(o[e]={...o[e],configure:n})}return o}(e,t);(function(e){let t=tP(),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),tQ(e,n,t,r,!1),tG={configState:e,tempConfigState:t,slotConfigs:r},tF()}()}catch(e){tV(e),console.error("Failed to recompute the configuration",e)}}tq();let tX=new Map;function tQ(e,t,n,r,a){let o=tO(),i=o.getState().configs,s={},l=!1,u=0;for(let o of t.mountedExtensions){let t,c=i[o.slotName]?.[o.extensionId],d=c&&tY.get(c);if(a&&c?.loaded&&d?.slotModuleName===o.slotModuleName&&d.extensionModuleName===o.extensionModuleName)t=c;else{let a=function(e,t,n,r,a,o,i){let s=function(e){let[t]=e.split("#");return t}(r),l=a.schemas[s],u=!!a.moduleStarted[t],c=JSON.stringify([n,r,e,t]),d=ne.get(c);if(d&&d.extensionSchema===l&&d.extensionModuleSchema===a.schemas[t]&&d.extensionModuleStarted===u&&d.providedConfigs===a.providedConfigs&&d.temporaryConfig===o.config)return d.config;let m=l?s:t,p=nr(a,o),f=i?.configure?.[r]??{},h=no(e,p),g=h?.extensionSlots?.[n]?.configure?.[r]??{},y=ni([no(m,p),f,g]),v=l??a.schemas[t];(l||u)&&ns(v,y,m);let b=nd(v,y);return nl(v,b,m),delete b.extensionSlots,ne.set(c,{extensionSchema:l,extensionModuleSchema:a.schemas[t],extensionModuleStarted:u,providedConfigs:a.providedConfigs,temporaryConfig:o.config,config:b}),b}(o.slotModuleName,o.extensionModuleName,o.slotName,o.extensionId,e,n,r[o.slotName]);t=c?.loaded&&(0,eZ.A)(c.config,a)?c:{config:a,loaded:!0}}tY.set(t,o),t!==c&&(l=!0),s[o.slotName]||(s[o.slotName]={}),s[o.slotName][o.extensionId]=t,u++}for(let[e,t]of Object.entries(s)){let n=i[e];n&&Object.keys(n).length===Object.keys(t).length&&Object.entries(t).every(([e,t])=>n[e]===t)&&(s[e]=n)}l||(l=Object.keys(i).length!==Object.keys(s).length||Object.values(i).reduce((e,t)=>e+Object.keys(t).length,0)!==u),l&&o.setState({configs:s})}function t0(e,t){na(e,t);let n=tz(t,nv);t_.setState(t=>({...t,schemas:{...t.schemas,[e]:n},moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function t1(e){t_.setState(t=>({...t,schemas:{...t.schemas,[e]:nv}}))}function t4(e){t_.setState(t=>({...t,moduleLoaded:{...t.moduleLoaded,[e]:!0},moduleStarted:{...t.moduleStarted,[e]:!0}}))}function t2(e){t_.setState(t=>({...t,schemas:{...t.schemas,[e]:ny}}))}function t3(e,t){na(e,t);let n=tz(t,nv);t_.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.`),t_.setState(t=>({...t,schemas:{...t.schemas,[e]:n}}))}function t6(e,t="provided"){t_.setState(n=>({...n,providedConfigs:[...n.providedConfigs,{source:t,config:e}]}))}function t5(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 t9(e){return t5(tk(e),e=>!!(e.loaded&&e.config),e=>tf(e.config,["Display conditions","Translation overrides"]))}function t8(e,t,n){let r=[e in t_.getState().schemas?t5(tk(e),e=>!!(e.translationOverridesLoaded&&e.config),e=>e.config["Translation overrides"]??{}):Promise.resolve({})];if(t&&n){let e=tN(tO().getState(),t,n),a=e.loaded&&e.config?e.config["Translation overrides"]??{}:{};r.push(Promise.resolve(a))}return Promise.all(r)}function t7(e,t,n){ns(e,t,n);let r=nd(e,t);return nl(e,r,n),r}let ne=new Map,nt=new Map,nn=new Map;function nr(e,t){return[...e.providedConfigs.map(e=>e.config),t.config]}function na(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}`),!np(i)){console.error(`${e} has bad config schema definition for key '${o}'. ${r}`);continue}i.hasOwnProperty("_default")||na(e,i,o);let s=i._elements;if(nm(s)&&na(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,31 +9,31 @@ If you're the maintainer: the allowed types are ${Object.values(tg).join(", ")}.
|
|
|
9
9
|
If you're the maintainer: all config elements must have a default. Received ${JSON.stringify(i)}`),s&&l&&![tg.Array,tg.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 no(e,t){return ni(t.map(({[e]:t})=>t).filter(e=>!!e))}function ni(e){return e.reduce((e,t)=>eK(e,t,tH),{})}function ns(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)&&nf(o,`Unknown config key '${o}' provided. Ignoring.`);continue}(function e(t,n,r){nu(r,t._type,n),np(n)?t._type===tg.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")||ns(t,n,r):t._type===tg.Array&&function(t,n,r){if(nu(r,tg.Array,n)){if(nm(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++)nu(`${r}[${e}]`,t._elements?._type,n[e])}}(t,n,r)})(i,a,o)}}function nl(e,t,n=""){if(e){if(t!==e._default&&nc(n,e._validators,t),np(t))for(let r of Object.keys(t)){let a=t[r],o=n+"."+r,i=e[r];e._type===tg.Object&&e._elements?nl(e._elements,a,o):nl(i,a,o)}else if(Array.isArray(t)&&e._elements)for(let r=0;r<t.length;r++)nl(e._elements,t[r],`${n}[${r}]`)}}function nu(e,t,n){return!t||nc(e,[{Array:tv,Boolean:tb,ConceptUuid:tE,Number:tw,Object:tD,String:tx,UUID:tE,PersonAttributeTypeUuid:tE,PatientIdentifierTypeUuid:tE}[t]],n)}function nc(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}`;nf(e,a),r=!1}}}catch(t){console.error(`Skipping invalid validator at "${e}". Encountered error
|
|
12
|
-
${t}`)}return r}let nd=(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&&nm(e)){if(a._type===tg.Array&&Array.isArray(r)){let a=r.map(t=>nd(e,t));n[t]=a}else if(a._type===tg.Object)for(let t of Object.keys(r))r[t]=nd(e,r[t])}}else if(np(a)){let e=r??{};np(e)&&(n[t]=nd(a,e))}}return n};function nm(e){return!!e&&Object.keys(e).filter(e=>!["_default","_validators"].includes(e)).length>0}function np(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}function nf(e,t){let n=`${e}:::${t}`;tZ.has(n)||(console.error(t),tZ.add(n))}function nh(e){e?tZ.forEach(t=>{t.startsWith(e)&&tZ.delete(t)}):tZ.clear()}function ng(){tK.forEach(e=>e()),tK.length=0,tX.clear(),ne.clear(),nn.clear(),nt.clear(),tG=null,tY=new WeakMap,tq()}let ny={"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:tg.Object,_default:{},_validators:[ty(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(", ")}.`})]}},nv={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:tg.Array,_default:[]},expression:{_description:"The expression that determines whether the extension is displayed",_type:tg.String,_default:void 0}},...ny},nb=(e,t)=>ty(n=>e<=n&&n<=t,`must be between ${e} and ${t}`),nw=e=>{let t=e.concat(["openmrsBase","openmrsSpaBase"]);return ty(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(", "))},nx=nw([]),nD=e=>ty(t=>e.includes(t),`Must be one of the following: '${e.join("', '")}'.`),nE={inRange:nb,isUrl:nx,isUrlWithTemplateParameters:nw,oneOf:nD};var n_=n(2034);let nS=V("breadcrumbs",[]);function nC(e){return nk([e])}function nk(e){let t=[...nP(),...e.map(e=>({matcher:e.matcher instanceof RegExp?e.matcher:"string"==typeof e.matcher?(0,n_.pathToRegexp)(e.matcher).regexp:(0,n_.pathToRegexp)(e.path).regexp,settings:e}))];nS.setState(t,!0)}function nP(){return nS.getState()}function nT(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=nT(e,n.join("/"));if(t)return t}}(e,t)}function nR(e,t){if(e.length>0){let n=nT(e,t);if(n){let t=[n],r=nT(e,n.settings.parent);for(;void 0!==r;)t.push(r),r=nT(e,r.settings.parent);return t.reverse()}}return[]}function nO(e){return nR(nP(),e)}var nN=Object.freeze({__proto__:null,get start(){return r4},get ensureJQuerySupport(){return rO},get setBootstrapMaxTime(){return rm},get setMountMaxTime(){return rp},get setUnmountMaxTime(){return rf},get setUnloadMaxTime(){return rh},get registerApplication(){return rU},get unregisterApplication(){return rH},get getMountedApps(){return rL},get getAppStatus(){return rB},get unloadApplication(){return rz},get checkActivityFunctions(){return rW},get getAppNames(){return rF},get pathToActiveWhen(){return rG},get navigateToUrl(){return rD},get patchHistoryApi(){return rP},get triggerAppChange(){return rX},get addErrorHandler(){return nI},get removeErrorHandler(){return nL},get mountRootParcel(){return rs},get NOT_LOADED(){return nV},get LOADING_SOURCE_CODE(){return nU},get NOT_BOOTSTRAPPED(){return nW},get BOOTSTRAPPING(){return nH},get NOT_MOUNTED(){return nz},get MOUNTING(){return nK},get UPDATING(){return nG},get LOAD_ERROR(){return nJ},get MOUNTED(){return nZ},get UNLOADING(){return nq},get UNMOUNTING(){return nY},get SKIP_BECAUSE_BROKEN(){return nX}}),n$=("u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{}).CustomEvent,nM=!function(){try{var e=new n$("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}:n$;let nA=[];function nj(e,t,n){let r=nB(e,t,n);nA.length?nA.forEach(e=>e(r)):setTimeout(()=>{throw r})}function nI(e){if("function"!=typeof e)throw Error(nF(28,!1));nA.push(e)}function nL(e){if("function"!=typeof e)throw Error(nF(29,!1));let t=!1;return nA=nA.filter(n=>{let r=n===e;return t=t||r,!r}),t}function nF(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 nB(e,t,n){let r,a=`${n2(t)} '${n1(t)}' died in status ${t.status}: `;if(e instanceof Error){try{e.message=a+e.message}catch(e){}r=e}else{console.warn(nF(30,!1,t.status,n1(t)));try{r=Error(a+JSON.stringify(e))}catch(t){r=e}}return r.appOrParcelName=n1(t),t.status=n,r}let nV="NOT_LOADED",nU="LOADING_SOURCE_CODE",nW="NOT_BOOTSTRAPPED",nH="BOOTSTRAPPING",nz="NOT_MOUNTED",nK="MOUNTING",nZ="MOUNTED",nG="UPDATING",nY="UNMOUNTING",nq="UNLOADING",nJ="LOAD_ERROR",nX="SKIP_BECAUSE_BROKEN";function nQ(e){return e.status===nZ}function n0(e){try{return e.activeWhen(window.location)}catch(t){return nj(t,e,nX),!1}}function n1(e){return e.name}function n4(e){return!!e.unmountThisParcel}function n2(e){return n4(e)?"parcel":"application"}function n3(){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 n6(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return e[n];return null}function n5(e){return e&&("function"==typeof e||Array.isArray(e)&&!n6(e,e=>"function"!=typeof e))}function n9(e,t){let n=e[t]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[()=>Promise.resolve()]);let r=n2(e),a=n1(e);return function(e){return n.reduce((n,o,i)=>n.then(()=>{let n=o(e);return n8(n)?n:Promise.reject(nF(15,!1,r,a,t,i))}),Promise.resolve())}}function n8(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}let n7=[];function re(e,t){return Promise.resolve().then(()=>e.status!==nW?e:(e.status=nH,e.bootstrap?rg(e,"bootstrap").then(n).catch(n=>{if(t)throw nB(n,e,nX);return nj(n,e,nX),e}):Promise.resolve().then(n)));function n(){return e.status=nz,e}}function rt(e,t){return Promise.resolve().then(()=>{if(e.status!==nZ)return e;return e.status=nY,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 nB(n,e,nX);nj(n,e,nX)})).then(()=>e);function n(){return rg(e,"unmount").then(()=>{e.status=nz},n=>{if(t)throw nB(n,e,nX);nj(n,e,nX)})}})}let rn=!1,rr=!1;function ra(e,t){return Promise.resolve().then(()=>e.status!==nz?e:(rn||(window.dispatchEvent(new nM("single-spa:before-first-mount")),rn=!0),e.status=nK,rg(e,"mount").then(()=>(e.status=nZ,rr||(window.dispatchEvent(new nM("single-spa:first-mount")),rr=!0),e)).catch(n=>{return e.status=nZ,rt(e,!0).then(r,r);function r(){if(t)throw nB(n,e,nX);return nj(n,e,nX),e}})))}let ro=0,ri={parcels:{}};function rs(){return rl.apply(ri,arguments)}function rl(e,t){let n,r,a,o=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(nF(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(nF(3,!1,typeof e.name));let i=ro++,s=e.name||`parcel-${i}`;if("object"!=typeof t)throw Error(nF(4,!1,s,typeof t));if(!t.domElement)throw Error(nF(5,!1,s));let l="function"==typeof e,u=l?e:()=>Promise.resolve(e),c={id:i,parcels:{},status:l?nU:nW,customProps:t,parentName:n1(o),unmountThisParcel:()=>p.then(()=>{if(c.status!==nZ)throw Error(nF(6,!1,s,c.status));return rt(c,!0)}).then(e=>(c.parentName&&delete o.parcels[c.id],e)).then(e=>(r(e),e)).catch(e=>{throw c.status=nX,a(e),e})};o.parcels[i]=c;let d=u();if(!d||"function"!=typeof d.then)throw Error(nF(7,!1));let m=(d=d.then(e=>{if(!e)throw Error(nF(8,!1));if(s=e.name||`parcel-${i}`,Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!n5(e.bootstrap))throw Error(nF(9,!1,s));if(!n5(e.mount))throw Error(nF(10,!1,s));if(!n5(e.unmount))throw Error(nF(11,!1,s));if(e.update&&!n5(e.update))throw Error(nF(12,!1,s));let t=n9(e,"bootstrap"),r=n9(e,"mount"),a=n9(e,"unmount");c.status=nW,c.name=s,c.bootstrap=t,c.mount=r,c.unmount=a,c.timeouts=ry(e.timeouts),e.update&&(c.update=n9(e,"update"),n.update=function(e){return c.customProps=e,ru(Promise.resolve().then(()=>{if(c.status!==nZ)throw Error(nF(32,!1,n1(c)));return c.status=nG,rg(c,"update").then(()=>(c.status=nZ,c)).catch(e=>{throw nB(e,c,nX)})}))})})).then(()=>re(c,!0)),p=m.then(()=>ra(c,!0)),f=new Promise((e,t)=>{r=e,a=t});return n={mount:()=>ru(Promise.resolve().then(()=>{if(c.status!==nz)throw Error(nF(13,!1,s,c.status));return o.parcels[i]=c,ra(c)})),unmount:()=>ru(c.unmountThisParcel()),getStatus:()=>c.status,loadPromise:ru(d),bootstrapPromise:ru(m),mountPromise:ru(p),unmountPromise:ru(f)}}function ru(e){return e.then(()=>null)}function rc(e){let t=n1(e),n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof n||null===n||Array.isArray(n))&&(n={},console.warn(nF(40,!1),t,n));let r=n3({},n,{name:t,mountParcel:rl.bind(e),singleSpa:nN});return n4(e)&&(r.unmountSelf=e.unmountThisParcel),r}let rd={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 rm(e,t,n){if("number"!=typeof e||e<=0)throw Error(nF(16,!1));rd.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function rp(e,t,n){if("number"!=typeof e||e<=0)throw Error(nF(17,!1));rd.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function rf(e,t,n){if("number"!=typeof e||e<=0)throw Error(nF(18,!1));rd.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function rh(e,t,n){if("number"!=typeof e||e<=0)throw Error(nF(19,!1));rd.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function rg(e,t){let n=e.timeouts[t],r=n.warningMillis,a=n2(e);return new Promise((o,i)=>{let s=!1,l=!1;e[t](rc(e)).then(e=>{s=!0,o(e)}).catch(e=>{s=!0,i(e)}),setTimeout(()=>c(1),r),setTimeout(()=>c(!0),n.millis);let u=nF(31,!1,t,a,n1(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 ry(e){let t={};for(let n in rd)t[n]=n3({},rd[n],e&&e[n]||{});return t}function rv(e){return Promise.resolve().then(()=>{let t,n;return e.loadPromise?e.loadPromise:e.status!==nV&&e.status!==nJ?e:(e.status=nU,e.loadPromise=Promise.resolve().then(()=>{let r=e.loadApp(rc(e));if(!n8(r))throw n=!0,Error(nF(33,!1,n1(e)));return r.then(n=>{let r;e.loadErrorTime=null,"object"!=typeof(t=n)&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!n5(t.bootstrap)&&(r=35),n5(t.mount)||(r=36),n5(t.unmount)||(r=37);let a=n2(t);if(r){let n;try{n=JSON.stringify(t)}catch(e){}return console.error(nF(r,!1,a,n1(e),n),t),nj(void 0,e,nX),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=n3({},e.devtools.overlays,t.devtools.overlays)),e.status=nW,e.bootstrap=n9(t,"bootstrap"),e.mount=n9(t,"mount"),e.unmount=n9(t,"unmount"),e.unload=n9(t,"unload"),e.timeouts=ry(t.timeouts),delete e.loadPromise,e})}).catch(t=>{let r;return delete e.loadPromise,n?r=nX:(r=nJ,e.loadErrorTime=(new Date).getTime()),nj(t,e,r),e}))})}let rb="u">typeof window,rw={hashchange:[],popstate:[]},rx=["hashchange","popstate"];function rD(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(nF(14,!1));t=e.currentTarget.href,e.preventDefault()}let n=rT(window.location.href),r=rT(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 rE(e){if(e){let t=e[0].type;rx.indexOf(t)>=0&&rw[t].forEach(t=>{try{t.apply(this,e)}catch(e){setTimeout(()=>{throw e})}})}}function r_(){rQ([],arguments)}function rS(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 rC=null,rk=!1;function rP(e){if(rk)throw Error(nF(43,!1));a=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,rk=!0,rC=window.history.replaceState,window.addEventListener("hashchange",r_),window.addEventListener("popstate",r_);let t=window.addEventListener,n=window.removeEventListener;window.addEventListener=function(e,n){if(!("function"==typeof n&&rx.indexOf(e)>=0)||n6(rw[e],e=>e===n))return t.apply(this,arguments);rw[e].push(n)},window.removeEventListener=function(e,t){return"function"==typeof t&&rx.indexOf(e)>=0&&(rw[e]=rw[e].filter(e=>e!==t)),n.apply(this,arguments)},window.history.pushState=rS(window.history.pushState,"pushState"),window.history.replaceState=rS(rC,"replaceState")}function rT(e){let t=document.createElement("a");return t.href=e,t}rb&&(window.singleSpaNavigate?console.warn(nF(41,!1)):window.singleSpaNavigate=rD);let rR=!1;function rO(e=window.jQuery){if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!rR){let t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return rN.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return rN.call(this,n,window.removeEventListener,e,t,arguments)},rR=!0}}function rN(e,t,n,r,a){return"string"!=typeof n?e.apply(this,a):(n.split(/\s+/).forEach(e=>{rx.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))}),""===n.trim()?this:e.apply(this,a))}let r$={};function rM(e){return Promise.resolve().then(()=>{let t=r$[n1(e)];if(!t)return e;if(e.status===nV)return rA(e,t),e;if(e.status===nq)return t.promise.then(()=>e);if(e.status!==nz&&e.status!==nJ)return e;let n=e.status===nJ?Promise.resolve():rg(e,"unload");return e.status=nq,n.then(()=>(rA(e,t),e)).catch(n=>(delete r$[n1(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,nj(n,e,nX),t.reject(n),e))})}function rA(e,t){delete r$[n1(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=nV,t.resolve()}function rj(e,t,n,r){r$[n1(e)]={app:e,resolve:n,reject:r},Object.defineProperty(r$[n1(e)],"promise",{get:t})}let rI=[];function rL(){return rI.filter(nQ).map(n1)}function rF(){return rI.map(n1)}function rB(e){let t=n6(rI,t=>n1(t)===e);return t?t.status:null}let rV=!1;function rU(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(nF(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(nF(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(nF(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(nF(24,!1));if(!rZ(e.customProps))throw Error(nF(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(nF(20,!1));if(!t)throw Error(nF(23,!1));if("function"!=typeof n)throw Error(nF(24,!1));if(!rZ(r))throw Error(nF(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:rG(e)),i.activeWhen=e=>s.some(t=>t(e)),i);if(r1||rV||(rV=!0,setTimeout(()=>{r1||console.warn(nF(1,!1))},5e3)),-1!==rF().indexOf(l.name))throw Error(nF(21,!1,l.name));rI.push(n3({loadErrorTime:null,status:nV,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},l)),rb&&(rO(),rQ())}function rW(e=window.location){return rI.filter(t=>t.activeWhen(e)).map(n1)}function rH(e){if(0===rI.filter(t=>n1(t)===e).length)throw Error(nF(25,!1,e));return(rb?rz(e,{waitForUnmount:!1}):Promise.resolve()).then(()=>{let t=rI.map(n1).indexOf(e);rI.splice(t,1)})}function rz(e,t={waitForUnmount:!1}){if("string"!=typeof e)throw Error(nF(26,!1));let n=n6(rI,t=>n1(t)===e);if(!n)throw Error(nF(27,!1,e));let r=r$[n1(n)];if(t&&t.waitForUnmount){if(r)return r.promise;{let e=new Promise((t,r)=>{rj(n,()=>e,t,r)});return e}}{let e;return r?(e=r.promise,rK(n,r.resolve,r.reject)):e=new Promise((t,r)=>{rj(n,()=>e,t,r),rK(n,t,r)}),e}}function rK(e,t,n){Promise.resolve().then(()=>{if(n6(rW(),t=>t===n1(e)))return rX()}).then(()=>rt(e).then(rM).then(()=>{t(),setTimeout(()=>{rQ()})})).catch(n)}function rZ(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)}function rG(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 rY=!1,rq=[],rJ=rb&&window.location.href;function rX(){return rQ()}function rQ(e=[],t,n=!1){let r,a,o,i,s;if(rY)return new Promise((e,n)=>{rq.push({resolve:e,reject:n,eventArguments:t})});let{appsToUnload:l,appsToUnmount:u,appsToLoad:c,appsToMount:d}=(r=[],a=[],o=[],i=[],s=(new Date).getTime(),rI.forEach(e=>{let t=e.status!==nX&&n0(e);switch(e.status){case nJ:t&&s-e.loadErrorTime>=200&&o.push(e);break;case nV:case nU:t&&o.push(e);break;case nW:case nz:!t&&r$[n1(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=rJ,h=rJ=window.location.href;return r1?(rY=!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 rC.call(window.history,history.state,"",f.substring(location.origin.length)),rJ=location.href,rY=!1,rQ(e,t,!0);let r=l.map(rM),a=Promise.all(u.map(rt).map(e=>e.then(rM)).concat(r));a.then(()=>{w("before-mount-routing-event",b(!0))},e=>{throw e});let o=c.map(e=>rv(e).then(e=>r0(e,a))),i=d.filter(e=>0>c.indexOf(e)).map(e=>r0(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(rv)).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(nF(42,!1))),console.warn(e),!1)))}function y(){let t=rL();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(rY=!1,rq.length>0){let e=rq;rq=[],rQ(e)}return t}function v(){n||(e.forEach(e=>{rE(e.eventArguments)}),rE(t))}function b(e=!1,n){let r={},a={[nZ]:[],[nz]:[],[nV]:[],[nX]:[]};e?(c.concat(d).forEach((e,t)=>{i(e,nZ)}),l.forEach(e=>{i(e,nV)}),u.forEach(e=>{i(e,nz)})):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&&n3(o.detail,n),o;function i(e,t){let n=n1(e);t=t||rB(n),r[n]=t,(a[t]=a[t]||[]).push(n)}}function w(e,t){n||window.dispatchEvent(new nM(`single-spa:${e}`,t))}}function r0(e,t){return n0(e)?re(e).then(e=>t.then(()=>n0(e)?ra(e):e)):t.then(()=>e)}let r1=!1;function r4(e){r1=!0,rb&&(rP(e),rQ())}rb&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods={getRawAppData:function(){return[...rI]},reroute:rQ,NOT_LOADED:nV,toLoadPromise:rv,toBootstrapPromise:re,unregisterApplication:rH,getProfilerData:function(){return n7}});let r2={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",applicationError:"Application Error",batchActionItemSelected:"{{totalSelected}} item selected",batchActionsItemsSelected:"{{totalSelected}} items selected",cancel:"Cancel",change:"Change",Clinic:"Clinic",clearDevOverrides:"Clear dev overrides",close:"Close",closesActionableNotification:"Close actionable notification",closeSnackbar:"Close snackbar",confirm:"Confirm",contactAdministratorIfIssuePersists:"Contact your system administrator if the problem persists.",contactDetails:"Contact details",copied:"Copied!",copyToClipboard:"Copy to clipboard",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",provisional:"Provisional",recordNewEntry:"Record {{displayText}}",relationships:"Relationships",reload:"Reload",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",serverStartingUp:"The server is starting",serverStartingUpExplainer:"This can take a few minutes. OpenMRS will open automatically when the server is ready.",serverStartingUpSlowExplainer:"This is taking longer than usual. First startup after an upgrade can take 10 minutes or more. You can leave this page open.",sex:"Sex",showLess:"Show less",showMore:"Show more",snackbarNotification:"Snackbar notification",somethingWentWrongTryReloading:"Something went wrong. Please try reloading.",toggleDevTools:"Toggle dev tools",unknown:"Unknown",viewSetupProgress:"View setup progress",waitingForServer:"Waiting for the server",yearAbbreviation:"yr",yearsAbbreviation:"yrs"},r3=e=>"string"==typeof e,r6=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},r5=e=>null==e?"":""+e,r9=/###/g,r8=e=>e&&e.indexOf("###")>-1?e.replace(r9,"."):e,r7=e=>!e||r3(e),ae=(e,t,n)=>{let r=r3(t)?t.split("."):t,a=0;for(;a<r.length-1;){if(r7(e))return{};let t=r8(r[a]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++a}return r7(e)?{}:{obj:e,k:r8(r[a])}},at=(e,t,n)=>{let{obj:r,k:a}=ae(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=ae(e,i,Object);for(;void 0===s.obj&&i.length;)o=`${i[i.length-1]}.${o}`,s=ae(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},an=(e,t)=>{let{obj:n,k:r}=ae(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},ar=(e,t,n)=>{for(let r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?r3(e[r])||e[r]instanceof String||r3(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):ar(e[r],t[r],n):e[r]=t[r]);return e};var aa={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};let ao=e=>r3(e)?e.replace(/[&<>"'\/]/g,e=>aa[e]):e,ai=[" ",",","?","!",";"],as=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),al=(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},au=e=>e?.replace("_","-"),ac={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 ad{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||ac,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:(r3(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new ad(this.logger,{...{prefix:`${this.prefix}:${e}:`},...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new ad(this.logger,e)}}var am=new ad;class ap{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 af extends ap{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):r3(n)&&o?a.push(...n.split(o)):a.push(n)));let s=an(this.data,a);return(!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!s&&i&&r3(n))?al(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),at(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)(r3(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=an(this.data,i)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?ar(s,n,a):s={...s,...n},at(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 ah={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 ag=Symbol("i18next/PATH_KEY");function ay(e,t){let n,r,a,{[ag]:o}=e((r=[],(a=Object.create(null)).get=(e,t)=>(n?.revoke?.(),t===ag)?r:(r.push(t),(n=Proxy.revocable(e,a)).proxy),Proxy.revocable(Object.create(null),a).proxy));return o.join(t?.keySeparator??".")}let av={},ab=e=>!r3(e)&&"boolean"!=typeof e&&"number"!=typeof e;class aw extends ap{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=am.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=ab(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=ai.filter(e=>0>t.indexOf(e)&&0>n.indexOf(e));if(0===r.length)return!0;let a=as.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:r3(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:r3(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=ay(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&&!r3(r.count),b=aw.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=ab(_),C=Object.prototype.toString.apply(_);if(y&&_&&S&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(C)&&!(r3(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:ab(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&&r3(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=r3(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&&!r3(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=r3(o)?[o]:o;return null!=e&&i?.length&&!1!==n.applyPostProcessor&&(e=ah.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 r3(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&&!r3(t.count),d=c&&!t.ordinal&&0===t.count,m=void 0!==t.context&&(r3(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,!av[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(i)&&(av[`${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&&!r3(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 ax{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=am.create("languageUtils")}getScriptPartFromCode(e){if(!(e=au(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=au(e))||0>e.indexOf("-"))return e;let t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(r3(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)),r3(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 r3(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))):r3(e)&&a(this.formatLanguageCode(e)),n.forEach(e=>{0>r.indexOf(e)&&a(this.formatLanguageCode(e))}),r}}let aD={zero:0,one:1,two:2,few:3,many:4,other:5},aE={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class a_{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=am.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n,r=au("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!"),aE;if(!e.match(/-|_/))return aE;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)=>aD[e]-aD[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 aS=(e,t,n,r=".",a=!0)=>{let o,i=void 0!==(o=an(e,n))?o:an(t,n);return!i&&a&&r3(n)&&void 0===(i=al(e,n,r))&&(i=al(t,n,r)),i};class aC{constructor(e={}){this.logger=am.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:ao,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=aS(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(aS(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=r3(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 r3(o)||this.useRawValueToEscape||(o=r5(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&&!r3(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&&!r3(a))return a;r3(a)||(a=r5(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 ak=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(au(r),a),t[i]=s),s(n)}},aP=e=>(t,n,r)=>e(au(n),r)(t);class aT{constructor(e={}){this.logger=am.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";let n=t.cacheInBuiltFormats?ak:aP;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()]=ak(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 aR extends ap{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=am.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}=ae(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();r3(e)&&(e=this.languageUtils.toResolveHierarchy(e)),r3(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 aO=()=>({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]),r3(e[1])&&(t.defaultValue=e[1]),r3(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}),aN=e=>(r3(e.ns)&&(e.ns=[e.ns]),r3(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),r3(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),a$=()=>{};class aM extends ap{constructor(e={},t){if(super(),this.options=aN(e),this.services={},this.logger=am,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&&(r3(e.ns)?e.defaultNS=e.ns:0>e.ns.indexOf("translation")&&(e.defaultNS=e.ns[0]));let n=aO();this.options={...n,...this.options,...aN(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?am.init(r(this.modules.logger),this.options):am.init(null,this.options),e=this.modules.formatter?this.modules.formatter:aT;let t=new ax(this.options);this.store=new af(this.options.resources,this.options);let a=this.services;a.logger=am,a.resourceStore=this.store,a.languageUtils=t,a.pluralResolver=new a_(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 aC(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new aR(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 aw(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=a$),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=r6(),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=a$){let n=t,r=r3(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=r6();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=a$),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&&ah.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=r6();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=r3(t)?t:t&&t[0],o=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(r3(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=ay(e,{...this.options,...t})),`${o.keyPrefix}${s}${e}`)):("function"==typeof e&&(e=ay(e,{...this.options,...t})),i=o.keyPrefix?`${o.keyPrefix}${s}${e}`:e),this.t(i,o)};return r3(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=r6();return this.options.ns?(r3(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=r6();r3(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 ax(aO());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 aM(e,t)}cloneInstance(e={},t=a$){let n=e.forkResourceStore;n&&delete e.forkResourceStore;let r={...this.options,...e,isClone:!0},a=new aM(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 af(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 aw(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 aA=aM.createInstance();aA.createInstance=aM.createInstance,aA.createInstance,aA.dir,aA.init,aA.loadResources,aA.reloadResources,aA.use,aA.changeLanguage,aA.getFixedT,aA.t,aA.exists,aA.setDefaultNamespace,aA.hasLoadedNamespace,aA.loadNamespaces,aA.loadLanguages;let aj=aA.default||aA;function aI(e,t,n,r){return aj.t(t,{ns:e,defaultValue:n,...r})}function aL(e,t,n){return r2[e]?aI("core",e,t??r2[e],n):(console.error(`O3 Core Translations does not provide key '${e}'. The key itself is being rendered as text.`),e)}function aF(e,t){let n=window.getOpenmrsSpaBase().replace(/\/$/,""),r=aB(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:n,...t});return e.startsWith("//")?r:r.replace(/^\/\//,"/")}function aB(e,t){return Object.keys(t).reduce((e,n)=>e.split("${"+n+"}").join(t[n]),e)}function aV({to:e,templateParams:t}){let n=window.getOpenmrsSpaBase().replace(/\/$/,""),r=aF(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(aL("navigateNonHttp"));r.startsWith(n)?rD(r):window.location.assign(r)}aj.on("initialized",function(){window.i18next.loadNamespaces(["core"])});let aU="openmrs:history";function aW(e){let t=JSON.parse(sessionStorage.getItem(aU)??"[]")||[];t.push(e),t.length>50&&(t=t.slice(-50)),sessionStorage.setItem(aU,JSON.stringify(t))}function aH(){0===JSON.parse(sessionStorage.getItem(aU)??"[]").length&&document.referrer&&aW(document.referrer),window.addEventListener("single-spa:routing-event",e=>{let t=az();e.detail.originalEvent?.singleSpaTrigger=="replaceState"?(t[t.length-1]=window.location.href,sessionStorage.setItem(aU,JSON.stringify(t))):!e.detail.originalEvent?.singleSpa&&t.includes(window.location.href)?aK({toUrl:window.location.href}):t[t.length-1]!==window.location.href&&aW(window.location.href)})}function az(){return JSON.parse(sessionStorage.getItem(aU)??"[]")}function aK({toUrl:e}){let t=az(),n=t.lastIndexOf(e);if(-1!=n){let e=t.slice(0,n+1);aV({to:t[n]}),sessionStorage.setItem(aU,JSON.stringify(e))}else throw Error(`URL ${e} not found in history; cannot go back to it.`)}function aZ(){sessionStorage.removeItem(aU)}let aG="${openmrsSpaBase}/login",aY={redirectAuthFailure:{enabled:{_type:tg.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:tg.String,_default:aG,_validators:[nE.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:tg.Array,_default:[401],_elements:{_type:tg.Number,_validators:[nE.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:tg.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:tg.Boolean,_default:!0,_description:"Whether openmrsFetch should support redirects returned from the backend"}};function aq(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let aJ="/ws/rest/v1",aX="/ws/fhir2/R4",aQ=`${aJ}/session`;function a0(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)}function a1(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=a0(e);t.headers||(t.headers={}),ep(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(a0(aJ),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(aX)){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 t9("@openmrs/esm-api");if(e.ok){let t=e.headers.get("location");return(o&&t&&(n===a0(aQ)||204===e.status)&&aV({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===a0(aQ)&&403===e.status||r.enabled&&r.errors.includes(e.status))&&(aZ(),aV({to:r.url||e.headers.get("location")||aG}),!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 a4(n,e,r,a)},()=>{throw new a4(n,e,null,a)})})}class a4 extends Error{constructor(e,t,n,r){super(),aq(this,"response",void 0),aq(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 nd=(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&&nm(e)){if(a._type===tg.Array&&Array.isArray(r)){let a=r.map(t=>nd(e,t));n[t]=a}else if(a._type===tg.Object)for(let t of Object.keys(r))r[t]=nd(e,r[t])}}else if(np(a)){let e=r??{};np(e)&&(n[t]=nd(a,e))}}return n};function nm(e){return!!e&&Object.keys(e).filter(e=>!["_default","_validators"].includes(e)).length>0}function np(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}function nf(e,t){let n=`${e}:::${t}`;tZ.has(n)||(console.error(t),tZ.add(n))}function nh(e){e?tZ.forEach(t=>{t.startsWith(e)&&tZ.delete(t)}):tZ.clear()}function ng(){tK.forEach(e=>e()),tK.length=0,tX.clear(),ne.clear(),nn.clear(),nt.clear(),tG=null,tY=new WeakMap,tq()}let ny={"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:tg.Object,_default:{},_validators:[ty(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(", ")}.`})]}},nv={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:tg.Array,_default:[]},expression:{_description:"The expression that determines whether the extension is displayed",_type:tg.String,_default:void 0}},...ny},nb=(e,t)=>ty(n=>e<=n&&n<=t,`must be between ${e} and ${t}`),nw=e=>{let t=e.concat(["openmrsBase","openmrsSpaBase"]);return ty(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(", "))},nx=nw([]),nD=e=>ty(t=>e.includes(t),`Must be one of the following: '${e.join("', '")}'.`),nE={inRange:nb,isUrl:nx,isUrlWithTemplateParameters:nw,oneOf:nD};var n_=n(2034);let nS=V("breadcrumbs",[]);function nC(e){return nk([e])}function nk(e){let t=[...nP(),...e.map(e=>({matcher:e.matcher instanceof RegExp?e.matcher:"string"==typeof e.matcher?(0,n_.pathToRegexp)(e.matcher).regexp:(0,n_.pathToRegexp)(e.path).regexp,settings:e}))];nS.setState(t,!0)}function nP(){return nS.getState()}function nT(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=nT(e,n.join("/"));if(t)return t}}(e,t)}function nR(e,t){if(e.length>0){let n=nT(e,t);if(n){let t=[n],r=nT(e,n.settings.parent);for(;void 0!==r;)t.push(r),r=nT(e,r.settings.parent);return t.reverse()}}return[]}function nO(e){return nR(nP(),e)}var nN=Object.freeze({__proto__:null,get start(){return r4},get ensureJQuerySupport(){return rO},get setBootstrapMaxTime(){return rm},get setMountMaxTime(){return rp},get setUnmountMaxTime(){return rf},get setUnloadMaxTime(){return rh},get registerApplication(){return rU},get unregisterApplication(){return rH},get getMountedApps(){return rL},get getAppStatus(){return rB},get unloadApplication(){return rz},get checkActivityFunctions(){return rW},get getAppNames(){return rF},get pathToActiveWhen(){return rG},get navigateToUrl(){return rD},get patchHistoryApi(){return rP},get triggerAppChange(){return rX},get addErrorHandler(){return nI},get removeErrorHandler(){return nL},get mountRootParcel(){return rs},get NOT_LOADED(){return nV},get LOADING_SOURCE_CODE(){return nU},get NOT_BOOTSTRAPPED(){return nW},get BOOTSTRAPPING(){return nH},get NOT_MOUNTED(){return nz},get MOUNTING(){return nK},get UPDATING(){return nG},get LOAD_ERROR(){return nJ},get MOUNTED(){return nZ},get UNLOADING(){return nq},get UNMOUNTING(){return nY},get SKIP_BECAUSE_BROKEN(){return nX}}),n$=("u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{}).CustomEvent,nM=!function(){try{var e=new n$("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}:n$;let nA=[];function nj(e,t,n){let r=nB(e,t,n);nA.length?nA.forEach(e=>e(r)):setTimeout(()=>{throw r})}function nI(e){if("function"!=typeof e)throw Error(nF(28,!1));nA.push(e)}function nL(e){if("function"!=typeof e)throw Error(nF(29,!1));let t=!1;return nA=nA.filter(n=>{let r=n===e;return t=t||r,!r}),t}function nF(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 nB(e,t,n){let r,a=`${n2(t)} '${n1(t)}' died in status ${t.status}: `;if(e instanceof Error){try{e.message=a+e.message}catch(e){}r=e}else{console.warn(nF(30,!1,t.status,n1(t)));try{r=Error(a+JSON.stringify(e))}catch(t){r=e}}return r.appOrParcelName=n1(t),t.status=n,r}let nV="NOT_LOADED",nU="LOADING_SOURCE_CODE",nW="NOT_BOOTSTRAPPED",nH="BOOTSTRAPPING",nz="NOT_MOUNTED",nK="MOUNTING",nZ="MOUNTED",nG="UPDATING",nY="UNMOUNTING",nq="UNLOADING",nJ="LOAD_ERROR",nX="SKIP_BECAUSE_BROKEN";function nQ(e){return e.status===nZ}function n0(e){try{return e.activeWhen(window.location)}catch(t){return nj(t,e,nX),!1}}function n1(e){return e.name}function n4(e){return!!e.unmountThisParcel}function n2(e){return n4(e)?"parcel":"application"}function n3(){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 n6(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return e[n];return null}function n5(e){return e&&("function"==typeof e||Array.isArray(e)&&!n6(e,e=>"function"!=typeof e))}function n9(e,t){let n=e[t]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[()=>Promise.resolve()]);let r=n2(e),a=n1(e);return function(e){return n.reduce((n,o,i)=>n.then(()=>{let n=o(e);return n8(n)?n:Promise.reject(nF(15,!1,r,a,t,i))}),Promise.resolve())}}function n8(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}let n7=[];function re(e,t){return Promise.resolve().then(()=>e.status!==nW?e:(e.status=nH,e.bootstrap?rg(e,"bootstrap").then(n).catch(n=>{if(t)throw nB(n,e,nX);return nj(n,e,nX),e}):Promise.resolve().then(n)));function n(){return e.status=nz,e}}function rt(e,t){return Promise.resolve().then(()=>{if(e.status!==nZ)return e;return e.status=nY,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 nB(n,e,nX);nj(n,e,nX)})).then(()=>e);function n(){return rg(e,"unmount").then(()=>{e.status=nz},n=>{if(t)throw nB(n,e,nX);nj(n,e,nX)})}})}let rn=!1,rr=!1;function ra(e,t){return Promise.resolve().then(()=>e.status!==nz?e:(rn||(window.dispatchEvent(new nM("single-spa:before-first-mount")),rn=!0),e.status=nK,rg(e,"mount").then(()=>(e.status=nZ,rr||(window.dispatchEvent(new nM("single-spa:first-mount")),rr=!0),e)).catch(n=>{return e.status=nZ,rt(e,!0).then(r,r);function r(){if(t)throw nB(n,e,nX);return nj(n,e,nX),e}})))}let ro=0,ri={parcels:{}};function rs(){return rl.apply(ri,arguments)}function rl(e,t){let n,r,a,o=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(nF(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(nF(3,!1,typeof e.name));let i=ro++,s=e.name||`parcel-${i}`;if("object"!=typeof t)throw Error(nF(4,!1,s,typeof t));if(!t.domElement)throw Error(nF(5,!1,s));let l="function"==typeof e,u=l?e:()=>Promise.resolve(e),c={id:i,parcels:{},status:l?nU:nW,customProps:t,parentName:n1(o),unmountThisParcel:()=>p.then(()=>{if(c.status!==nZ)throw Error(nF(6,!1,s,c.status));return rt(c,!0)}).then(e=>(c.parentName&&delete o.parcels[c.id],e)).then(e=>(r(e),e)).catch(e=>{throw c.status=nX,a(e),e})};o.parcels[i]=c;let d=u();if(!d||"function"!=typeof d.then)throw Error(nF(7,!1));let m=(d=d.then(e=>{if(!e)throw Error(nF(8,!1));if(s=e.name||`parcel-${i}`,Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!n5(e.bootstrap))throw Error(nF(9,!1,s));if(!n5(e.mount))throw Error(nF(10,!1,s));if(!n5(e.unmount))throw Error(nF(11,!1,s));if(e.update&&!n5(e.update))throw Error(nF(12,!1,s));let t=n9(e,"bootstrap"),r=n9(e,"mount"),a=n9(e,"unmount");c.status=nW,c.name=s,c.bootstrap=t,c.mount=r,c.unmount=a,c.timeouts=ry(e.timeouts),e.update&&(c.update=n9(e,"update"),n.update=function(e){return c.customProps=e,ru(Promise.resolve().then(()=>{if(c.status!==nZ)throw Error(nF(32,!1,n1(c)));return c.status=nG,rg(c,"update").then(()=>(c.status=nZ,c)).catch(e=>{throw nB(e,c,nX)})}))})})).then(()=>re(c,!0)),p=m.then(()=>ra(c,!0)),f=new Promise((e,t)=>{r=e,a=t});return n={mount:()=>ru(Promise.resolve().then(()=>{if(c.status!==nz)throw Error(nF(13,!1,s,c.status));return o.parcels[i]=c,ra(c)})),unmount:()=>ru(c.unmountThisParcel()),getStatus:()=>c.status,loadPromise:ru(d),bootstrapPromise:ru(m),mountPromise:ru(p),unmountPromise:ru(f)}}function ru(e){return e.then(()=>null)}function rc(e){let t=n1(e),n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof n||null===n||Array.isArray(n))&&(n={},console.warn(nF(40,!1),t,n));let r=n3({},n,{name:t,mountParcel:rl.bind(e),singleSpa:nN});return n4(e)&&(r.unmountSelf=e.unmountThisParcel),r}let rd={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 rm(e,t,n){if("number"!=typeof e||e<=0)throw Error(nF(16,!1));rd.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function rp(e,t,n){if("number"!=typeof e||e<=0)throw Error(nF(17,!1));rd.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function rf(e,t,n){if("number"!=typeof e||e<=0)throw Error(nF(18,!1));rd.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function rh(e,t,n){if("number"!=typeof e||e<=0)throw Error(nF(19,!1));rd.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function rg(e,t){let n=e.timeouts[t],r=n.warningMillis,a=n2(e);return new Promise((o,i)=>{let s=!1,l=!1;e[t](rc(e)).then(e=>{s=!0,o(e)}).catch(e=>{s=!0,i(e)}),setTimeout(()=>c(1),r),setTimeout(()=>c(!0),n.millis);let u=nF(31,!1,t,a,n1(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 ry(e){let t={};for(let n in rd)t[n]=n3({},rd[n],e&&e[n]||{});return t}function rv(e){return Promise.resolve().then(()=>{let t,n;return e.loadPromise?e.loadPromise:e.status!==nV&&e.status!==nJ?e:(e.status=nU,e.loadPromise=Promise.resolve().then(()=>{let r=e.loadApp(rc(e));if(!n8(r))throw n=!0,Error(nF(33,!1,n1(e)));return r.then(n=>{let r;e.loadErrorTime=null,"object"!=typeof(t=n)&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!n5(t.bootstrap)&&(r=35),n5(t.mount)||(r=36),n5(t.unmount)||(r=37);let a=n2(t);if(r){let n;try{n=JSON.stringify(t)}catch(e){}return console.error(nF(r,!1,a,n1(e),n),t),nj(void 0,e,nX),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=n3({},e.devtools.overlays,t.devtools.overlays)),e.status=nW,e.bootstrap=n9(t,"bootstrap"),e.mount=n9(t,"mount"),e.unmount=n9(t,"unmount"),e.unload=n9(t,"unload"),e.timeouts=ry(t.timeouts),delete e.loadPromise,e})}).catch(t=>{let r;return delete e.loadPromise,n?r=nX:(r=nJ,e.loadErrorTime=(new Date).getTime()),nj(t,e,r),e}))})}let rb="u">typeof window,rw={hashchange:[],popstate:[]},rx=["hashchange","popstate"];function rD(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(nF(14,!1));t=e.currentTarget.href,e.preventDefault()}let n=rT(window.location.href),r=rT(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 rE(e){if(e){let t=e[0].type;rx.indexOf(t)>=0&&rw[t].forEach(t=>{try{t.apply(this,e)}catch(e){setTimeout(()=>{throw e})}})}}function r_(){rQ([],arguments)}function rS(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 rC=null,rk=!1;function rP(e){if(rk)throw Error(nF(43,!1));a=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,rk=!0,rC=window.history.replaceState,window.addEventListener("hashchange",r_),window.addEventListener("popstate",r_);let t=window.addEventListener,n=window.removeEventListener;window.addEventListener=function(e,n){if(!("function"==typeof n&&rx.indexOf(e)>=0)||n6(rw[e],e=>e===n))return t.apply(this,arguments);rw[e].push(n)},window.removeEventListener=function(e,t){return"function"==typeof t&&rx.indexOf(e)>=0&&(rw[e]=rw[e].filter(e=>e!==t)),n.apply(this,arguments)},window.history.pushState=rS(window.history.pushState,"pushState"),window.history.replaceState=rS(rC,"replaceState")}function rT(e){let t=document.createElement("a");return t.href=e,t}rb&&(window.singleSpaNavigate?console.warn(nF(41,!1)):window.singleSpaNavigate=rD);let rR=!1;function rO(e=window.jQuery){if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!rR){let t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return rN.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return rN.call(this,n,window.removeEventListener,e,t,arguments)},rR=!0}}function rN(e,t,n,r,a){return"string"!=typeof n?e.apply(this,a):(n.split(/\s+/).forEach(e=>{rx.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))}),""===n.trim()?this:e.apply(this,a))}let r$={};function rM(e){return Promise.resolve().then(()=>{let t=r$[n1(e)];if(!t)return e;if(e.status===nV)return rA(e,t),e;if(e.status===nq)return t.promise.then(()=>e);if(e.status!==nz&&e.status!==nJ)return e;let n=e.status===nJ?Promise.resolve():rg(e,"unload");return e.status=nq,n.then(()=>(rA(e,t),e)).catch(n=>(delete r$[n1(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,nj(n,e,nX),t.reject(n),e))})}function rA(e,t){delete r$[n1(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=nV,t.resolve()}function rj(e,t,n,r){r$[n1(e)]={app:e,resolve:n,reject:r},Object.defineProperty(r$[n1(e)],"promise",{get:t})}let rI=[];function rL(){return rI.filter(nQ).map(n1)}function rF(){return rI.map(n1)}function rB(e){let t=n6(rI,t=>n1(t)===e);return t?t.status:null}let rV=!1;function rU(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(nF(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(nF(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(nF(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(nF(24,!1));if(!rZ(e.customProps))throw Error(nF(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(nF(20,!1));if(!t)throw Error(nF(23,!1));if("function"!=typeof n)throw Error(nF(24,!1));if(!rZ(r))throw Error(nF(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:rG(e)),i.activeWhen=e=>s.some(t=>t(e)),i);if(r1||rV||(rV=!0,setTimeout(()=>{r1||console.warn(nF(1,!1))},5e3)),-1!==rF().indexOf(l.name))throw Error(nF(21,!1,l.name));rI.push(n3({loadErrorTime:null,status:nV,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},l)),rb&&(rO(),rQ())}function rW(e=window.location){return rI.filter(t=>t.activeWhen(e)).map(n1)}function rH(e){if(0===rI.filter(t=>n1(t)===e).length)throw Error(nF(25,!1,e));return(rb?rz(e,{waitForUnmount:!1}):Promise.resolve()).then(()=>{let t=rI.map(n1).indexOf(e);rI.splice(t,1)})}function rz(e,t={waitForUnmount:!1}){if("string"!=typeof e)throw Error(nF(26,!1));let n=n6(rI,t=>n1(t)===e);if(!n)throw Error(nF(27,!1,e));let r=r$[n1(n)];if(t&&t.waitForUnmount){if(r)return r.promise;{let e=new Promise((t,r)=>{rj(n,()=>e,t,r)});return e}}{let e;return r?(e=r.promise,rK(n,r.resolve,r.reject)):e=new Promise((t,r)=>{rj(n,()=>e,t,r),rK(n,t,r)}),e}}function rK(e,t,n){Promise.resolve().then(()=>{if(n6(rW(),t=>t===n1(e)))return rX()}).then(()=>rt(e).then(rM).then(()=>{t(),setTimeout(()=>{rQ()})})).catch(n)}function rZ(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)}function rG(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 rY=!1,rq=[],rJ=rb&&window.location.href;function rX(){return rQ()}function rQ(e=[],t,n=!1){let r,a,o,i,s;if(rY)return new Promise((e,n)=>{rq.push({resolve:e,reject:n,eventArguments:t})});let{appsToUnload:l,appsToUnmount:u,appsToLoad:c,appsToMount:d}=(r=[],a=[],o=[],i=[],s=(new Date).getTime(),rI.forEach(e=>{let t=e.status!==nX&&n0(e);switch(e.status){case nJ:t&&s-e.loadErrorTime>=200&&o.push(e);break;case nV:case nU:t&&o.push(e);break;case nW:case nz:!t&&r$[n1(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=rJ,h=rJ=window.location.href;return r1?(rY=!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 rC.call(window.history,history.state,"",f.substring(location.origin.length)),rJ=location.href,rY=!1,rQ(e,t,!0);let r=l.map(rM),a=Promise.all(u.map(rt).map(e=>e.then(rM)).concat(r));a.then(()=>{w("before-mount-routing-event",b(!0))},e=>{throw e});let o=c.map(e=>rv(e).then(e=>r0(e,a))),i=d.filter(e=>0>c.indexOf(e)).map(e=>r0(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(rv)).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(nF(42,!1))),console.warn(e),!1)))}function y(){let t=rL();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(rY=!1,rq.length>0){let e=rq;rq=[],rQ(e)}return t}function v(){n||(e.forEach(e=>{rE(e.eventArguments)}),rE(t))}function b(e=!1,n){let r={},a={[nZ]:[],[nz]:[],[nV]:[],[nX]:[]};e?(c.concat(d).forEach((e,t)=>{i(e,nZ)}),l.forEach(e=>{i(e,nV)}),u.forEach(e=>{i(e,nz)})):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&&n3(o.detail,n),o;function i(e,t){let n=n1(e);t=t||rB(n),r[n]=t,(a[t]=a[t]||[]).push(n)}}function w(e,t){n||window.dispatchEvent(new nM(`single-spa:${e}`,t))}}function r0(e,t){return n0(e)?re(e).then(e=>t.then(()=>n0(e)?ra(e):e)):t.then(()=>e)}let r1=!1;function r4(e){r1=!0,rb&&(rP(e),rQ())}rb&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods={getRawAppData:function(){return[...rI]},reroute:rQ,NOT_LOADED:nV,toLoadPromise:rv,toBootstrapPromise:re,unregisterApplication:rH,getProfilerData:function(){return n7}});let r2=e=>"string"==typeof e,r3=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},r6=e=>null==e?"":""+e,r5=/###/g,r9=e=>e&&e.indexOf("###")>-1?e.replace(r5,"."):e,r8=e=>!e||r2(e),r7=(e,t,n)=>{let r=r2(t)?t.split("."):t,a=0;for(;a<r.length-1;){if(r8(e))return{};let t=r9(r[a]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++a}return r8(e)?{}:{obj:e,k:r9(r[a])}},ae=(e,t,n)=>{let{obj:r,k:a}=r7(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=r7(e,i,Object);for(;void 0===s.obj&&i.length;)o=`${i[i.length-1]}.${o}`,s=r7(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},at=(e,t)=>{let{obj:n,k:r}=r7(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},an=(e,t,n)=>{for(let r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?r2(e[r])||e[r]instanceof String||r2(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):an(e[r],t[r],n):e[r]=t[r]);return e};var ar={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};let aa=e=>r2(e)?e.replace(/[&<>"'\/]/g,e=>ar[e]):e,ao=[" ",",","?","!",";"],ai=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),as=(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},al=e=>e?.replace("_","-"),au={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 ac{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||au,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:(r2(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new ac(this.logger,{...{prefix:`${this.prefix}:${e}:`},...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new ac(this.logger,e)}}var ad=new ac;class am{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 ap extends am{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):r2(n)&&o?a.push(...n.split(o)):a.push(n)));let s=at(this.data,a);return(!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!s&&i&&r2(n))?as(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),ae(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)(r2(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=at(this.data,i)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?an(s,n,a):s={...s,...n},ae(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 af={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 ah=Symbol("i18next/PATH_KEY");function ag(e,t){let n,r,a,{[ah]:o}=e((r=[],(a=Object.create(null)).get=(e,t)=>(n?.revoke?.(),t===ah)?r:(r.push(t),(n=Proxy.revocable(e,a)).proxy),Proxy.revocable(Object.create(null),a).proxy));return o.join(t?.keySeparator??".")}let ay={},av=e=>!r2(e)&&"boolean"!=typeof e&&"number"!=typeof e;class ab extends am{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=ad.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=av(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=ao.filter(e=>0>t.indexOf(e)&&0>n.indexOf(e));if(0===r.length)return!0;let a=ai.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:r2(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:r2(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=ag(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&&!r2(r.count),b=ab.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=av(_),C=Object.prototype.toString.apply(_);if(y&&_&&S&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(C)&&!(r2(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:av(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&&r2(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=r2(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&&!r2(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=r2(o)?[o]:o;return null!=e&&i?.length&&!1!==n.applyPostProcessor&&(e=af.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 r2(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&&!r2(t.count),d=c&&!t.ordinal&&0===t.count,m=void 0!==t.context&&(r2(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,!ay[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(i)&&(ay[`${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&&!r2(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 aw{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ad.create("languageUtils")}getScriptPartFromCode(e){if(!(e=al(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=al(e))||0>e.indexOf("-"))return e;let t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(r2(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)),r2(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 r2(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))):r2(e)&&a(this.formatLanguageCode(e)),n.forEach(e=>{0>r.indexOf(e)&&a(this.formatLanguageCode(e))}),r}}let ax={zero:0,one:1,two:2,few:3,many:4,other:5},aD={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class aE{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=ad.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n,r=al("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!"),aD;if(!e.match(/-|_/))return aD;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)=>ax[e]-ax[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 a_=(e,t,n,r=".",a=!0)=>{let o,i=void 0!==(o=at(e,n))?o:at(t,n);return!i&&a&&r2(n)&&void 0===(i=as(e,n,r))&&(i=as(t,n,r)),i};class aS{constructor(e={}){this.logger=ad.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:aa,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=a_(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(a_(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=r2(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 r2(o)||this.useRawValueToEscape||(o=r6(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&&!r2(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&&!r2(a))return a;r2(a)||(a=r6(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 aC=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(al(r),a),t[i]=s),s(n)}},ak=e=>(t,n,r)=>e(al(n),r)(t);class aP{constructor(e={}){this.logger=ad.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";let n=t.cacheInBuiltFormats?aC: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()]=aC(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 aT extends am{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=ad.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}=r7(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();r2(e)&&(e=this.languageUtils.toResolveHierarchy(e)),r2(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 aR=()=>({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]),r2(e[1])&&(t.defaultValue=e[1]),r2(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}),aO=e=>(r2(e.ns)&&(e.ns=[e.ns]),r2(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),r2(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 a$ extends am{constructor(e={},t){if(super(),this.options=aO(e),this.services={},this.logger=ad,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&&(r2(e.ns)?e.defaultNS=e.ns:0>e.ns.indexOf("translation")&&(e.defaultNS=e.ns[0]));let n=aR();this.options={...n,...this.options,...aO(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?ad.init(r(this.modules.logger),this.options):ad.init(null,this.options),e=this.modules.formatter?this.modules.formatter:aP;let t=new aw(this.options);this.store=new ap(this.options.resources,this.options);let a=this.services;a.logger=ad,a.resourceStore=this.store,a.languageUtils=t,a.pluralResolver=new aE(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 aS(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new aT(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 ab(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=r3(),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=r2(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=r3();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&&af.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=r3();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=r2(t)?t:t&&t[0],o=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(r2(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=ag(e,{...this.options,...t})),`${o.keyPrefix}${s}${e}`)):("function"==typeof e&&(e=ag(e,{...this.options,...t})),i=o.keyPrefix?`${o.keyPrefix}${s}${e}`:e),this.t(i,o)};return r2(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=r3();return this.options.ns?(r2(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=r3();r2(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 aw(aR());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 a$(e,t)}cloneInstance(e={},t=aN){let n=e.forkResourceStore;n&&delete e.forkResourceStore;let r={...this.options,...e,isClone:!0},a=new a$(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 ap(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 ab(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 aM=a$.createInstance();aM.createInstance=a$.createInstance,aM.createInstance,aM.dir,aM.init,aM.loadResources,aM.reloadResources,aM.use,aM.changeLanguage,aM.getFixedT,aM.t,aM.exists,aM.setDefaultNamespace,aM.hasLoadedNamespace,aM.loadNamespaces,aM.loadLanguages;let aA={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",applicationError:"Application Error",batchActionItemSelected:"{{totalSelected}} item selected",batchActionsItemsSelected:"{{totalSelected}} items selected",cancel:"Cancel",change:"Change",Clinic:"Clinic",clearDevOverrides:"Clear dev overrides",close:"Close",closesActionableNotification:"Close actionable notification",closeSnackbar:"Close snackbar",confirm:"Confirm",contactAdministratorIfIssuePersists:"Contact your system administrator if the problem persists.",contactDetails:"Contact details",copied:"Copied!",copyToClipboard:"Copy to clipboard",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",provisional:"Provisional",recordNewEntry:"Record {{displayText}}",relationships:"Relationships",reload:"Reload",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",serverStartingUp:"The server is starting",serverStartingUpExplainer:"This can take a few minutes. OpenMRS will open automatically when the server is ready.",serverStartingUpSlowExplainer:"This is taking longer than usual. First startup after an upgrade can take 10 minutes or more. You can leave this page open.",sex:"Sex",showLess:"Show less",showMore:"Show more",snackbarNotification:"Snackbar notification",somethingWentWrongTryReloading:"Something went wrong. Please try reloading.",toggleDevTools:"Toggle dev tools",unknown:"Unknown",viewSetupProgress:"View setup progress",waitingForServer:"Waiting for the server",yearAbbreviation:"yr",yearsAbbreviation:"yrs"},aj=aM.default||aM,aI="___",aL=new Map,aF=!1;function aB(){aF=!0,aj.emit("languageChanged",aj.language)}function aV(){aF=!1,aL.clear()}function aU(){return aF}function aW(e){if(!aF)return;let t=aL.get(e.value);if(!t){aL.size>=2e4&&aL.delete(aL.keys().next().value),aL.set(e.value,[{...e}]);return}let n=t.find(t=>t.key===e.key&&t.namespace===e.namespace&&t.extensionNamespace===e.extensionNamespace);n?n.hasCount||(n.hasCount=e.hasCount):t.push({...e}),aL.delete(e.value),aL.set(e.value,t)}function aH(e){return e&&aF?(aL.get(e)??aL.get(e.trim())??[]).map(e=>({...e})):[]}let az=aM.default||aM;function aK(e,t,n,r){return az.t(t,{ns:e,defaultValue:n,...r})}function aZ(e,t,n){return aA[e]?aK("core",e,t??aA[e],n):(console.error(`O3 Core Translations does not provide key '${e}'. The key itself is being rendered as text.`),e)}function aG(e,t){let n=window.getOpenmrsSpaBase().replace(/\/$/,""),r=aY(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:n,...t});return e.startsWith("//")?r:r.replace(/^\/\//,"/")}function aY(e,t){return Object.keys(t).reduce((e,n)=>e.split("${"+n+"}").join(t[n]),e)}function aq({to:e,templateParams:t}){let n=window.getOpenmrsSpaBase().replace(/\/$/,""),r=aG(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(aZ("navigateNonHttp"));r.startsWith(n)?rD(r):window.location.assign(r)}az.on("initialized",function(){window.i18next.loadNamespaces(["core"])});let aJ="openmrs:history";function aX(e){let t=JSON.parse(sessionStorage.getItem(aJ)??"[]")||[];t.push(e),t.length>50&&(t=t.slice(-50)),sessionStorage.setItem(aJ,JSON.stringify(t))}function aQ(){0===JSON.parse(sessionStorage.getItem(aJ)??"[]").length&&document.referrer&&aX(document.referrer),window.addEventListener("single-spa:routing-event",e=>{let t=a0();e.detail.originalEvent?.singleSpaTrigger=="replaceState"?(t[t.length-1]=window.location.href,sessionStorage.setItem(aJ,JSON.stringify(t))):!e.detail.originalEvent?.singleSpa&&t.includes(window.location.href)?a1({toUrl:window.location.href}):t[t.length-1]!==window.location.href&&aX(window.location.href)})}function a0(){return JSON.parse(sessionStorage.getItem(aJ)??"[]")}function a1({toUrl:e}){let t=a0(),n=t.lastIndexOf(e);if(-1!=n){let e=t.slice(0,n+1);aq({to:t[n]}),sessionStorage.setItem(aJ,JSON.stringify(e))}else throw Error(`URL ${e} not found in history; cannot go back to it.`)}function a4(){sessionStorage.removeItem(aJ)}let a2="${openmrsSpaBase}/login",a3={redirectAuthFailure:{enabled:{_type:tg.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:tg.String,_default:a2,_validators:[nE.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:tg.Array,_default:[401],_elements:{_type:tg.Number,_validators:[nE.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:tg.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:tg.Boolean,_default:!0,_description:"Whether openmrsFetch should support redirects returned from the backend"}};function a6(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let a5="/ws/rest/v1",a9="/ws/fhir2/R4",a8=`${a5}/session`;function a7(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)}function oe(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=a7(e);t.headers||(t.headers={}),ep(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(a7(a5),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(a9)){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 t9("@openmrs/esm-api");if(e.ok){let t=e.headers.get("location");return(o&&t&&(n===a7(a8)||204===e.status)&&aq({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===a7(a8)&&403===e.status||r.enabled&&r.errors.includes(e.status))&&(a4(),aq({to:r.url||e.headers.get("location")||a2}),!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 ot(n,e,r,a)},()=>{throw new ot(n,e,null,a)})})}class ot extends Error{constructor(e,t,n,r){super(),a6(this,"response",void 0),a6(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 a2=V("session",{loaded:!1,session:null}),a3=0,a6=null;function a5(){return a6||(a2.getState().loaded&&a3>=Date.now()-6e4?null:oe())}function a9(e){let t=e?.includeAuthStatus??!0,n=e=>t?e:e.user,r=a5();return r?new Promise(e=>{let t=()=>{let t=a2.getState();t.loaded&&(a(),e(n(t.session)))},a=a2.subscribe(t);r.then(t,t)}):Promise.resolve(n(a2.getState().session))}function a8(){return a5(),a2}function a7(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 oe(e,t){a3=Date.now(),o??(o=a3);let n={};e&&t&&(n.Authorization=`Basic ${window.btoa(`${e}:${t}`)}`);let r=oc(a1(aQ,{headers:n,rejectAuthFailure:!0})),a=()=>{a6===r&&(a6=null)};return r.then(a,a),a6=r,r}function ot(){a2.setState({loaded:!0,session:{authenticated:!1,sessionId:""}},!0)}function on(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 or(){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(a2.getState()),e||(t=a2.subscribe(r))})}async function oa(){return(await a9()).sessionLocation}async function oo(e,t){return oc(a1(aQ,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},rejectAuthFailure:!0,signal:t?.signal}))}async function oi(e,t){return await a1(aQ,{method:"POST",body:{locale:e},headers:{"Content-Type":"application/json"},signal:t?.signal}),oe()}async function os(e,t,n){return n||(n=new AbortController),await a1(`${aJ}/user/${e}`,{method:"POST",body:{userProperties:t},headers:{"Content-Type":"application/json"},signal:n.signal}),oe()}async function ol(e,t=!1){let n=await a1(t?`${aQ}?rememberMe=true`:aQ,{headers:{"X-Totp-Code":e}});return n.data?.authenticated?(await oe()).session:n.data}async function ou(){try{await a1(aQ,{method:"DELETE",rejectAuthFailure:!0})}catch(e){if(!od(e))throw e}ot(),await oe().catch(()=>{})}function oc(e){return new Promise((t,n)=>{e.then(e=>{if("object"==typeof e?.data){let n={loaded:!0,session:e.data};a2.setState(n,!0),t(n)}else!function(e){if(!e?.redirected||!e.url)return!1;try{return new URL(e.url,window.location.href).pathname.replace(/\/+$/,"").endsWith("/initialsetup")}catch{return!1}}(e)?n(om(Error("The session endpoint did not respond with a session"))):n(om(Error("The server is still starting up"),!0))}).catch(e=>{var r,a;if(od(e)){"object"==typeof(r=e.responseBody)&&null!==r&&!1===r.authenticated?a2.setState({loaded:!0,session:e.responseBody},!0):ot(),t(a2.getState());return}(a=e)instanceof a4&&502===a.response.status&&!a2.getState().loaded&&void 0!==o&&Date.now()-o<18e4?n(om(e,!0)):(P(`Failed to fetch new session information: ${e}`),n(om(e)))})})}function od(e){return e instanceof a4&&(401===e.response.status||403===e.response.status)}function om(e,t=!1){return a2.getState().loaded||a2.setState({loaded:!1,session:null,error:e instanceof Error?e:Error(String(e)),initializing:t},!0),a2.getState()}function op(){return"development"===window.spaEnv||"true"===localStorage.getItem("openmrs:devtools")}a2.subscribe(e=>{e.loaded&&e.session&&a7(e.session)});let of={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"};function oh(){t0("@openmrs/esm-api",aY),oe()}let og="import-map-override:",oy="import-map-overrides-disabled",ov="import-map-overrides:change",ob=!1,ow=null,ox=null;async function oD(){return ox??(ox=oE().then(({map:e,complete:t})=>(t||(ox=null),e))),ox}async function oE(){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:o_(t),complete:n}}function o_(e){let t={imports:{}};for(let n of e)n?.imports&&Object.assign(t.imports,n.imports);return t}function oS(){let e={};try{let t=oR();for(let n=0;n<localStorage.length;n++){let r=localStorage.key(n);if(r?.startsWith(og)){let n=r.slice(og.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 oC(){let e=await oD();return ob?o_([e,ow??oS()]):e}async function ok(){return oD()}async function oP(){return ob?o_([await oD(),oS()]):oD()}function oT(e){if(!ob)return{imports:{}};if(e){let e={};for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);if(n?.startsWith(og)){let t=localStorage.getItem(n);t&&(e[n.slice(og.length)]=t)}}return{imports:e}}return oS()}function oR(){if(!ob)return[];try{let e=localStorage.getItem(oy);if(e){let t=JSON.parse(e);if(Array.isArray(t))return t}}catch{}return[]}function oO(e){return!!ob&&oR().includes(e)}function oN(e,t){if(!ob)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.setItem(og+e,t),window.dispatchEvent(new CustomEvent(ov))}catch(e){console.warn("[import-maps] Failed to write import-map override to localStorage",e)}}function o$(e){if(!ob)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.removeItem(og+e);let t=oR().filter(t=>t!==e);t.length>0?localStorage.setItem(oy,JSON.stringify(t)):localStorage.removeItem(oy),window.dispatchEvent(new CustomEvent(ov))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}function oM(){if(!ob)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(og)&&e.push(n)}e.forEach(e=>localStorage.removeItem(e)),localStorage.removeItem(oy),window.dispatchEvent(new CustomEvent(ov))}catch(e){console.warn("[import-maps] Failed to clear import-map overrides from localStorage",e)}}function oA(e){if(!ob)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{let t=oR().filter(t=>t!==e);t.length>0?localStorage.setItem(oy,JSON.stringify(t)):localStorage.removeItem(oy),window.dispatchEvent(new CustomEvent(ov))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}let oj=!1;function oI(){!oj&&(oj=!0,(ob="development"===window.spaEnv)&&(ow=oS()))}function oL(e){return e.replace(/[\/\-@]/g,"_")}async function oF(e,t="./start",r){var a;let o,i=!r?.maxLoadingTime||r.maxLoadingTime<=0?6e5:r.maxLoadingTime;await Promise.race([oB(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=oL(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 oB(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=oL(e);if(!window[n]){let n=t??await oV();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 oT().imports;try{return await function(e){var t;let n=(t=window)[oU]??(t[oU]=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&&D({kind:"error",title:aL("scriptLoadingFailed","Error: Script failed to load"),description:aL("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:aL("resetOverrides","Reset overrides"),onActionButtonClick(){oM(),window.location.reload()}}),Promise.reject(e)}}return Promise.resolve()}async function oV(){return oC()}let oU=Symbol.for("__openmrs_script_loading");function oW(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,"modals")&&(!e.modals||!Array.isArray(e.modals))||Object.hasOwn(e,"workspaces2")&&(!e.workspaces2||!Array.isArray(e.workspaces2))||Object.hasOwn(e,"workspaceWindows2")&&(!e.workspaceWindows2||!Array.isArray(e.workspaceWindows2))||Object.hasOwn(e,"workspaceGroups2")&&(!e.workspaceGroups2||!Array.isArray(e.workspaceGroups2)))}function oH(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&&oW(t))}let oz="openmrs-routes:",oK="openmrs-routes:change",oZ=!1,oG=null,oY=null;async function oq(){return oY??(oY=oJ().then(({map:e,complete:t})=>(t||(oY=null),e))),oY}async function oJ(){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&&oH(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:oX(t),complete:n}}function oX(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 oQ(){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(oz)){let e=localStorage.getItem(n);e&&t.push({moduleName:n.slice(oz.length),raw:e})}}for(let n of(await Promise.allSettled(t.map(async({moduleName:e,raw:t})=>{let n=JSON.parse(t);if(oW(n))return{moduleName:e,routes:n};if("string"==typeof n&&n.startsWith("http")){let t=await fetch(n),r=await t.json();if(oW(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 o0(){let e=await oq();return oZ?oX([e,oG??await oQ()]):e}async function o1(){return oq()}async function o4(){return oZ?oX([await oq(),await oQ()]):oq()}function o2(){if(!oZ)return{};let e={};try{for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);if(n?.startsWith(oz)){let t=localStorage.getItem(n);t&&(e[n.slice(oz.length)]=t)}}}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}function o3(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(oz+e,JSON.stringify(t));else{let n=JSON.parse(t);if(!oW(n))return void console.error(`The supplied routes for ${e} is not a valid OpenmrsAppRoutes object`,t);localStorage.setItem(oz+e,JSON.stringify(n))}else if(t instanceof URL)localStorage.setItem(oz+e,JSON.stringify(t.toString()));else{if(!oW(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(oz+e,JSON.stringify(t))}window.dispatchEvent(new CustomEvent(oK))}catch(e){console.warn("[route-maps] Failed to write route override to localStorage",e)}}function o6(e){if(!oZ)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{localStorage.removeItem(oz+e),window.dispatchEvent(new CustomEvent(oK))}catch(e){console.warn("[route-maps] Failed to remove route override from localStorage",e)}}function o5(){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(oz)&&e.push(n)}e.forEach(e=>localStorage.removeItem(e)),window.dispatchEvent(new CustomEvent(oK))}catch(e){console.warn("[route-maps] Failed to clear route overrides from localStorage",e)}}let o9=null;function o8(){return o9||(o9=(oZ="development"===window.spaEnv)?oQ().then(e=>{oG=e}):Promise.resolve())}let o7=`${aJ}/attachment`;function ie(e,t){return a1(`${o7}/${e}`,{signal:t.signal})}function it(e,t,n,r){return a1(ir(e,t,r),{signal:n.signal})}function ir(e,t,n){return n?`${o7}?patient=${e}&encounter=${n}`:`${o7}?patient=${e}&includeEncounterless=${t}`}async function ia(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)),a1(`${o7}`,{method:"POST",body:r})}function io(e,t){return a1(`${o7}/${e}`,{method:"DELETE",signal:t.signal})}async function ii(e,t){return e?(await a1(`${aX}/Patient/${e}`,t)).data:null}function is(e,t){let n=new CustomEvent(`openmrs:${e}`,{detail:t??void 0,cancelable:!0,bubbles:!0});return window.dispatchEvent(n)}function il(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 iu(e){return{uuid:e.uuid,display:e.display}}function ic(e=null,t=null){let n=new URLSearchParams;e&&n.set("tag",e),t&&n.set("q",t);let r=n.toString();return a1(`${aJ}/location${r?"?"+r:""}`).then(e=>e.data.results.map(iu))}function id(e){return{uuid:e.uuid,display:e.display,name:e.name}}let im=`${aJ}/visittype`;function ip(e=im){return a1(e).then(e=>e.data.results.map(id))}var ih=((ee={}).NEWVISIT="startVisit",ee.EDITVISIT="editVisit",ee.LOADING="loadingVisit",ee),ig=((et={}).NOTSTARTED="notStarted",et.ONGOING="ongoing",et);let iy="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))",iv=function(){try{return JSON.parse(sessionStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null};function ib(){return H("visit",iv)}function iw(e,t){ib().setState({patientUuid:e,manuallySetVisitUuid:t})}function ix(e,t){return a1(`${aJ}/visit`,{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function iD(e,t,n){return a1(`${aJ}/visit/${e}`,{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}function iE(e,t,n){return a1(`${aJ}/visit?patient=${e}&v=${n??iy}`,{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}})}ib().subscribe(e=>{var t;t=e,sessionStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))});class i_{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+i_.version}static addUnaryOp(e){return i_.max_unop_len=Math.max(e.length,i_.max_unop_len),i_.unary_ops[e]=1,i_}static addBinaryOp(e,t,n){return i_.max_binop_len=Math.max(e.length,i_.max_binop_len),i_.binary_ops[e]=t,n?i_.right_associative.add(e):i_.right_associative.delete(e),i_}static addIdentifierChar(e){return i_.additional_identifier_chars.add(e),i_}static addLiteral(e,t){return i_.literals[e]=t,i_}static removeUnaryOp(e){return delete i_.unary_ops[e],e.length===i_.max_unop_len&&(i_.max_unop_len=i_.getMaxKeyLen(i_.unary_ops)),i_}static removeAllUnaryOps(){return i_.unary_ops={},i_.max_unop_len=0,i_}static removeIdentifierChar(e){return i_.additional_identifier_chars.delete(e),i_}static removeBinaryOp(e){return delete i_.binary_ops[e],e.length===i_.max_binop_len&&(i_.max_binop_len=i_.getMaxKeyLen(i_.binary_ops)),i_.right_associative.delete(e),i_}static removeAllBinaryOps(){return i_.binary_ops={},i_.max_binop_len=0,i_}static removeLiteral(e){return delete i_.literals[e],i_}static removeAllLiterals(){return i_.literals={},i_}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 i_(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 i_.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!i_.binary_ops[String.fromCharCode(e)]||i_.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return i_.isIdentifierStart(e)||i_.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(i_.hooks[e]){let n={context:this,node:t};return i_.hooks.run(e,n),n.node}return t}searchHook(e){if(i_.hooks[e]){let t={context:this};return i_.hooks[e].find(function(e){return e.call(t.context,t),t.node}),t.node}}gobbleSpaces(){let e=this.code;for(;e===i_.SPACE_CODE||e===i_.TAB_CODE||e===i_.LF_CODE||e===i_.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:i_.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)===i_.SEMCOL_CODE||n===i_.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,i_.max_binop_len),t=e.length;for(;t>0;){if(i_.binary_ops.hasOwnProperty(e)&&(!i_.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!i_.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:i_.binaryPrecedence(t),right_a:i_.right_associative.has(t)},(i=this.gobbleToken())||this.throwError("Expected expression after "+t),r=[o,a,i];t=this.gobbleBinaryOp();){if(0===(n=i_.binaryPrecedence(t))){this.index-=t.length;break}a={value:t,prec:n,right_a:i_.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:i_.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:i_.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,i_.isDecimalDigit(e)||e===i_.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===i_.SQUOTE_CODE||e===i_.DQUOTE_CODE)r=this.gobbleStringLiteral();else if(e===i_.OBRACK_CODE)r=this.gobbleArray();else{for(n=(t=this.expr.substr(this.index,i_.max_unop_len)).length;n>0;){if(i_.unary_ops.hasOwnProperty(t)&&(!i_.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!i_.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:i_.UNARY_EXP,operator:t,argument:e,prefix:!0})}t=t.substr(0,--n)}i_.isIdentifierStart(e)?(r=this.gobbleIdentifier(),i_.literals.hasOwnProperty(r.name)?r={type:i_.LITERAL,value:i_.literals[r.name],raw:r.name}:r.name===i_.this_str&&(r={type:i_.THIS_EXP})):e===i_.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===i_.PERIOD_CODE||t===i_.OBRACK_CODE||t===i_.OPAREN_CODE||t===i_.QUMARK_CODE;){let n;if(t===i_.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==i_.PERIOD_CODE)break;n=!0,this.index+=2,this.gobbleSpaces(),t=this.code}this.index++,t===i_.OBRACK_CODE?((e={type:i_.MEMBER_EXP,computed:!0,object:e,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),(t=this.code)!==i_.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):t===i_.OPAREN_CODE?e={type:i_.CALL_EXP,arguments:this.gobbleArguments(i_.CPAREN_CODE),callee:e}:(t===i_.PERIOD_CODE||n)&&(n&&this.index--,this.gobbleSpaces(),e={type:i_.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(;i_.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(this.code===i_.PERIOD_CODE)for(e+=this.expr.charAt(this.index++);i_.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++));i_.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);i_.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+e+this.char+")")}return n=this.code,i_.isIdentifierStart(n)?this.throwError("Variable names cannot start with a number ("+e+this.char+")"):(n===i_.PERIOD_CODE||1===e.length&&e.charCodeAt(0)===i_.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:i_.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:i_.LITERAL,value:e,raw:this.expr.substring(t,this.index)}}gobbleIdentifier(){let e=this.code,t=this.index;for(i_.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length;)if(e=this.code,i_.isIdentifierPart(e))this.index++;else break;return{type:i_.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===i_.CPAREN_CODE&&r&&r>=t.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}if(a===i_.COMMA_CODE){if(this.index++,++r!==t.length){if(e===i_.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===i_.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!==i_.COMPOUND||this.throwError("Expected comma"),t.push(e)}}return n||this.throwError("Expected "+String.fromCharCode(e)),t}gobbleGroup(){this.index++;let e=this.gobbleExpressions(i_.CPAREN_CODE);if(this.code===i_.CPAREN_CODE)return(this.index++,1===e.length)?e[0]:!!e.length&&{type:i_.SEQUENCE_EXP,expressions:e};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:i_.ARRAY_EXP,elements:this.gobbleArguments(i_.CBRACK_CODE)}}}Object.assign(i_,{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)})}}(i_),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"}),i_.max_unop_len=i_.getMaxKeyLen(i_.unary_ops),i_.max_binop_len=i_.getMaxKeyLen(i_.binary_ops);let iS=e=>new i_(e).parse(),iC=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(i_).filter(e=>!iC.includes(e)&&void 0===iS[e]).forEach(e=>{iS[e]=i_[e]}),iS.Jsep=i_,iS.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 ik="ArrowFunctionExpression",iP={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)}},iT={...iP,Promise};function iR(e,t={}){return ij(e,t,iF)}async function iO(e,t={}){return iI(e,t,iF)}function iN(e,t={}){return ij(e,t,iB)}function i$(e,t={}){return iI(e,t,iB)}function iM(e,t={}){return ij(e,t,iV)}function iA(e,t={}){return iI(e,t,iV)}function ij(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=iK(t,iP),a=iU("string"==typeof e?iS(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 iI(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=iK(t,iT);return Promise.resolve(iU("string"==typeof e?iS(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 iL(e){return iS(e)}function iF(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||e instanceof Date}function iB(e){return"boolean"==typeof e}function iV(e){return"number"==typeof e}function iU(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=iU(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 iU(v.left,b)&&iU(v.right,b);case"||":return iU(v.left,b)||iU(v.right,b);case"??":return iU(v.left,b)??iU(v.right,b)}let w=iU(v.left,b),x=iU(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,iU(n.test,r)?iU(n.consequent,r):iU(n.alternate,r);case"CallExpression":return iY(iH(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 iU(a.body,o.addVariables(t))}).bind(null);case"MemberExpression":return iY(iz(e,t));case"ArrayExpression":return i=e,s=t,i.elements?.map(iq(s));case"SequenceExpression":let E;return l=e,u=t,(E=l.expressions.map(iq(u)))[E.length-1];case"NewExpression":var _=e,S=t;if(_.callee&&"Identifier"===_.callee.type){let e=_.arguments?.map(iq(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,(iJ(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 C,k;return m=e,p=t,C=m.expressions?.map(iq(p))??[],(k=m.quasis?.map(iq(p))??[]).filter(e=>!e.tail).map(e=>e.value).join("")+C.join("")+k.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 iW(e,t){switch(e.type){case"Literal":return e.value;case"Identifier":return e.name;case"MemberExpression":return iW(e.property,t);default:throw`VisitExpressionName does not support expression of type '${e.type}'`}}function iH(e,t){let n=iG(e.callee,t);if(n===iZ||e.optional&&null==n)return iZ;let r=e.arguments?.map(iq(t));if(n){if("function"!=typeof n)throw`${i0(e.callee)} is not a function`}else throw`No function named ${i0(e.callee)} is defined in this context`;return n(...r)}function iz(e,t){let n=iG(e.object,t);if(n===iZ||e.optional&&null==n)return iZ;if(null===n)throw TypeError(`TypeError: cannot read properties of null (reading '${iQ(e.property,t)}')`);if(void 0===n)switch(e.object.type){case"Identifier":{let n=iW(e.object,t);throw ReferenceError(`ReferenceError: ${n} is not defined`)}case"MemberExpression":throw TypeError(`TypeError: cannot read properties of undefined (reading '${iQ(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}(iU(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);iJ(r),function(e,t){if(iX.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 iK(e,t){let n={variables:{...e},globals:{...t},addVariables(e){return this.variables={...this.variables,...e},this}};return n.addVariables.bind(n),n}iS.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:ik,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=ik,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)})}}),iS.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"}})}}),iS.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)})}}),iS.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")}})}}),iS.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 :")}})}}),iS.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})}}),iS.addBinaryOp("in",7),iS.addBinaryOp("??",1);let iZ=Symbol("optional chain short-circuited");function iG(e,t){switch(e.type){case"MemberExpression":return iz(e,t);case"CallExpression":return iH(e,t);default:return iU(e,t)}}function iY(e){return e===iZ?void 0:e}function iq(e){return function(t){return null===t?null:iU(t,e)}}function iJ(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:`Cannot access the ${e} property of objects`}}let iX=new Set(["toString","valueOf","hasOwnProperty"]);function iQ(e,t){try{return iW(e,t)}catch{return"<computed>"}}function i0(e){return e?"MemberExpression"===e.type?e.property?.name:e.name:null}function i1(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:{...iT},boundNames:new Set,variables:new Set};return i4("string"==typeof e?iS(e):e,t),[...t.variables]}function i4(e,t){switch(e.type){case"UnaryExpression":return n=e,r=t,void i4(n.argument,r);case"BinaryExpression":return a=e,o=t,void(i4(a.left,o),i4(a.right,o));case"ConditionalExpression":return i=e,s=t,void(i4(i.consequent,s),i4(i.test,s),i4(i.alternate,s));case"CallExpression":return l=e,u=t,void(i4(l.callee,u),l.arguments?.map(i2(u)));case"ArrowFunctionExpression":var n,r,a,o,i,s,l,u,c,d,m,p,f,h,g,y,v,b,w,x,D=e,E=t;let _=new Set(E.boundNames);for(let e of D.params??[])e?.type==="Identifier"&&_.add(e.name);i4(D.body,{...E,boundNames:_});return;case"MemberExpression":return c=e,d=t,void(i4(c.object,d),c.computed&&i4(c.property,d));case"ArrayExpression":return m=e,p=t,void m.elements?.map(i2(p));case"SequenceExpression":return f=e,h=t,void f.expressions?.map(i2(h));case"NewExpression":return g=e,y=t,void g.arguments?.map(i2(y));case"Literal":case"TemplateElement":return;case"Identifier":return v=e,b=t,void(v.name in b.globals||b.boundNames.has(v.name)||b.variables.add(v.name));case"TemplateLiteral":return w=e,x=t,void(w.expressions?.map(i2(x)),w.quasis?.map(i2(x)));default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function i2(e){return function(t){return null===t?null:i4(t,e)}}let i3=H("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 i6(e,t,n){i3.setState(r=>({flags:{...r.flags,[e]:{enabled:r.flags[e]?.enabled??!1,label:t,description:n}}}))}function i5(){let e=i3.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 i9(e){return i3.getState().flags[e].enabled}function i8(e,t){i3.subscribe(n=>{t(n.flags[e].enabled)})}function i7(e,t){i3.setState(n=>({flags:{...n.flags,[e]:{...n.flags[e],enabled:t}}}))}i3.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 se=ez(function(e,t,n){eM(e,t,n)});let st=V("extensionsInternal",{slots:{},extensions:{}}),sn=V("extensionRenderings",{renderings:new Map}),sr=()=>H("extensionsInternal",{slots:{},extensions:{}}),sa=()=>H("extensionRenderings",{renderings:new Map});function so(e){let t=st.getState(),n=e(t);n!==t&&st.setState(n)}let si=null,ss=null;function sl(){let e=sn.getState();return si&&e===ss||(si=new Map(e.renderings),ss=e,function(e){for(let t of(sv.clear(),e.values()))sw(t,1);sb=!0}(si)),si}function su(e){ss={renderings:e},sn.setState(ss,!0)}function sc(e){let t=sl();t.has(e.renderingId)||(t.set(e.renderingId,e),sw(e,1),su(t))}function sd(e){let t=sl(),n=t.get(e);n&&(t.delete(e),sw(n,-1),su(t))}let sm=()=>H("extensions",{slots:{}}),sp=0,sf=new Set;function sh(e){sp++;try{return e()}finally{if(0==--sp&&sf.size>0){let e=Array.from(sf);for(let t of(sf.clear(),e))sg(t)}}}function sg(e){try{e()}catch(t){console.error(`The extension system's '${e.name}' recomputation failed`,t)}}function sy(e){sp>0?sf.add(e):sg(e)}let sv=new Map,sb=!1;function sw(e,t){let n=JSON.stringify([e.slotName,e.extensionId,e.slotModuleName,e.extensionModuleName]),r=sv.get(n);if(!r){if(t<0)return;sv.set(n,{count:1,record:{slotModuleName:e.slotModuleName,extensionModuleName:e.extensionModuleName,slotName:e.slotName,extensionId:e.extensionId}}),sb=!0;return}r.count+=t,r.count<1&&(sv.delete(n),sb=!0)}function sx(){var e,t;if(sl(),!sb)return;sb=!1;let n=Array.from(sv.values(),({record:e})=>e);n.sort(sD),e=tC.getState().mountedExtensions,t=n,e.length===t.length&&e.every((e,n)=>0===sD(e,t[n]))||tC.setState({mountedExtensions:n})}function sD(e,t){return sE(e.slotName,t.slotName)||sE(e.extensionId,t.extensionId)||sE(e.slotModuleName,t.slotModuleName)||sE(e.extensionModuleName,t.extensionModuleName)}function sE(e,t){return e===t?0:e<t?-1:1}sx(),sn.subscribe(()=>sy(sx));let s_=sr(),sS=sm(),sC=tP(),sk=tO(),sP=new Set,sT=!1;function sR(e){if(null===e)sP=null;else if(null!==sP)for(let t of e)sP.add(t);sy(sO)}function sO(){if(!sT){sT=!0;try{for(let e=1;;e++){let t=sP;if(null!==t&&0===t.size)return;sP=new Set;try{!function(e,t,n,r,a,o=null){let i=sS.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}=tR(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}=s_.getState(),i=new Set(r),s=[...t,...n].filter(e=>!i.has(e)),l=sV(a),u=sV(t),c=new Map(s.map(e=>[e,function(e,t,n,r){let a=t.get(e);if(void 0!==a)return a;{if(void 0!==n)return 1e3+n;let t=r.get(e);return void 0!==t?2e3+t:3e3}}(e,l,o[sM(e)]?.order,u)]));return s.sort((e,t)=>c.get(e)-c.get(t))}(n,t.slots[e].attachedIds),s=[];for(let l of i){let{config:i}=tN(r,e,l),u=t$(n,e,l),c=u?se({},i,u):i,d=sM(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||!on(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)&&sS.setState({slots:s})}(s_.getState(),sC.getState(),sk.getState(),i3.getState(),a2.getState(),t)}catch(e){throw sP=null===t||null===sP?null:new Set([...t,...sP]),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{sT=!1}}}function sN(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 s$(e,t){return{moduleName:t,name:e,attachedIds:[]}}function sM(e){let[t]=e.split("#");return t}function sA(e,t){let n=sM(t);return e.extensions[n]}function sj(e){return sA(s_.getState(),e)}s_.subscribe((e,t)=>{sR(e.extensions!==t.extensions?null:sN(e.slots,t.slots))}),sC.subscribe((e,t)=>{sR(sN(e.slots,t.slots))}),sk.subscribe((e,t)=>{sR(sN(e.configs,t.configs))}),i3.subscribe(()=>sR(null)),a2.subscribe(()=>sR(null)),sR(null);let sI=e=>so(t=>({...t,extensions:{...t.extensions,[e.name]:{...e}}}));function sL(e,t){so(n=>{let r=n.slots[e];return r?{...n,slots:{...n.slots,[e]:{...r,attachedIds:[...r.attachedIds,t]}}}:{...n,slots:{...n.slots,[e]:{...s$(e),attachedIds:[t]}}}})}function sF(e,t){so(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 sB(e){so(t=>{let n=t.slots[e];return n?{...t,slots:{...t.slots,[e]:{...n,attachedIds:[]}}}:t})}function sV(e){let t=new Map;return e.forEach((e,n)=>{t.has(e)||t.set(e,n)}),t}function sU(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!!iN(o,a)}catch(t){return console.error(`Error while evaluating expression '${o}' for ${e.id}`+(r?` in ${r}`:""),t),!1}})}(sW(e),t,a2.getState().session,e)}function sW(e){return sS.getState().slots[e]?.candidateExtensions??[]}let sH=(e,t)=>s_.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=s$(t,e);return{...n,slots:{...n.slots,[t]:{...a}}}}),sz=()=>{sP=null,so(()=>({slots:{},extensions:{}})),sa().setState({renderings:new Map}),sS.setState({slots:{}})},sK=V("left-nav",{slotName:null,basePath:window.spaBase,mode:"normal"});function sZ({name:e,basePath:t,mode:n,componentContext:r,state:a}){sK.setState({slotName:e,basePath:t,mode:n??"normal",componentContext:r,state:a})}function sG(e){sK.getState().slotName===e&&sK.setState(sK.getInitialState(),!0)}let sY=V("modalRegistry",{modals:{}});function sq(e){sY.setState(t=>(t.modals[e.name]=e,t))}function sJ(e){let t=sY.getState().modals[e];if(!t){let n=sj(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.`),sq(t))}return t}let sX=V("workspace2",{registeredGroupsByName:{},registeredWindowsByName:{},registeredWorkspacesByName:{},openedGroup:null,openedWindows:[],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)=>{rs({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),rs))),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=sM(r),s=sj(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{sd(f)}catch(t){console.error(e,t)}};try{sc({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:""});var li=n(3338);function ls({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}`)},[]),(0,li.jsx)("a",{onClick:r=>{0===r.button&&!r.ctrlKey&&!r.shiftKey&&!r.altKey&&!r.metaKey&&(r.preventDefault(),n?.(r),aV({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:aF(e,t),...a,children:r})}let ll=({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?(0,li.jsx)("div",{ref:d,"data-extension-id":r?.extensionId,style:{position:"relative"},...n}):null};function lu(e){let t=(0,lr.useRef)(e);return O(t.current,e)||(t.current=e),t.current}function lc(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 ld=e=>e;function lm(e,t=ld,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?lc(e,n):null,[e,n]);return(0,lr.useMemo)(()=>i?{...o,...i}:o,[o,i])}function lp(e,t){return lm(e,ld,t)}function lf(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?lc(e,t):null,[t]);return(0,lr.useMemo)(()=>o?{...a,...o}:a,[a,o])}}let lh=[];Object.freeze(lh);let lg={candidateExtensions:lh};Object.freeze(lg);let ly=e=>{let t=(0,lr.useCallback)(t=>t.slots?.[e]??lg,[e]);return lm(sm(),t)},lv=e=>e.session;function lb(e,t){let{candidateExtensions:n}=ly(e),r=lm(a2,lv),a=lu(t);return(0,lr.useMemo)(()=>sU(e,a),[e,a,r,n])}function lw(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)(()=>{sH(n,e)},[n,e]),{extensions:lb(e,t),extensionSlotName:e,extensionSlotModuleName:n}}function lx(e){return e}function lD({name:e,extensionSlotName:t,select:n=lx,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}=lw(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(0,li.jsx)("div",{ref:l,"data-extension-slot-name":s,"data-extension-slot-module-name":c,style:{...o,position:"relative"},...i,children:s&&d?.map((e,t)=>(0,li.jsx)(lo.Provider,{value:{moduleName:c,featureName:"",extension:{extensionId:e.id,extensionSlotName:s,extensionSlotModuleName:c,extensionMeta:e.meta}},children:m?.[t]??("function"!=typeof r?r:null)??(0,li.jsx)(ll,{state:a})},e.id))})}var lE=n(6442),l_=n.n(lE);function lS(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 lC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lS(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)):lS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return 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 lP(e){return(lP="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 lT(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(lP(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(lP(e)));return e}}var lR=null;try{lR=require("react").createContext()}catch(e){}var lO={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 lN(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then(function(t){e.rootComponent=t})}function l$(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=lI(e,t,function(){n(this)}),i=lT(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:lj(e),renderType:"function"==typeof(a=e).renderType?a.renderType():a.renderType});e.domElements[t.name]=i,e.renderResults[t.name]=s})}function lM(e,t){return new Promise(function(n){e.unmountResolves[t.name]=n;var r=e.renderResults[t.name];r&&r.unmount?r.unmount():lj(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]})}function lA(e,t){return new Promise(function(n){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(n);var r=lI(e,t,null),a=e.renderResults[t.name];if(a&&a.render)a.render(r);else{var o=lT(e,t)();lj(e).render(r,o)}})}function lj(e){return e.ReactDOMClient||e.ReactDOM}function lI(e,t,n){var r=e.React.createElement(e.rootComponent,t),a=lR?e.React.createElement(lR.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,lC(lC({},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 lL=n(7807),lF=n(1619),lB=n.n(lF),lV=n(3432);let lU={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},lW=new Map;(0,lV.initCache)(lW);let lH={errorRetryCount:3,fetcher:a1,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,shouldRetryOnError:e=>{if(e instanceof a4){let t=e.response.status;return!!(t>=500)||401===t||403===t||429===t}return!0},provider:()=>lW};function lz(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw Error("Invalid options");let t=Object.assign({},lU,e),n={...lH,...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(0,li.jsx)("div",{children:"An error has occurred. Please try reloading the page."});{let r=(0,li.jsx)(lr.Suspense,{fallback:null,children:(0,li.jsx)(lF.SWRConfig,{value:n,children:(0,li.jsx)(lo.Provider,{value:this.state.config,children:t.disableTranslations?(0,li.jsx)(e,{...this.props}):(0,li.jsx)(lL.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,children:(0,li.jsx)(e,{...this.props})})})})});return t.strictMode&&la().StrictMode?(0,li.jsx)(la().StrictMode,{children: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 lK(e,t){return function(e){if("object"!==lk(e))throw Error("single-spa-react requires a configuration object");var t,n=lC(lC({},lO),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");!lR&&n.React.createContext&&(lR=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:lN.bind(null,n),mount:l$.bind(null,n),unmount:lM.bind(null,n)};return n.parcelCanUpdate&&(r.update=lA.bind(null,n)),r}({React:la(),ReactDOMClient:l_(),rootComponent:lz(t)(e)})}function lZ(e,t){return()=>e().then(({default:e})=>lK(e,t))}function lG(e,t){return()=>Promise.resolve(lK(e,t))}let lY=lZ,lq=A()(()=>({}));W("openmrs-app-context",lq);let lJ={};function lX(e,t=e=>e){let n=lq.getState();return e in n?Object.freeze(Object.assign({},t?t(n[e]):n[e])):null}function lQ(e,t){lq.setState(n=>(e in n||(n[e]={}),n[e]=t(n[e]),Object.assign({},n)))}function l0(e){return null===e?null:Object.freeze(Object.assign({},e))}let l1=new Map;function l4(e,t){let n=(0,lr.useRef)(t??{}),r=(0,lr.useRef)(t=>lQ(e,t)),a=(0,lr.useRef)(Symbol());return(0,lr.useEffect)(()=>{let n=t??{},r=a.current;return null===lX(e)?!function(e,t=lJ){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===lJ?{}: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.`),lQ(e,()=>n)),l1.set(e,r),()=>{l1.get(e)===r&&(lq.setState(t=>(e in t&&delete t[e],t)),l1.delete(e))}},[e]),(0,lr.useEffect)(()=>{let r=t??{};O(n.current,r)||(lQ(e,()=>r),n.current=r)},[t]),r.current}function l2({namespace:e,value:t}){return l4(e,t),null}let l3=({children:e,value:t,fallback:n})=>t?(0,li.jsx)(li.Fragment,{children:e}):n?(0,li.jsx)(li.Fragment,{children:n}):null;function l6(){let e=(0,lr.useRef)(null);return(!e.current||e.current.signal.aborted)&&(e.current=new AbortController),(0,lr.useEffect)(()=>{let t=e.current;return()=>t?.abort()},[]),e.current}function l5(e,t=e=>e??{}){let[n,r]=(0,lr.useState)(()=>{if(l9(e))return;let n=lX(e);if(null!==n)return t?t(n):n});return(0,lr.useEffect)(()=>{if(l9(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=>O(e,n)?e:n)})(l0(a=lX(e))),lq.subscribe(t=>{let r=e in t?t[e]:null;r!==a&&(a=r,n(l0(r)))})},[e,t]),n}function l9(e){return"string"!=typeof e||0===e.trim().length}function l8(e){let t=lb(e);return(0,lr.useMemo)(()=>t.map(e=>e.id),[t])}function l7(e){return ly(e).candidateExtensions}function ue(e,t,n){let{data:r,error:a,mutate:o,isLoading:i,isValidating:s}=lB()(e?ir(e,t,n):null,a1);return(0,lr.useMemo)(()=>({isLoading:i,data:r?.data.results??[],error:a,mutate:o,isValidating:s}),[r,a,i,s,o])}function ut(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 un={},ur=`No ComponentContext has been provided. This should come from "openmrsComponentDecorator".
|
|
16
|
-
Usually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".`;function ua(e,t,n){let r=un[e];if(r)return r;let a=new Promise(e=>{let r=n(t.getState());if(r)return void e(r);let a=t.subscribe(t=>{let r=n(t);r&&(a(),e(r))})});return un[e]=a,a.then(()=>{un[e]===a&&delete un[e]}),a}function uo(e){let{moduleName:t,extension:n}=(0,lr.useContext)(lo),r=e?.externalModuleName??t;if(!r&&!n)throw Error(ur);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 ua(e,t,e=>e.loaded?e.config:null);return n}(r),o=function(e){let t=(0,lr.useMemo)(tO,[]),n=function(e,t){let[n,r]=(0,lr.useState)(t?()=>{let n=tN(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=tN(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)throw ua(`${e.extensionSlotName}-${e.extensionId}`,t,t=>{let n=tN(t,e.extensionSlotName,e.extensionId);return n.loaded?n.config:null});return n||{}}(n);return(0,lr.useMemo)(()=>e?.externalModuleName&&r===e.externalModuleName?{...a}:{...a,...o},[r,e?.externalModuleName,a,o])}let ui=lb;function us(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 ul=n(3660),uu=n.n(ul);let uc=`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 ud(){let e=`${aJ}/emrapi/configuration?v=${uc}`,t=uu()(e,a1);return(0,lr.useMemo)(()=>({emrConfiguration:t.data?.data,isLoadingEmrConfiguration:t.isLoading,mutateEmrConfiguration:t.mutate,errorFetchingEmrConfiguration:t.error}),[t])}function um(){return(0,lr.useContext)(lo).extension}let up=lf(sr());function uf(e){let t=lb(e);return(0,lr.useMemo)(()=>Object.fromEntries(t.map(e=>[e.name,e.meta])),[t])}let uh=lf(sm());function ug(e){let{flags:t}=lm(i3);return t[e]?.enabled??!1}function uy(){let[,e]=(0,lr.useState)(0);return(0,lr.useCallback)(()=>{e(e=>e+1)},[])}function uv(e,t,n={}){return uw(e,t,ub,n)}let ub={getPaginatedUrl:(e,t,n)=>{if(!e)return null;{let r=new URL(a0(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 uw(e,t,n,r={}){let{getPaginatedUrl:a,getTotalCount:o,getCurrentPageSize:i,getData:s}=n,{immutable:l,swrConfig:u}=r,c=r.fetcher??a1,[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?uu():lB())(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),C=(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 k=(0,lr.useCallback)(()=>{C(h.current+1)},[C]),P=(0,lr.useCallback)(()=>{C(h.current-1)},[C]);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:C,goToNext:k,goToPrevious:P,..._}}function ux(e,t,n={}){return uw(e,t,uD(),n)}function uD(){return{getPaginatedUrl:(e,t,n)=>{if(!e)return null;{let r=new URL(a0(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 uE=n(682),u_=n.n(uE);function uS(e,t={}){return uC(e,ub,t)}function uC(e,t,n={}){let{swrInfiniteConfig:r,immutable:a}=n,{getNextUrl:o,getTotalCount:i,getData:s}=t,l=n.fetcher??a1,u=(0,lr.useCallback)((n,r)=>0==n?e?.toString()??null:t.getNextUrl(r.data),[e]),{data:c,size:d,setSize:m,...p}=u_()(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 uk(e,t={}){return uP(e,ub,t)}function uP(e,t,n={}){let r=uC(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 uT(e,t={}){return uP(e,uD(),t)}function uR(e,t={}){return uC(e,uD(),t)}function uO(){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 uN(){let[e,t]=(0,lr.useState)(uO);return(0,lr.useEffect)(()=>{let e=()=>{t(uO())};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}let u$=e=>"small-desktop"===e||"large-desktop"===e;function uM(e){let t=(0,lr.useContext)(lo);(0,lr.useEffect)(()=>(t&&t.moduleName&&(e.componentContext=t),sZ(e),()=>{sG(e.name)}),[t,e])}function uA(){return lm(sK)}let uj=[];function uI(e=null,t=null){let n=new URLSearchParams;e&&n.set("tag",e),t&&n.set("q",t);let r=n.toString(),{data:a}=uk(`${aJ}/location${r?"?"+r:""}`,{immutable:!0});return a??uj}function uL(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 uF(e){let t=(0,lr.useRef)(null);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 uB(e,t={}){let{abortController:n,fetchInit:r,url:a,swrConfig:o}=t,i=l6(),s=(0,lr.useMemo)(()=>r?.signal??n?.signal??i.signal,[n?.signal,r?.signal,i.signal]),l=(0,lr.useCallback)(e=>a1(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 lB()(e,l,o)}function uV(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 uU(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 uW(){let e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function uH(e){let[t,n]=(0,lr.useState)(e??uW()),{data:r,error:a,isValidating:o}=lB()(t?["patient",t]:null,()=>ii(t,{}));return(0,lr.useEffect)(()=>{let e=()=>{let e=uW();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 uz(){let e=`${aJ}/metadatamapping/termmapping?v=custom:(metadataUuid)&code=emr.primaryIdentifierType`,{data:t,error:n,isLoading:r}=lB()(e,a1);return(0,lr.useMemo)(()=>({primaryIdentifierCode:t?.data?.results[0]?.metadataUuid,isLoading:r,error:n}),[t,n,r])}function uK(e,t,n,r){let a=e?.slotName===t&&e.slotModuleName===n?e.components:null,o=new Map;for(let e of r)o.set(e,a?.get(e)??function(e,t,n){let r=sM(n),a=e=>e.extensions[r]?.meta,o=({state:r})=>{let o=lm(sr(),a),i=(0,lr.useMemo)(()=>({moduleName:t,featureName:"",extension:{extensionId:n,extensionSlotName:e,extensionSlotModuleName:t,extensionMeta:o}}),[o]);return(0,li.jsx)(lo.Provider,{value:i,children:(0,li.jsx)(ll,{state:r})})};return o.displayName=`RenderableExtension(${n})`,o}(t,n,e));return{slotName:t,slotModuleName:n,components:o}}function uZ(e){let{extensions:t,extensionSlotModuleName:n}=lw(e),r=(0,lr.useMemo)(()=>new Set(e?t.map(e=>e.id):[]),[e,t]),[a,o]=(0,lr.useState)(()=>uK(null,e,n,r)),i=a;return a.slotName===e&&a.slotModuleName===n&&a.components.size===r.size&&[...r].every(e=>a.components.has(e))||o(i=uK(a,e,n,r)),(0,lr.useMemo)(()=>e?t.flatMap(e=>{let t=i.components.get(e.id);return t?[t]:[]}):[],[e,t,i])}function uG(){let e=(0,lr.useRef)(null),[t,n]=(0,lr.useState)(null),r=null;if(!t){if(i){let e=a8().getState();e.loaded&&(r=e.session)}else i=new Promise(t=>{let n=({loaded:n,session:a})=>{n&&(t(a),r=a,e.current&&(e.current(),e.current=null))};n(a8().getState()),r||(e.current=a8().subscribe(n))});if(r)n(r);else throw i}(0,lr.useEffect)(()=>(e.current||(e.current=a8().subscribe(({loaded:e,session:t})=>{e&&(r=t,n(t))})),()=>{e.current&&(e.current(),e.current=null)}),[]);let a=t||r;if(!a)if(i)throw console.warn("useSession is in an unexpected state. Attempting to recover."),i;else throw Error("useSession is in an invalid state.");return a}let uY=({privilege:e,fallback:t,children:n})=>{let[r,a]=(0,lr.useState)(null);return((0,lr.useEffect)(()=>{let e=a8(),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&&on(e,r))?(0,li.jsx)(li.Fragment,{children:n}):t?(0,li.jsx)(li.Fragment,{children:t}):null};var uq=n(222),uJ=n.n(uq),uX=n(5602);let uQ=new Map;function u0(){for(let e of Array.from(uQ.values()))e()}let u1={setVisitContext:(e,t)=>null==t?{manuallySetVisitUuid:null}:{manuallySetVisitUuid:t.uuid,patientUuid:t.patient?.uuid}};function u4(e){let t=(0,lr.useId)();return(0,lr.useEffect)(()=>{if(e)return uQ.set(t,e),()=>{uQ.delete(t)}},[t,e]),{...lp(ib(),u1),mutateVisit:u0}}function u2(e,t=iy){let n=(0,lr.useRef)(void 0),{patientUuid:r,manuallySetVisitUuid:a,setVisitContext:o}=u4((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}=lB()(e?`${aJ}/visit${s}`:null,a1),{data:p,error:f,mutate:h,isValidating:g}=lB()(e&&i?`${aJ}/visit${l}`:null,a1),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}}uJ().extend(uX);let u3=[];function u6(){let{data:e}=uu()(im,ip);return e??u3}let u5=new Map;async function u9(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 oF(a);return i&&Object.hasOwn(i,o)&&"function"==typeof i[o]?u7(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`),u8)}let u8={bootstrap:()=>Promise.resolve(),mount:()=>Promise.resolve(),unmount:()=>Promise.resolve()};async function u7(e,t){if(e in u5)await u5[e];else{let n=t??await oF(e);await (u5[e]=new Promise((t,r)=>{if(Object.hasOwn(n,"startupApp")){let a=n.startupApp;if("function"==typeof a)return Promise.resolve(a()).then(()=>{t4(e),t(null)}).catch(r)}t4(e),t(null)}))}}function ce(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 on=V("session",{loaded:!1,session:null}),or=0,oa=null;function oo(){return oa||(on.getState().loaded&&or>=Date.now()-6e4?null:ou())}function oi(e){let t=e?.includeAuthStatus??!0,n=e=>t?e:e.user,r=oo();return r?new Promise(e=>{let t=()=>{let t=on.getState();t.loaded&&(a(),e(n(t.session)))},a=on.subscribe(t);r.then(t,t)}):Promise.resolve(n(on.getState().session))}function os(){return oo(),on}function ol(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 ou(e,t){or=Date.now(),o??(o=or);let n={};e&&t&&(n.Authorization=`Basic ${window.btoa(`${e}:${t}`)}`);let r=ob(oe(a8,{headers:n,rejectAuthFailure:!0})),a=()=>{oa===r&&(oa=null)};return r.then(a,a),oa=r,r}function oc(){on.setState({loaded:!0,session:{authenticated:!1,sessionId:""}},!0)}function od(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 om(){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(on.getState()),e||(t=on.subscribe(r))})}async function op(){return(await oi()).sessionLocation}async function of(e,t){return ob(oe(a8,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},rejectAuthFailure:!0,signal:t?.signal}))}async function oh(e,t){return await oe(a8,{method:"POST",body:{locale:e},headers:{"Content-Type":"application/json"},signal:t?.signal}),ou()}async function og(e,t,n){return n||(n=new AbortController),await oe(`${a5}/user/${e}`,{method:"POST",body:{userProperties:t},headers:{"Content-Type":"application/json"},signal:n.signal}),ou()}async function oy(e,t=!1){let n=await oe(t?`${a8}?rememberMe=true`:a8,{headers:{"X-Totp-Code":e}});return n.data?.authenticated?(await ou()).session:n.data}async function ov(){try{await oe(a8,{method:"DELETE",rejectAuthFailure:!0})}catch(e){if(!ow(e))throw e}oc(),await ou().catch(()=>{})}function ob(e){return new Promise((t,n)=>{e.then(e=>{if("object"==typeof e?.data){let n={loaded:!0,session:e.data};on.setState(n,!0),t(n)}else!function(e){if(!e?.redirected||!e.url)return!1;try{return new URL(e.url,window.location.href).pathname.replace(/\/+$/,"").endsWith("/initialsetup")}catch{return!1}}(e)?n(ox(Error("The session endpoint did not respond with a session"))):n(ox(Error("The server is still starting up"),!0))}).catch(e=>{var r,a;if(ow(e)){"object"==typeof(r=e.responseBody)&&null!==r&&!1===r.authenticated?on.setState({loaded:!0,session:e.responseBody},!0):oc(),t(on.getState());return}(a=e)instanceof ot&&502===a.response.status&&!on.getState().loaded&&void 0!==o&&Date.now()-o<18e4?n(ox(e,!0)):(P(`Failed to fetch new session information: ${e}`),n(ox(e)))})})}function ow(e){return e instanceof ot&&(401===e.response.status||403===e.response.status)}function ox(e,t=!1){return on.getState().loaded||on.setState({loaded:!1,session:null,error:e instanceof Error?e:Error(String(e)),initializing:t},!0),on.getState()}function oD(){return"development"===window.spaEnv||"true"===localStorage.getItem("openmrs:devtools")}on.subscribe(e=>{e.loaded&&e.session&&ol(e.session)});let oE={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"};function o_(){t0("@openmrs/esm-api",a3),ou()}let oS="import-map-override:",oC="import-map-overrides-disabled",ok="import-map-overrides:change",oP=!1,oT=null,oR=null;async function oO(){return oR??(oR=oN().then(({map:e,complete:t})=>(t||(oR=null),e))),oR}async function oN(){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:o$(t),complete:n}}function o$(e){let t={imports:{}};for(let n of e)n?.imports&&Object.assign(t.imports,n.imports);return t}function oM(){let e={};try{let t=oF();for(let n=0;n<localStorage.length;n++){let r=localStorage.key(n);if(r?.startsWith(oS)){let n=r.slice(oS.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 oA(){let e=await oO();return oP?o$([e,oT??oM()]):e}async function oj(){return oO()}async function oI(){return oP?o$([await oO(),oM()]):oO()}function oL(e){if(!oP)return{imports:{}};if(e){let e={};for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);if(n?.startsWith(oS)){let t=localStorage.getItem(n);t&&(e[n.slice(oS.length)]=t)}}return{imports:e}}return oM()}function oF(){if(!oP)return[];try{let e=localStorage.getItem(oC);if(e){let t=JSON.parse(e);if(Array.isArray(t))return t}}catch{}return[]}function oB(e){return!!oP&&oF().includes(e)}function oV(e,t){if(!oP)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.setItem(oS+e,t),window.dispatchEvent(new CustomEvent(ok))}catch(e){console.warn("[import-maps] Failed to write import-map override to localStorage",e)}}function oU(e){if(!oP)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.removeItem(oS+e);let t=oF().filter(t=>t!==e);t.length>0?localStorage.setItem(oC,JSON.stringify(t)):localStorage.removeItem(oC),window.dispatchEvent(new CustomEvent(ok))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}function oW(){if(!oP)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(oS)&&e.push(n)}e.forEach(e=>localStorage.removeItem(e)),localStorage.removeItem(oC),window.dispatchEvent(new CustomEvent(ok))}catch(e){console.warn("[import-maps] Failed to clear import-map overrides from localStorage",e)}}function oH(e){if(!oP)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{let t=oF().filter(t=>t!==e);t.length>0?localStorage.setItem(oC,JSON.stringify(t)):localStorage.removeItem(oC),window.dispatchEvent(new CustomEvent(ok))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}let oz=!1;function oK(){!oz&&(oz=!0,(oP="development"===window.spaEnv)&&(oT=oM()))}function oZ(e){return e.replace(/[\/\-@]/g,"_")}async function oG(e,t="./start",r){var a;let o,i=!r?.maxLoadingTime||r.maxLoadingTime<=0?6e5:r.maxLoadingTime;await Promise.race([oY(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=oZ(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 oY(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=oZ(e);if(!window[n]){let n=t??await oq();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 oL().imports;try{return await function(e){var t;let n=(t=window)[oJ]??(t[oJ]=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&&D({kind:"error",title:aZ("scriptLoadingFailed","Error: Script failed to load"),description:aZ("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:aZ("resetOverrides","Reset overrides"),onActionButtonClick(){oW(),window.location.reload()}}),Promise.reject(e)}}return Promise.resolve()}async function oq(){return oA()}let oJ=Symbol.for("__openmrs_script_loading");function oX(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,"modals")&&(!e.modals||!Array.isArray(e.modals))||Object.hasOwn(e,"workspaces2")&&(!e.workspaces2||!Array.isArray(e.workspaces2))||Object.hasOwn(e,"workspaceWindows2")&&(!e.workspaceWindows2||!Array.isArray(e.workspaceWindows2))||Object.hasOwn(e,"workspaceGroups2")&&(!e.workspaceGroups2||!Array.isArray(e.workspaceGroups2)))}function oQ(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&&oX(t))}let o0="openmrs-routes:",o1="openmrs-routes:change",o4=!1,o2=null,o3=null;async function o6(){return o3??(o3=o5().then(({map:e,complete:t})=>(t||(o3=null),e))),o3}async function o5(){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&&oQ(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:o9(t),complete:n}}function o9(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 o8(){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(o0)){let e=localStorage.getItem(n);e&&t.push({moduleName:n.slice(o0.length),raw:e})}}for(let n of(await Promise.allSettled(t.map(async({moduleName:e,raw:t})=>{let n=JSON.parse(t);if(oX(n))return{moduleName:e,routes:n};if("string"==typeof n&&n.startsWith("http")){let t=await fetch(n),r=await t.json();if(oX(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 o7(){let e=await o6();return o4?o9([e,o2??await o8()]):e}async function ie(){return o6()}async function it(){return o4?o9([await o6(),await o8()]):o6()}function ir(){if(!o4)return{};let e={};try{for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);if(n?.startsWith(o0)){let t=localStorage.getItem(n);t&&(e[n.slice(o0.length)]=t)}}}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}function ia(e,t){if(!o4)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{if("string"==typeof t)if(t.startsWith("http"))localStorage.setItem(o0+e,JSON.stringify(t));else{let n=JSON.parse(t);if(!oX(n))return void console.error(`The supplied routes for ${e} is not a valid OpenmrsAppRoutes object`,t);localStorage.setItem(o0+e,JSON.stringify(n))}else if(t instanceof URL)localStorage.setItem(o0+e,JSON.stringify(t.toString()));else{if(!oX(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(o0+e,JSON.stringify(t))}window.dispatchEvent(new CustomEvent(o1))}catch(e){console.warn("[route-maps] Failed to write route override to localStorage",e)}}function io(e){if(!o4)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{localStorage.removeItem(o0+e),window.dispatchEvent(new CustomEvent(o1))}catch(e){console.warn("[route-maps] Failed to remove route override from localStorage",e)}}function ii(){if(!o4)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(o0)&&e.push(n)}e.forEach(e=>localStorage.removeItem(e)),window.dispatchEvent(new CustomEvent(o1))}catch(e){console.warn("[route-maps] Failed to clear route overrides from localStorage",e)}}let is=null;function il(){return is||(is=(o4="development"===window.spaEnv)?o8().then(e=>{o2=e}):Promise.resolve())}let iu=`${a5}/attachment`;function ic(e,t){return oe(`${iu}/${e}`,{signal:t.signal})}function id(e,t,n,r){return oe(im(e,t,r),{signal:n.signal})}function im(e,t,n){return n?`${iu}?patient=${e}&encounter=${n}`:`${iu}?patient=${e}&includeEncounterless=${t}`}async function ip(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)),oe(`${iu}`,{method:"POST",body:r})}function ih(e,t){return oe(`${iu}/${e}`,{method:"DELETE",signal:t.signal})}async function ig(e,t){return e?(await oe(`${a9}/Patient/${e}`,t)).data:null}function iy(e,t){let n=new CustomEvent(`openmrs:${e}`,{detail:t??void 0,cancelable:!0,bubbles:!0});return window.dispatchEvent(n)}function iv(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 ib(e){return{uuid:e.uuid,display:e.display}}function iw(e=null,t=null){let n=new URLSearchParams;e&&n.set("tag",e),t&&n.set("q",t);let r=n.toString();return oe(`${a5}/location${r?"?"+r:""}`).then(e=>e.data.results.map(ib))}function ix(e){return{uuid:e.uuid,display:e.display,name:e.name}}let iD=`${a5}/visittype`;function iE(e=iD){return oe(e).then(e=>e.data.results.map(ix))}var i_=((ee={}).NEWVISIT="startVisit",ee.EDITVISIT="editVisit",ee.LOADING="loadingVisit",ee),iS=((et={}).NOTSTARTED="notStarted",et.ONGOING="ongoing",et);let iC="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))",ik=function(){try{return JSON.parse(sessionStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null};function iP(){return H("visit",ik)}function iT(e,t){iP().setState({patientUuid:e,manuallySetVisitUuid:t})}function iR(e,t){return oe(`${a5}/visit`,{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function iO(e,t,n){return oe(`${a5}/visit/${e}`,{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}function iN(e,t,n){return oe(`${a5}/visit?patient=${e}&v=${n??iC}`,{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}})}iP().subscribe(e=>{var t;t=e,sessionStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))});class i${static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+i$.version}static addUnaryOp(e){return i$.max_unop_len=Math.max(e.length,i$.max_unop_len),i$.unary_ops[e]=1,i$}static addBinaryOp(e,t,n){return i$.max_binop_len=Math.max(e.length,i$.max_binop_len),i$.binary_ops[e]=t,n?i$.right_associative.add(e):i$.right_associative.delete(e),i$}static addIdentifierChar(e){return i$.additional_identifier_chars.add(e),i$}static addLiteral(e,t){return i$.literals[e]=t,i$}static removeUnaryOp(e){return delete i$.unary_ops[e],e.length===i$.max_unop_len&&(i$.max_unop_len=i$.getMaxKeyLen(i$.unary_ops)),i$}static removeAllUnaryOps(){return i$.unary_ops={},i$.max_unop_len=0,i$}static removeIdentifierChar(e){return i$.additional_identifier_chars.delete(e),i$}static removeBinaryOp(e){return delete i$.binary_ops[e],e.length===i$.max_binop_len&&(i$.max_binop_len=i$.getMaxKeyLen(i$.binary_ops)),i$.right_associative.delete(e),i$}static removeAllBinaryOps(){return i$.binary_ops={},i$.max_binop_len=0,i$}static removeLiteral(e){return delete i$.literals[e],i$}static removeAllLiterals(){return i$.literals={},i$}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 i$(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 i$.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!i$.binary_ops[String.fromCharCode(e)]||i$.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return i$.isIdentifierStart(e)||i$.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(i$.hooks[e]){let n={context:this,node:t};return i$.hooks.run(e,n),n.node}return t}searchHook(e){if(i$.hooks[e]){let t={context:this};return i$.hooks[e].find(function(e){return e.call(t.context,t),t.node}),t.node}}gobbleSpaces(){let e=this.code;for(;e===i$.SPACE_CODE||e===i$.TAB_CODE||e===i$.LF_CODE||e===i$.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:i$.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)===i$.SEMCOL_CODE||n===i$.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,i$.max_binop_len),t=e.length;for(;t>0;){if(i$.binary_ops.hasOwnProperty(e)&&(!i$.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!i$.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:i$.binaryPrecedence(t),right_a:i$.right_associative.has(t)},(i=this.gobbleToken())||this.throwError("Expected expression after "+t),r=[o,a,i];t=this.gobbleBinaryOp();){if(0===(n=i$.binaryPrecedence(t))){this.index-=t.length;break}a={value:t,prec:n,right_a:i$.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:i$.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:i$.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,i$.isDecimalDigit(e)||e===i$.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===i$.SQUOTE_CODE||e===i$.DQUOTE_CODE)r=this.gobbleStringLiteral();else if(e===i$.OBRACK_CODE)r=this.gobbleArray();else{for(n=(t=this.expr.substr(this.index,i$.max_unop_len)).length;n>0;){if(i$.unary_ops.hasOwnProperty(t)&&(!i$.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!i$.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:i$.UNARY_EXP,operator:t,argument:e,prefix:!0})}t=t.substr(0,--n)}i$.isIdentifierStart(e)?(r=this.gobbleIdentifier(),i$.literals.hasOwnProperty(r.name)?r={type:i$.LITERAL,value:i$.literals[r.name],raw:r.name}:r.name===i$.this_str&&(r={type:i$.THIS_EXP})):e===i$.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===i$.PERIOD_CODE||t===i$.OBRACK_CODE||t===i$.OPAREN_CODE||t===i$.QUMARK_CODE;){let n;if(t===i$.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==i$.PERIOD_CODE)break;n=!0,this.index+=2,this.gobbleSpaces(),t=this.code}this.index++,t===i$.OBRACK_CODE?((e={type:i$.MEMBER_EXP,computed:!0,object:e,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),(t=this.code)!==i$.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):t===i$.OPAREN_CODE?e={type:i$.CALL_EXP,arguments:this.gobbleArguments(i$.CPAREN_CODE),callee:e}:(t===i$.PERIOD_CODE||n)&&(n&&this.index--,this.gobbleSpaces(),e={type:i$.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(;i$.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(this.code===i$.PERIOD_CODE)for(e+=this.expr.charAt(this.index++);i$.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++));i$.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);i$.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+e+this.char+")")}return n=this.code,i$.isIdentifierStart(n)?this.throwError("Variable names cannot start with a number ("+e+this.char+")"):(n===i$.PERIOD_CODE||1===e.length&&e.charCodeAt(0)===i$.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:i$.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:i$.LITERAL,value:e,raw:this.expr.substring(t,this.index)}}gobbleIdentifier(){let e=this.code,t=this.index;for(i$.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length;)if(e=this.code,i$.isIdentifierPart(e))this.index++;else break;return{type:i$.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===i$.CPAREN_CODE&&r&&r>=t.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}if(a===i$.COMMA_CODE){if(this.index++,++r!==t.length){if(e===i$.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===i$.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!==i$.COMPOUND||this.throwError("Expected comma"),t.push(e)}}return n||this.throwError("Expected "+String.fromCharCode(e)),t}gobbleGroup(){this.index++;let e=this.gobbleExpressions(i$.CPAREN_CODE);if(this.code===i$.CPAREN_CODE)return(this.index++,1===e.length)?e[0]:!!e.length&&{type:i$.SEQUENCE_EXP,expressions:e};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:i$.ARRAY_EXP,elements:this.gobbleArguments(i$.CBRACK_CODE)}}}Object.assign(i$,{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)})}}(i$),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"}),i$.max_unop_len=i$.getMaxKeyLen(i$.unary_ops),i$.max_binop_len=i$.getMaxKeyLen(i$.binary_ops);let iM=e=>new i$(e).parse(),iA=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(i$).filter(e=>!iA.includes(e)&&void 0===iM[e]).forEach(e=>{iM[e]=i$[e]}),iM.Jsep=i$,iM.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 ij="ArrowFunctionExpression",iI={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)}},iL={...iI,Promise};function iF(e,t={}){return iz(e,t,iG)}async function iB(e,t={}){return iK(e,t,iG)}function iV(e,t={}){return iz(e,t,iY)}function iU(e,t={}){return iK(e,t,iY)}function iW(e,t={}){return iz(e,t,iq)}function iH(e,t={}){return iK(e,t,iq)}function iz(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=i1(t,iI),a=iJ("string"==typeof e?iM(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 iK(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=i1(t,iL);return Promise.resolve(iJ("string"==typeof e?iM(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 iZ(e){return iM(e)}function iG(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||e instanceof Date}function iY(e){return"boolean"==typeof e}function iq(e){return"number"==typeof e}function iJ(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=iJ(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 iJ(v.left,b)&&iJ(v.right,b);case"||":return iJ(v.left,b)||iJ(v.right,b);case"??":return iJ(v.left,b)??iJ(v.right,b)}let w=iJ(v.left,b),x=iJ(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,iJ(n.test,r)?iJ(n.consequent,r):iJ(n.alternate,r);case"CallExpression":return i3(iQ(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 iJ(a.body,o.addVariables(t))}).bind(null);case"MemberExpression":return i3(i0(e,t));case"ArrayExpression":return i=e,s=t,i.elements?.map(i6(s));case"SequenceExpression":let E;return l=e,u=t,(E=l.expressions.map(i6(u)))[E.length-1];case"NewExpression":var _=e,S=t;if(_.callee&&"Identifier"===_.callee.type){let e=_.arguments?.map(i6(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,(i5(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 C,k;return m=e,p=t,C=m.expressions?.map(i6(p))??[],(k=m.quasis?.map(i6(p))??[]).filter(e=>!e.tail).map(e=>e.value).join("")+C.join("")+k.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 iX(e,t){switch(e.type){case"Literal":return e.value;case"Identifier":return e.name;case"MemberExpression":return iX(e.property,t);default:throw`VisitExpressionName does not support expression of type '${e.type}'`}}function iQ(e,t){let n=i2(e.callee,t);if(n===i4||e.optional&&null==n)return i4;let r=e.arguments?.map(i6(t));if(n){if("function"!=typeof n)throw`${i7(e.callee)} is not a function`}else throw`No function named ${i7(e.callee)} is defined in this context`;return n(...r)}function i0(e,t){let n=i2(e.object,t);if(n===i4||e.optional&&null==n)return i4;if(null===n)throw TypeError(`TypeError: cannot read properties of null (reading '${i8(e.property,t)}')`);if(void 0===n)switch(e.object.type){case"Identifier":{let n=iX(e.object,t);throw ReferenceError(`ReferenceError: ${n} is not defined`)}case"MemberExpression":throw TypeError(`TypeError: cannot read properties of undefined (reading '${i8(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}(iJ(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);i5(r),function(e,t){if(i9.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 i1(e,t){let n={variables:{...e},globals:{...t},addVariables(e){return this.variables={...this.variables,...e},this}};return n.addVariables.bind(n),n}iM.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:ij,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=ij,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)})}}),iM.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"}})}}),iM.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)})}}),iM.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")}})}}),iM.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 :")}})}}),iM.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})}}),iM.addBinaryOp("in",7),iM.addBinaryOp("??",1);let i4=Symbol("optional chain short-circuited");function i2(e,t){switch(e.type){case"MemberExpression":return i0(e,t);case"CallExpression":return iQ(e,t);default:return iJ(e,t)}}function i3(e){return e===i4?void 0:e}function i6(e){return function(t){return null===t?null:iJ(t,e)}}function i5(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:`Cannot access the ${e} property of objects`}}let i9=new Set(["toString","valueOf","hasOwnProperty"]);function i8(e,t){try{return iX(e,t)}catch{return"<computed>"}}function i7(e){return e?"MemberExpression"===e.type?e.property?.name:e.name:null}function se(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:{...iL},boundNames:new Set,variables:new Set};return st("string"==typeof e?iM(e):e,t),[...t.variables]}function st(e,t){switch(e.type){case"UnaryExpression":return n=e,r=t,void st(n.argument,r);case"BinaryExpression":return a=e,o=t,void(st(a.left,o),st(a.right,o));case"ConditionalExpression":return i=e,s=t,void(st(i.consequent,s),st(i.test,s),st(i.alternate,s));case"CallExpression":return l=e,u=t,void(st(l.callee,u),l.arguments?.map(sn(u)));case"ArrowFunctionExpression":var n,r,a,o,i,s,l,u,c,d,m,p,f,h,g,y,v,b,w,x,D=e,E=t;let _=new Set(E.boundNames);for(let e of D.params??[])e?.type==="Identifier"&&_.add(e.name);st(D.body,{...E,boundNames:_});return;case"MemberExpression":return c=e,d=t,void(st(c.object,d),c.computed&&st(c.property,d));case"ArrayExpression":return m=e,p=t,void m.elements?.map(sn(p));case"SequenceExpression":return f=e,h=t,void f.expressions?.map(sn(h));case"NewExpression":return g=e,y=t,void g.arguments?.map(sn(y));case"Literal":case"TemplateElement":return;case"Identifier":return v=e,b=t,void(v.name in b.globals||b.boundNames.has(v.name)||b.variables.add(v.name));case"TemplateLiteral":return w=e,x=t,void(w.expressions?.map(sn(x)),w.quasis?.map(sn(x)));default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function sn(e){return function(t){return null===t?null:st(t,e)}}let sr=H("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 sa(e,t,n){sr.setState(r=>({flags:{...r.flags,[e]:{enabled:r.flags[e]?.enabled??!1,label:t,description:n}}}))}function so(){let e=sr.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 si(e){return sr.getState().flags[e].enabled}function ss(e,t){sr.subscribe(n=>{t(n.flags[e].enabled)})}function sl(e,t){sr.setState(n=>({flags:{...n.flags,[e]:{...n.flags[e],enabled:t}}}))}sr.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 su=ez(function(e,t,n){eM(e,t,n)});let sc=V("extensionsInternal",{slots:{},extensions:{}}),sd=V("extensionRenderings",{renderings:new Map}),sm=()=>H("extensionsInternal",{slots:{},extensions:{}}),sp=()=>H("extensionRenderings",{renderings:new Map});function sf(e){let t=sc.getState(),n=e(t);n!==t&&sc.setState(n)}let sh=null,sg=null;function sy(){let e=sd.getState();return sh&&e===sg||(sh=new Map(e.renderings),sg=e,function(e){for(let t of(sk.clear(),e.values()))sT(t,1);sP=!0}(sh)),sh}function sv(e){sg={renderings:e},sd.setState(sg,!0)}function sb(e){let t=sy();t.has(e.renderingId)||(t.set(e.renderingId,e),sT(e,1),sv(t))}function sw(e){let t=sy(),n=t.get(e);n&&(t.delete(e),sT(n,-1),sv(t))}let sx=()=>H("extensions",{slots:{}}),sD=0,sE=new Set;function s_(e){sD++;try{return e()}finally{if(0==--sD&&sE.size>0){let e=Array.from(sE);for(let t of(sE.clear(),e))sS(t)}}}function sS(e){try{e()}catch(t){console.error(`The extension system's '${e.name}' recomputation failed`,t)}}function sC(e){sD>0?sE.add(e):sS(e)}let sk=new Map,sP=!1;function sT(e,t){let n=JSON.stringify([e.slotName,e.extensionId,e.slotModuleName,e.extensionModuleName]),r=sk.get(n);if(!r){if(t<0)return;sk.set(n,{count:1,record:{slotModuleName:e.slotModuleName,extensionModuleName:e.extensionModuleName,slotName:e.slotName,extensionId:e.extensionId}}),sP=!0;return}r.count+=t,r.count<1&&(sk.delete(n),sP=!0)}function sR(){var e,t;if(sy(),!sP)return;sP=!1;let n=Array.from(sk.values(),({record:e})=>e);n.sort(sO),e=tC.getState().mountedExtensions,t=n,e.length===t.length&&e.every((e,n)=>0===sO(e,t[n]))||tC.setState({mountedExtensions:n})}function sO(e,t){return sN(e.slotName,t.slotName)||sN(e.extensionId,t.extensionId)||sN(e.slotModuleName,t.slotModuleName)||sN(e.extensionModuleName,t.extensionModuleName)}function sN(e,t){return e===t?0:e<t?-1:1}sR(),sd.subscribe(()=>sC(sR));let s$=sm(),sM=sx(),sA=tP(),sj=tO(),sI=new Set,sL=!1;function sF(e){if(null===e)sI=null;else if(null!==sI)for(let t of e)sI.add(t);sC(sB)}function sB(){if(!sL){sL=!0;try{for(let e=1;;e++){let t=sI;if(null!==t&&0===t.size)return;sI=new Set;try{!function(e,t,n,r,a,o=null){let i=sM.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}=tR(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}=s$.getState(),i=new Set(r),s=[...t,...n].filter(e=>!i.has(e)),l=sq(a),u=sq(t),c=new Map(s.map(e=>[e,function(e,t,n,r){let a=t.get(e);if(void 0!==a)return a;{if(void 0!==n)return 1e3+n;let t=r.get(e);return void 0!==t?2e3+t:3e3}}(e,l,o[sW(e)]?.order,u)]));return s.sort((e,t)=>c.get(e)-c.get(t))}(n,t.slots[e].attachedIds),s=[];for(let l of i){let{config:i}=tN(r,e,l),u=t$(n,e,l),c=u?su({},i,u):i,d=sW(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||!od(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)&&sM.setState({slots:s})}(s$.getState(),sA.getState(),sj.getState(),sr.getState(),on.getState(),t)}catch(e){throw sI=null===t||null===sI?null:new Set([...t,...sI]),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{sL=!1}}}function sV(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 sU(e,t){return{moduleName:t,name:e,attachedIds:[]}}function sW(e){let[t]=e.split("#");return t}function sH(e,t){let n=sW(t);return e.extensions[n]}function sz(e){return sH(s$.getState(),e)}s$.subscribe((e,t)=>{sF(e.extensions!==t.extensions?null:sV(e.slots,t.slots))}),sA.subscribe((e,t)=>{sF(sV(e.slots,t.slots))}),sj.subscribe((e,t)=>{sF(sV(e.configs,t.configs))}),sr.subscribe(()=>sF(null)),on.subscribe(()=>sF(null)),sF(null);let sK=e=>sf(t=>({...t,extensions:{...t.extensions,[e.name]:{...e}}}));function sZ(e,t){sf(n=>{let r=n.slots[e];return r?{...n,slots:{...n.slots,[e]:{...r,attachedIds:[...r.attachedIds,t]}}}:{...n,slots:{...n.slots,[e]:{...sU(e),attachedIds:[t]}}}})}function sG(e,t){sf(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 sY(e){sf(t=>{let n=t.slots[e];return n?{...t,slots:{...t.slots,[e]:{...n,attachedIds:[]}}}:t})}function sq(e){let t=new Map;return e.forEach((e,n)=>{t.has(e)||t.set(e,n)}),t}function sJ(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!!iV(o,a)}catch(t){return console.error(`Error while evaluating expression '${o}' for ${e.id}`+(r?` in ${r}`:""),t),!1}})}(sX(e),t,on.getState().session,e)}function sX(e){return sM.getState().slots[e]?.candidateExtensions??[]}let sQ=(e,t)=>s$.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=sU(t,e);return{...n,slots:{...n.slots,[t]:{...a}}}}),s0=()=>{sI=null,sf(()=>({slots:{},extensions:{}})),sp().setState({renderings:new Map}),sM.setState({slots:{}})},s1=V("left-nav",{slotName:null,basePath:window.spaBase,mode:"normal"});function s4({name:e,basePath:t,mode:n,componentContext:r,state:a}){s1.setState({slotName:e,basePath:t,mode:n??"normal",componentContext:r,state:a})}function s2(e){s1.getState().slotName===e&&s1.setState(s1.getInitialState(),!0)}let s3=V("modalRegistry",{modals:{}});function s6(e){s3.setState(t=>(t.modals[e.name]=e,t))}function s5(e){let t=s3.getState().modals[e];if(!t){let n=sz(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.`),s6(t))}return t}let s9=V("workspace2",{registeredGroupsByName:{},registeredWindowsByName:{},registeredWorkspacesByName:{},openedGroup:null,openedWindows:[],isMostRecentlyOpenedWindowHidden:!1});function s8(e){let{registeredWorkspacesByName:t,registeredWindowsByName:n}=s9.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 s7(e){let{registeredGroupsByName:t,registeredWindowsByName:n}=s9.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 le(e){let{openedWindows:t}=s9.getState();return t.findIndex(t=>t.openedWorkspaces.find(t=>t.workspaceName===e))}function lt(e,t){if(0==t.length)return;let{registeredGroupsByName:n}=s9.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}}s9.setState({registeredGroupsByName:r})}function ln(e,t){if(0==t.length)return;let{registeredWindowsByName:n}=s9.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}s9.setState({registeredWindowsByName:r})}function lr(e,t){if(0==t.length)return;let{registeredWorkspacesByName:n}=s9.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}s9.setState({registeredWorkspacesByName:r})}let la=0,lo=null,li={bootstrap:15e3,mount:15e3,unmount:15e3};function ls(e,t){if(e.timeouts)return e;let n=e.name??"parcel",r=Object.fromEntries(Object.keys(li).filter(t=>e[t]).map(r=>{var a,o;let i,s;return[r,(a=e[r],o=li[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 ll(e,t){var n,r;let a,o,i,s,l,u=await (lo??(lo=new Promise((e,t)=>{rs({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),rs))),lo),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=>ls(e,n)):ls(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 lu(){return lc}function lc(e,t){let n,r=ll(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 ld(e,t,n,r,a=e=>e,o={}){let i=sW(r),s=sz(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=la++,f=`${t}/${r}-${p}`;e.dataset.extensionRenderingId=f;let h=e=>{try{sw(f)}catch(t){console.error(e,t)}};try{sb({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 ll(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 lm=n(5399),lp=n.n(lm);let lf=(0,lm.createContext)({moduleName:"",featureName:""});var lh=n(3338);function lg({to:e,templateParams:t,onBeforeNavigate:n,children:r,...a}){return(0,lm.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}`)},[]),(0,lh.jsx)("a",{onClick:r=>{0===r.button&&!r.ctrlKey&&!r.shiftKey&&!r.altKey&&!r.metaKey&&(r.preventDefault(),n?.(r),aq({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:aG(e,t),...a,children:r})}let ly=({state:e,children:t,...n})=>{let{extension:r}=(0,lm.useContext)(lf),a=(0,lm.useRef)(null),o=(0,lm.useRef)(Promise.resolve()),i=(0,lm.useRef)(!1),s=(0,lm.useRef)(!1),l=(0,lm.useRef)(e),u=(0,lm.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,lm.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,lm.useCallback)(t=>{t&&!a.current&&!s.current&&r?.extensionSlotName&&r.extensionSlotModuleName&&(s.current=!0,ld(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,lm.useEffect)(()=>(i.current=!1,()=>{i.current=!0,u(a.current)}),[]),(0,lm.useEffect)(()=>{l.current=e,a.current&&c(a.current,e)},[e]),r?(0,lh.jsx)("div",{ref:d,"data-extension-id":r?.extensionId,style:{position:"relative"},...n}):null};function lv(e){let t=(0,lm.useRef)(e);return O(t.current,e)||(t.current=e),t.current}function lb(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 lw=e=>e;function lx(e,t=lw,n){let r=(0,lm.useCallback)(t=>e.subscribe(t),[e]),a=(0,lm.useCallback)(()=>t(e.getState()),[e,t]),o=(0,lm.useSyncExternalStore)(r,a,a),i=(0,lm.useMemo)(()=>n?lb(e,n):null,[e,n]);return(0,lm.useMemo)(()=>i?{...o,...i}:o,[o,i])}function lD(e,t){return lx(e,lw,t)}function lE(e){return function(t){let n=(0,lm.useCallback)(t=>e.subscribe(t),[]),r=(0,lm.useCallback)(()=>e.getState(),[]),a=(0,lm.useSyncExternalStore)(n,r,r),o=(0,lm.useMemo)(()=>t?lb(e,t):null,[t]);return(0,lm.useMemo)(()=>o?{...a,...o}:a,[a,o])}}let l_=[];Object.freeze(l_);let lS={candidateExtensions:l_};Object.freeze(lS);let lC=e=>{let t=(0,lm.useCallback)(t=>t.slots?.[e]??lS,[e]);return lx(sx(),t)},lk=e=>e.session;function lP(e,t){let{candidateExtensions:n}=lC(e),r=lx(on,lk),a=lv(t);return(0,lm.useMemo)(()=>sJ(e,a),[e,a,r,n])}function lT(e,t){let{moduleName:n}=(0,lm.useContext)(lf);if(!n)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,lm.useEffect)(()=>{sQ(n,e)},[n,e]),{extensions:lP(e,t),extensionSlotName:e,extensionSlotModuleName:n}}function lR(e){return e}function lO({name:e,extensionSlotName:t,select:n=lR,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,lm.useRef)(null),{extensions:u,extensionSlotModuleName:c}=lT(s,a),d=(0,lm.useMemo)(()=>n(u),[n,u]),m=(0,lm.useMemo)(()=>{if("function"==typeof r&&!lp().isValidElement(r))return d.map(e=>r(e,a))},[r,d]);return(0,lh.jsx)("div",{ref:l,"data-extension-slot-name":s,"data-extension-slot-module-name":c,style:{...o,position:"relative"},...i,children:s&&d?.map((e,t)=>(0,lh.jsx)(lf.Provider,{value:{moduleName:c,featureName:"",extension:{extensionId:e.id,extensionSlotName:s,extensionSlotModuleName:c,extensionMeta:e.meta}},children:m?.[t]??("function"!=typeof r?r:null)??(0,lh.jsx)(ly,{state:a})},e.id))})}var lN=n(6442),l$=n.n(lN);function lM(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 lA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lM(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)):lM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function lj(e){return(lj="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 lI(e){return(lI="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 lL(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(lI(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(lI(e)));return e}}var lF=null;try{lF=require("react").createContext()}catch(e){}var lB={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 lV(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then(function(t){e.rootComponent=t})}function lU(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=lK(e,t,function(){n(this)}),i=lL(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:lz(e),renderType:"function"==typeof(a=e).renderType?a.renderType():a.renderType});e.domElements[t.name]=i,e.renderResults[t.name]=s})}function lW(e,t){return new Promise(function(n){e.unmountResolves[t.name]=n;var r=e.renderResults[t.name];r&&r.unmount?r.unmount():lz(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]})}function lH(e,t){return new Promise(function(n){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(n);var r=lK(e,t,null),a=e.renderResults[t.name];if(a&&a.render)a.render(r);else{var o=lL(e,t)();lz(e).render(r,o)}})}function lz(e){return e.ReactDOMClient||e.ReactDOM}function lK(e,t,n){var r=e.React.createElement(e.rootComponent,t),a=lF?e.React.createElement(lF.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,lA(lA({},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 lZ=n(7807),lG=n(1619),lY=n.n(lG),lq=n(3432);let lJ={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},lX=new Map;(0,lq.initCache)(lX);let lQ={errorRetryCount:3,fetcher:oe,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,shouldRetryOnError:e=>{if(e instanceof ot){let t=e.response.status;return!!(t>=500)||401===t||403===t||429===t}return!0},provider:()=>lX};function l0(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw Error("Invalid options");let t=Object.assign({},lJ,e),n={...lQ,...t.swrConfig};return function(e){var r,a,o,i,s;return o=a=class extends(r=lp().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(0,lh.jsx)("div",{children:"An error has occurred. Please try reloading the page."});{let r=(0,lh.jsx)(lm.Suspense,{fallback:null,children:(0,lh.jsx)(lG.SWRConfig,{value:n,children:(0,lh.jsx)(lf.Provider,{value:this.state.config,children:t.disableTranslations?(0,lh.jsx)(e,{...this.props}):(0,lh.jsx)(lZ.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,children:(0,lh.jsx)(e,{...this.props})})})})});return t.strictMode&&lp().StrictMode?(0,lh.jsx)(lp().StrictMode,{children: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 l1(e,t){return function(e){if("object"!==lj(e))throw Error("single-spa-react requires a configuration object");var t,n=lA(lA({},lB),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");!lF&&n.React.createContext&&(lF=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:lV.bind(null,n),mount:lU.bind(null,n),unmount:lW.bind(null,n)};return n.parcelCanUpdate&&(r.update=lH.bind(null,n)),r}({React:lp(),ReactDOMClient:l$(),rootComponent:l0(t)(e)})}function l4(e,t){return()=>e().then(({default:e})=>l1(e,t))}function l2(e,t){return()=>Promise.resolve(l1(e,t))}let l3=l4,l6=A()(()=>({}));W("openmrs-app-context",l6);let l5={};function l9(e,t=e=>e){let n=l6.getState();return e in n?Object.freeze(Object.assign({},t?t(n[e]):n[e])):null}function l8(e,t){l6.setState(n=>(e in n||(n[e]={}),n[e]=t(n[e]),Object.assign({},n)))}function l7(e){return null===e?null:Object.freeze(Object.assign({},e))}let ue=new Map;function ut(e,t){let n=(0,lm.useRef)(t??{}),r=(0,lm.useRef)(t=>l8(e,t)),a=(0,lm.useRef)(Symbol());return(0,lm.useEffect)(()=>{let n=t??{},r=a.current;return null===l9(e)?!function(e,t=l5){l6.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===l5?{}: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.`),l8(e,()=>n)),ue.set(e,r),()=>{ue.get(e)===r&&(l6.setState(t=>(e in t&&delete t[e],t)),ue.delete(e))}},[e]),(0,lm.useEffect)(()=>{let r=t??{};O(n.current,r)||(l8(e,()=>r),n.current=r)},[t]),r.current}function un({namespace:e,value:t}){return ut(e,t),null}let ur=({children:e,value:t,fallback:n})=>t?(0,lh.jsx)(lh.Fragment,{children:e}):n?(0,lh.jsx)(lh.Fragment,{children:n}):null;function ua(){let e=(0,lm.useRef)(null);return(!e.current||e.current.signal.aborted)&&(e.current=new AbortController),(0,lm.useEffect)(()=>{let t=e.current;return()=>t?.abort()},[]),e.current}function uo(e,t=e=>e??{}){let[n,r]=(0,lm.useState)(()=>{if(ui(e))return;let n=l9(e);if(null!==n)return t?t(n):n});return(0,lm.useEffect)(()=>{if(ui(e))throw Error(`The namespace supplied to useAppContext must be a non-empty string, but was "${e}".`)},[e]),(0,lm.useEffect)(()=>{var n;let a;return(n=e=>{if(null==e)return void r(void 0);let n=t?t(e):e;r(e=>O(e,n)?e:n)})(l7(a=l9(e))),l6.subscribe(t=>{let r=e in t?t[e]:null;r!==a&&(a=r,n(l7(r)))})},[e,t]),n}function ui(e){return"string"!=typeof e||0===e.trim().length}function us(e){let t=lP(e);return(0,lm.useMemo)(()=>t.map(e=>e.id),[t])}function ul(e){return lC(e).candidateExtensions}function uu(e,t,n){let{data:r,error:a,mutate:o,isLoading:i,isValidating:s}=lY()(e?im(e,t,n):null,oe);return(0,lm.useMemo)(()=>({isLoading:i,data:r?.data.results??[],error:a,mutate:o,isValidating:s}),[r,a,i,s,o])}function uc(e){(0,lm.useEffect)(()=>{if(e){let e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])}let ud={},um=`No ComponentContext has been provided. This should come from "openmrsComponentDecorator".
|
|
16
|
+
Usually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".`;function up(e,t,n){let r=ud[e];if(r)return r;let a=new Promise(e=>{let r=n(t.getState());if(r)return void e(r);let a=t.subscribe(t=>{let r=n(t);r&&(a(),e(r))})});return ud[e]=a,a.then(()=>{ud[e]===a&&delete ud[e]}),a}function uf(e){let{moduleName:t,extension:n}=(0,lm.useContext)(lf),r=e?.externalModuleName??t;if(!r&&!n)throw Error(um);let a=function(e){let t=(0,lm.useMemo)(()=>tk(e),[e]),n=function(e){let[t,n]=(0,lm.useState)(()=>{let t=e.getState();return t.loaded&&t.config?t.config:null});return(0,lm.useEffect)(()=>e?.subscribe(e=>{e.loaded&&e.config&&n(e.config)}),[e]),t}(t);if(!n)throw up(e,t,e=>e.loaded?e.config:null);return n}(r),o=function(e){let t=(0,lm.useMemo)(tO,[]),n=function(e,t){let[n,r]=(0,lm.useState)(t?()=>{let n=tN(e.getState(),t.extensionSlotName,t.extensionId);if(n.loaded&&n.config)return n.config}:null);return(0,lm.useEffect)(()=>{if(t)return e.subscribe(e=>{let a=tN(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)throw up(`${e.extensionSlotName}-${e.extensionId}`,t,t=>{let n=tN(t,e.extensionSlotName,e.extensionId);return n.loaded?n.config:null});return n||{}}(n);return(0,lm.useMemo)(()=>e?.externalModuleName&&r===e.externalModuleName?{...a}:{...a,...o},[r,e?.externalModuleName,a,o])}let uh=lP;function ug(e,t=300){let[n,r]=(0,lm.useState)(e);return(0,lm.useEffect)(()=>{let n=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(n)}},[e,t]),n}var uy=n(3660),uv=n.n(uy);let ub=`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 uw(){let e=`${a5}/emrapi/configuration?v=${ub}`,t=uv()(e,oe);return(0,lm.useMemo)(()=>({emrConfiguration:t.data?.data,isLoadingEmrConfiguration:t.isLoading,mutateEmrConfiguration:t.mutate,errorFetchingEmrConfiguration:t.error}),[t])}function ux(){return(0,lm.useContext)(lf).extension}let uD=lE(sm());function uE(e){let t=lP(e);return(0,lm.useMemo)(()=>Object.fromEntries(t.map(e=>[e.name,e.meta])),[t])}let u_=lE(sx());function uS(e){let{flags:t}=lx(sr);return t[e]?.enabled??!1}function uC(){let[,e]=(0,lm.useState)(0);return(0,lm.useCallback)(()=>{e(e=>e+1)},[])}function uk(e,t,n={}){return uT(e,t,uP,n)}let uP={getPaginatedUrl:(e,t,n)=>{if(!e)return null;{let r=new URL(a7(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 uT(e,t,n,r={}){let{getPaginatedUrl:a,getTotalCount:o,getCurrentPageSize:i,getData:s}=n,{immutable:l,swrConfig:u}=r,c=r.fetcher??oe,[d,m]=(0,lm.useState)(1),p=(0,lm.useRef)(NaN),f=(0,lm.useRef)(NaN),h=(0,lm.useRef)(d),g=(0,lm.useRef)(!1),y=(0,lm.useRef)(!1),v=e?.toString()??"",[b,w]=(0,lm.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,lm.useMemo)(()=>a(e,t,x),[e,t,x]),{data:E,..._}=(l?uv():lY())(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),C=(0,lm.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,lm.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 k=(0,lm.useCallback)(()=>{C(h.current+1)},[C]),P=(0,lm.useCallback)(()=>{C(h.current-1)},[C]);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:C,goToNext:k,goToPrevious:P,..._}}function uR(e,t,n={}){return uT(e,t,uO(),n)}function uO(){return{getPaginatedUrl:(e,t,n)=>{if(!e)return null;{let r=new URL(a7(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 uN=n(682),u$=n.n(uN);function uM(e,t={}){return uA(e,uP,t)}function uA(e,t,n={}){let{swrInfiniteConfig:r,immutable:a}=n,{getNextUrl:o,getTotalCount:i,getData:s}=t,l=n.fetcher??oe,u=(0,lm.useCallback)((n,r)=>0==n?e?.toString()??null:t.getNextUrl(r.data),[e]),{data:c,size:d,setSize:m,...p}=u$()(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 uj(e,t={}){return uI(e,uP,t)}function uI(e,t,n={}){let r=uA(e,t,n),{hasMore:a,error:o,data:i,loadMore:s,isLoading:l,nextUri:u}=r;return((0,lm.useEffect)(()=>{a&&!o&&s()},[a,u]),n.partialData)?r:{...r,data:a||o?void 0:i,isLoading:l||a}}function uL(e,t={}){return uI(e,uO(),t)}function uF(e,t={}){return uA(e,uO(),t)}function uB(){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 uV(){let[e,t]=(0,lm.useState)(uB);return(0,lm.useEffect)(()=>{let e=()=>{t(uB())};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}let uU=e=>"small-desktop"===e||"large-desktop"===e;function uW(e){let t=(0,lm.useContext)(lf);(0,lm.useEffect)(()=>(t&&t.moduleName&&(e.componentContext=t),s4(e),()=>{s2(e.name)}),[t,e])}function uH(){return lx(s1)}let uz=[];function uK(e=null,t=null){let n=new URLSearchParams;e&&n.set("tag",e),t&&n.set("q",t);let r=n.toString(),{data:a}=uj(`${a5}/location${r?"?"+r:""}`,{immutable:!0});return a??uz}function uZ(e,t=!0){let n=(0,lm.useRef)(null);return(0,lm.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 uG(e){let t=(0,lm.useRef)(null);return(0,lm.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 uY(e,t={}){let{abortController:n,fetchInit:r,url:a,swrConfig:o}=t,i=ua(),s=(0,lm.useMemo)(()=>r?.signal??n?.signal??i.signal,[n?.signal,r?.signal,i.signal]),l=(0,lm.useCallback)(e=>oe(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 lY()(e,l,o)}function uq(e=[],t=10){let[n,r]=(0,lm.useState)(1),a=(0,lm.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,lm.useMemo)(()=>{let n=(o-1)*t,r=(o+0)*t;return e.slice(n,r)},[e,o,t]),s=(0,lm.useCallback)(e=>{!Number.isInteger(e)||e<1?console.warn(`usePagination: ignoring goTo(${e}); page must be a positive integer.`):r(e)},[]),l=(0,lm.useCallback)(()=>{r(e=>e+1)},[]),u=(0,lm.useCallback)(()=>{r(e=>Math.max(1,e-1))},[]);return(0,lm.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 uJ(e,t,n,r){return{pageSizes:(0,lm.useMemo)(()=>{let n=Math.ceil(t/e);return isNaN(n)&&(n=0),[...Array(n).keys()].map(t=>(t+1)*e)},[e,t]),pageItemsCount:(0,lm.useMemo)(()=>e>t?t:e*n>t?e*(n-1)+r:e*n,[e,t,n,r])}}function uX(){let e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function uQ(e){let[t,n]=(0,lm.useState)(e??uX()),{data:r,error:a,isValidating:o}=lY()(t?["patient",t]:null,()=>ig(t,{}));return(0,lm.useEffect)(()=>{let e=()=>{let e=uX();e!==t&&n(e)};return window.addEventListener("single-spa:routing-event",e),()=>window.removeEventListener("single-spa:routing-event",e)},[t]),(0,lm.useMemo)(()=>({isLoading:o&&!a&&!r,patient:r,patientUuid:t,error:a}),[o,a,r,t])}function u0(){let e=`${a5}/metadatamapping/termmapping?v=custom:(metadataUuid)&code=emr.primaryIdentifierType`,{data:t,error:n,isLoading:r}=lY()(e,oe);return(0,lm.useMemo)(()=>({primaryIdentifierCode:t?.data?.results[0]?.metadataUuid,isLoading:r,error:n}),[t,n,r])}function u1(e,t,n,r){let a=e?.slotName===t&&e.slotModuleName===n?e.components:null,o=new Map;for(let e of r)o.set(e,a?.get(e)??function(e,t,n){let r=sW(n),a=e=>e.extensions[r]?.meta,o=({state:r})=>{let o=lx(sm(),a),i=(0,lm.useMemo)(()=>({moduleName:t,featureName:"",extension:{extensionId:n,extensionSlotName:e,extensionSlotModuleName:t,extensionMeta:o}}),[o]);return(0,lh.jsx)(lf.Provider,{value:i,children:(0,lh.jsx)(ly,{state:r})})};return o.displayName=`RenderableExtension(${n})`,o}(t,n,e));return{slotName:t,slotModuleName:n,components:o}}function u4(e){let{extensions:t,extensionSlotModuleName:n}=lT(e),r=(0,lm.useMemo)(()=>new Set(e?t.map(e=>e.id):[]),[e,t]),[a,o]=(0,lm.useState)(()=>u1(null,e,n,r)),i=a;return a.slotName===e&&a.slotModuleName===n&&a.components.size===r.size&&[...r].every(e=>a.components.has(e))||o(i=u1(a,e,n,r)),(0,lm.useMemo)(()=>e?t.flatMap(e=>{let t=i.components.get(e.id);return t?[t]:[]}):[],[e,t,i])}function u2(){let e=(0,lm.useRef)(null),[t,n]=(0,lm.useState)(null),r=null;if(!t){if(i){let e=os().getState();e.loaded&&(r=e.session)}else i=new Promise(t=>{let n=({loaded:n,session:a})=>{n&&(t(a),r=a,e.current&&(e.current(),e.current=null))};n(os().getState()),r||(e.current=os().subscribe(n))});if(r)n(r);else throw i}(0,lm.useEffect)(()=>(e.current||(e.current=os().subscribe(({loaded:e,session:t})=>{e&&(r=t,n(t))})),()=>{e.current&&(e.current(),e.current=null)}),[]);let a=t||r;if(!a)if(i)throw console.warn("useSession is in an unexpected state. Attempting to recover."),i;else throw Error("useSession is in an invalid state.");return a}let u3=({privilege:e,fallback:t,children:n})=>{let[r,a]=(0,lm.useState)(null);return((0,lm.useEffect)(()=>{let e=os(),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&&od(e,r))?(0,lh.jsx)(lh.Fragment,{children:n}):t?(0,lh.jsx)(lh.Fragment,{children:t}):null};var u6=n(222),u5=n.n(u6),u9=n(5602);let u8=new Map;function u7(){for(let e of Array.from(u8.values()))e()}let ce={setVisitContext:(e,t)=>null==t?{manuallySetVisitUuid:null}:{manuallySetVisitUuid:t.uuid,patientUuid:t.patient?.uuid}};function ct(e){let t=(0,lm.useId)();return(0,lm.useEffect)(()=>{if(e)return u8.set(t,e),()=>{u8.delete(t)}},[t,e]),{...lD(iP(),ce),mutateVisit:u7}}function cn(e,t=iC){let n=(0,lm.useRef)(void 0),{patientUuid:r,manuallySetVisitUuid:a,setVisitContext:o}=ct((0,lm.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}=lY()(e?`${a5}/visit${s}`:null,oe),{data:p,error:f,mutate:h,isValidating:g}=lY()(e&&i?`${a5}/visit${l}`:null,oe),y=(0,lm.useMemo)(()=>u?.data.results.find(e=>null===e.stopDatetime)??null,[u]),v=(0,lm.useMemo)(()=>i&&p?p.data:null,[p,i]),b=(0,lm.useRef)(null);(0,lm.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,lm.useCallback)(()=>{d(),h()},[d,h]);(0,lm.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}}u5().extend(u9);let cr=[];function ca(){let{data:e}=uv()(iD,iE);return e??cr}let co=new Map;async function ci(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 oG(a);return i&&Object.hasOwn(i,o)&&"function"==typeof i[o]?cl(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`),cs)}let cs={bootstrap:()=>Promise.resolve(),mount:()=>Promise.resolve(),unmount:()=>Promise.resolve()};async function cl(e,t){if(e in co)await co[e];else{let n=t??await oG(e);await (co[e]=new Promise((t,r)=>{if(Object.hasOwn(n,"startupApp")){let a=n.startupApp;if("function"==typeof a)return Promise.resolve(a()).then(()=>{t4(e),t(null)}).catch(r)}t4(e),t(null)}))}}function cu(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(
|
|
20
|
+
To fix this, ensure that you define a 'component' field inside the extension definition.`,t);for(let a of(sK({name:n,load:()=>ci(e,t.component),meta:t.meta||{},order:t.order,moduleName:e,privileges:t.privileges,featureFlag:t.featureFlag,displayExpression:t.displayExpression}),r))sZ(a,n)}let cc=[];function cd(e,t){s_(()=>(function(e,t){if(e&&t&&"object"==typeof t){t1(e);let n=t.extensions??[],r=t.modals??[],a=t.featureFlags??[],o=t.workspaceGroups2??[],i=t.workspaceWindows2??[],s=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"))?cc.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")?cu(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?s6({name:n,moduleName:e,load:()=>ci(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
|
-
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)}),(Object.hasOwn(t,"workspaces")||Object.hasOwn(t,"workspaceGroups"))&&console.warn(`${e} defines workspaces or workspaceGroups in its routes.json, which are no longer supported and won't be registered. Use workspaces2, workspaceWindows2 and workspaceGroups2 instead.`),
|
|
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)}),(Object.hasOwn(t,"workspaces")||Object.hasOwn(t,"workspaceGroups"))&&console.warn(`${e} defines workspaces or workspaceGroups in its routes.json, which are no longer supported and won't be registered. Use workspaces2, workspaceWindows2 and workspaceGroups2 instead.`),lt(e,o);for(let t of(ln(e,i),i))t.icon&&cu(e,{name:t.name,component:t.icon,slot:t.group,order:t.order});lr(e,s),a.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"flagName"))t.flagName?t.label?t.description?sa(t.flagName,t.label,t.description):console.error(`A feature flag definition in ${e} is missing a description and thus cannot be registered.
|
|
24
24
|
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.
|
|
25
25
|
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.
|
|
26
|
-
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
|
|
27
|
-
To fix this, ensure that you define the "route" (or alternatively the "routeRegex") field inside the extension definition.`,e):t.component?rU(e,()=>
|
|
28
|
-
To fix this, ensure that you define the "component" field inside the page definition.`,e)}(r,t)}}let ca={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 co(){document.body.classList.toggle("omrs-breakpoint-lt-tablet",window.innerWidth<ca.TABLET_MIN),document.body.classList.toggle("omrs-breakpoint-gt-phone",window.innerWidth>ca.PHONE_MAX),document.body.classList.toggle("omrs-breakpoint-gt-tablet",window.innerWidth>ca.TABLET_MAX),document.body.classList.toggle("omrs-breakpoint-lt-desktop",window.innerWidth<ca.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-small-desktop",window.innerWidth<ca.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-large-desktop",window.innerWidth<ca.LARGE_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-gt-small-desktop",window.innerWidth>ca.SMALL_DESKTOP_MAX)}let ci=!1;function cs(){ci||(window.addEventListener("resize",co),co(),ci=!0)}var cl=n(3373),cu=n.n(cl);function cc({title:e,children:t}){let n="tablet"===uN();return(0,li.jsxs)("div",{className:cu()({"-esm-form-engine__card-header-module__tabletHeader___xhRSy":n,"-esm-form-engine__card-header-module__desktopHeader___aPTXc":!n}),children:[(0,li.jsx)("h4",{children:e}),t]})}let cd=["red","magenta","purple","blue","teal","cyan","gray","green","warm-gray","cool-gray","high-contrast","outline"],cm={primaryColor:{_type:tg.String,_description:"The color for displaying primary diagnoses tags",_default:"blue",_validators:[nE.oneOf(cd)]},secondaryColor:{_type:tg.String,_description:"The color for displaying secondary diagnoses tags",_default:"gray",_validators:[nE.oneOf(cd)]}},cp={"Brand color #1":{_default:"#005d5d",_type:tg.String},"Brand color #2":{_default:"#004144",_type:tg.String},"Brand color #3":{_default:"#007d79",_type:tg.String},excludePatientIdentifierCodeTypes:{uuids:{_type:tg.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:tg.UUID}}},implementationName:{_type:tg.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},logo:{src:{_type:tg.String,_default:"",_description:"The path or URL to the logo shown on the login page and while the server is starting up. If set to an empty string, the default OpenMRS logo is used.",_validators:[nE.isUrl]},alt:{_type:tg.String,_default:"Logo",_description:"The alternative text for the logo image, displayed when the image cannot be loaded or on hover."}},patientPhotoConceptUuid:{_type:tg.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:tg.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:[nE.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:tg.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:tg.String}},diagnosisTags:cm};var cf=n(324);let ch={"carbon.table.batch.cancel":"cancel","carbon.table.batch.items.selected":"batchActionsItemsSelected","carbon.table.batch.item.selected":"batchActionItemSelected","carbon.table.batch.selectAll":"selectAll"},cg=e=>(0,li.jsx)(cf.TableBatchActions,{translateWithId:(e,t)=>{let n=ch[e];return n?aL(n,e,t):e},...e}),cy="-esm-form-engine__custom-overflow-menu-module__container___QIBvW",cv="-esm-form-engine__custom-overflow-menu-module__menu___ZppPo",cb="-esm-form-engine__custom-overflow-menu-module__show___8rVUu",cw="-esm-form-engine__custom-overflow-menu-module__overflowMenuButton___0VKUu",cx=(0,lr.createContext)(null);function cD(){let e=(0,lr.useContext)(cx);if(!e)throw Error("useCustomOverflowMenu must be used within a CustomOverflowMenu");return e}function cE({menuTitle:e,children:t}){let[n,r]=la().useState(!1),a=uL(()=>r(!1),n),o="tablet"===uN(),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,li.jsxs)("div",{"data-overflow-menu":!0,className:cu()("cds--overflow-menu",cy),ref:a,children:[(0,li.jsx)("button",{className:cu()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":n},cw),"aria-controls":d,"aria-expanded":n,"aria-haspopup":"true",id:c,onClick:i,onKeyDown:f,ref:s,children:e}),(0,li.jsxs)("div",{className:cu()("cds--overflow-menu-options","cds--overflow-menu--flip",cv,{[cb]:n}),"aria-labelledby":c,"data-floating-menu-direction":"bottom",id:d,onKeyDown:f,ref:l,role:"menu",tabIndex:-1,children:[(0,li.jsx)("ul",{className:cu()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":o}),children:(0,li.jsx)(cx.Provider,{value:p,children:y})}),(0,li.jsx)("span",{})]})]})}function c_(e){let t=(0,lr.useContext)(cx);return(0,li.jsx)(cf.OverflowMenuItem,{...e,closeMenu:t?.closeMenu})}var cS=n(5571);let cC=["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"],ck=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-activity",iconProps:e})})),cP=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-add",iconProps:e})})),cT=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-arrow-down",iconProps:e})})),cR=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-arrow-left",iconProps:e})})),cO=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-arrow-right",iconProps:e})})),cN=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-arrow-up",iconProps:e})})),c$=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-baby",iconProps:e})})),cM=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-calendar-heat-map",iconProps:e})})),cA=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-calendar",iconProps:e})})),cj=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-caret-down",iconProps:e})})),cI=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-caret-left",iconProps:e})})),cL=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-caret-right",iconProps:e})})),cF=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-caret-up",iconProps:e})})),cB=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-chart-average",iconProps:e})})),cV=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-chart-line",iconProps:e})})),cU=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-checkmark-filled",iconProps:e})})),cW=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-checkmark-outline",iconProps:e})})),cH=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-chemistry",iconProps:e})})),cz=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-chevron-down",iconProps:e})})),cK=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-chevron-left",iconProps:e})})),cZ=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-chevron-right",iconProps:e})})),cG=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-chevron-up",iconProps:e})})),cY=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-close",iconProps:e})})),cq=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-close-filled",iconProps:e})})),cJ=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-close-outline",iconProps:e})})),cX=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-document",iconProps:e})})),cQ=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-document-attachment",iconProps:e})})),c0=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-download",iconProps:e})})),c1=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-drug-order",iconProps:e})})),c4=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-edit",iconProps:e})})),c2=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-event-schedule",iconProps:e})})),c3=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-events",iconProps:e})})),c6=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-gender-female",iconProps:e})})),c5=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-gender-male",iconProps:e})})),c9=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-gender-other",iconProps:e})})),c8=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-gender-unknown",iconProps:e})})),c7=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-generic-order-type",iconProps:e})})),de=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-group",iconProps:e})})),dt=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-group-access",iconProps:e})})),dn=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-hospital-bed",iconProps:e})})),dr=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-image-medical",iconProps:e})})),da=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-information",iconProps:e})})),di=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-information-filled",iconProps:e})})),ds=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-information-square",iconProps:e})})),dl=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-inventory-management",iconProps:e})})),du=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-lab-order",iconProps:e})})),dc=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-list-checked",iconProps:e})})),dd=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-location",iconProps:e})})),dm=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-material-order",iconProps:e})})),dp=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-maximize",iconProps:e})})),df=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-medication",iconProps:e})})),dh=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-message-queue",iconProps:e})})),dg=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-microscope",iconProps:e})})),dy=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-mobile-check",iconProps:e})})),dv=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-money",iconProps:e})})),db=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-mother",iconProps:e})})),dw=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-movement",iconProps:e})})),dx=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),dD=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),dE=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-password",iconProps:e})})),d_=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-pedestrian-family",iconProps:e})})),dS=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-pen",iconProps:e})})),dC=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-printer",iconProps:e})})),dk=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-procedure-order",iconProps:e})})),dP=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-programs",iconProps:e})})),dT=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-referral-order",iconProps:e})})),dR=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-renew",iconProps:e})})),dO=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-report",iconProps:e})})),dN=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-reset",iconProps:e})})),d$=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-save",iconProps:e})})),dM=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-search",iconProps:e})})),dA=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-settings",iconProps:e})})),dj=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-switcher",iconProps:e})})),dI=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-shopping-cart",iconProps:e})})),dL=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-shopping-cart--arrow-down",iconProps:e})})),dF=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-sticky-note-add",iconProps:e})})),dB=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-syringe",iconProps:e})})),dV=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-table-of-contents",iconProps:e})})),dU=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-table",iconProps:e})})),dW=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-time",iconProps:e})})),dH=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-tools",iconProps:e})})),dz=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-translate",iconProps:e})})),dK=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-trash-can",iconProps:e})})),dZ=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-tree-view--alt",iconProps:e})})),dG=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-two-factor-authentication",iconProps:e})})),dY=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-user-avatar",iconProps:e})})),dq=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-user-follow",iconProps:e})})),dJ=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-user-xray",iconProps:e})})),dX=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-user",iconProps:e})})),dQ=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-view-off",iconProps:e})})),d0=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-view",iconProps:e})})),d1=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(d8,{ref:t,icon:"omrs-icon-warning",iconProps:e})})),d4=d1,d2=cQ,d3=dc,d6=dr,d5=dL,d9=(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,li.jsx)(l3,{value:a.current,fallback:t,children:(0,li.jsx)(d8,{ref:r,icon:e,iconProps:n})})})),d8=(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,li.jsx)("svg",{ref:i,className:cu()("omrs-icon","-esm-form-engine__icons-module__icon___uq4qr",r),height:o,width:o,viewBox:"0 0 16 16",children:(0,li.jsx)("use",{href:`#${e}`})})})),d7=({path:e,title:t,basePath:n,icon:r})=>{let{t:a}=(0,lL.useTranslation)(),o=(0,cS.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,li.jsx)("div",{children:(0,li.jsx)(ls,{className:cu()("cds--side-nav__link",{"active-left-nav-link":i}),to:`${n}/${encodeURIComponent(e)}`,children:(0,li.jsxs)("span",{className:"-esm-form-engine__dashboard-module__menu___WbY42",children:[(0,li.jsx)(d9,{icon:r,className:"-esm-form-engine__dashboard-module__icon___L-hKL",size:16}),(0,li.jsx)("span",{children:a(t)})]})})},e)};function me(e){return function({basePath:t}){return(0,li.jsx)(cS.BrowserRouter,{children:(0,li.jsx)(d7,{basePath:t,...e})})}}function mt(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 mn(...e){return 1===e.length&&e[0]?e[0]:t=>{let n=!1,r=e.map(e=>{let r=mr(e,t);return n||="function"==typeof r,r});if(n)return()=>{r.forEach((t,n)=>{"function"==typeof t?t():mr(e[n],null)})}}}function mr(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function ma(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}let mo="u">typeof document?la().useLayoutEffect:()=>{},mi={prefix:String(Math.round(1e10*Math.random())),current:0},ms=la().createContext(mi),ml=la().createContext(!1),mu=("u">typeof window&&window.document&&window.document.createElement,new WeakMap),mc="function"==typeof la().useId?function(e){let t=la().useId(),[n]=(0,lr.useState)(mf()),r=n?"react-aria":`react-aria${mi.prefix}`;return e||`${r}-${t}`}:function(e){let t=(0,lr.useContext)(ms),n=function(e=!1){let t=(0,lr.useContext)(ms),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=mu.get(e);null==n?mu.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==n.state&&(t.current=n.id,mu.delete(e))}n.current=++t.current}return n.current}(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`};function md(){return!1}function mm(){return!0}function mp(e){return()=>{}}function mf(){return"function"==typeof la().useSyncExternalStore?la().useSyncExternalStore(mp,md,mm):(0,lr.useContext)(ml)}let mh=!!("u">typeof window&&window.document&&window.document.createElement),mg=new Map;function my(e){let[t,n]=(0,lr.useState)(e),r=(0,lr.useRef)(null),a=mc(t),o=(0,lr.useRef)(null);if(s&&s.register(o,a),mh){let e=mg.get(a);e&&!e.includes(r)?e.push(r):mg.set(a,[r])}return mo(()=>()=>{s&&s.unregister(o),mg.delete(a)},[a]),(0,lr.useEffect)(()=>{let e=r.current;return e&&n(e),()=>{e&&(r.current=null)}}),a}function mv(e=[]){let t=my(),[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 mo(()=>{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 mo(a,[t,a,...e]),n}"u">typeof FinalizationRegistry&&(s=new FinalizationRegistry(e=>{mg.delete(e)}));let mb=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 mw(...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]=ma(n,a):("className"===e||"UNSAFE_className"===e)&&"string"==typeof n&&"string"==typeof a?t[e]=mb(n,a):"id"===e&&n&&a?t.id=function(e,t){if(e===t)return e;let n=mg.get(e);if(n)return n.forEach(e=>e.current=t),t;let r=mg.get(t);return r?(r.forEach(t=>t.current=e),e):t}(n,a):"ref"===e&&n&&a?t.ref=mn(n,a):t[e]=void 0!==a?a:n}}return t}let mx=Symbol("default");function mD({values:e,children:t}){for(let[n,r]of e)t=la().createElement(n.Provider,{value:r},t);return t}function mE(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 m_(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||mx;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 mS(e,t,n){let{ref:r,...a}=m_(n,e.slot)||{},o=mt((0,lr.useMemo)(()=>mn(t,r),[t,r])),i=mw(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 mC(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 mo(()=>{r.current||n(!1)},[]),[a,t]}function mk(e){let t=/^(data-.*)$/,n={};for(let r in e)t.test(r)||(n[r]=e[r]);return n}let mP=(0,lr.createContext)(null),mT=null;function mR(e,t="assertive",n=7e3){mT?mT.announce(e,t,n):(mT=new mO,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?mT.announce(e,t,n):setTimeout(()=>{(null==mT?void 0:mT.isAttached())&&(null==mT||mT.announce(e,t,n))},100))}class mO{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 mN=new Set(["id"]),m$=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),mM=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),mA=new Set(["dir","lang","hidden","inert","translate"]),mj=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"]),mI=/^(data-.*)$/;function mL(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)&&(mN.has(t)||n&&m$.has(t)||r&&mM.has(t)||a&&mA.has(t)||o&&(mj.has(t)||t.endsWith("Capture")&&mj.has(t.slice(0,-7)))||i?.has(t)||mI.test(t))&&(s[t]=e[t]);return s}function mF(e){if(function(){if(null==mB){mB=!1;try{document.createElement("div").focus({get preventScroll(){return mB=!0,!0}})}catch{}}return mB}())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 mB=null,mV=e=>e?.ownerDocument??document,mU=e=>e&&"window"in e&&e.window===e?e:mV(e).defaultView||window;function mW(e,t){return!!t&&!!e&&e.contains(t)}function mH(e){return e.target}function mz(e){if(!e)return!1;let t=e.getRootNode(),n=mU(e);if(!(t instanceof n.Document||t instanceof n.ShadowRoot))return!1;let r=t.activeElement;return null!=r&&e.contains(r)}let mK="u">typeof Element&&"checkVisibility"in Element.prototype;function mZ(e,t){return mK?e.checkVisibility({visibilityProperty:!0})&&!e.closest("[data-react-aria-prevent-focus]"):"#comment"!==e.nodeName&&function(e){let t=mU(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||mZ(e.parentElement,e))}let mG=["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"],mY=mG.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";mG.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let mq=mG.join(':not([hidden]):not([tabindex="-1"]),');function mJ(e,t){return e.matches(mY)&&!mQ(e)&&(t?.skipVisibilityCheck||mZ(e))}function mX(e){return e.matches(mq)&&mZ(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 m0(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function m1(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function m4(e){let t=(0,lr.useRef)({isFocused:!1,observer:null});return mo(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]),(0,lr.useCallback)(n=>{let r=mH(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=m0(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 m2=!1;function m3(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 m6(e){return"u">typeof window&&null!=window.navigator&&e.test(window.navigator.userAgentData?.platform||window.navigator.platform)}function m5(e){let t=null;return()=>(null==t&&(t=e()),t)}let m9=m5(function(){return m6(/^Mac/i)}),m8=m5(function(){return m6(/^iPhone/i)}),m7=m5(function(){return m6(/^iPad/i)||m9()&&navigator.maxTouchPoints>1}),pe=m5(function(){return m8()||m7()});m5(function(){return m9()||pe()});let pt=m5(function(){return m3(/AppleWebKit/i)&&!pn()}),pn=m5(function(){return m3(/Chrome/i)}),pr=m5(function(){return m3(/Android/i)}),pa=m5(function(){return m3(/Firefox/i)});function po(e){return""===e.pointerType&&!!e.isTrusted||(pr()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function pi(e,t,n=!0){let{metaKey:r,ctrlKey:a,altKey:o,shiftKey:i}=t;pa()&&window.event?.type?.startsWith("key")&&"_blank"===e.target&&(m9()?r=!0:a=!0);let s=pt()&&m9()&&!m7()&&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});pi.isOpening=n,mF(e),e.dispatchEvent(s),pi.isOpening=!1}pi.isOpening=!1;let ps=null,pl=new Set,pu=new Map,pc=!1,pd=!1,pm={Tab:!0,Escape:!0};function pp(e,t){for(let n of pl)n(e,t)}function pf(e){pc=!0,pi.isOpening||e.metaKey||!m9()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(ps="keyboard",pp("keyboard",e))}function ph(e){ps="pointer","pointerType"in e&&e.pointerType,("mousedown"===e.type||"pointerdown"===e.type)&&(pc=!0,pp("pointer",e))}function pg(e){!pi.isOpening&&po(e)&&(pc=!0,ps="virtual")}function py(e){let t=mU(mH(e)),n=mV(mH(e));mH(e)!==t&&mH(e)!==n&&!m2&&e.isTrusted&&(pc||pd||(ps="virtual",pp("virtual",e)),pc=!1,pd=!1)}function pv(){m2||(pc=!1,pd=!0)}function pb(e){if("u"<typeof window||"u"<typeof document)return;let t=mU(e),n=mV(e);if(pu.get(t))return;let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){pc=!0,r.apply(this,arguments)},n.addEventListener("keydown",pf,!0),n.addEventListener("keyup",pf,!0),n.addEventListener("click",pg,!0),t.addEventListener("focus",py,!0),t.addEventListener("blur",pv,!1),"u">typeof PointerEvent&&(n.addEventListener("pointerdown",ph,!0),n.addEventListener("pointermove",ph,!0),n.addEventListener("pointerup",ph,!0)),t.addEventListener("beforeunload",()=>{pw(e)},{once:!0}),pu.set(t,{focus:r})}let pw=(e,t)=>{let n=mU(e),r=mV(e);t&&r.removeEventListener("DOMContentLoaded",t),pu.has(n)&&(n.HTMLElement.prototype.focus=pu.get(n).focus,r.removeEventListener("keydown",pf,!0),r.removeEventListener("keyup",pf,!0),r.removeEventListener("click",pg,!0),n.removeEventListener("focus",py,!0),n.removeEventListener("blur",pv,!1),"u">typeof PointerEvent&&(r.removeEventListener("pointerdown",ph,!0),r.removeEventListener("pointermove",ph,!0),r.removeEventListener("pointerup",ph,!0)),pu.delete(n))};function px(){return"pointer"!==ps}"u">typeof document&&("loading"!==(m=mV(void 0)).readyState?pb(void 0):m.addEventListener("DOMContentLoaded",()=>{pb(void 0)}));let pD=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),pE=new Map,p_=new Set;function pS(){if("u"<typeof window)return;function e(e){return"propertyName"in e}let t=n=>{let r=mH(n);if(!e(n)||!r)return;let a=pE.get(r);if(a&&(a.delete(n.propertyName),0===a.size&&(r.removeEventListener("transitioncancel",t),pE.delete(r)),0===pE.size)){for(let e of p_)e();p_.clear()}};document.body.addEventListener("transitionrun",n=>{let r=mH(n);if(!e(n)||!r)return;let a=pE.get(r);a||(a=new Set,pE.set(r,a),r.addEventListener("transitioncancel",t,{once:!0})),a.add(n.propertyName)}),document.body.addEventListener("transitionend",t)}function pC(e){requestAnimationFrame(()=>{for(let[e]of pE)"isConnected"in e&&!e.isConnected&&pE.delete(e);0===pE.size?e():p_.add(e)})}function pk(e){if(!e.isConnected)return;let t=mV(e);if("virtual"===ps){let n=((e=document)=>e.activeElement)(t);pC(()=>{let r=((e=document)=>e.activeElement)(t);(r===n||r===t.body)&&e.isConnected&&mF(e)})}else mF(e)}function pP(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:a}=e,o=(0,lr.useCallback)(e=>{if(mH(e)===e.currentTarget)return r&&r(e),a&&a(!1),!0},[r,a]),i=m4(o),s=(0,lr.useCallback)(e=>{let t=mH(e),r=mV(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 pT(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 pR(e,t){mo(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}"u">typeof document&&("loading"!==document.readyState?pS():document.addEventListener("DOMContentLoaded",pS));let pO=la().createContext(null);function pN(e,t){let{focusProps:n}=pP(e),{keyboardProps:r}={keyboardProps:e.isDisabled?{}:{onKeyDown:pT(e.onKeyDown),onKeyUp:pT(e.onKeyUp)}},a=mw(n,r),o=function(e){let t=(0,lr.useContext)(pO)||{};pR(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&&pk(t.current),s.current=!1},[t]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:mw({...a,tabIndex:l},i)}}la().forwardRef(function(e,t){let{children:n,...r}=e,a=mt(t),o={...r,ref:a};return la().createElement(pO.Provider,{value:o},n)});let p$="default",pM="",pA=new WeakMap;function pj(e){if(pe())"disabled"===p$&&(p$="restoring",setTimeout(()=>{pC(()=>{if("restoring"===p$){let t=mV(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=pM||""),pM="",p$="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&pA.has(e)){let t=pA.get(e),n="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[n]&&(e.style[n]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),pA.delete(e)}}function pI(e){let t=e?.defaultView;return t?.__webpack_nonce__||globalThis.__webpack_nonce__||void 0}let pL=new WeakMap;function pF(e){let t=e??("u">typeof document?document:void 0);if(!t)return pI(t);if(pL.has(t))return pL.get(t);let n=t.querySelector('meta[property="csp-nonce"]'),r=n&&n instanceof mU(n).HTMLMetaElement&&(n.nonce||n.content)||pI(t)||void 0;return void 0!==r&&pL.set(t,r),r}let pB=la().createContext({register:()=>{}});pB.displayName="PressResponderContext";let pV=la().useInsertionEffect??mo;function pU(e){let t=(0,lr.useRef)(null);return pV(()=>{t.current=e},[e]),(0,lr.useCallback)((...e)=>{let n=t.current;return n?.(...e)},[])}function pW(){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 pH=n(8439),pz=n.n(pH);class pK{#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 pZ=Symbol("linkClicked"),pG="react-aria-pressable-style",pY="data-react-aria-pressable";function pq(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)(pB);if(t){let{register:n,ref:r,...a}=t;e=mw(a,e),n()}return pR(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}=pW(),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 pK("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 pK("pressend",r,e);a(t),l=t.shouldStopPropagation}if(n&&n(!1),h(!1),t&&o&&!s){let n=new pK("press",r,e);t(n),l&&=n.shouldStopPropagation}return i.isTriggeringEvent=!1,l},[s,a,n,t]),x=pU(w),D=pU((0,lr.useCallback)((e,t)=>{let n=g.current;if(s)return!1;if(o){n.isTriggeringEvent=!0;let r=new pK("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||pj(t.target),t.disposables))n();t.disposables=[]}},[d,v,w]),_=pU(E),S=(0,lr.useCallback)(e=>{c&&E(e)},[c,E]),C=(0,lr.useCallback)(e=>{s||i?.(e)},[s,i]),k=(0,lr.useCallback)((e,t)=>{if(!s&&i){let n=new MouseEvent("click",e);m1(n,t),i(m0(n))}},[s,i]),P=(0,lr.useMemo)(()=>{let e=g.current,t={onKeyDown(t){if(pX(t.nativeEvent,t.currentTarget)&&mW(t.currentTarget,mH(t))){p0(mH(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(mV(t.currentTarget),"keyup",ma(t=>{pX(t,a)&&!t.repeat&&mW(a,mH(t))&&e.target&&D(pQ(e.target,t),"keyboard")},n),!0),r&&t.stopPropagation(),t.metaKey&&m9()&&e.metaKeyEvents?.set(t.key,t.nativeEvent)}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||mW(t.currentTarget,mH(t)))&&t&&0===t.button&&!e.isTriggeringEvent&&!pi.isOpening){let n=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||po(t.nativeEvent))){let e=b(t,"virtual"),r=D(t,"virtual"),a=x(t,"virtual");C(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,C(t),_(t)}e.ignoreEmulatedMouseEvents=!1,n&&t.stopPropagation()}}},n=t=>{if(e.isPressed&&e.target&&pX(t,e.target)){p0(mH(t),t.key)&&t.preventDefault();let n=mH(t),r=mW(e.target,n);x(pQ(e.target,t),"keyboard",r),r&&k(t,e.target),v(),"Enter"!==t.key&&pJ(e.target)&&mW(e.target,n)&&!t[pZ]&&(t[pZ]=!0,pi(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||!mW(t.currentTarget,mH(t)))return;if(a=t.nativeEvent,!pr()&&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(pe()){if("default"===p$){let t=mV(e);pM=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}p$="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";pA.set(e,e.style[t]),e.style[t]="none"}}(e.target),o=b(t,e.pointerType);let a=mH(t);"releasePointerCapture"in a&&("hasPointerCapture"in a?a.hasPointerCapture(t.pointerId)&&a.releasePointerCapture(t.pointerId):a.releasePointerCapture(t.pointerId)),y(mV(t.currentTarget),"pointerup",n,!1),y(mV(t.currentTarget),"pointercancel",r,!1)}o&&t.stopPropagation()},t.onMouseDown=t=>{if(mW(t.currentTarget,mH(t))&&0===t.button){if(u){let n=function(e){for(;e&&!mJ(e,{skipVisibilityCheck:!0});)e=e.parentElement;let t=mU(e),n=t.document.activeElement;if(!n||n===e)return;m2=!0;let r=!1,a=e=>{(mH(e)===n||r)&&e.stopImmediatePropagation()},o=t=>{(mH(t)===n||r)&&(t.stopImmediatePropagation(),e||r||(r=!0,mF(n),l()))},i=t=>{(mH(t)===e||r)&&t.stopImmediatePropagation()},s=t=>{(mH(t)===e||r)&&(t.stopImmediatePropagation(),r||(r=!0,mF(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),m2=!1,r=!1},u=requestAnimationFrame(l);return l}(t.target);n&&e.disposables.push(n)}t.stopPropagation()}},t.onPointerUp=t=>{mW(t.currentTarget,mH(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(mW(e.target,mH(t))&&null!=e.pointerType){let n=!1,r=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(n?_(t):(mF(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=>{mW(e.currentTarget,mH(e))&&_(e)}}return t},[y,s,u,v,d,S,b,C,k]);return(0,lr.useEffect)(()=>{if(!m)return;let e=mV(m.current);if(!e||!e.head||e.getElementById(pG))return;let t=e.createElement("style");t.id=pG;let n=pF(e);n&&(t.nonce=n),t.textContent=`
|
|
26
|
+
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 cm(){cc.sort((e,t)=>e.appName.localeCompare(t.appName,"en"));let e=new Map;for(let t of cc){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.
|
|
27
|
+
To fix this, ensure that you define the "route" (or alternatively the "routeRegex") field inside the extension definition.`,e):t.component?rU(e,()=>ci(t.appName,t.component),function(e,{featureFlag:t}){return t?n=>!!si(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?rG(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.
|
|
28
|
+
To fix this, ensure that you define the "component" field inside the page definition.`,e)}(r,t)}}let cp={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 cf(){document.body.classList.toggle("omrs-breakpoint-lt-tablet",window.innerWidth<cp.TABLET_MIN),document.body.classList.toggle("omrs-breakpoint-gt-phone",window.innerWidth>cp.PHONE_MAX),document.body.classList.toggle("omrs-breakpoint-gt-tablet",window.innerWidth>cp.TABLET_MAX),document.body.classList.toggle("omrs-breakpoint-lt-desktop",window.innerWidth<cp.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-small-desktop",window.innerWidth<cp.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-large-desktop",window.innerWidth<cp.LARGE_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-gt-small-desktop",window.innerWidth>cp.SMALL_DESKTOP_MAX)}let ch=!1;function cg(){ch||(window.addEventListener("resize",cf),cf(),ch=!0)}var cy=n(3373),cv=n.n(cy);function cb({title:e,children:t}){let n="tablet"===uV();return(0,lh.jsxs)("div",{className:cv()({"-esm-form-engine__card-header-module__tabletHeader___xhRSy":n,"-esm-form-engine__card-header-module__desktopHeader___aPTXc":!n}),children:[(0,lh.jsx)("h4",{children:e}),t]})}let cw=["red","magenta","purple","blue","teal","cyan","gray","green","warm-gray","cool-gray","high-contrast","outline"],cx={primaryColor:{_type:tg.String,_description:"The color for displaying primary diagnoses tags",_default:"blue",_validators:[nE.oneOf(cw)]},secondaryColor:{_type:tg.String,_description:"The color for displaying secondary diagnoses tags",_default:"gray",_validators:[nE.oneOf(cw)]}},cD={"Brand color #1":{_default:"#005d5d",_type:tg.String},"Brand color #2":{_default:"#004144",_type:tg.String},"Brand color #3":{_default:"#007d79",_type:tg.String},excludePatientIdentifierCodeTypes:{uuids:{_type:tg.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:tg.UUID}}},implementationName:{_type:tg.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},logo:{src:{_type:tg.String,_default:"",_description:"The path or URL to the logo shown on the login page and while the server is starting up. If set to an empty string, the default OpenMRS logo is used.",_validators:[nE.isUrl]},alt:{_type:tg.String,_default:"Logo",_description:"The alternative text for the logo image, displayed when the image cannot be loaded or on hover."}},patientPhotoConceptUuid:{_type:tg.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:tg.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:[nE.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:tg.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:tg.String}},diagnosisTags:cx};var cE=n(324);let c_={"carbon.table.batch.cancel":"cancel","carbon.table.batch.items.selected":"batchActionsItemsSelected","carbon.table.batch.item.selected":"batchActionItemSelected","carbon.table.batch.selectAll":"selectAll"},cS=e=>(0,lh.jsx)(cE.TableBatchActions,{translateWithId:(e,t)=>{let n=c_[e];return n?aZ(n,e,t):e},...e}),cC="-esm-form-engine__custom-overflow-menu-module__container___QIBvW",ck="-esm-form-engine__custom-overflow-menu-module__menu___ZppPo",cP="-esm-form-engine__custom-overflow-menu-module__show___8rVUu",cT="-esm-form-engine__custom-overflow-menu-module__overflowMenuButton___0VKUu",cR=(0,lm.createContext)(null);function cO(){let e=(0,lm.useContext)(cR);if(!e)throw Error("useCustomOverflowMenu must be used within a CustomOverflowMenu");return e}function cN({menuTitle:e,children:t}){let[n,r]=lp().useState(!1),a=uZ(()=>r(!1),n),o="tablet"===uV(),i=(0,lm.useCallback)(()=>r(e=>!e),[]),s=(0,lm.useRef)(null),l=(0,lm.useRef)(null),u=(0,lm.useId)(),c=`custom-overflow-menu-trigger-${u}`,d=`custom-overflow-menu-${u}`,m=(0,lm.useCallback)(()=>{r(!1),s.current?.focus()},[]),p=(0,lm.useMemo)(()=>({closeMenu:m}),[m]),f=(0,lm.useCallback)(e=>{"Escape"===e.key&&n&&(e.stopPropagation(),m())},[m,n]),h=lm.Children.toArray(t);(0,lm.useEffect)(()=>{if(n&&l.current){let e=l.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[n]);let g=(0,lm.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,lm.isValidElement)(e)?(0,lm.cloneElement)(e,{closeMenu:m,handleOverflowMenuItemFocus:g,index:t}):e);return(0,lh.jsxs)("div",{"data-overflow-menu":!0,className:cv()("cds--overflow-menu",cC),ref:a,children:[(0,lh.jsx)("button",{className:cv()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":n},cT),"aria-controls":d,"aria-expanded":n,"aria-haspopup":"true",id:c,onClick:i,onKeyDown:f,ref:s,children:e}),(0,lh.jsxs)("div",{className:cv()("cds--overflow-menu-options","cds--overflow-menu--flip",ck,{[cP]:n}),"aria-labelledby":c,"data-floating-menu-direction":"bottom",id:d,onKeyDown:f,ref:l,role:"menu",tabIndex:-1,children:[(0,lh.jsx)("ul",{className:cv()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":o}),children:(0,lh.jsx)(cR.Provider,{value:p,children:y})}),(0,lh.jsx)("span",{})]})]})}function c$(e){let t=(0,lm.useContext)(cR);return(0,lh.jsx)(cE.OverflowMenuItem,{...e,closeMenu:t?.closeMenu})}var cM=n(5571);let cA=["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"],cj=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-activity",iconProps:e})})),cI=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-add",iconProps:e})})),cL=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-arrow-down",iconProps:e})})),cF=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-arrow-left",iconProps:e})})),cB=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-arrow-right",iconProps:e})})),cV=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-arrow-up",iconProps:e})})),cU=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-baby",iconProps:e})})),cW=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-calendar-heat-map",iconProps:e})})),cH=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-calendar",iconProps:e})})),cz=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-caret-down",iconProps:e})})),cK=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-caret-left",iconProps:e})})),cZ=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-caret-right",iconProps:e})})),cG=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-caret-up",iconProps:e})})),cY=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-chart-average",iconProps:e})})),cq=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-chart-line",iconProps:e})})),cJ=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-checkmark-filled",iconProps:e})})),cX=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-checkmark-outline",iconProps:e})})),cQ=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-chemistry",iconProps:e})})),c0=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-chevron-down",iconProps:e})})),c1=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-chevron-left",iconProps:e})})),c4=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-chevron-right",iconProps:e})})),c2=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-chevron-up",iconProps:e})})),c3=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-close",iconProps:e})})),c6=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-close-filled",iconProps:e})})),c5=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-close-outline",iconProps:e})})),c9=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-document",iconProps:e})})),c8=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-document-attachment",iconProps:e})})),c7=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-download",iconProps:e})})),de=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-drug-order",iconProps:e})})),dt=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-edit",iconProps:e})})),dn=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-event-schedule",iconProps:e})})),dr=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-events",iconProps:e})})),da=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-gender-female",iconProps:e})})),di=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-gender-male",iconProps:e})})),ds=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-gender-other",iconProps:e})})),dl=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-gender-unknown",iconProps:e})})),du=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-generic-order-type",iconProps:e})})),dc=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-group",iconProps:e})})),dd=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-group-access",iconProps:e})})),dm=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-hospital-bed",iconProps:e})})),dp=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-image-medical",iconProps:e})})),df=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-information",iconProps:e})})),dh=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-information-filled",iconProps:e})})),dg=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-information-square",iconProps:e})})),dy=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-inventory-management",iconProps:e})})),dv=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-lab-order",iconProps:e})})),db=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-list-checked",iconProps:e})})),dw=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-location",iconProps:e})})),dx=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-material-order",iconProps:e})})),dD=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-maximize",iconProps:e})})),dE=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-medication",iconProps:e})})),d_=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-message-queue",iconProps:e})})),dS=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-microscope",iconProps:e})})),dC=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-mobile-check",iconProps:e})})),dk=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-money",iconProps:e})})),dP=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-mother",iconProps:e})})),dT=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-movement",iconProps:e})})),dR=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),dO=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),dN=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-password",iconProps:e})})),d$=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-pedestrian-family",iconProps:e})})),dM=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-pen",iconProps:e})})),dA=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-printer",iconProps:e})})),dj=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-procedure-order",iconProps:e})})),dI=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-programs",iconProps:e})})),dL=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-referral-order",iconProps:e})})),dF=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-renew",iconProps:e})})),dB=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-report",iconProps:e})})),dV=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-reset",iconProps:e})})),dU=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-save",iconProps:e})})),dW=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-search",iconProps:e})})),dH=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-settings",iconProps:e})})),dz=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-switcher",iconProps:e})})),dK=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-shopping-cart",iconProps:e})})),dZ=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-shopping-cart--arrow-down",iconProps:e})})),dG=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-sticky-note-add",iconProps:e})})),dY=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-syringe",iconProps:e})})),dq=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-table-of-contents",iconProps:e})})),dJ=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-table",iconProps:e})})),dX=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-time",iconProps:e})})),dQ=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-tools",iconProps:e})})),d0=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-translate",iconProps:e})})),d1=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-trash-can",iconProps:e})})),d4=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-tree-view--alt",iconProps:e})})),d2=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-two-factor-authentication",iconProps:e})})),d3=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-user-avatar",iconProps:e})})),d6=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-user-follow",iconProps:e})})),d5=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-user-xray",iconProps:e})})),d9=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-user",iconProps:e})})),d8=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-view-off",iconProps:e})})),d7=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-view",iconProps:e})})),me=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(ms,{ref:t,icon:"omrs-icon-warning",iconProps:e})})),mt=me,mn=c8,mr=db,ma=dp,mo=dZ,mi=(0,lm.memo)((0,lm.forwardRef)(function({icon:e,fallback:t,...n},r){let a=(0,lm.useRef)(e?document.getElementById(e):void 0);return(0,lm.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,lh.jsx)(ur,{value:a.current,fallback:t,children:(0,lh.jsx)(ms,{ref:r,icon:e,iconProps:n})})})),ms=(0,lm.memo)((0,lm.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,lm.useRef)(null);return(0,lm.useImperativeHandle)(n,()=>i.current),(0,lm.useEffect)(()=>{i.current&&"currentColor"!==a&&i.current.style.setProperty("--omrs-icon-fill",a)},[]),(0,lh.jsx)("svg",{ref:i,className:cv()("omrs-icon","-esm-form-engine__icons-module__icon___uq4qr",r),height:o,width:o,viewBox:"0 0 16 16",children:(0,lh.jsx)("use",{href:`#${e}`})})})),ml=({path:e,title:t,basePath:n,icon:r})=>{let{t:a}=(0,lZ.useTranslation)(),o=(0,cM.useLocation)(),i=(0,lm.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,lh.jsx)("div",{children:(0,lh.jsx)(lg,{className:cv()("cds--side-nav__link",{"active-left-nav-link":i}),to:`${n}/${encodeURIComponent(e)}`,children:(0,lh.jsxs)("span",{className:"-esm-form-engine__dashboard-module__menu___WbY42",children:[(0,lh.jsx)(mi,{icon:r,className:"-esm-form-engine__dashboard-module__icon___L-hKL",size:16}),(0,lh.jsx)("span",{children:a(t)})]})})},e)};function mu(e){return function({basePath:t}){return(0,lh.jsx)(cM.BrowserRouter,{children:(0,lh.jsx)(ml,{basePath:t,...e})})}}function mc(e){let t=(0,lm.useRef)(null),n=(0,lm.useRef)(void 0),r=(0,lm.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,lm.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 md(...e){return 1===e.length&&e[0]?e[0]:t=>{let n=!1,r=e.map(e=>{let r=mm(e,t);return n||="function"==typeof r,r});if(n)return()=>{r.forEach((t,n)=>{"function"==typeof t?t():mm(e[n],null)})}}}function mm(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function mp(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}let mf="u">typeof document?lp().useLayoutEffect:()=>{},mh={prefix:String(Math.round(1e10*Math.random())),current:0},mg=lp().createContext(mh),my=lp().createContext(!1),mv=("u">typeof window&&window.document&&window.document.createElement,new WeakMap),mb="function"==typeof lp().useId?function(e){let t=lp().useId(),[n]=(0,lm.useState)(mE()),r=n?"react-aria":`react-aria${mh.prefix}`;return e||`${r}-${t}`}:function(e){let t=(0,lm.useContext)(mg),n=function(e=!1){let t=(0,lm.useContext)(mg),n=(0,lm.useRef)(null);if(null===n.current&&!e){let e=lp().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;if(e){let n=mv.get(e);null==n?mv.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==n.state&&(t.current=n.id,mv.delete(e))}n.current=++t.current}return n.current}(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`};function mw(){return!1}function mx(){return!0}function mD(e){return()=>{}}function mE(){return"function"==typeof lp().useSyncExternalStore?lp().useSyncExternalStore(mD,mw,mx):(0,lm.useContext)(my)}let m_=!!("u">typeof window&&window.document&&window.document.createElement),mS=new Map;function mC(e){let[t,n]=(0,lm.useState)(e),r=(0,lm.useRef)(null),a=mb(t),o=(0,lm.useRef)(null);if(s&&s.register(o,a),m_){let e=mS.get(a);e&&!e.includes(r)?e.push(r):mS.set(a,[r])}return mf(()=>()=>{s&&s.unregister(o),mS.delete(a)},[a]),(0,lm.useEffect)(()=>{let e=r.current;return e&&n(e),()=>{e&&(r.current=null)}}),a}function mk(e=[]){let t=mC(),[n,r]=function(e){let[t,n]=(0,lm.useState)(e),r=(0,lm.useRef)(t),a=(0,lm.useRef)(null),o=(0,lm.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 mf(()=>{r.current=t,a.current&&o.current()}),[t,(0,lm.useCallback)(e=>{a.current=e(r.current),o.current()},[o])]}(t),a=(0,lm.useCallback)(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return mf(a,[t,a,...e]),n}"u">typeof FinalizationRegistry&&(s=new FinalizationRegistry(e=>{mS.delete(e)}));let mP=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 mT(...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]=mp(n,a):("className"===e||"UNSAFE_className"===e)&&"string"==typeof n&&"string"==typeof a?t[e]=mP(n,a):"id"===e&&n&&a?t.id=function(e,t){if(e===t)return e;let n=mS.get(e);if(n)return n.forEach(e=>e.current=t),t;let r=mS.get(t);return r?(r.forEach(t=>t.current=e),e):t}(n,a):"ref"===e&&n&&a?t.ref=md(n,a):t[e]=void 0!==a?a:n}}return t}let mR=Symbol("default");function mO({values:e,children:t}){for(let[n,r]of e)t=lp().createElement(n.Provider,{value:r},t);return t}function mN(e){let{className:t,style:n,children:r,defaultClassName:a,defaultChildren:o,defaultStyle:i,values:s}=e;return(0,lm.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 m$(e,t){let n=(0,lm.useContext)(e);if(null===t)return null;if(n&&"object"==typeof n&&"slots"in n&&n.slots){let e=t||mR;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 mM(e,t,n){let{ref:r,...a}=m$(n,e.slot)||{},o=mc((0,lm.useMemo)(()=>md(t,r),[t,r])),i=mT(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 mA(e=!0){let[t,n]=(0,lm.useState)(e),r=(0,lm.useRef)(!1),a=(0,lm.useCallback)(e=>{r.current=!0,n(!!e)},[]);return mf(()=>{r.current||n(!1)},[]),[a,t]}function mj(e){let t=/^(data-.*)$/,n={};for(let r in e)t.test(r)||(n[r]=e[r]);return n}let mI=(0,lm.createContext)(null),mL=null;function mF(e,t="assertive",n=7e3){mL?mL.announce(e,t,n):(mL=new mB,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?mL.announce(e,t,n):setTimeout(()=>{(null==mL?void 0:mL.isAttached())&&(null==mL||mL.announce(e,t,n))},100))}class mB{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 mV=new Set(["id"]),mU=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),mW=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),mH=new Set(["dir","lang","hidden","inert","translate"]),mz=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"]),mK=/^(data-.*)$/;function mZ(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)&&(mV.has(t)||n&&mU.has(t)||r&&mW.has(t)||a&&mH.has(t)||o&&(mz.has(t)||t.endsWith("Capture")&&mz.has(t.slice(0,-7)))||i?.has(t)||mK.test(t))&&(s[t]=e[t]);return s}function mG(e){if(function(){if(null==mY){mY=!1;try{document.createElement("div").focus({get preventScroll(){return mY=!0,!0}})}catch{}}return mY}())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 mY=null,mq=e=>e?.ownerDocument??document,mJ=e=>e&&"window"in e&&e.window===e?e:mq(e).defaultView||window;function mX(e,t){return!!t&&!!e&&e.contains(t)}function mQ(e){return e.target}function m0(e){if(!e)return!1;let t=e.getRootNode(),n=mJ(e);if(!(t instanceof n.Document||t instanceof n.ShadowRoot))return!1;let r=t.activeElement;return null!=r&&e.contains(r)}let m1="u">typeof Element&&"checkVisibility"in Element.prototype;function m4(e,t){return m1?e.checkVisibility({visibilityProperty:!0})&&!e.closest("[data-react-aria-prevent-focus]"):"#comment"!==e.nodeName&&function(e){let t=mJ(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||m4(e.parentElement,e))}let m2=["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"],m3=m2.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";m2.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let m6=m2.join(':not([hidden]):not([tabindex="-1"]),');function m5(e,t){return e.matches(m3)&&!m8(e)&&(t?.skipVisibilityCheck||m4(e))}function m9(e){return e.matches(m6)&&m4(e)&&!m8(e)}function m8(e){let t=e;for(;null!=t;){if(t instanceof t.ownerDocument.defaultView.HTMLElement&&t.inert)return!0;t=t.parentElement}return!1}function m7(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function pe(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function pt(e){let t=(0,lm.useRef)({isFocused:!1,observer:null});return mf(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]),(0,lm.useCallback)(n=>{let r=mQ(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=m7(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 pn=!1;function pr(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 pa(e){return"u">typeof window&&null!=window.navigator&&e.test(window.navigator.userAgentData?.platform||window.navigator.platform)}function po(e){let t=null;return()=>(null==t&&(t=e()),t)}let pi=po(function(){return pa(/^Mac/i)}),ps=po(function(){return pa(/^iPhone/i)}),pl=po(function(){return pa(/^iPad/i)||pi()&&navigator.maxTouchPoints>1}),pu=po(function(){return ps()||pl()});po(function(){return pi()||pu()});let pc=po(function(){return pr(/AppleWebKit/i)&&!pd()}),pd=po(function(){return pr(/Chrome/i)}),pm=po(function(){return pr(/Android/i)}),pp=po(function(){return pr(/Firefox/i)});function pf(e){return""===e.pointerType&&!!e.isTrusted||(pm()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function ph(e,t,n=!0){let{metaKey:r,ctrlKey:a,altKey:o,shiftKey:i}=t;pp()&&window.event?.type?.startsWith("key")&&"_blank"===e.target&&(pi()?r=!0:a=!0);let s=pc()&&pi()&&!pl()&&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});ph.isOpening=n,mG(e),e.dispatchEvent(s),ph.isOpening=!1}ph.isOpening=!1;let pg=null,py=new Set,pv=new Map,pb=!1,pw=!1,px={Tab:!0,Escape:!0};function pD(e,t){for(let n of py)n(e,t)}function pE(e){pb=!0,ph.isOpening||e.metaKey||!pi()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(pg="keyboard",pD("keyboard",e))}function p_(e){pg="pointer","pointerType"in e&&e.pointerType,("mousedown"===e.type||"pointerdown"===e.type)&&(pb=!0,pD("pointer",e))}function pS(e){!ph.isOpening&&pf(e)&&(pb=!0,pg="virtual")}function pC(e){let t=mJ(mQ(e)),n=mq(mQ(e));mQ(e)!==t&&mQ(e)!==n&&!pn&&e.isTrusted&&(pb||pw||(pg="virtual",pD("virtual",e)),pb=!1,pw=!1)}function pk(){pn||(pb=!1,pw=!0)}function pP(e){if("u"<typeof window||"u"<typeof document)return;let t=mJ(e),n=mq(e);if(pv.get(t))return;let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){pb=!0,r.apply(this,arguments)},n.addEventListener("keydown",pE,!0),n.addEventListener("keyup",pE,!0),n.addEventListener("click",pS,!0),t.addEventListener("focus",pC,!0),t.addEventListener("blur",pk,!1),"u">typeof PointerEvent&&(n.addEventListener("pointerdown",p_,!0),n.addEventListener("pointermove",p_,!0),n.addEventListener("pointerup",p_,!0)),t.addEventListener("beforeunload",()=>{pT(e)},{once:!0}),pv.set(t,{focus:r})}let pT=(e,t)=>{let n=mJ(e),r=mq(e);t&&r.removeEventListener("DOMContentLoaded",t),pv.has(n)&&(n.HTMLElement.prototype.focus=pv.get(n).focus,r.removeEventListener("keydown",pE,!0),r.removeEventListener("keyup",pE,!0),r.removeEventListener("click",pS,!0),n.removeEventListener("focus",pC,!0),n.removeEventListener("blur",pk,!1),"u">typeof PointerEvent&&(r.removeEventListener("pointerdown",p_,!0),r.removeEventListener("pointermove",p_,!0),r.removeEventListener("pointerup",p_,!0)),pv.delete(n))};function pR(){return"pointer"!==pg}"u">typeof document&&("loading"!==(m=mq(void 0)).readyState?pP(void 0):m.addEventListener("DOMContentLoaded",()=>{pP(void 0)}));let pO=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),pN=new Map,p$=new Set;function pM(){if("u"<typeof window)return;function e(e){return"propertyName"in e}let t=n=>{let r=mQ(n);if(!e(n)||!r)return;let a=pN.get(r);if(a&&(a.delete(n.propertyName),0===a.size&&(r.removeEventListener("transitioncancel",t),pN.delete(r)),0===pN.size)){for(let e of p$)e();p$.clear()}};document.body.addEventListener("transitionrun",n=>{let r=mQ(n);if(!e(n)||!r)return;let a=pN.get(r);a||(a=new Set,pN.set(r,a),r.addEventListener("transitioncancel",t,{once:!0})),a.add(n.propertyName)}),document.body.addEventListener("transitionend",t)}function pA(e){requestAnimationFrame(()=>{for(let[e]of pN)"isConnected"in e&&!e.isConnected&&pN.delete(e);0===pN.size?e():p$.add(e)})}function pj(e){if(!e.isConnected)return;let t=mq(e);if("virtual"===pg){let n=((e=document)=>e.activeElement)(t);pA(()=>{let r=((e=document)=>e.activeElement)(t);(r===n||r===t.body)&&e.isConnected&&mG(e)})}else mG(e)}function pI(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:a}=e,o=(0,lm.useCallback)(e=>{if(mQ(e)===e.currentTarget)return r&&r(e),a&&a(!1),!0},[r,a]),i=pt(o),s=(0,lm.useCallback)(e=>{let t=mQ(e),r=mq(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 pL(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 pF(e,t){mf(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}"u">typeof document&&("loading"!==document.readyState?pM():document.addEventListener("DOMContentLoaded",pM));let pB=lp().createContext(null);function pV(e,t){let{focusProps:n}=pI(e),{keyboardProps:r}={keyboardProps:e.isDisabled?{}:{onKeyDown:pL(e.onKeyDown),onKeyUp:pL(e.onKeyUp)}},a=mT(n,r),o=function(e){let t=(0,lm.useContext)(pB)||{};pF(t,e);let{ref:n,...r}=t;return r}(t),i=e.isDisabled?{}:o,s=(0,lm.useRef)(e.autoFocus);(0,lm.useEffect)(()=>{s.current&&t.current&&pj(t.current),s.current=!1},[t]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:mT({...a,tabIndex:l},i)}}lp().forwardRef(function(e,t){let{children:n,...r}=e,a=mc(t),o={...r,ref:a};return lp().createElement(pB.Provider,{value:o},n)});let pU="default",pW="",pH=new WeakMap;function pz(e){if(pu())"disabled"===pU&&(pU="restoring",setTimeout(()=>{pA(()=>{if("restoring"===pU){let t=mq(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=pW||""),pW="",pU="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&pH.has(e)){let t=pH.get(e),n="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[n]&&(e.style[n]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),pH.delete(e)}}function pK(e){let t=e?.defaultView;return t?.__webpack_nonce__||globalThis.__webpack_nonce__||void 0}let pZ=new WeakMap;function pG(e){let t=e??("u">typeof document?document:void 0);if(!t)return pK(t);if(pZ.has(t))return pZ.get(t);let n=t.querySelector('meta[property="csp-nonce"]'),r=n&&n instanceof mJ(n).HTMLMetaElement&&(n.nonce||n.content)||pK(t)||void 0;return void 0!==r&&pZ.set(t,r),r}let pY=lp().createContext({register:()=>{}});pY.displayName="PressResponderContext";let pq=lp().useInsertionEffect??mf;function pJ(e){let t=(0,lm.useRef)(null);return pq(()=>{t.current=e},[e]),(0,lm.useCallback)((...e)=>{let n=t.current;return n?.(...e)},[])}function pX(){let e=(0,lm.useRef)(new Map),t=(0,lm.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,lm.useCallback)((t,n,r,a)=>{let o=e.current.get(r)?.fn||r;t.removeEventListener(n,o,a),e.current.delete(r)},[]),r=(0,lm.useCallback)(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return(0,lm.useEffect)(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}var pQ=n(8439),p0=n.n(pQ);class p1{#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 p4=Symbol("linkClicked"),p2="react-aria-pressable-style",p3="data-react-aria-pressable";function p6(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,lm.useContext)(pY);if(t){let{register:n,ref:r,...a}=t;e=mT(a,e),n()}return pF(t,e.ref),e}(e),[f,h]=(0,lm.useState)(!1),g=(0,lm.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:y,removeAllGlobalListeners:v}=pX(),b=(0,lm.useCallback)((e,t)=>{let a=g.current;if(s||a.didFirePressStart)return!1;let o=!0;if(a.isTriggeringEvent=!0,r){let n=new p1("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,lm.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 p1("pressend",r,e);a(t),l=t.shouldStopPropagation}if(n&&n(!1),h(!1),t&&o&&!s){let n=new p1("press",r,e);t(n),l&&=n.shouldStopPropagation}return i.isTriggeringEvent=!1,l},[s,a,n,t]),x=pJ(w),D=pJ((0,lm.useCallback)((e,t)=>{let n=g.current;if(s)return!1;if(o){n.isTriggeringEvent=!0;let r=new p1("pressup",t,e);return o(r),n.isTriggeringEvent=!1,r.shouldStopPropagation}return!0},[s,o])),E=(0,lm.useCallback)(e=>{let t=g.current;if(t.isPressed&&t.target){for(let n of(t.didFirePressStart&&null!=t.pointerType&&w(p8(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,v(),d||pz(t.target),t.disposables))n();t.disposables=[]}},[d,v,w]),_=pJ(E),S=(0,lm.useCallback)(e=>{c&&E(e)},[c,E]),C=(0,lm.useCallback)(e=>{s||i?.(e)},[s,i]),k=(0,lm.useCallback)((e,t)=>{if(!s&&i){let n=new MouseEvent("click",e);pe(n,t),i(m7(n))}},[s,i]),P=(0,lm.useMemo)(()=>{let e=g.current,t={onKeyDown(t){if(p9(t.nativeEvent,t.currentTarget)&&mX(t.currentTarget,mQ(t))){p7(mQ(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(mq(t.currentTarget),"keyup",mp(t=>{p9(t,a)&&!t.repeat&&mX(a,mQ(t))&&e.target&&D(p8(e.target,t),"keyboard")},n),!0),r&&t.stopPropagation(),t.metaKey&&pi()&&e.metaKeyEvents?.set(t.key,t.nativeEvent)}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||mX(t.currentTarget,mQ(t)))&&t&&0===t.button&&!e.isTriggeringEvent&&!ph.isOpening){let n=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||pf(t.nativeEvent))){let e=b(t,"virtual"),r=D(t,"virtual"),a=x(t,"virtual");C(t),n=e&&r&&a}else if(e.isPressed&&"keyboard"!==e.pointerType){let r=e.pointerType||t.nativeEvent.pointerType||"virtual",a=D(p8(t.currentTarget,t),r),o=x(p8(t.currentTarget,t),r,!0);n=a&&o,e.isOverTarget=!1,C(t),_(t)}e.ignoreEmulatedMouseEvents=!1,n&&t.stopPropagation()}}},n=t=>{if(e.isPressed&&e.target&&p9(t,e.target)){p7(mQ(t),t.key)&&t.preventDefault();let n=mQ(t),r=mX(e.target,n);x(p8(e.target,t),"keyboard",r),r&&k(t,e.target),v(),"Enter"!==t.key&&p5(e.target)&&mX(e.target,n)&&!t[p4]&&(t[p4]=!0,ph(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||!mX(t.currentTarget,mQ(t)))return;if(a=t.nativeEvent,!pm()&&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(pu()){if("default"===pU){let t=mq(e);pW=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}pU="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";pH.set(e,e.style[t]),e.style[t]="none"}}(e.target),o=b(t,e.pointerType);let a=mQ(t);"releasePointerCapture"in a&&("hasPointerCapture"in a?a.hasPointerCapture(t.pointerId)&&a.releasePointerCapture(t.pointerId):a.releasePointerCapture(t.pointerId)),y(mq(t.currentTarget),"pointerup",n,!1),y(mq(t.currentTarget),"pointercancel",r,!1)}o&&t.stopPropagation()},t.onMouseDown=t=>{if(mX(t.currentTarget,mQ(t))&&0===t.button){if(u){let n=function(e){for(;e&&!m5(e,{skipVisibilityCheck:!0});)e=e.parentElement;let t=mJ(e),n=t.document.activeElement;if(!n||n===e)return;pn=!0;let r=!1,a=e=>{(mQ(e)===n||r)&&e.stopImmediatePropagation()},o=t=>{(mQ(t)===n||r)&&(t.stopImmediatePropagation(),e||r||(r=!0,mG(n),l()))},i=t=>{(mQ(t)===e||r)&&t.stopImmediatePropagation()},s=t=>{(mQ(t)===e||r)&&(t.stopImmediatePropagation(),r||(r=!0,mG(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),pn=!1,r=!1},u=requestAnimationFrame(l);return l}(t.target);n&&e.disposables.push(n)}t.stopPropagation()}},t.onPointerUp=t=>{mX(t.currentTarget,mQ(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(p8(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,x(p8(e.target,t),e.pointerType,!1),S(t))};let n=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target){if(mX(e.target,mQ(t))&&null!=e.pointerType){let n=!1,r=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(n?_(t):(mG(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=>{mX(e.currentTarget,mQ(e))&&_(e)}}return t},[y,s,u,v,d,S,b,C,k]);return(0,lm.useEffect)(()=>{if(!m)return;let e=mq(m.current);if(!e||!e.head||e.getElementById(p2))return;let t=e.createElement("style");t.id=p2;let n=pG(e);n&&(t.nonce=n),t.textContent=`
|
|
29
29
|
@layer {
|
|
30
|
-
[${
|
|
30
|
+
[${p3}] {
|
|
31
31
|
touch-action: pan-x pan-y pinch-zoom;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
`.trim(),e.head.prepend(t)},[m]),(0,lr.useEffect)(()=>{let e=g.current;return()=>{for(let t of(d||pj(e.target??void 0),e.disposables))t();e.disposables=[]}},[d]),{isPressed:l||f,pressProps:mw(p,P,{[pY]:!0})}}function pJ(e){return"A"===e.tagName&&e.hasAttribute("href")}function pX(e,t){let{key:n,code:r}=e,a=t.getAttribute("role");return("Enter"===n||" "===n||"Spacebar"===n||"Space"===r)&&!(t instanceof mU(t).HTMLInputElement&&!p4(t,n)||t instanceof mU(t).HTMLTextAreaElement||t.isContentEditable)&&!(("link"===a||!a&&pJ(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 p0(e,t){return e instanceof HTMLInputElement?!p4(e,t):!(e instanceof HTMLInputElement)&&(e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!pJ(e))}let p1=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function p4(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:p1.has(e.type)}function p2(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:a}=e,o=(0,lr.useRef)({isFocusWithin:!1}),{addGlobalListener:i,removeAllGlobalListeners:s}=pW(),l=(0,lr.useCallback)(e=>{mW(e.currentTarget,mH(e))&&o.current.isFocusWithin&&!mW(e.currentTarget,e.relatedTarget)&&(o.current.isFocusWithin=!1,s(),n&&n(e),a&&a(!1))},[n,a,o,s]),u=m4(l),c=(0,lr.useCallback)(e=>{if(!mW(e.currentTarget,mH(e)))return;let t=mH(e),n=mV(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=mH(e);if(o.current.isFocusWithin&&!mW(t,r)){let e=new n.defaultView.FocusEvent("blur",{relatedTarget:r});m1(e,t),l(m0(e))}},{capture:!0})}},[r,a,u,i,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:l}}}function p3(e={}){var t;let{autoFocus:n=!1,isTextInput:r,within:a}=e,o=(0,lr.useRef)({isFocused:!1,isFocusVisible:n||px()}),[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=px(),s(e),c()},[c]);t={enabled:i,isTextInput:r},pb(),(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=mV(a=n?mH(n):void 0),l=void 0!==(s=mU(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&&!pD.has(p.type)||p instanceof u||p instanceof d&&p.isContentEditable)&&"keyboard"===e&&n instanceof m&&!pm[n.key]||(e=>{o.current.isFocusVisible=e,c()})(px())};return pl.add(e),()=>{pl.delete(e)}},[r,i]);let{focusProps:m}=pP({isDisabled:a,onFocusChange:d}),{focusWithinProps:p}=p2({isDisabled:!a,onFocusWithinChange:d});return{isFocused:i,isFocusVisible:l,focusProps:a?p:m}}let p6=!1,p5=0;function p9(e){"touch"===e.pointerType&&(p6=!0,setTimeout(()=>{p6=!1},500))}function p8(){let e=mV(null);if(void 0!==e)return 0===p5&&"u">typeof PointerEvent&&e.addEventListener("pointerup",p9),p5++,()=>{!(--p5>0)&&"u">typeof PointerEvent&&e.removeEventListener("pointerup",p9)}}function p7(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)(p8,[]);let{addGlobalListener:l,removeAllGlobalListeners:u}=pW(),{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=>{p6&&"mouse"===r.pointerType||((r,o)=>{if(s.pointerType=o,a||"touch"===o||s.isHovered||!mW(r.currentTarget,mH(r)))return;s.isHovered=!0;let u=r.currentTarget;s.target=u,l(mV(mH(r)),"pointerover",t=>{s.isHovered&&s.target&&!mW(s.target,mH(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&&mW(t.currentTarget,mH(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 fe=(0,lr.createContext)(!1);function ft(e){let t=(t,n)=>(0,lr.useContext)(fe)?null:e(t,n);return t.displayName=e.displayName||e.name,(0,lr.forwardRef)(t)}let fn=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),fr=(0,lr.createContext)({}),fa=ft(function(e,t){var n;[e,t]=mS(e,t,fr);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}=pq({onPressStart:i,onPressEnd:s,onPressChange:u,onPress:o,onPressUp:l,onClick:m,isDisabled:a,preventFocusOnPress:c,ref:t}),{focusableProps:b}=pN(e,t);d&&(b.tabIndex=a?-1:b.tabIndex);let w=mw(b,y,mL(e,{labelable:!0}));return{isPressed:v,buttonProps:mw(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}=p3(e),{hoverProps:c,isHovered:d}=p7({...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=mE({...e,values:m,defaultClassName:"react-aria-Button"}),f=my(o.id),h=my(),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?mR(e,"assertive"):y.current&&l&&!a&&mR(e,"assertive"),y.current=a},[a,l,g,f]),la().createElement("button",{...mL(e,{propNames:fn}),...mw(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(mP.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 fo=(0,lr.createContext)({}),fi=(0,lr.createContext)({}),fs=(0,lr.forwardRef)(function(e,t){[e,t]=mS(e,t,fi);let{elementType:n="span",...r}=e;return la().createElement(n,{className:"react-aria-Text",...r,ref:t})}),fl=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),fu=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function fc(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 fl.has(t.script)}let t=e.split("-")[0];return fu.has(t)}let fd=Symbol.for("react-aria.i18n.locale");function fm(){let e="u">typeof window&&window[fd]||"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:fc(e)?"rtl":"ltr"}}let fp=fm(),ff=new Set;function fh(){for(let e of(fp=fm(),ff))e(fp)}function fg(){let e=mf(),[t,n]=(0,lr.useState)(fp);return((0,lr.useEffect)(()=>(0===ff.size&&window.addEventListener("languagechange",fh),ff.add(n),()=>{ff.delete(n),0===ff.size&&window.removeEventListener("languagechange",fh)}),[]),e)?{locale:"u">typeof window&&window[fd]||"en-US",direction:"ltr"}:t}let fy=la().createContext(null);function fv(e){let{locale:t,children:n}=e,r=la().useMemo(()=>({locale:t,direction:fc(t)?"rtl":"ltr"}),[t]);return la().createElement(fy.Provider,{value:r},n)}function fb(e){let{children:t}=e,n=fg();return la().createElement(fy.Provider,{value:n},t)}function fw(e){let{locale:t,children:n}=e;return t?la().createElement(fv,{locale:t,children:n}):la().createElement(fb,{children:n})}function fx(){let e=fg();return(0,lr.useContext)(fy)||e}let fD=null;function fE(e,t="assertive",n=7e3){fD?fD.announce(e,t,n):(fD=new f_,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?fD.announce(e,t,n):setTimeout(()=>{fD?.isAttached()&&fD?.announce(e,t,n)},100))}class f_{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 fS={};function fC(e,t){let n=(0,lr.useRef)(null);return e&&n.current&&t(e,n.current)&&(e=n.current),n.current=e,e}fS={"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 fk=new Map;class fP{constructor(e,t={}){this.formatter=fR(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==fN&&(fN="h12"===new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle),fN&&(this.resolvedHourCycle||(this.resolvedHourCycle=function(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,"");let n=fR(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 fT={true:{ja:"h11"},false:{}};function fR(e,t={}){if("boolean"==typeof t.hour12&&(null==fO&&(fO="24"===new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))),fO)){let n=fT[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(fk.has(n))return fk.get(n);let r=new Intl.DateTimeFormat(e,t);return fk.set(n,r),r}let fO=null,fN=null;function f$(e){e=fC(e??{},fM);let{locale:t}=fx();return(0,lr.useMemo)(()=>new fP(t,e),[t,e])}function fM(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 fA=Symbol.for("react-aria.i18n.locale"),fj=Symbol.for("react-aria.i18n.strings");class fI{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[fA];if(void 0===p){let e=window[fj];if(!e)return null;for(let n in p={},e)p[n]=new fI({[t]:e[n]},t)}let n=p?.[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 fL=new Map,fF=new Map;class fB{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=fL.get(a);return o||(o=new Intl.PluralRules(this.locale,{type:n}),fL.set(a,o)),"function"==typeof(r=t[o.select(e)]||t.other)?r():r}number(e){let t=fF.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),fF.set(this.locale,t)),t.format(e)}select(e,t){let n=e[t]||e.other;return"function"==typeof n?n():n}}let fV=new WeakMap;function fU(e,t){let n;return t&&fI.getGlobalDictionaryForPackage(t)||((n=fV.get(e))||(n=new fI(e),fV.set(e,n)),n)}function fW(e,t){let{locale:n}=fx(),r=fU(e,t);return(0,lr.useMemo)(()=>new fB(n,r),[n,r])}function fH(e,t){return e-t*Math.floor(e/t)}function fz(e,t,n,r){let a=(t=fZ(e,t))-1,o=-2;return n<=2?o=0:fK(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 fK(e){return e%4==0&&(e%100!=0||e%400==0)}function fZ(e,t){return"BC"===e?1-t:t}function fG(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}let fY={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 fq{fromJulianDay(e){let t=e-1721426,n=Math.floor(t/146097),r=fH(t,146097),a=Math.floor(r/36524),o=fH(r,36524),i=Math.floor(o/1461),s=Math.floor(fH(o,1461)/365),[l,u]=fG(400*n+100*a+4*i+s+ +(4!==a&&4!==s)),c=e-fz(l,u,1,1),d=2;e<fz(l,u,3,1)?d=0:fK(u)&&(d=1);let m=Math.floor(((c+d)*12+373)/367),p=e-fz(l,u,m,1)+1;return new hs(l,u,m,p)}toJulianDay(e){return fz(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return fY[fK(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return fK(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 fJ(e,t){let n=e.copy(),r="hour"in n?f9(n,t):0;fX(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,fQ(n),f0(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 fX(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function fQ(e){for(;e.month<1;)fX(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,fX(e,1)}function f0(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 f1(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),f0(e)}function f4(e){let t={};for(let n in e)"number"==typeof e[n]&&(t[n]=-e[n]);return t}function f2(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),f1(n),n}function f3(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),f6(n),n}function f6(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 f5(e,t){let n=e%t;return n<0&&(n+=t),n}function f9(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=f5(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=f5(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=f5(e.minute,60),n=Math.floor(e.hour/24),e.hour=f5(e.hour,24),n}function f8(e,t){let n=e.copy();return f9(n,t),n}function f7(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=ht(o,n,0,t.length-1,r?.round),a.era=t[o],f1(a);break}case"year":a.calendar.isInverseEra?.(a)&&(n=-n),a.year=ht(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=ht(e.month,n,1,e.calendar.getMonthsInYear(e),r?.round);break;case"day":a.day=ht(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),f1(a),a}function he(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=ht(t,n,o,i,r?.round);break}case"minute":a.minute=ht(e.minute,n,0,59,r?.round);break;case"second":a.second=ht(e.second,n,0,59,r?.round);break;case"millisecond":a.millisecond=ht(e.millisecond,n,0,999,r?.round);break;default:throw Error("Unsupported field "+t)}return a}function ht(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 hn(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?hg(fJ(hw(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):hd(e)-e.offset)+(t.milliseconds||0),n+=1e3*(t.seconds||0),n+=6e4*(t.minutes||0),hx(hv(n+=36e5*(t.hours||0),e.timeZone),e.calendar)}function hr(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 ha(e){let t,n=hx(e,new fq);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 ho(e){return`${ha(e)}T${hr(e)}`}function hi(e){let t,n="object"==typeof e[0]?e.shift():new fq;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 hs{#t;constructor(...e){let[t,n,r,a,o]=hi(e);this.calendar=t,this.era=n,this.year=r,this.month=a,this.day=o,f1(this)}copy(){return this.era?new hs(this.calendar,this.era,this.year,this.month,this.day):new hs(this.calendar,this.year,this.month,this.day)}add(e){return fJ(this,e)}subtract(e){return fJ(this,f4(e))}set(e){return f2(this,e)}cycle(e,t,n){return f7(this,e,t,n)}toDate(e){return hy(this,e)}toString(){return ha(this)}compare(e){return hR(this,e)}}class hl{#t;constructor(e=0,t=0,n=0,r=0){this.hour=e,this.minute=t,this.second=n,this.millisecond=r,f6(this)}copy(){return new hl(this.hour,this.minute,this.second,this.millisecond)}add(e){return f8(this,e)}subtract(e){return f8(this,f4(e))}set(e){return f3(this,e)}cycle(e,t,n){return he(this,e,t,n)}toString(){return hr(this)}compare(e){var t,n;return t=this,n=e,hO(t)-hO(n)}}class hu{#t;constructor(...e){let[t,n,r,a,o]=hi(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,f1(this)}copy(){return this.era?new hu(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new hu(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return fJ(this,e)}subtract(e){return fJ(this,f4(e))}set(e){return f2(f3(this,e),e)}cycle(e,t,n){switch(e){case"era":case"year":case"month":case"day":return f7(this,e,t,n);default:return he(this,e,t,n)}}toDate(e,t){return hy(this,e,t)}toString(){return ho(this)}compare(e){var t,n;let r=hR(this,e);return 0===r?(t=this,n=hw(e),hO(t)-hO(n)):r}}class hc{#t;constructor(...e){let[t,n,r,a,o]=hi(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,f1(this)}copy(){return this.era?new hc(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new hc(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return hn(this,e)}subtract(e){return hn(this,f4(e))}set(e,t){let n,r;return 0===(r=f3(f2(n=hw(this),e),e)).compare(n)?this:hx(hv(hg(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=hw(e),i=hx(f3(o,{hour:t}),new fq),s=[hg(i,e.timeZone,"earlier"),hg(i,e.timeZone,"later")].filter(t=>hv(t,e.timeZone).day===i.day)[0],l=hx(f3(o,{hour:a}),new fq),u=[hg(l,e.timeZone,"earlier"),hg(l,e.timeZone,"later")].filter(t=>hv(t,e.timeZone).day===l.day).pop(),c=hd(e)-e.offset,d=Math.floor(c/36e5),m=c%36e5;return hx(hv(c=36e5*ht(d,n,Math.floor(s/36e5),Math.floor(u/36e5),r?.round)+m,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return he(e,t,n,r);case"era":case"year":case"month":case"day":return hx(hv(hg(f7(hw(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(hd(e)-e.offset)}toString(){var e;let t,n,r,a,o;return`${ho(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 hc){var n,r;return e.timeZone===t?e:(n=e,r=t,hx(hv(hd(n)-n.offset,r),n.calendar))}return hv(hg(e,t,void 0),t)})(e,this.timeZone).toDate().getTime()}}function hd(e){return hm(fZ((e=hx(e,new fq)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function hm(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 hp(e,t){if("UTC"===t)return 0;if(e>0&&t===h$())return -6e4*new Date(e).getTimezoneOffset();let{year:n,month:r,day:a,hour:o,minute:i,second:s}=hh(e,t);return hm(n,r,a,o,i,s,0)-1e3*Math.floor(e/1e3)}let hf=new Map;function hh(e,t){let n=hf.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"}),hf.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 hg(e,t,n="compatible"){var r,a,o;let i=hw(e);if("UTC"===t)return hd(i);if(t===h$()&&"compatible"===n){i=hx(i,new fq);let e=new Date,t=fZ(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=hd(i),l=hp(s-864e5,t),u=hp(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=hh(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 hy(e,t,n="compatible"){return new Date(hg(e,t,n))}function hv(e,t){let n=hp(e,t),r=new Date(e+n),a=r.getUTCFullYear();return new hc(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 hb(e){return new hs(e.calendar,e.era,e.year,e.month,e.day)}function hw(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 hu(e.calendar,e.era,e.year,e.month,e.day,n,r,a,o)}function hx(e,t){if(hS(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,f1(r),r}let hD={"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 hE(e,t){return t=hx(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function h_(e,t){return hS(e.calendar,t.calendar)&&hE(e,t)}function hS(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}let hC={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function hk(e,t,n){let r=Math.ceil(e.calendar.toJulianDay(e)+1-(n?hC[n]:function(e){let t=hL.get(e);if(!t){if(Intl.Locale){let n=new Intl.Locale(e);if("getWeekInfo"in n&&(t=n.getWeekInfo()))return hL.set(e,t),t.firstDay}let n=function(e){if(Intl.Locale){let t=hI.get(e);return!t&&(t=new Intl.Locale(e).maximize().region)&&hI.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&&hD[n]||0};hL.set(e,t)}return t.firstDay}(t)))%7;return r<0&&(r+=7),r}function hP(e){return hv(Date.now(),e)}function hT(e){return hb(hP(e))}function hR(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function hO(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let hN=null;function h$(){return null==hN&&(hN=new Intl.DateTimeFormat().resolvedOptions().timeZone),hN}function hM(e){return e.subtract({days:e.day-1})}function hA(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function hj(e,t,n){let r=hk(e,t,n);return e.subtract({days:r})}let hI=new Map,hL=new Map;function hF(e,t,n){let r=e.calendar.getDaysInMonth(e);return Math.ceil((hk(hM(e),t,n)+r)/7)}function hB(e,t){return e&&t?0>=e.compare(t)?e:t:e||t}function hV(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function hU(e){return e&&e.__esModule?e.default:e}let hW=new WeakMap;function hH(e){return e?.calendar.identifier==="gregory"&&"BC"===e.era?"short":void 0}function hz(e,t,n,r){let a=fW(hU(fS),"@react-aria/calendar"),o=hH(e)||hH(t),i=f$({month:"long",year:"numeric",era:o,calendar:e.calendar.identifier,timeZone:n}),s=f$({month:"long",year:"numeric",day:"numeric",era:o,calendar:e.calendar.identifier,timeZone:n});return(0,lr.useMemo)(()=>{if(hE(e,hM(e))){let o=e,s=t;if(e.calendar.getFormattableMonth&&(o=e.calendar.getFormattableMonth(e)),t.calendar.getFormattableMonth&&(s=t.calendar.getFormattableMonth(t)),hE(t,hA(e)))return i.format(o.toDate(n));if(hE(t,hA(t)))return r?hK(i,a,o,s,n):i.formatRange(o.toDate(n),s.toDate(n))}return r?hK(s,a,e,t,n):s.formatRange(e.toDate(n),t.toDate(n))},[e,t,i,s,a,n,r])}function hK(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 hZ(e,t){let{id:n,"aria-label":r,"aria-labelledby":a}=e;return n=my(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 hG(e,t){let n=(0,lr.useRef)(!0),r=(0,lr.useRef)(null),a=pU(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 hY(e,t){var n;let r,a,o,i,s,l=fW((n=fS)&&n.__esModule?n.default:n,"@react-aria/calendar"),u=mL(e),c=hz(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),d=hz(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);hG(()=>{t.isFocused||fE(d)},[d]);let m=(o=fW(hU(fS),"@react-aria/calendar"),"highlightedRange"in t?{start:r,end:a}=t.highlightedRange||{}:r=a=t.value??void 0,i=f$({weekday:"long",month:"long",year:"numeric",day:"numeric",era:hH(r)||hH(a),timeZone:t.timeZone}),s="anchorDate"in t?t.anchorDate:null,(0,lr.useMemo)(()=>{if(!s&&r&&a)if(hE(r,a)){let e=i.format(r.toDate(t.timeZone));return o.format("selectedDateDescription",{date:e})}else{let e=hK(i,o,r,a,t.timeZone);return o.format("selectedRangeDescription",{dateRange:e})}return""},[r,a,s,t.timeZone,o,i]));hG(()=>{m&&fE(m,"polite",4e3)},[m]);let p=mv([!!e.errorMessage,e.isInvalid,e.validationState]);hW.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:mw(u,hZ({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 hq={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 hJ(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}=p2({isDisabled:!n,onFocusWithinChange:e=>a(e)}),i=(0,lr.useMemo)(()=>r?t:t?{...hq,...t}:hq,[r]);return{visuallyHiddenProps:{...o,style:i}}}(e);return la().createElement(n,mw(o,i),t)}function hX(e,t,n,r){let a=pU(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 h0(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 h1(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 h4(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,C=parseInt(c.borderLeftWidth,10)||0,k=parseInt(c.borderRightWidth,10)||0,P=s.top-g,T=s.bottom+y,R=s.left-v,O=s.right+b,N=e===d?0:C+k,$=e===d?0:_+S,M=e.offsetWidth-e.clientWidth-N,A=e.offsetHeight-e.clientHeight-$,j=m+_+w,I=p-S-x-A,L=f+C+D,F=h-k-E;"rtl"!==c.direction||pe()?F-=M:L+=M;let B=P<j||T>I,V=R<L||O>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+O)/2-(L+F)/2;else if(V&&"end"===a)i+=O-F;else if(V&&"nearest"===a){let e=R-L,t=O-F;i+=Math.abs(e)<=Math.abs(t)?e:t}e.scrollTo({left:i,top:o})}function h2(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=h1(e,!0);for(let t of a)h4(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?h1(n,!0):[])h4(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 h3=0,h6=new Map;function h5(e){let[t,n]=(0,lr.useState)();return mo(()=>{if(!e)return;let t=h6.get(e);if(t)n(t.element.id);else{let r=`react-aria-description-${h3++}`;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},h6.set(e,t)}return t.refCount++,()=>{t&&0==--t.refCount&&(t.element.remove(),h6.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}class h9 extends fq{fromJulianDay(e){let t=super.fromJulianDay(e);return new hs(this,fZ(t.era,t.year)- -543,t.month,t.day)}toJulianDay(e){return super.toJulianDay(h8(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(h8(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function h8(e){let[t,n]=fG(e.year+-543);return new hs(t,n,e.month,e.day)}function h7(e,t,n,r){return e+365*t+Math.floor(t/4)+30*(n-1)+r-1}function ge(e,t){let n=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-h7(e,n,1,1))/30),a=t+1-h7(e,n,r,1);return[n,r,a]}function gt(e){return Math.floor(e%4/3)}function gn(e,t){return t%13!=0?30:gt(e)+5}class gr{fromJulianDay(e){let[t,n,r]=ge(1723856,e),a="AM";return t<=0&&(a="AA",t+=5500),new hs(this,a,t,n,r)}toJulianDay(e){let t=e.year;return"AA"===e.era&&(t-=5500),h7(1723856,t,e.month,e.day)}getDaysInMonth(e){return gn(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+gt(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 ga extends gr{fromJulianDay(e){let[t,n,r]=ge(1723856,e);return new hs(this,"AA",t+=5500,n,r)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class go extends gr{fromJulianDay(e){let[t,n,r]=ge(1824665,e),a="CE";return t<=0&&(a="BCE",t=1-t),new hs(this,a,t,n,r)}toJulianDay(e){let t=e.year;return"BCE"===e.era&&(t=1-t),h7(1824665,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return"BCE"===e.era&&(t=1-t),gn(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 gi=765433;function gs(e){return 7>fH(7*e+1,19)}function gl(e){let t=Math.floor((235*e-234)/19),n=29*t+Math.floor((12084+13753*t)/25920);return 3>fH(3*(n+1),7)&&(n+=1),n}function gu(e){let t,n;return gl(e)+(t=gl(e-1),n=gl(e),gl(e+1)-n==356?2:+(n-t==382))}function gc(e){return gu(e+1)-gu(e)}function gd(e,t){if(t>=6&&!gs(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;let n=function(e){let t=gc(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*!!gs(e):30}class gm{fromJulianDay(e){let t=e-347997,n=Math.floor((25920*t/gi*19+234)/235)+1,r=gu(n),a=Math.floor(t-r);for(;a<1;)a=Math.floor(t-(r=gu(--n)));let o=1,i=0;for(;i<a;)i+=gd(n,o),o++;let s=a-(i-=gd(n,--o));return new hs(this,n,o,s)}toJulianDay(e){let t=gu(e.year);for(let n=1;n<e.month;n++)t+=gd(e.year,n);return t+e.day+347997}getDaysInMonth(e){return gd(e.year,e.month)}getMonthsInYear(e){return gs(e.year)?13:12}getDaysInYear(e){return gc(e.year)}getMaximumMonthsInYear(){return 13}getMaximumDaysInMonth(){return 30}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,t){t.year!==e.year&&(gs(t.year)&&!gs(e.year)&&t.month>6?e.month--:!gs(t.year)&&gs(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class gp extends fq{fromJulianDay(e){let t,n,r,a=super.fromJulianDay(e),o=a.year-78,i=e-fz(a.era,a.year,1,1);if(i<80?(o--,i+=(t=fK(a.year-1)?31:30)+155+90+10):(t=fK(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 hs(this,o,n,r)}toJulianDay(e){let t,n,[r,a]=fG(e.year+78);return(fK(a)?(t=31,n=fz(r,a,3,21)):(t=30,n=fz(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&&fK(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 gf(e,t,n,r){return r+Math.ceil(29.5*(n-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function gh(e,t,n){let r=Math.floor((30*(n-t)+10646)/10631),a=Math.min(12,Math.ceil((n-(29+gf(t,r,1,1)))/29.5)+1),o=n-gf(t,r,a,1)+1;return new hs(e,r,a,o)}function gg(e){return(14+11*e)%30<11}class gy{fromJulianDay(e){return gh(this,1948440,e)}toJulianDay(e){return gf(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return 12===e.month&&gg(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return gg(e.year)?355:354}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 30}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class gv extends gy{fromJulianDay(e){return gh(this,1948439,e)}toJulianDay(e){return gf(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function gb(e){return 460322+u[e-1300]}function gw(e,t){return(l[e-1300]&1<<11-(t-1))==0?29:30}function gx(e,t){let n=gb(e);for(let r=1;r<t;r++)n+=gw(e,r);return n}function gD(e){return u[e+1-1300]-u[e-1300]}class gE extends gy{constructor(){if(super(),this.identifier="islamic-umalqura",l||(l=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),e=>e.charCodeAt(0)).buffer)),!u){u=new Uint32Array(301);let e=0;for(let t=1300;t<=1600;t++){u[t-1300]=e;for(let n=1;n<=12;n++)e+=gw(t,n)}}}fromJulianDay(e){let t=e-1948440,n=gb(1300),r=gb(1600);if(t<n||t>r)return super.fromJulianDay(e);{let e=1299,n=1,r=1;for(;r>0;){r=t-gb(++e)+1;let a=gD(e);if(r===a){n=12;break}if(r<a){let t=gw(e,n);for(n=1;r>t;)r-=t,t=gw(e,++n);break}}return new hs(this,e,n,t-gx(e,n)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+gx(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):gw(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):gD(e.year)}}let g_=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],gS=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],gC=[1867,1911,1925,1988,2018],gk=["meiji","taisho","showa","heisei","reiwa"];function gP(e){let t=g_.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?g_.length-1:0===t?0:t-1}function gT(e){let t=gC[gk.indexOf(e.era)];if(!t)throw Error("Unknown era: "+e.era);return new hs(e.year+t,e.month,e.day)}class gR extends fq{fromJulianDay(e){let t=super.fromJulianDay(e),n=gP(t);return new hs(this,gk[n],t.year-gC[n],t.month,t.day)}toJulianDay(e){return super.toJulianDay(gT(e))}balanceDate(e){let t=gT(e),n=gP(t);gk[n]!==e.era&&(e.era=gk[n],e.year=t.year-gC[n]),this.constrainDate(e)}constrainDate(e){let t=gk.indexOf(e.era),n=gS[t];if(null!=n){let[r,a,o]=n,i=r-gC[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]=g_[t];e.month=Math.max(n,e.month),e.month===n&&(e.day=Math.max(r,e.day))}}getEras(){return gk}getYearsInEra(e){let t=gk.indexOf(e.era),n=g_[t],r=g_[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(gT(e))}getMinimumMonthInYear(e){let t=gO(e);return t?t[1]:1}getMinimumDayInMonth(e){let t=gO(e);return t&&e.month===t[1]?t[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function gO(e){if(1===e.year)return g_[gk.indexOf(e.era)]}let gN=[0,31,62,93,124,155,186,216,246,276,306,336];class g${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-gN[a]+1;return new hs(this,n,a+1,o)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=gN[e.month-1],t+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>fH(25*e.year+11,33)?30:29}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function gM(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function gA(e){let t=e-1911;return t>0?["minguo",t]:["before_minguo",1-t]}class gj extends fq{fromJulianDay(e){let t=super.fromJulianDay(e),[n,r]=gA(fZ(t.era,t.year));return new hs(this,n,r,t.month,t.day)}toJulianDay(e){return super.toJulianDay(gI(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[t,n]=gA(gM(e));e.era=t,e.year=n}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(gI(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function gI(e){let[t,n]=fG(gM(e));return new hs(t,n,e.month,e.day)}function gL(e){switch(e){case"buddhist":return new h9;case"ethiopic":return new gr;case"ethioaa":return new ga;case"coptic":return new go;case"hebrew":return new gm;case"indian":return new gp;case"islamic-civil":return new gy;case"islamic-tbla":return new gv;case"islamic-umalqura":return new gE;case"japanese":return new gR;case"persian":return new g$;case"roc":return new gj;default:return new fq}}function gF(e,t,n){return null!=t&&0>e.compare(t)||null!=n&&e.compare(n)>0}function gB(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=gV(e,t,n).subtract(o);return gW(e,i,t,n,r,a)}function gV(e,t,n,r,a){let o=e;if(t.years)o=hM(e.subtract({months:e.month-1}));else t.months?o=hM(e):t.weeks&&(o=hj(e,n));return gW(e,o,t,n,r,a)}function gU(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=gV(e,t,n).subtract(o);return gW(e,i,t,n,r,a)}function gW(e,t,n,r,a,o){if(a&&e.compare(a)>=0){let e=hV(t,gV(hb(a),n,r));e&&(t=e)}if(o&&0>=e.compare(o)){let e=hB(t,gU(hb(o),n,r));e&&(t=e)}return t}function gH(e,t,n){if(t){let n=hV(e,hb(t));n&&(e=n)}if(n){let t=hB(e,hb(n));t&&(e=t)}return e}function gz(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 gK="u">typeof document?la().useInsertionEffect??la().useLayoutEffect:()=>{};function gZ(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;gK(()=>{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 gG(e){let t=(0,lr.useMemo)(()=>new fP(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]=gZ(e.value,e.defaultValue??null,e.onChange),h=(0,lr.useMemo)(()=>p?hx(hb(p),m):null,[p,m]),g=(0,lr.useMemo)(()=>p&&"timeZone"in p?p.timeZone:n.timeZone,[p,n.timeZone]),[y,v]=gZ((0,lr.useMemo)(()=>e.focusedValue?gH(hx(hb(e.focusedValue),m),i,s):void 0,[e.focusedValue,m,i,s]),(0,lr.useMemo)(()=>gH(e.defaultFocusedValue?hx(hb(e.defaultFocusedValue),m):h||hx(hT(g),m),i,s),[e.defaultFocusedValue,h,g,m,i,s]),e.onFocusChange),[b,w]=(0,lr.useState)(()=>{switch(l){case"start":return gV(y,o,r,i,s);case"end":return gU(y,o,r,i,s);default:return gB(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(!hS(m,_)){let e=hx(y,m);w(gB(e,o,r,i,s)),v(e),S(m)}function C(e){v(e=gH(e,i,s))}function k(t){if(!e.isDisabled&&!e.isReadOnly){let e=t;if(null===e)return void f(null);(e=gz(e=gH(e,i,s),b,u))&&(e=hx(e,p?.calendar||new fq),p&&"hour"in p?f(p.set(e)):f(e))}}gF(y,i,s)?v(gH(y,i,s)):0>y.compare(b)?w(gU(y,o,r,i,s)):y.compare(E)>0&&w(gV(y,o,r,i,s));let P=(0,lr.useMemo)(()=>!!h&&(!!(u&&u(h))||gF(h,i,s)),[h,u,i,s]),T=e.isInvalid||"invalid"===e.validationState||P,R=(0,lr.useMemo)(()=>"visible"===c?o:gY(o),[c,o]);return{isDisabled:e.isDisabled??!1,isReadOnly:e.isReadOnly??!1,value:h,setValue:k,visibleRange:{start:b,end:E},minValue:i,maxValue:s,focusedDate:y,timeZone:g,validationState:T?"invalid":null,isValueInvalid:T,setFocusedDate(e){C(e)},focusNextDay(){C(y.add({days:1}))},focusPreviousDay(){C(y.subtract({days:1}))},focusNextRow(){o.days?this.focusNextPage():(o.weeks||o.months||o.years)&&C(y.add({weeks:1}))},focusPreviousRow(){o.days?this.focusPreviousPage():(o.weeks||o.months||o.years)&&C(y.subtract({weeks:1}))},focusNextPage(){let e=b.add(R);v(gH(y.add(R),i,s)),w(gV(gW(y,e,R,r,i,s),R,r))},focusPreviousPage(){let e=b.subtract(R);v(gH(y.subtract(R),i,s)),w(gV(gW(y,e,R,r,i,s),R,r))},focusSectionStart(){o.days?C(b):o.weeks?C(hj(y,r)):(o.months||o.years)&&C(hM(y))},focusSectionEnd(){o.days?C(E):o.weeks?C(hj(y,r,void 0).add({days:6})):(o.months||o.years)&&C(hA(y))},focusNextSection(e){e||o.days?o.days?this.focusNextPage():o.weeks?C(y.add({months:1})):(o.months||o.years)&&C(y.add({years:1})):C(y.add(gY(o)))},focusPreviousSection(e){e||o.days?o.days?this.focusPreviousPage():o.weeks?C(y.subtract({months:1})):(o.months||o.years)&&C(y.subtract({years:1})):C(y.subtract(gY(o)))},selectFocusedDate(){u&&u(y)||k(y)},selectDate(e){k(e)},isFocused:x,setFocused:D,isInvalid:e=>gF(e,i,s),isSelected(e){return null!=h&&hE(e,h)&&!this.isCellDisabled(e)&&!this.isCellUnavailable(e)},isCellFocused:e=>x&&y&&hE(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 hE(e,b)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=E.add({days:1});return hE(e,E)||this.isInvalid(e)},getDatesInWeek(e,t=b){let n=t.add({weeks:e}),a=[],o=hk(n=hj(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(hE(n,e))break;n=e}for(;a.length<7;)a.push(null);return a}}}function gY(e){let t={...e};for(let n in e)t[n]=1;return t}function gq(e,t){return e&&t?(0>t.compare(e)&&([e,t]=[t,e]),{start:hb(e),end:hb(t)}):null}function gJ(e,t){return(e=hx(e,t?.calendar||new fq),t&&"hour"in t)?t.set(e):e}function gX(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),g0=(0,lr.createContext)(null),g1=(0,lr.createContext)(null),g4=(0,lr.createContext)(null),g2=(0,lr.forwardRef)(function(e,t){[e,t]=mS(e,t,gQ);let{locale:n}=fx(),r=gG({...e,locale:n,createCalendar:gL}),{calendarProps:a,prevButtonProps:o,nextButtonProps:i,errorMessageProps:s,title:l}=hY(e,r),u=mE({...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(mD,{values:[[fr,{slots:{previous:o,next:i}}],[fo,{"aria-hidden":!0,level:2,children:l}],[g1,r],[gQ,e],[fi,{slots:{errorMessage:s}}]]},la().createElement(hJ,null,la().createElement("h2",null,a["aria-label"])),u.children,la().createElement(hJ,null,la().createElement("button",{"aria-label":i["aria-label"],disabled:i.isDisabled,onClick:()=>r.focusNextPage(),tabIndex:-1}))))}),g3=(0,lr.forwardRef)(function(e,t){[e,t]=mS(e,t,g0);let{locale:n}=fx(),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]=gZ(t,n||null,r),[m,p]=(0,lr.useState)(null),f="center";if(c&&c.start&&c.end){let e=gB(hb(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)(()=>hV(s,g?.start),[s,g]),b=(0,lr.useMemo)(()=>hB(l,g?.end),[l,g]),w=gG({...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:gX(t,w,-1),end:gX(t,w,1)},y(h.current)):(h.current=null,y(null))},[D,E]=(0,lr.useState)(w.visibleRange);h_(w.visibleRange.start,D.start)&&h_(w.visibleRange.end,D.end)||(x(m),E(w.visibleRange));let _=e=>{e?(p(e),x(e)):(p(null),x(null))},S=m?gq(m,w.focusedDate):c&&gq(c.start,c.end),C=t=>{if(e.isReadOnly)return;let n=gz(gH(t,v,b),w.visibleRange.start,e.isDateUnavailable);if(n)if(m){let e=gq(m,n);e&&d({start:gJ(e.start,c?.start),end:gJ(e.end,c?.end)}),_(null)}else _(n)},[k,P]=(0,lr.useState)(!1),{isDateUnavailable:T}=e,R=(0,lr.useMemo)(()=>!!c&&!m&&(!!(T&&(T(c.start)||T(c.end)))||gF(c.start,s,l)||gF(c.end,s,l)),[T,c,m,s,l]),O=e.isInvalid||"invalid"===e.validationState||R;return{...w,value:c,setValue:d,anchorDate:m,setAnchorDate:_,highlightedRange:S,validationState:O?"invalid":null,isValueInvalid:O,selectFocusedDate(){C(w.focusedDate)},selectDate:C,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)||gF(e,h.current?.start,h.current?.end),isDragging:k,setDragging:P,clearSelection(){_(null),d(null)}}}({...e,locale:n,createCalendar:gL}),{calendarProps:a,prevButtonProps:o,nextButtonProps:i,errorMessageProps:s,title:l}=function(e,t,n){let{commitBehavior:r="select",...a}=e,o=hY(a,t),i=(0,lr.useRef)(!1),s=(0,lr.useRef)("u">typeof window?window:null);hX(s,"pointerdown",e=>{i.current=0===e.width&&0===e.height});let l={clear:()=>t.clearSelection(),reset:()=>t.setAnchorDate(null),select:()=>t.selectFocusedDate()};return hX(s,"pointerup",e=>{if(i.current){i.current=!1;return}if(t.setDragging(!1),!t.anchorDate)return;let a=e.target;n.current&&mz(n.current)&&(!mW(n.current,a)||!a.closest('button, [role="button"]'))&&l[r]()}),o.calendarProps.onBlur=e=>{n.current&&(e.relatedTarget&&mW(n.current,e.relatedTarget)||!t.anchorDate||l[r]())},hX(n,"touchmove",e=>{t.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),o}(e,r,t),u=mE({...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(mD,{values:[[fr,{slots:{previous:o,next:i}}],[fo,{"aria-hidden":!0,level:2,children:l}],[g4,r],[g0,e],[fi,{slots:{errorMessage:s}}]]},la().createElement(hJ,null,la().createElement("h2",null,a["aria-label"])),u.children,la().createElement(hJ,null,la().createElement("button",{"aria-label":i["aria-label"],disabled:i.isDisabled,onClick:()=>r.focusNextPage(),tabIndex:-1}))))}),g6=(0,lr.createContext)(null),g5=(0,lr.forwardRef)(function(e,t){var n,r;let a=(0,lr.useContext)(g1),o=(0,lr.useContext)(g4),i=m_(gQ),s=m_(g0),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}=fx(),i=hz(n,r,t.timeZone,!0),{ariaLabel:s,ariaLabelledBy:l}=hW.get(t),u=hZ({"aria-label":[s,i].filter(Boolean).join(", "),"aria-labelledby":l}),c=f$({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:d}=fx(),m=(0,lr.useMemo)(()=>{let e=hj(hT(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=hF(n,d,a);return{gridProps:mw(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:hA(u),weekdayStyle:e.weekdayStyle,firstDayOfWeek:c},l);return la().createElement(g6.Provider,{value:{headerProps:m,weekDays:p,startDate:u,firstDayOfWeek:c}},la().createElement("table",{...mL(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(g9,null,e=>la().createElement(g8,null,e)),la().createElement(g7,null,e.children))))}),g9=(0,lr.forwardRef)(function(e,t){let{children:n,style:r,className:a}=e,{headerProps:o,weekDays:i}=(0,lr.useContext)(g6);return la().createElement("thead",{...mL(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}))))}),g8=(0,lr.forwardRef)(function(e,t){let{children:n,style:r,className:a}=e;return la().createElement("th",{...mL(e),ref:t,style:r,className:a||"react-aria-CalendarHeaderCell"},n)}),g7=(0,lr.forwardRef)(function(e,t){let{children:n,style:r,className:a}=e,o=(0,lr.useContext)(g1),i=(0,lr.useContext)(g4),s=null!=o?o:i,{startDate:l,firstDayOfWeek:u}=(0,lr.useContext)(g6),{locale:c}=fx(),d=hF(l,c,u);return la().createElement("tbody",{...mL(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})))))}),ye=(0,lr.forwardRef)(function({date:e,...t},n){var r,a,o;let i=(0,lr.useContext)(g1),s=(0,lr.useContext)(g4),l=null!=i?i:s,{startDate:u}=null!=(r=(0,lr.useContext)(g6))?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}=hW.get(t),u=fW((r=fS)&&r.__esModule?r.default:r,"@react-aria/calendar"),c=f$({weekday:"long",day:"numeric",month:"long",year:"numeric",era:hH(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&&hE(t.value,o));h&&(d=!0),o=fC(o,h_);let g=(0,lr.useMemo)(()=>o.toDate(t.timeZone),[o,t.timeZone]),y=hE(o,hT(t.timeZone)),v=(0,lr.useMemo)(()=>{let e="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(hE(o,t.value.start)||hE(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&&hE(o,t.minValue)?e+=", "+u.format("minimumDate"):t.maxValue&&hE(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=h5(b),x=(0,lr.useRef)(!1),D=(0,lr.useRef)(!1),E=(0,lr.useRef)(void 0),{pressProps:_,isPressed:S}=pq({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(hE(o,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(o),t.setFocused(!0),t.setDragging(!0),D.current=!0;return}else if(hE(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=hE(o,t.focusedDate)?0:-1),(0,lr.useEffect)(()=>{m&&n.current&&(mF(n.current),"pointer"!==ps&&((e=document)=>e.activeElement)()===n.current&&h2(n.current,{containingElement:h0(n.current)}))},[m,n]);let C=f$({day:"numeric",timeZone:t.timeZone,calendar:o.calendar.identifier}),k=(0,lr.useMemo)(()=>C.formatToParts(g).find(e=>"day"===e.type).value,[C,g]);return{cellProps:{role:"gridcell","aria-disabled":!f||void 0,"aria-selected":d||void 0,"aria-invalid":h||void 0},buttonProps:mw(_,{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=mH(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:k}}({date:e},l,c),{hoverProps:f,isHovered:h}=p7({...t,isDisabled:p.isDisabled}),{focusProps:g,isFocusVisible:y}=p3();y&&(y=p.isFocused);let v=(a=u,o=hx(o=e,a.calendar),a=hM(a),o=hM(o),a.era!==o.era||a.year!==o.year||a.month!==o.month),b=!1,w=!1;"highlightedRange"in l&&l.highlightedRange&&(b=hE(e,l.highlightedRange.start),w=hE(e,l.highlightedRange.end));let x=mE({...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",{...mw(mL(t),m,g,f,D,x),ref:c}))}),yt=(0,lr.createContext)({}),yn=(0,lr.forwardRef)(function(e,t){var n,r;[e,t]=mS(e,t,yt);let{isDisabled:a,isInvalid:o,onHoverStart:i,onHoverChange:s,onHoverEnd:l,...u}=e,{hoverProps:c,isHovered:d}=p7({onHoverStart:i,onHoverChange:s,onHoverEnd:l,isDisabled:a}),{isFocused:m,isFocusVisible:p,focusProps:f}=p3({within:!0});null!=a||(a=!!e["aria-disabled"]&&"false"!==e["aria-disabled"]),null!=o||(o=!!e["aria-invalid"]&&"false"!==e["aria-invalid"]);let h=mE({...e,values:{isHovered:d,isFocusWithin:m,isFocusVisible:p,isDisabled:a,isInvalid:o},defaultClassName:"react-aria-Group"});return la().createElement("div",{...mw(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)}),yr=(0,lr.createContext)({}),ya=ft(function(e,t){[e,t]=mS(e,t,yr);let{hoverProps:n,isHovered:r}=p7(e),{isFocused:a,isFocusVisible:o,focusProps:i}=p3({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e["aria-invalid"]&&"false"!==e["aria-invalid"],l=mE({...e,values:{isHovered:r,isFocused:a,isFocusVisible:o,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:"react-aria-Input"});return la().createElement("input",{...mw((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 yo(e,t,n,r){return e.createTreeWalker(t,n,r)}let yi=la().createContext(null),ys="react-aria-focus-scope-restore",yl=null;function yu(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)(yi)||{},E=(0,lr.useMemo)(()=>new y_({scopeRef:x}),[x]);mo(()=>{let e=D||yS.root;if(yS.getTreeNode(e.scopeRef)&&yl&&!yf(yl,e.scopeRef)){let t=yS.getTreeNode(yl);t&&(e=t)}e.addChild(E),yS.addNode(E)},[E,D]),mo(()=>{let e=yS.getTreeNode(x);e&&(e.contain=!!g)},[g]),mo(()=>{let e=b.current?.nextSibling,t=[],n=e=>e.stopPropagation();for(;e&&e!==w.current;)t.push(e),e.addEventListener(ys,n),e=e.nextSibling;return x.current=t,()=>{for(let e of t)e.removeEventListener(ys,n)}},[h]),mo(()=>{if(n||r)return;let e=t.current,a=mV(e?e[0]:void 0),o=e=>{let n=mH(e);ym(n,t.current)?yl=t:yp(n)||(yl=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),mo(()=>{let e=a.current;if(!o){m.current&&(cancelAnimationFrame(m.current),m.current=void 0);return}let t=mV(e?e[0]:void 0),n=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!yd(a)||e.isComposing)return;let n=((e=document)=>e.activeElement)(t),r=a.current;if(!r||!ym(n,r))return;let o=yw(yc(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&&(yh(i,!0),i instanceof mU(i).HTMLInputElement&&i.select())},r=e=>{(!yl||yf(yl,a))&&ym(mH(e),a.current)?(yl=a,d.current=mH(e)):yd(a)&&!yp(mH(e),a)?d.current?d.current.focus():yl&&yl.current&&yy(yl.current):yd(a)&&(d.current=mH(e))},i=e=>{m.current&&cancelAnimationFrame(m.current),m.current=requestAnimationFrame(()=>{let n=ps,r=("virtual"===n||null===n)&&pr()&&pn(),o=((e=document)=>e.activeElement)(t);if(!r&&o&&yd(a)&&!yp(o,a)){yl=a;let t=mH(e);t&&t.isConnected?(d.current=t,d.current?.focus()):yl.current&&yy(yl.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]),mo(()=>()=>{m.current&&cancelAnimationFrame(m.current)},[m]),i=x,s=y,l=g,p=(0,lr.useRef)("u">typeof document?((e=document)=>e.activeElement)(mV(i.current?i.current[0]:void 0)):null),mo(()=>{let e=i.current,t=mV(e?e[0]:void 0);if(!s||l)return;let n=()=>{(!yl||yf(yl,i))&&ym(((e=document)=>e.activeElement)(t),i.current)&&(yl=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]),mo(()=>{let e=mV(i.current?i.current[0]:void 0);if(!s)return;let t=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!yd(i)||t.isComposing)return;let n=e.activeElement;if(!yp(n,i)||!yv(i))return;let r=yS.getTreeNode(i);if(!r)return;let a=r.nodeToRestore,o=yw(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||!yp(s,i))&&a){o.currentNode=a;do s=t.shiftKey?o.previousNode():o.nextNode();while(yp(s,i));(t.preventDefault(),t.stopPropagation(),s)?yh(s,!0):yp(a)?yh(a,!0):n.blur()}};return l||e.addEventListener("keydown",t,!0),()=>{l||e.removeEventListener("keydown",t,!0)}},[i,s,l]),mo(()=>{let e=mV(i.current?i.current[0]:void 0);if(!s)return;let t=yS.getTreeNode(i);if(t)return t.nodeToRestore=p.current??void 0,()=>{let t=yS.getTreeNode(i);if(!t)return;let n=t.nodeToRestore,r=((e=document)=>e.activeElement)(e);if(s&&n&&(r&&yp(r,i)||r===e.body&&yv(i))){let t=yS.clone();requestAnimationFrame(()=>{if(e.activeElement===e.body){let e=t.getTreeNode(i);for(;e;){if(e.nodeToRestore&&e.nodeToRestore.isConnected)return void yb(e.nodeToRestore);e=e.parent}for(e=t.getTreeNode(i);e;){if(e.scopeRef&&e.scopeRef.current&&yS.getTreeNode(e.scopeRef))return void yb(yg(e.scopeRef.current,!0));e=e.parent}}})}}},[i,s]),u=x,c=v,f=la().useRef(c),(0,lr.useEffect)(()=>{f.current&&(yl=u,!ym(((e=document)=>e.activeElement)(mV(u.current?u.current[0]:void 0)),yl.current)&&u.current&&yy(u.current)),f.current=!1},[u]),(0,lr.useEffect)(()=>{let e=((e=document)=>e.activeElement)(mV(x.current?x.current[0]:void 0)),t=null;if(ym(e,x.current)){for(let n of yS.traverse())n.scopeRef&&ym(e,n.scopeRef.current)&&(t=n);t===yS.getTreeNode(x)&&(yl=t.scopeRef)}},[x]),mo(()=>()=>{let e=yS.getTreeNode(x)?.parent?.scopeRef??null;(x===yl||yf(x,yl))&&(!e||yS.getTreeNode(e))&&(yl=e),yS.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)(mV(n[0]??void 0)),l=n[0].previousElementSibling,u=yw(yc(n),{tabbable:a,accept:i},n);u.currentNode=ym(s,n)?s:l;let c=u.nextNode();return!c&&o&&(u.currentNode=l,c=u.nextNode()),c&&yh(c,!0),c},focusPrevious(t={}){let n=e.current,{from:r,tabbable:a,wrap:o,accept:i}=t,s=r||((e=document)=>e.activeElement)(mV(n[0]??void 0)),l=n[n.length-1].nextElementSibling,u=yw(yc(n),{tabbable:a,accept:i},n);u.currentNode=ym(s,n)?s:l;let c=u.previousNode();return!c&&o&&(u.currentNode=l,c=u.previousNode()),c&&yh(c,!0),c},focusFirst(t={}){let n=e.current,{tabbable:r,accept:a}=t,o=yw(yc(n),{tabbable:r,accept:a},n);o.currentNode=n[0].previousElementSibling;let i=o.nextNode();return i&&yh(i,!0),i},focusLast(t={}){let n=e.current,{tabbable:r,accept:a}=t,o=yw(yc(n),{tabbable:r,accept:a},n);o.currentNode=n[n.length-1].nextElementSibling;let i=o.previousNode();return i&&yh(i,!0),i}}},[]),S=(0,lr.useMemo)(()=>({focusManager:_,parentNode:E}),[E,_]);return la().createElement(yi.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 yc(e){return e[0].parentElement}function yd(e){let t=yS.getTreeNode(yl);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function ym(e,t){return!!e&&!!t&&t.some(t=>mW(t,e))}function yp(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of yS.traverse(yS.getTreeNode(t)))if(n&&ym(e,n.current))return!0;return!1}function yf(e,t){let n=yS.getTreeNode(t)?.parent;for(;n;){if(n.scopeRef===e)return!0;n=n.parent}return!1}function yh(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch{}}else try{pk(e)}catch{}}function yg(e,t=!0){let n=e[0].previousElementSibling,r=yc(e),a=yw(r,{tabbable:t},e);a.currentNode=n;let o=a.nextNode();return t&&!o&&((a=yw(r=yc(e),{tabbable:!1},e)).currentNode=n,o=a.nextNode()),o}function yy(e,t=!0){yh(yg(e,t))}function yv(e){let t=yS.getTreeNode(yl);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function yb(e){e.dispatchEvent(new CustomEvent(ys,{bubbles:!0,cancelable:!0}))&&yh(e)}function yw(e,t,n){let r=t?.tabbable?mX:mJ,a=mV(e?.nodeType===Node.ELEMENT_NODE?e:null),o=yo(a,e||a,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>mW(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(mV(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)).filter(e=>!e.form);let t=e.form.elements.namedItem(e.name),n=mU(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||ym(e,n))&&(!t?.accept||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});return t?.from&&(o.currentNode=t.from),o}function yx(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)(mV(r)),u=yw(r,{tabbable:o,accept:s});mW(r,l)&&(u.currentNode=l);let c=u.nextNode();return!c&&i&&(u.currentNode=r,c=u.nextNode()),c&&yh(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)(mV(r)),u=yw(r,{tabbable:o,accept:s});if(mW(r,l))u.currentNode=l;else{let e=yD(u);return e&&yh(e,!0),e??null}let c=u.previousNode();if(!c&&i){u.currentNode=r;let e=yD(u);if(!e)return null;c=e}return c&&yh(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=yw(r,{tabbable:a,accept:o}).nextNode();return i&&yh(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=yD(yw(r,{tabbable:a,accept:o}));return i&&yh(i,!0),i??null}}}function yD(e){let t,n;do(t=e.lastChild())&&(n=t);while(t);return n}class yE{constructor(){this.fastMap=new Map,this.root=new y_({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 y_({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&&ym(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 yE;for(let t of this.traverse())e.addTreeNode(t.scopeRef,t.parent?.scopeRef??null,t.nodeToRestore);return e}}class y_{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 yS=new yE;var yC={};function yk(e,t,n){let{direction:r}=fx(),a=(0,lr.useMemo)(()=>yx(t),[t]),o=()=>{if(!t.current)return;let e=window.event?mH(window.event):null,n=yw(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}=pq({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){"mouse"===e.pointerType&&o()},onPress(e){("touch"===e.pointerType||"pen"===e.pointerType)&&o()}});return mw(i,{onKeyDown:o=>{if(mW(o.currentTarget,mH(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=mH(o),n=yP(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=mH(o),n=yP(t.current,e.getBoundingClientRect().left,1);n&&n.focus()}}else a.focusNext()}}})}function yP(e,t,n){let r=yw(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 yT(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=my(t);let i=my(),s={};return n&&(r=r?`${i} ${r}`:i,s={id:i,htmlFor:"label"===o?t:void 0}),{labelProps:s,fieldProps:hZ({id:t,"aria-label":a,"aria-labelledby":r})}}(e),s=mv([!!t,!!n,r,a]),l=mv([!!t,!!n,r,a]);return{labelProps:o,fieldProps:i=mw(i,{"aria-describedby":[s,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),descriptionProps:{id:s},errorMessageProps:{id:l}}}function yR(e,t,n){let r=pU(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 yO(e,t,n){let{validationBehavior:r,focus:a}=e;mo(()=>{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=pU(()=>{o.current||t.resetValidation()}),s=pU(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(),ps="keyboard",pp("keyboard",null));e.preventDefault()}),l=pU(()=>{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&&mH(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])}yC={"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 yN=new WeakMap,y$="__reactAriaDateFieldRole",yM="__reactAriaDateFieldFocusManager";function yA(e,t,n){var r;let a,{isInvalid:o,validationErrors:i,validationDetails:s}=t.displayValidation,{labelProps:l,fieldProps:u,descriptionProps:c,errorMessageProps:d}=yT({...e,labelElementType:"span",isInvalid:o,errorMessage:e.errorMessage||i}),m=(0,lr.useRef)(null),{focusWithinProps:p}=p2({...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=fW((r=yC)&&r.__esModule?r.default:r,"@react-aria/datepicker"),h="hour"===t.maxGranularity?"selectedTimeDescription":"selectedDateDescription",g="hour"===t.maxGranularity?"time":"date",y=h5(t.value?f.format(h,{[g]:t.formatValue({month:"long"})}):""),v="presentation"===e[y$]?u["aria-describedby"]:[y["aria-describedby"],u["aria-describedby"]].filter(Boolean).join(" ")||void 0,b=e[yM],w=(0,lr.useMemo)(()=>b||yx(n),[b,n]),x=yk(t,n,"presentation"===e[y$]);yN.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[y$]?{role:"presentation"}:mw(u,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":v}),(0,lr.useEffect)(()=>{D.current&&w.focusFirst(),D.current=!1},[w]),yR(e.inputRef,t.defaultValue,t.setValue),yO({...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 _=mL(e);return{labelProps:{...l,onClick:()=>{w.focusFirst()}},fieldProps:mw(_,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 yj={};yj={"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 yI={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},yL={...yI,customError:!0,valid:!1},yF={isInvalid:!1,validationDetails:yI,validationErrors:[]},yB=(0,lr.createContext)({}),yV="__reactAriaFormValidationState";function yU(e){if(e[yV]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:a,commitValidation:o}=e[yV];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:yL}:null,u=(0,lr.useMemo)(()=>i&&null!=a?yH(function(e,t){if("function"==typeof e){let n=e(t);if(n&&"boolean"!=typeof n)return yW(n)}return[]}(i,a)):null,[i,a]);o?.validationDetails.valid&&(o=void 0);let c=(0,lr.useContext)(yB),d=(0,lr.useMemo)(()=>r?Array.isArray(r)?r.flatMap(e=>yW(c[e])):yW(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)(()=>yH(f?[]:d),[f,d]),y=(0,lr.useRef)(yF),[v,b]=(0,lr.useState)(yF),w=(0,lr.useRef)(yF),[x,D]=(0,lr.useState)(!1);return(0,lr.useEffect)(()=>{if(!x)return;D(!1);let e=u||o||y.current;yz(e,w.current)||(w.current=e,b(e))}),{realtimeValidation:l||g||u||o||yF,displayValidation:"native"===s?l||g||v:l||g||u||o||v,updateValidation(e){"aria"!==s||yz(v,e)?y.current=e:b(e)},resetValidation(){yz(yF,w.current)||(w.current=yF,b(yF)),"native"===s&&D(!1),h(!0)},commitValidation(){"native"===s&&D(!0),h(!0)}}}(e)}function yW(e){return e?Array.isArray(e)?e:[e]:[]}function yH(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:yL}:null}function yz(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 yK(...e){let t=new Set,n=!1,r={...yI};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 yZ=new fI((en=yj)&&en.__esModule?en.default:en);function yG(){let e="u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return e}function yY(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=yG(),r=new fB(e,fI.getGlobalDictionaryForPackage("@react-stately/datepicker")||yZ),l=new fP(e,yX({},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 yq={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},yJ={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function yX(e,t){e={...t.shouldForceLeadingZeros?yJ:yq,...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 hl}function y0(e,t){return null===e?null:e?hx(e,t):void 0}function y1(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 y4=new fI({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 y2{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]=y6(this.hour,t);this.dayPeriod=e,this.hour=n}}copy(){let e=new y2(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]=y6(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=y6(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]=y6(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=y3(n,t,0,e.length-1),a.era=e[n];break}case"year":{let r=new hs(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=y3(a.month??1,t,1,this.calendar.getMaximumMonthsInYear());break;case"day":a.day=y3(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]=y6((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=y3(e,t,r.minValue,r.maxValue),null==a.dayPeriod&&"hour"in n&&(a.dayPeriod=y6(n.hour,this.hourCycle)[0])}break}case"dayPeriod":a.dayPeriod=y3(a.dayPeriod??0,t,0,1);break;case"minute":a.minute=y3(a.minute??0,t,0,59,!0);break;case"second":a.second=y3(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 y3(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 y6(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 y5=n(9264);let y9={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},y8={year:5,month:2,day:7,hour:2,minute:15,second:15},y7={dayperiod:"dayPeriod",relatedYear:"year",yearName:"literal",unknown:"literal"};function ve(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]=y1(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 fP(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]=gZ(e.value,e.defaultValue??null,e.onChange),[v]=(0,lr.useState)(g),b=(0,lr.useMemo)(()=>y0(g,f)??null,[g,f]),[w,x]=(0,lr.useState)(()=>new y2(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)(()=>yX({},E),[E]),S=(0,lr.useMemo)(()=>new fP(t,_),[t,_]),C=(0,lr.useMemo)(()=>S.resolvedOptions(),[S]),k=(0,lr.useMemo)(()=>(function(e,t,n,r){if(e)return y0(e,n);let a=hx(hP(r??h$()).set({hour:0,minute:0,second:0,millisecond:0}),n);return"year"===t||"month"===t||"day"===t?hb(a):r?a:hw(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),[O,N]=(0,lr.useState)(f),[$,M]=(0,lr.useState)(h);b===T&&h===$&&hS(f,O)||(w=new y2(f,h,b),R(b),N(f),M(h),x(w));let A=t=>{if(!e.isDisabled&&!e.isReadOnly)if(null==t||t instanceof y2&&t.isCleared(P))x(new y2(f,h,b)),y(null);else if(t instanceof y2){if(t.isComplete(P)){let e=t.toValue(b??k);if(t.validate(e,P)){let t=hx(e,c?.calendar||new fq);if(!g||0!==t.compare(g)){x(new y2(f,h,b)),y(t);return}}}x(t)}else t=hx(t,c?.calendar||new fq),x(new y2(f,h,b)),y(t)},j=(0,lr.useMemo)(()=>w.toValue(b??k).toDate(p),[w,p,b,k]),I=(0,lr.useMemo)(()=>(function(e,t,n,r,a,o,i){let s=["hour","minute","second"],l=n.formatToParts(e),u=new(0,y5.K)(o,{useGrouping:!1}),c=new(0,y5.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=y7[e.type]||e.type,r=y9[n];"era"===n&&1===a.getEras().length&&(r=!1);let l=y9[n]&&null==t[e.type],u=y9[n]?(m=e.value,"era"===n||"dayPeriod"===n?m:"year"===n||"month"===n||"day"===n?y4.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,C,f,t,d),[j,S,C,w,f,t,d]),L=(e,t)=>{A(w.cycle(e,t,k,P))},F=(0,lr.useMemo)(()=>yY(g,s,l,u,E),[g,s,l,u,E]),B=yU({...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,y8[e]||1)},decrementPage(e){L(e,-(y8[e]||1))},incrementToMax(e){let t="hour"===e&&"h12"===h?11:w.getSegmentLimits(e).maxValue;A(w.set(e,t,k))},decrementToMin(e){let t="hour"===e&&"h12"===h?12:w.getSegmentLimits(e).minValue;A(w.set(e,t,k))},setSegment(e,t){A(w.set(e,t,k))},confirmPlaceholder(){if(!e.isDisabled&&!e.isReadOnly&&w.isComplete(P)){let e=hx(w.toValue(b??k),c?.calendar||new fq);g&&0===e.compare(g)||y(e),x(new y2(f,h,b))}},clearSegment(e){let t=w;"timeZoneName"!==e&&"literal"!==e&&(t=w.clear(e)),A(t)},formatValue:e=>b?new fP(t,yX(e,E)).format(j):"",getDateFormatter:(e,t)=>new fP(e,yX({},{...E,...t}))}}let vt=(0,lr.createContext)(null),vn=(0,lr.createContext)(null),vr=(0,lr.createContext)(null),va=(0,lr.forwardRef)(function(e,t){let n=(0,lr.useContext)(vn),r=(0,lr.useContext)(vr);return n||r?la().createElement(vi,{...e,ref:t}):la().createElement(vo,{...e,ref:t})}),vo=(0,lr.forwardRef)((e,t)=>{let[n,r]=mS({slot:e.slot},t,vt),{locale:a}=fx(),o=ve({...n,locale:a,createCalendar:gL}),i=(0,lr.useRef)(null),{fieldProps:s,inputProps:l}=yA({...n,inputRef:i},o,r);return la().createElement(mD,{values:[[vn,o],[yr,{...l,ref:i}],[yt,{...s,ref:r,isInvalid:o.isInvalid}]]},la().createElement(vi,e))}),vi=(0,lr.forwardRef)((e,t)=>{let{className:n,children:r}=e,a=(0,lr.useContext)(vn),o=(0,lr.useContext)(vr),i=null!=a?a:o;return la().createElement(la().Fragment,null,la().createElement(yn,{...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(ya,null))});function vs({children:e}){let t=(0,lr.useMemo)(()=>({register:()=>{}}),[]);return la().createElement(pB.Provider,{value:t},e)}la().forwardRef(({children:e,...t},n)=>{let r=(0,lr.useRef)(!1),a=(0,lr.useContext)(pB),o=mw(a||{},{...t,register(){r.current=!0,a&&a.register()}});return o.ref=mt(n||a?.ref),pR(a,o.ref),(0,lr.useEffect)(()=>{r.current||(r.current=!0)},[]),la().createElement(pB.Provider,{value:o},e)});let vl=(0,lr.createContext)({});function vu(){return(0,lr.useContext)(vl)??{}}let vc=la().createContext(null);function vd(e){let t=mf(),{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}=vu();if(!e.portalContainer&&s&&(n=s()),!n)return null;let l=e.children;return e.disableFocusManagement||(l=la().createElement(yu,{restoreFocus:!0,contain:(e.shouldContainFocus||a)&&!r},l)),l=la().createElement(vc.Provider,{value:i},la().createElement(vs,null,l)),pz().createPortal(l,n)}let vm=(0,lr.createContext)(null),vp=(0,lr.createContext)(null),vf=(0,lr.forwardRef)(function(e,t){let n=e["aria-labelledby"];[e,t]=mS(e,t,vm);let{dialogProps:r,titleProps:a}=function(e,t){let n,r,{role:a="dialog"}=e,o=mv();o=e["aria-label"]?void 0:o;let i=(0,lr.useRef)(!1);return(0,lr.useEffect)(()=>{if(t.current&&!mz(t.current)){pk(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(),pk(t.current)),i.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),n=(0,lr.useContext)(vc),mo(()=>{r?.(!0)},[r=n?.setContain]),(0,lr.useRef)(!1),(0,lr.useEffect)(()=>{}),{dialogProps:{...mL(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)(vp);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=mE({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",{...mL(e),...r,...i,ref:t,slot:e.slot||void 0},la().createElement(mD,{values:[[fo,{slots:{[mx]:{},title:{...a,level:2}}}],[fr,{slots:{[mx]:{},close:{onPress:()=>null==o?void 0:o.close()}}}]]},i.children))}),vh=(0,lr.createContext)(null),vg=(0,lr.forwardRef)(function(e,t){let n=(0,lr.useContext)(vh);return(null==n?void 0:n.isInvalid)?la().createElement(vy,{...e,ref:t}):null}),vy=(0,lr.forwardRef)((e,t)=>{let n=(0,lr.useContext)(vh),r=mL(e),a=mE({...e,defaultClassName:"react-aria-FieldError",defaultChildren:0===n.validationErrors.length?void 0:n.validationErrors.join(" "),values:n});return null==a.children?null:la().createElement(fs,{slot:"errorMessage",...r,...a,ref:t})}),vv=(0,lr.createContext)(null),vb=(0,lr.createContext)({}),vw=ft(function(e,t){[e,t]=mS(e,t,vb);let{elementType:n="label",...r}=e;return la().createElement(n,{className:"react-aria-Label",...r,ref:t})}),vx=(0,lr.createContext)({placement:"bottom"}),vD="u">typeof HTMLElement&&"inert"in HTMLElement.prototype,vE=new WeakMap,v_=[];function vS(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 vk(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 vP={top:"top",bottom:"top",left:"left",right:"left"},vT={top:"bottom",bottom:"top",left:"right",right:"left"},vR={top:"left",left:"top"},vO={top:"height",left:"width"},vN={width:"totalWidth",height:"totalHeight"},v$={};function vM(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}=vB(e,!1)),l.top=e.scrollTop,l.left=e.scrollLeft,a=n,o=r;return pt()&&("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 vA(e,t,n,r,a,o,i){let s=a.scroll[e]??0,l=r[vO[e]],u=i[e]+r.scroll[vP[e]]+o,c=i[e]+r.scroll[vP[e]]+l-o,d=t-s+r.scroll[vP[e]]+i[e]-r[vP[e]],m=t-s+n+r.scroll[vP[e]]+i[e]-r[vP[e]];return d<u?u-d:m>c?Math.max(c-m,u-d):0}function vj(e){if(v$[e])return v$[e];let[t,n]=e.split(" "),r=vP[t]||"right",a=vR[r];vP[n]||(n="center");let o=vO[r],i=vO[a];return v$[e]={placement:t,crossPlacement:n,axis:r,crossAxis:a,size:o,crossSize:i},v$[e]}function vI(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]=vS(y[f],v,b),d===p){let t=s?c[h]:c[vN[h]];y[vT[p]]=Math.floor(t-e[p]+a)}else y[p]=Math.floor(e[p]+e[h]+a);return y}function vL(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[vT[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[vT[u]]-a)}function vF(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 vB(e,t){let{top:n,left:r,width:a,height:o}=vF(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 vV(e,t,n){let r,a=window.getComputedStyle(e);if("fixed"===a.position)r=vF(e,n);else{r=vB(e,n);let a=vB(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 vU(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 vW=new WeakMap;function vH(e){let{ref:t,box:n,onResize:r}=e,a=pU(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 vz="u">typeof document?window.visualViewport:null;function vK(e){var t;let{direction:n}=fx(),{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)(vz?.scale);(0,lr.useEffect)(()=>{h&&(D.current=vz?.scale)},[h]);let E=(0,lr.useCallback)(()=>{var e;if(!1===f||!h||!o.current||!a.current||!d||vz?.scale!==D.current)return;let t=null;if(s.current&&mz(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&&!vU(t)&&(t=document.documentElement),null==t)for(t=e.parentElement;t&&!vU(t);)t=t.parentElement;return t||document.documentElement}(o):document.documentElement,y=g===document.documentElement,v=window.getComputedStyle(g).position,b=y?vB(a,!1):vV(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=vB(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=vM(u,h),E=vM(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}:vV(u,g,!1);else{let e=vF(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=vj(e),{size:_,crossAxis:S,crossSize:C,placement:k,crossPlacement:P}=E,T=vI(t,i,n,E,u,c,l,d,p,f,s),R=u,O=vL(i,l,t,r,a+u,E,s,h);if(o&&n[_]>O){let e=vj(`${vT[k]} ${P}`),o=vI(t,i,n,e,u,c,l,d,p,f,s);vL(i,l,t,r,a+u,e,s,h)>O&&(E=e,T=o,R=u)}let N="bottom";"top"===E.axis?"top"===E.placement?N="top":"bottom"===E.placement&&(N="bottom"):"top"===E.crossAxis&&("top"===E.crossPlacement?N="bottom":"bottom"===E.crossPlacement&&(N="top"));let $=vA(S,T[S],n[C],i,s,a,l);T[S]+=$;let M=(y=T,v=n.height,b=N,w=(null!=y.top?y.top:s[vN.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),$=vA(S,(T=vI(t,i,n,E,R,c,l,d,p,f,s))[S],n[C],i,s,a,l),T[S]+=$;let A={},j=t[S]-T[S]-r[vP[S]],I=j+.5*t[C],L=p/2+f,F="left"===vP[S]?(r.left??0)+(r.right??0):(r.top??0)+(r.bottom??0),B=n[C]-F-p/2-f,V=vS(I,t[S]+p/2-(T[S]+r[vP[S]]),t[S]+t[C]-p/2-(T[S]+r[vP[S]]));A[S]=vS(V,L,B),({placement:k,crossPlacement:P}=E),p?j=A[S]:"right"===P?j+=t[C]:"center"===P&&(j+=t[C]/2);let U="left"===k||"top"===k?n[_]:0,W={x:"top"===k||"bottom"===k?j:U,y:"left"===k||"right"===k?j:U};return{position:T,maxHeight:M,arrowOffsetLeft:A.left,arrowOffsetTop:A.top,placement:k,triggerAnchorPoint:W}}(r,b,w,x,s,l,D,E,n,c,d,!!v&&"static"!==v,m,p,f,mW(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?vF(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);mo(E,x),mo(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t=E]),vH({ref:o,onResize:E}),vH({ref:a,onResize:E});let _=(0,lr.useRef)(!1);mo(()=>{let e,t=()=>{_.current=!0,clearTimeout(e),e=setTimeout(()=>{_.current=!1},500),E()},n=()=>{_.current&&t()};return vz?.addEventListener("resize",t),vz?.addEventListener("scroll",n),()=>{vz?.removeEventListener("resize",t),vz?.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=mH(e);if(!t.current||n instanceof Node&&!mW(n,t.current)||n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)return;let a=r||vW.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}}function vZ(e,t){if(e.button>0)return!1;let n=mH(e);if(n){let e=n.ownerDocument;if(!e||!mW(e.documentElement,n)||n.closest("[data-react-aria-top-layer]"))return!1}return!!t.current&&!e.composedPath().includes(t.current)}let vG=[],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=h0(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=hZ(r,fW((t=v2)&&t.__esModule?t.default:t,"@react-aria/overlays").format("dismiss"));return la().createElement(hJ,null,la().createElement("button",{...a,tabIndex:-1,onClick:()=>{n&&n()},style:{width:1,height:1}}))}function v6(e,t=!0){let[n,r]=(0,lr.useState)(!0),a=n&&t;return mo(()=>{if(a&&e.current&&"getAnimations"in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,a]),v9(e,a,(0,lr.useCallback)(()=>r(!1),[])),a}function v5(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 v9(e,a,(0,lr.useCallback)(()=>{r(e=>"exiting"===e?"closed":e)},[])),a}function v9(e,t,n){mo(()=>{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,pH.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 v8=null,v7=new Set,be=new Map,bt=!1,bn=!1;function br(e,t){for(let n of v7)n(e,t)}function ba(e){bt=!0,e.metaKey||!m9()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(v8="keyboard",br("keyboard",e))}function bo(e){v8="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(bt=!0,br("pointer",e))}function bi(e){po(e)&&(bt=!0,v8="virtual")}function bs(e){e.target!==window&&e.target!==document&&e.isTrusted&&(bt||bn||(v8="virtual",br("virtual",e)),bt=!1,bn=!1)}function bl(){bt=!1,bn=!0}function bu(e){if("u"<typeof window||be.get(mU(e)))return;let t=mU(e),n=mV(e),r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){bt=!0,r.apply(this,arguments)},n.addEventListener("keydown",ba,!0),n.addEventListener("keyup",ba,!0),n.addEventListener("click",bi,!0),t.addEventListener("focus",bs,!0),t.addEventListener("blur",bl,!1),"u">typeof PointerEvent?(n.addEventListener("pointerdown",bo,!0),n.addEventListener("pointermove",bo,!0),n.addEventListener("pointerup",bo,!0)):(n.addEventListener("mousedown",bo,!0),n.addEventListener("mousemove",bo,!0),n.addEventListener("mouseup",bo,!0)),t.addEventListener("beforeunload",()=>{bc(e)},{once:!0}),be.set(t,{focus:r})}let bc=(e,t)=>{let n=mU(e),r=mV(e);t&&r.removeEventListener("DOMContentLoaded",t),be.has(n)&&(n.HTMLElement.prototype.focus=be.get(n).focus,r.removeEventListener("keydown",ba,!0),r.removeEventListener("keyup",ba,!0),r.removeEventListener("click",bi,!0),n.removeEventListener("focus",bs,!0),n.removeEventListener("blur",bl,!1),"u">typeof PointerEvent?(r.removeEventListener("pointerdown",bo,!0),r.removeEventListener("pointermove",bo,!0),r.removeEventListener("pointerup",bo,!0)):(r.removeEventListener("mousedown",bo,!0),r.removeEventListener("mousemove",bo,!0),r.removeEventListener("mouseup",bo,!0)),be.delete(n))};function bd(e){let[t,n]=gZ(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"!==(f=mV(void 0)).readyState?bu(void 0):f.addEventListener("DOMContentLoaded",()=>{bu(void 0)}));let bm=(0,lr.createContext)(null),bp=(0,lr.createContext)(null),bf=(0,lr.forwardRef)(function(e,t){[e,t]=mS(e,t,bm);let n=(0,lr.useContext)(vp),r=bd(e),a=null==e.isOpen&&null==e.defaultOpen&&n?n:r,o=v5(t,a.isOpen)||e.isExiting||!1,i=(0,lr.useContext)(fe),{direction:s}=fx();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(bh,{...e,triggerRef:e.triggerRef,state:a,popoverRef:t,isExiting:o,dir:s}):null});function bh({state:e,isExiting:t,UNSTABLE_portalContainer:n,...r}){var a,o;let i=(0,lr.useRef)(null),[s,l]=(0,lr.useState)(0),u=(0,lr.useRef)(null),d=(0,lr.useContext)(bp),m=d&&"SubmenuTrigger"===r.trigger;mo(()=>{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,u="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&&!vG.includes(t))return vG.push(t),()=>{let e=vG.indexOf(t);e>=0&&vG.splice(e,1)}},[a,t]);let u=()=>{vG[vG.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=pU(e=>{n&&vZ(e,t)&&(a&&a(e),o.current.isPointerDown=!0)}),s=pU(e=>{n&&n(e)});(0,lr.useEffect)(()=>{let e=o.current;if(r)return;let n=mV(t.current);if("u">typeof PointerEvent){let r=n=>{e.isPointerDown&&vZ(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(mH(e)))&&(vG[vG.length-1]===t&&e.stopPropagation(),l.current===t&&u()),l.current=void 0}:void 0,onInteractOutsideStart:e=>{let n=vG[vG.length-1];l.current=n,(!s||s(mH(e)))&&n===t&&e.stopPropagation()}});let{focusWithinProps:c}=p2({isDisabled:!r,onBlurWithin:e=>{!(!e.relatedTarget||yp(e.relatedTarget,yl))&&(!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||u,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:s},a??r),{overlayProps:p,arrowProps:f,placement:h,triggerAnchorPoint:g}=vK({...l,targetRef:n,overlayRef:r,isOpen:t.isOpen,onClose:o&&!u?t.close:null});return!function(e={}){let{isDisabled:t}=e;mo(()=>{if(!t){let e,t,n,r,a,o,i,s;return 1==++vX&&(c=pe()?(t=vQ(document.documentElement,"overflow","hidden"),n=!1,r=document.createElement("style"),(a=pF())&&(r.nonce=a),r.textContent=`
|
|
34
|
+
`.trim(),e.head.prepend(t)},[m]),(0,lm.useEffect)(()=>{let e=g.current;return()=>{for(let t of(d||pz(e.target??void 0),e.disposables))t();e.disposables=[]}},[d]),{isPressed:l||f,pressProps:mT(p,P,{[p3]:!0})}}function p5(e){return"A"===e.tagName&&e.hasAttribute("href")}function p9(e,t){let{key:n,code:r}=e,a=t.getAttribute("role");return("Enter"===n||" "===n||"Spacebar"===n||"Space"===r)&&!(t instanceof mJ(t).HTMLInputElement&&!ft(t,n)||t instanceof mJ(t).HTMLTextAreaElement||t.isContentEditable)&&!(("link"===a||!a&&p5(t))&&"Enter"!==n)}function p8(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 p7(e,t){return e instanceof HTMLInputElement?!ft(e,t):!(e instanceof HTMLInputElement)&&(e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!p5(e))}let fe=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function ft(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:fe.has(e.type)}function fn(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:a}=e,o=(0,lm.useRef)({isFocusWithin:!1}),{addGlobalListener:i,removeAllGlobalListeners:s}=pX(),l=(0,lm.useCallback)(e=>{mX(e.currentTarget,mQ(e))&&o.current.isFocusWithin&&!mX(e.currentTarget,e.relatedTarget)&&(o.current.isFocusWithin=!1,s(),n&&n(e),a&&a(!1))},[n,a,o,s]),u=pt(l),c=(0,lm.useCallback)(e=>{if(!mX(e.currentTarget,mQ(e)))return;let t=mQ(e),n=mq(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=mQ(e);if(o.current.isFocusWithin&&!mX(t,r)){let e=new n.defaultView.FocusEvent("blur",{relatedTarget:r});pe(e,t),l(m7(e))}},{capture:!0})}},[r,a,u,i,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:l}}}function fr(e={}){var t;let{autoFocus:n=!1,isTextInput:r,within:a}=e,o=(0,lm.useRef)({isFocused:!1,isFocusVisible:n||pR()}),[i,s]=(0,lm.useState)(!1),[l,u]=(0,lm.useState)(()=>o.current.isFocused&&o.current.isFocusVisible),c=(0,lm.useCallback)(()=>u(o.current.isFocused&&o.current.isFocusVisible),[]),d=(0,lm.useCallback)(e=>{o.current.isFocused=e,o.current.isFocusVisible=pR(),s(e),c()},[c]);t={enabled:i,isTextInput:r},pP(),(0,lm.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=mq(a=n?mQ(n):void 0),l=void 0!==(s=mJ(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&&!pO.has(p.type)||p instanceof u||p instanceof d&&p.isContentEditable)&&"keyboard"===e&&n instanceof m&&!px[n.key]||(e=>{o.current.isFocusVisible=e,c()})(pR())};return py.add(e),()=>{py.delete(e)}},[r,i]);let{focusProps:m}=pI({isDisabled:a,onFocusChange:d}),{focusWithinProps:p}=fn({isDisabled:!a,onFocusWithinChange:d});return{isFocused:i,isFocusVisible:l,focusProps:a?p:m}}let fa=!1,fo=0;function fi(e){"touch"===e.pointerType&&(fa=!0,setTimeout(()=>{fa=!1},500))}function fs(){let e=mq(null);if(void 0!==e)return 0===fo&&"u">typeof PointerEvent&&e.addEventListener("pointerup",fi),fo++,()=>{!(--fo>0)&&"u">typeof PointerEvent&&e.removeEventListener("pointerup",fi)}}function fl(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:a}=e,[o,i]=(0,lm.useState)(!1),s=(0,lm.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,lm.useEffect)(fs,[]);let{addGlobalListener:l,removeAllGlobalListeners:u}=pX(),{hoverProps:c,triggerHoverEnd:d}=(0,lm.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=>{fa&&"mouse"===r.pointerType||((r,o)=>{if(s.pointerType=o,a||"touch"===o||s.isHovered||!mX(r.currentTarget,mQ(r)))return;s.isHovered=!0;let u=r.currentTarget;s.target=u,l(mq(mQ(r)),"pointerover",t=>{s.isHovered&&s.target&&!mX(s.target,mQ(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&&mX(t.currentTarget,mQ(t))&&e(t,t.pointerType)}),{hoverProps:o,triggerHoverEnd:e}},[t,n,r,a,s,l,u]);return(0,lm.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 fu=(0,lm.createContext)(!1);function fc(e){let t=(t,n)=>(0,lm.useContext)(fu)?null:e(t,n);return t.displayName=e.displayName||e.name,(0,lm.forwardRef)(t)}let fd=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),fm=(0,lm.createContext)({}),fp=fc(function(e,t){var n;[e,t]=mM(e,t,fm);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}=p6({onPressStart:i,onPressEnd:s,onPressChange:u,onPress:o,onPressUp:l,onClick:m,isDisabled:a,preventFocusOnPress:c,ref:t}),{focusableProps:b}=pV(e,t);d&&(b.tabIndex=a?-1:b.tabIndex);let w=mT(b,y,mZ(e,{labelable:!0}));return{isPressed:v,buttonProps:mT(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}=fr(e),{hoverProps:c,isHovered:d}=fl({...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=mN({...e,values:m,defaultClassName:"react-aria-Button"}),f=mC(o.id),h=mC(),g=o["aria-labelledby"];a&&(g?g=`${g} ${h}`:o["aria-label"]&&(g=`${f} ${h}`));let y=(0,lm.useRef)(a);return(0,lm.useEffect)(()=>{let e={"aria-labelledby":g||f};!y.current&&l&&a?mF(e,"assertive"):y.current&&l&&!a&&mF(e,"assertive"),y.current=a},[a,l,g,f]),lp().createElement("button",{...mZ(e,{propNames:fd}),...mT(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},lp().createElement(mI.Provider,{value:{id:h}},p.children))});(0,lm.createContext)(null),(0,lm.createContext)(null),(0,lm.createContext)(null),(0,lm.createContext)(null),(0,lm.createContext)(null);let ff=(0,lm.createContext)({}),fh=(0,lm.createContext)({}),fg=(0,lm.forwardRef)(function(e,t){[e,t]=mM(e,t,fh);let{elementType:n="span",...r}=e;return lp().createElement(n,{className:"react-aria-Text",...r,ref:t})}),fy=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),fv=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function fb(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 fy.has(t.script)}let t=e.split("-")[0];return fv.has(t)}let fw=Symbol.for("react-aria.i18n.locale");function fx(){let e="u">typeof window&&window[fw]||"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:fb(e)?"rtl":"ltr"}}let fD=fx(),fE=new Set;function f_(){for(let e of(fD=fx(),fE))e(fD)}function fS(){let e=mE(),[t,n]=(0,lm.useState)(fD);return((0,lm.useEffect)(()=>(0===fE.size&&window.addEventListener("languagechange",f_),fE.add(n),()=>{fE.delete(n),0===fE.size&&window.removeEventListener("languagechange",f_)}),[]),e)?{locale:"u">typeof window&&window[fw]||"en-US",direction:"ltr"}:t}let fC=lp().createContext(null);function fk(e){let{locale:t,children:n}=e,r=lp().useMemo(()=>({locale:t,direction:fb(t)?"rtl":"ltr"}),[t]);return lp().createElement(fC.Provider,{value:r},n)}function fP(e){let{children:t}=e,n=fS();return lp().createElement(fC.Provider,{value:n},t)}function fT(e){let{locale:t,children:n}=e;return t?lp().createElement(fk,{locale:t,children:n}):lp().createElement(fP,{children:n})}function fR(){let e=fS();return(0,lm.useContext)(fC)||e}let fO=null;function fN(e,t="assertive",n=7e3){fO?fO.announce(e,t,n):(fO=new f$,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?fO.announce(e,t,n):setTimeout(()=>{fO?.isAttached()&&fO?.announce(e,t,n)},100))}class f${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 fM={};function fA(e,t){let n=(0,lm.useRef)(null);return e&&n.current&&t(e,n.current)&&(e=n.current),n.current=e,e}fM={"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 fj=new Map;class fI{constructor(e,t={}){this.formatter=fF(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==fV&&(fV="h12"===new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle),fV&&(this.resolvedHourCycle||(this.resolvedHourCycle=function(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,"");let n=fF(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 fL={true:{ja:"h11"},false:{}};function fF(e,t={}){if("boolean"==typeof t.hour12&&(null==fB&&(fB="24"===new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))),fB)){let n=fL[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(fj.has(n))return fj.get(n);let r=new Intl.DateTimeFormat(e,t);return fj.set(n,r),r}let fB=null,fV=null;function fU(e){e=fA(e??{},fW);let{locale:t}=fR();return(0,lm.useMemo)(()=>new fI(t,e),[t,e])}function fW(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 fH=Symbol.for("react-aria.i18n.locale"),fz=Symbol.for("react-aria.i18n.strings");class fK{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[fH];if(void 0===p){let e=window[fz];if(!e)return null;for(let n in p={},e)p[n]=new fK({[t]:e[n]},t)}let n=p?.[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 fZ=new Map,fG=new Map;class fY{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=fZ.get(a);return o||(o=new Intl.PluralRules(this.locale,{type:n}),fZ.set(a,o)),"function"==typeof(r=t[o.select(e)]||t.other)?r():r}number(e){let t=fG.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),fG.set(this.locale,t)),t.format(e)}select(e,t){let n=e[t]||e.other;return"function"==typeof n?n():n}}let fq=new WeakMap;function fJ(e,t){let n;return t&&fK.getGlobalDictionaryForPackage(t)||((n=fq.get(e))||(n=new fK(e),fq.set(e,n)),n)}function fX(e,t){let{locale:n}=fR(),r=fJ(e,t);return(0,lm.useMemo)(()=>new fY(n,r),[n,r])}function fQ(e,t){return e-t*Math.floor(e/t)}function f0(e,t,n,r){let a=(t=f4(e,t))-1,o=-2;return n<=2?o=0:f1(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 f1(e){return e%4==0&&(e%100!=0||e%400==0)}function f4(e,t){return"BC"===e?1-t:t}function f2(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}let f3={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 f6{fromJulianDay(e){let t=e-1721426,n=Math.floor(t/146097),r=fQ(t,146097),a=Math.floor(r/36524),o=fQ(r,36524),i=Math.floor(o/1461),s=Math.floor(fQ(o,1461)/365),[l,u]=f2(400*n+100*a+4*i+s+ +(4!==a&&4!==s)),c=e-f0(l,u,1,1),d=2;e<f0(l,u,3,1)?d=0:f1(u)&&(d=1);let m=Math.floor(((c+d)*12+373)/367),p=e-f0(l,u,m,1)+1;return new hg(l,u,m,p)}toJulianDay(e){return f0(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return f3[f1(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return f1(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 f5(e,t){let n=e.copy(),r="hour"in n?hi(n,t):0;f9(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,f8(n),f7(n),n.day+=7*(t.weeks||0),n.day+=t.days||0,n.day+=r,function(e){for(;e.day<1;)e.month--,f8(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,f8(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 f9(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function f8(e){for(;e.month<1;)f9(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,f9(e,1)}function f7(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 he(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),f7(e)}function ht(e){let t={};for(let n in e)"number"==typeof e[n]&&(t[n]=-e[n]);return t}function hn(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),he(n),n}function hr(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),ha(n),n}function ha(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 ho(e,t){let n=e%t;return n<0&&(n+=t),n}function hi(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=ho(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=ho(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=ho(e.minute,60),n=Math.floor(e.hour/24),e.hour=ho(e.hour,24),n}function hs(e,t){let n=e.copy();return hi(n,t),n}function hl(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=hc(o,n,0,t.length-1,r?.round),a.era=t[o],he(a);break}case"year":a.calendar.isInverseEra?.(a)&&(n=-n),a.year=hc(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=hc(e.month,n,1,e.calendar.getMonthsInYear(e),r?.round);break;case"day":a.day=hc(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),he(a),a}function hu(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=hc(t,n,o,i,r?.round);break}case"minute":a.minute=hc(e.minute,n,0,59,r?.round);break;case"second":a.second=hc(e.second,n,0,59,r?.round);break;case"millisecond":a.millisecond=hc(e.millisecond,n,0,999,r?.round);break;default:throw Error("Unsupported field "+t)}return a}function hc(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 hd(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?hS(f5(hT(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):hw(e)-e.offset)+(t.milliseconds||0),n+=1e3*(t.seconds||0),n+=6e4*(t.minutes||0),hR(hk(n+=36e5*(t.hours||0),e.timeZone),e.calendar)}function hm(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 hp(e){let t,n=hR(e,new f6);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 hf(e){return`${hp(e)}T${hm(e)}`}function hh(e){let t,n="object"==typeof e[0]?e.shift():new f6;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 hg{#t;constructor(...e){let[t,n,r,a,o]=hh(e);this.calendar=t,this.era=n,this.year=r,this.month=a,this.day=o,he(this)}copy(){return this.era?new hg(this.calendar,this.era,this.year,this.month,this.day):new hg(this.calendar,this.year,this.month,this.day)}add(e){return f5(this,e)}subtract(e){return f5(this,ht(e))}set(e){return hn(this,e)}cycle(e,t,n){return hl(this,e,t,n)}toDate(e){return hC(this,e)}toString(){return hp(this)}compare(e){return hF(this,e)}}class hy{#t;constructor(e=0,t=0,n=0,r=0){this.hour=e,this.minute=t,this.second=n,this.millisecond=r,ha(this)}copy(){return new hy(this.hour,this.minute,this.second,this.millisecond)}add(e){return hs(this,e)}subtract(e){return hs(this,ht(e))}set(e){return hr(this,e)}cycle(e,t,n){return hu(this,e,t,n)}toString(){return hm(this)}compare(e){var t,n;return t=this,n=e,hB(t)-hB(n)}}class hv{#t;constructor(...e){let[t,n,r,a,o]=hh(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,he(this)}copy(){return this.era?new hv(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new hv(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return f5(this,e)}subtract(e){return f5(this,ht(e))}set(e){return hn(hr(this,e),e)}cycle(e,t,n){switch(e){case"era":case"year":case"month":case"day":return hl(this,e,t,n);default:return hu(this,e,t,n)}}toDate(e,t){return hC(this,e,t)}toString(){return hf(this)}compare(e){var t,n;let r=hF(this,e);return 0===r?(t=this,n=hT(e),hB(t)-hB(n)):r}}class hb{#t;constructor(...e){let[t,n,r,a,o]=hh(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,he(this)}copy(){return this.era?new hb(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new hb(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return hd(this,e)}subtract(e){return hd(this,ht(e))}set(e,t){let n,r;return 0===(r=hr(hn(n=hT(this),e),e)).compare(n)?this:hR(hk(hS(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=hT(e),i=hR(hr(o,{hour:t}),new f6),s=[hS(i,e.timeZone,"earlier"),hS(i,e.timeZone,"later")].filter(t=>hk(t,e.timeZone).day===i.day)[0],l=hR(hr(o,{hour:a}),new f6),u=[hS(l,e.timeZone,"earlier"),hS(l,e.timeZone,"later")].filter(t=>hk(t,e.timeZone).day===l.day).pop(),c=hw(e)-e.offset,d=Math.floor(c/36e5),m=c%36e5;return hR(hk(c=36e5*hc(d,n,Math.floor(s/36e5),Math.floor(u/36e5),r?.round)+m,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return hu(e,t,n,r);case"era":case"year":case"month":case"day":return hR(hk(hS(hl(hT(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(hw(e)-e.offset)}toString(){var e;let t,n,r,a,o;return`${hf(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 hb){var n,r;return e.timeZone===t?e:(n=e,r=t,hR(hk(hw(n)-n.offset,r),n.calendar))}return hk(hS(e,t,void 0),t)})(e,this.timeZone).toDate().getTime()}}function hw(e){return hx(f4((e=hR(e,new f6)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function hx(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 hD(e,t){if("UTC"===t)return 0;if(e>0&&t===hU())return -6e4*new Date(e).getTimezoneOffset();let{year:n,month:r,day:a,hour:o,minute:i,second:s}=h_(e,t);return hx(n,r,a,o,i,s,0)-1e3*Math.floor(e/1e3)}let hE=new Map;function h_(e,t){let n=hE.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"}),hE.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 hS(e,t,n="compatible"){var r,a,o;let i=hT(e);if("UTC"===t)return hw(i);if(t===hU()&&"compatible"===n){i=hR(i,new f6);let e=new Date,t=f4(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=hw(i),l=hD(s-864e5,t),u=hD(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=h_(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 hC(e,t,n="compatible"){return new Date(hS(e,t,n))}function hk(e,t){let n=hD(e,t),r=new Date(e+n),a=r.getUTCFullYear();return new hb(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 hP(e){return new hg(e.calendar,e.era,e.year,e.month,e.day)}function hT(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 hv(e.calendar,e.era,e.year,e.month,e.day,n,r,a,o)}function hR(e,t){if(hM(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,he(r),r}let hO={"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 hN(e,t){return t=hR(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function h$(e,t){return hM(e.calendar,t.calendar)&&hN(e,t)}function hM(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}let hA={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function hj(e,t,n){let r=Math.ceil(e.calendar.toJulianDay(e)+1-(n?hA[n]:function(e){let t=hZ.get(e);if(!t){if(Intl.Locale){let n=new Intl.Locale(e);if("getWeekInfo"in n&&(t=n.getWeekInfo()))return hZ.set(e,t),t.firstDay}let n=function(e){if(Intl.Locale){let t=hK.get(e);return!t&&(t=new Intl.Locale(e).maximize().region)&&hK.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&&hO[n]||0};hZ.set(e,t)}return t.firstDay}(t)))%7;return r<0&&(r+=7),r}function hI(e){return hk(Date.now(),e)}function hL(e){return hP(hI(e))}function hF(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function hB(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let hV=null;function hU(){return null==hV&&(hV=new Intl.DateTimeFormat().resolvedOptions().timeZone),hV}function hW(e){return e.subtract({days:e.day-1})}function hH(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function hz(e,t,n){let r=hj(e,t,n);return e.subtract({days:r})}let hK=new Map,hZ=new Map;function hG(e,t,n){let r=e.calendar.getDaysInMonth(e);return Math.ceil((hj(hW(e),t,n)+r)/7)}function hY(e,t){return e&&t?0>=e.compare(t)?e:t:e||t}function hq(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function hJ(e){return e&&e.__esModule?e.default:e}let hX=new WeakMap;function hQ(e){return e?.calendar.identifier==="gregory"&&"BC"===e.era?"short":void 0}function h0(e,t,n,r){let a=fX(hJ(fM),"@react-aria/calendar"),o=hQ(e)||hQ(t),i=fU({month:"long",year:"numeric",era:o,calendar:e.calendar.identifier,timeZone:n}),s=fU({month:"long",year:"numeric",day:"numeric",era:o,calendar:e.calendar.identifier,timeZone:n});return(0,lm.useMemo)(()=>{if(hN(e,hW(e))){let o=e,s=t;if(e.calendar.getFormattableMonth&&(o=e.calendar.getFormattableMonth(e)),t.calendar.getFormattableMonth&&(s=t.calendar.getFormattableMonth(t)),hN(t,hH(e)))return i.format(o.toDate(n));if(hN(t,hH(t)))return r?h1(i,a,o,s,n):i.formatRange(o.toDate(n),s.toDate(n))}return r?h1(s,a,e,t,n):s.formatRange(e.toDate(n),t.toDate(n))},[e,t,i,s,a,n,r])}function h1(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 h4(e,t){let{id:n,"aria-label":r,"aria-labelledby":a}=e;return n=mC(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 h2(e,t){let n=(0,lm.useRef)(!0),r=(0,lm.useRef)(null),a=pJ(e);(0,lm.useEffect)(()=>(n.current=!0,()=>{n.current=!1}),[]),(0,lm.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 h3(e,t){var n;let r,a,o,i,s,l=fX((n=fM)&&n.__esModule?n.default:n,"@react-aria/calendar"),u=mZ(e),c=h0(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),d=h0(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);h2(()=>{t.isFocused||fN(d)},[d]);let m=(o=fX(hJ(fM),"@react-aria/calendar"),"highlightedRange"in t?{start:r,end:a}=t.highlightedRange||{}:r=a=t.value??void 0,i=fU({weekday:"long",month:"long",year:"numeric",day:"numeric",era:hQ(r)||hQ(a),timeZone:t.timeZone}),s="anchorDate"in t?t.anchorDate:null,(0,lm.useMemo)(()=>{if(!s&&r&&a)if(hN(r,a)){let e=i.format(r.toDate(t.timeZone));return o.format("selectedDateDescription",{date:e})}else{let e=h1(i,o,r,a,t.timeZone);return o.format("selectedRangeDescription",{dateRange:e})}return""},[r,a,s,t.timeZone,o,i]));h2(()=>{m&&fN(m,"polite",4e3)},[m]);let p=mk([!!e.errorMessage,e.isInvalid,e.validationState]);hX.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:p,selectedDateDescription:m});let[f,h]=(0,lm.useState)(!1),g=e.isDisabled||t.isNextVisibleRangeInvalid();g&&f&&(h(!1),t.setFocused(!0));let[y,v]=(0,lm.useState)(!1),b=e.isDisabled||t.isPreviousVisibleRangeInvalid();return b&&y&&(v(!1),t.setFocused(!0)),{calendarProps:mT(u,h4({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 h6={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 h5(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,lm.useState)(!1),{focusWithinProps:o}=fn({isDisabled:!n,onFocusWithinChange:e=>a(e)}),i=(0,lm.useMemo)(()=>r?t:t?{...h6,...t}:h6,[r]);return{visuallyHiddenProps:{...o,style:i}}}(e);return lp().createElement(n,mT(o,i),t)}function h9(e,t,n,r){let a=pJ(n),o=null==n;(0,lm.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 h8(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 h7(e,t){let n=e;for(h8(n,t)&&(n=n.parentElement);n&&!h8(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function ge(e,t){let n=[],r=document.scrollingElement||document.documentElement;do h8(e,t)&&n.push(e),e=e.parentElement;while(e&&e!==r);return n}function gt(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,C=parseInt(c.borderLeftWidth,10)||0,k=parseInt(c.borderRightWidth,10)||0,P=s.top-g,T=s.bottom+y,R=s.left-v,O=s.right+b,N=e===d?0:C+k,$=e===d?0:_+S,M=e.offsetWidth-e.clientWidth-N,A=e.offsetHeight-e.clientHeight-$,j=m+_+w,I=p-S-x-A,L=f+C+D,F=h-k-E;"rtl"!==c.direction||pu()?F-=M:L+=M;let B=P<j||T>I,V=R<L||O>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+O)/2-(L+F)/2;else if(V&&"end"===a)i+=O-F;else if(V&&"nearest"===a){let e=R-L,t=O-F;i+=Math.abs(e)<=Math.abs(t)?e:t}e.scrollTo({left:i,top:o})}function gn(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=ge(e,!0);for(let t of a)gt(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?ge(n,!0):[])gt(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 gr=0,ga=new Map;function go(e){let[t,n]=(0,lm.useState)();return mf(()=>{if(!e)return;let t=ga.get(e);if(t)n(t.element.id);else{let r=`react-aria-description-${gr++}`;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},ga.set(e,t)}return t.refCount++,()=>{t&&0==--t.refCount&&(t.element.remove(),ga.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}class gi extends f6{fromJulianDay(e){let t=super.fromJulianDay(e);return new hg(this,f4(t.era,t.year)- -543,t.month,t.day)}toJulianDay(e){return super.toJulianDay(gs(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(gs(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function gs(e){let[t,n]=f2(e.year+-543);return new hg(t,n,e.month,e.day)}function gl(e,t,n,r){return e+365*t+Math.floor(t/4)+30*(n-1)+r-1}function gu(e,t){let n=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-gl(e,n,1,1))/30),a=t+1-gl(e,n,r,1);return[n,r,a]}function gc(e){return Math.floor(e%4/3)}function gd(e,t){return t%13!=0?30:gc(e)+5}class gm{fromJulianDay(e){let[t,n,r]=gu(1723856,e),a="AM";return t<=0&&(a="AA",t+=5500),new hg(this,a,t,n,r)}toJulianDay(e){let t=e.year;return"AA"===e.era&&(t-=5500),gl(1723856,t,e.month,e.day)}getDaysInMonth(e){return gd(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+gc(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 gp extends gm{fromJulianDay(e){let[t,n,r]=gu(1723856,e);return new hg(this,"AA",t+=5500,n,r)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class gf extends gm{fromJulianDay(e){let[t,n,r]=gu(1824665,e),a="CE";return t<=0&&(a="BCE",t=1-t),new hg(this,a,t,n,r)}toJulianDay(e){let t=e.year;return"BCE"===e.era&&(t=1-t),gl(1824665,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return"BCE"===e.era&&(t=1-t),gd(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 gh=765433;function gg(e){return 7>fQ(7*e+1,19)}function gy(e){let t=Math.floor((235*e-234)/19),n=29*t+Math.floor((12084+13753*t)/25920);return 3>fQ(3*(n+1),7)&&(n+=1),n}function gv(e){let t,n;return gy(e)+(t=gy(e-1),n=gy(e),gy(e+1)-n==356?2:+(n-t==382))}function gb(e){return gv(e+1)-gv(e)}function gw(e,t){if(t>=6&&!gg(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;let n=function(e){let t=gb(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*!!gg(e):30}class gx{fromJulianDay(e){let t=e-347997,n=Math.floor((25920*t/gh*19+234)/235)+1,r=gv(n),a=Math.floor(t-r);for(;a<1;)a=Math.floor(t-(r=gv(--n)));let o=1,i=0;for(;i<a;)i+=gw(n,o),o++;let s=a-(i-=gw(n,--o));return new hg(this,n,o,s)}toJulianDay(e){let t=gv(e.year);for(let n=1;n<e.month;n++)t+=gw(e.year,n);return t+e.day+347997}getDaysInMonth(e){return gw(e.year,e.month)}getMonthsInYear(e){return gg(e.year)?13:12}getDaysInYear(e){return gb(e.year)}getMaximumMonthsInYear(){return 13}getMaximumDaysInMonth(){return 30}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,t){t.year!==e.year&&(gg(t.year)&&!gg(e.year)&&t.month>6?e.month--:!gg(t.year)&&gg(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class gD extends f6{fromJulianDay(e){let t,n,r,a=super.fromJulianDay(e),o=a.year-78,i=e-f0(a.era,a.year,1,1);if(i<80?(o--,i+=(t=f1(a.year-1)?31:30)+155+90+10):(t=f1(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 hg(this,o,n,r)}toJulianDay(e){let t,n,[r,a]=f2(e.year+78);return(f1(a)?(t=31,n=f0(r,a,3,21)):(t=30,n=f0(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&&f1(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 gE(e,t,n,r){return r+Math.ceil(29.5*(n-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function g_(e,t,n){let r=Math.floor((30*(n-t)+10646)/10631),a=Math.min(12,Math.ceil((n-(29+gE(t,r,1,1)))/29.5)+1),o=n-gE(t,r,a,1)+1;return new hg(e,r,a,o)}function gS(e){return(14+11*e)%30<11}class gC{fromJulianDay(e){return g_(this,1948440,e)}toJulianDay(e){return gE(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return 12===e.month&&gS(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return gS(e.year)?355:354}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 30}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class gk extends gC{fromJulianDay(e){return g_(this,1948439,e)}toJulianDay(e){return gE(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function gP(e){return 460322+u[e-1300]}function gT(e,t){return(l[e-1300]&1<<11-(t-1))==0?29:30}function gR(e,t){let n=gP(e);for(let r=1;r<t;r++)n+=gT(e,r);return n}function gO(e){return u[e+1-1300]-u[e-1300]}class gN extends gC{constructor(){if(super(),this.identifier="islamic-umalqura",l||(l=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),e=>e.charCodeAt(0)).buffer)),!u){u=new Uint32Array(301);let e=0;for(let t=1300;t<=1600;t++){u[t-1300]=e;for(let n=1;n<=12;n++)e+=gT(t,n)}}}fromJulianDay(e){let t=e-1948440,n=gP(1300),r=gP(1600);if(t<n||t>r)return super.fromJulianDay(e);{let e=1299,n=1,r=1;for(;r>0;){r=t-gP(++e)+1;let a=gO(e);if(r===a){n=12;break}if(r<a){let t=gT(e,n);for(n=1;r>t;)r-=t,t=gT(e,++n);break}}return new hg(this,e,n,t-gR(e,n)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+gR(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):gT(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):gO(e.year)}}let g$=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],gM=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],gA=[1867,1911,1925,1988,2018],gj=["meiji","taisho","showa","heisei","reiwa"];function gI(e){let t=g$.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?g$.length-1:0===t?0:t-1}function gL(e){let t=gA[gj.indexOf(e.era)];if(!t)throw Error("Unknown era: "+e.era);return new hg(e.year+t,e.month,e.day)}class gF extends f6{fromJulianDay(e){let t=super.fromJulianDay(e),n=gI(t);return new hg(this,gj[n],t.year-gA[n],t.month,t.day)}toJulianDay(e){return super.toJulianDay(gL(e))}balanceDate(e){let t=gL(e),n=gI(t);gj[n]!==e.era&&(e.era=gj[n],e.year=t.year-gA[n]),this.constrainDate(e)}constrainDate(e){let t=gj.indexOf(e.era),n=gM[t];if(null!=n){let[r,a,o]=n,i=r-gA[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]=g$[t];e.month=Math.max(n,e.month),e.month===n&&(e.day=Math.max(r,e.day))}}getEras(){return gj}getYearsInEra(e){let t=gj.indexOf(e.era),n=g$[t],r=g$[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(gL(e))}getMinimumMonthInYear(e){let t=gB(e);return t?t[1]:1}getMinimumDayInMonth(e){let t=gB(e);return t&&e.month===t[1]?t[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function gB(e){if(1===e.year)return g$[gj.indexOf(e.era)]}let gV=[0,31,62,93,124,155,186,216,246,276,306,336];class gU{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-gV[a]+1;return new hg(this,n,a+1,o)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=gV[e.month-1],t+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>fQ(25*e.year+11,33)?30:29}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function gW(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function gH(e){let t=e-1911;return t>0?["minguo",t]:["before_minguo",1-t]}class gz extends f6{fromJulianDay(e){let t=super.fromJulianDay(e),[n,r]=gH(f4(t.era,t.year));return new hg(this,n,r,t.month,t.day)}toJulianDay(e){return super.toJulianDay(gK(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[t,n]=gH(gW(e));e.era=t,e.year=n}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(gK(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function gK(e){let[t,n]=f2(gW(e));return new hg(t,n,e.month,e.day)}function gZ(e){switch(e){case"buddhist":return new gi;case"ethiopic":return new gm;case"ethioaa":return new gp;case"coptic":return new gf;case"hebrew":return new gx;case"indian":return new gD;case"islamic-civil":return new gC;case"islamic-tbla":return new gk;case"islamic-umalqura":return new gN;case"japanese":return new gF;case"persian":return new gU;case"roc":return new gz;default:return new f6}}function gG(e,t,n){return null!=t&&0>e.compare(t)||null!=n&&e.compare(n)>0}function gY(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=gq(e,t,n).subtract(o);return gX(e,i,t,n,r,a)}function gq(e,t,n,r,a){let o=e;if(t.years)o=hW(e.subtract({months:e.month-1}));else t.months?o=hW(e):t.weeks&&(o=hz(e,n));return gX(e,o,t,n,r,a)}function gJ(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=gq(e,t,n).subtract(o);return gX(e,i,t,n,r,a)}function gX(e,t,n,r,a,o){if(a&&e.compare(a)>=0){let e=hq(t,gq(hP(a),n,r));e&&(t=e)}if(o&&0>=e.compare(o)){let e=hY(t,gJ(hP(o),n,r));e&&(t=e)}return t}function gQ(e,t,n){if(t){let n=hq(e,hP(t));n&&(e=n)}if(n){let t=hY(e,hP(n));t&&(e=t)}return e}function g0(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 g1="u">typeof document?lp().useInsertionEffect??lp().useLayoutEffect:()=>{};function g4(e,t,n){let[r,a]=(0,lm.useState)(e||t),o=(0,lm.useRef)(r),i=(0,lm.useRef)(void 0!==e),s=void 0!==e;(0,lm.useEffect)(()=>{i.current,i.current=s},[s]);let l=s?e:r;g1(()=>{o.current=l});let[,u]=(0,lm.useReducer)(()=>({}),{});return[l,(0,lm.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 g2(e){let t=(0,lm.useMemo)(()=>new fI(e.locale),[e.locale]),n=(0,lm.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,lm.useMemo)(()=>a(n.calendar),[a,n.calendar]),[p,f]=g4(e.value,e.defaultValue??null,e.onChange),h=(0,lm.useMemo)(()=>p?hR(hP(p),m):null,[p,m]),g=(0,lm.useMemo)(()=>p&&"timeZone"in p?p.timeZone:n.timeZone,[p,n.timeZone]),[y,v]=g4((0,lm.useMemo)(()=>e.focusedValue?gQ(hR(hP(e.focusedValue),m),i,s):void 0,[e.focusedValue,m,i,s]),(0,lm.useMemo)(()=>gQ(e.defaultFocusedValue?hR(hP(e.defaultFocusedValue),m):h||hR(hL(g),m),i,s),[e.defaultFocusedValue,h,g,m,i,s]),e.onFocusChange),[b,w]=(0,lm.useState)(()=>{switch(l){case"start":return gq(y,o,r,i,s);case"end":return gJ(y,o,r,i,s);default:return gY(y,o,r,i,s)}}),[x,D]=(0,lm.useState)(e.autoFocus||!1),E=(0,lm.useMemo)(()=>{let e={...o};return e.days?e.days--:e.days=-1,b.add(e)},[b,o]),[_,S]=(0,lm.useState)(m);if(!hM(m,_)){let e=hR(y,m);w(gY(e,o,r,i,s)),v(e),S(m)}function C(e){v(e=gQ(e,i,s))}function k(t){if(!e.isDisabled&&!e.isReadOnly){let e=t;if(null===e)return void f(null);(e=g0(e=gQ(e,i,s),b,u))&&(e=hR(e,p?.calendar||new f6),p&&"hour"in p?f(p.set(e)):f(e))}}gG(y,i,s)?v(gQ(y,i,s)):0>y.compare(b)?w(gJ(y,o,r,i,s)):y.compare(E)>0&&w(gq(y,o,r,i,s));let P=(0,lm.useMemo)(()=>!!h&&(!!(u&&u(h))||gG(h,i,s)),[h,u,i,s]),T=e.isInvalid||"invalid"===e.validationState||P,R=(0,lm.useMemo)(()=>"visible"===c?o:g3(o),[c,o]);return{isDisabled:e.isDisabled??!1,isReadOnly:e.isReadOnly??!1,value:h,setValue:k,visibleRange:{start:b,end:E},minValue:i,maxValue:s,focusedDate:y,timeZone:g,validationState:T?"invalid":null,isValueInvalid:T,setFocusedDate(e){C(e)},focusNextDay(){C(y.add({days:1}))},focusPreviousDay(){C(y.subtract({days:1}))},focusNextRow(){o.days?this.focusNextPage():(o.weeks||o.months||o.years)&&C(y.add({weeks:1}))},focusPreviousRow(){o.days?this.focusPreviousPage():(o.weeks||o.months||o.years)&&C(y.subtract({weeks:1}))},focusNextPage(){let e=b.add(R);v(gQ(y.add(R),i,s)),w(gq(gX(y,e,R,r,i,s),R,r))},focusPreviousPage(){let e=b.subtract(R);v(gQ(y.subtract(R),i,s)),w(gq(gX(y,e,R,r,i,s),R,r))},focusSectionStart(){o.days?C(b):o.weeks?C(hz(y,r)):(o.months||o.years)&&C(hW(y))},focusSectionEnd(){o.days?C(E):o.weeks?C(hz(y,r,void 0).add({days:6})):(o.months||o.years)&&C(hH(y))},focusNextSection(e){e||o.days?o.days?this.focusNextPage():o.weeks?C(y.add({months:1})):(o.months||o.years)&&C(y.add({years:1})):C(y.add(g3(o)))},focusPreviousSection(e){e||o.days?o.days?this.focusPreviousPage():o.weeks?C(y.subtract({months:1})):(o.months||o.years)&&C(y.subtract({years:1})):C(y.subtract(g3(o)))},selectFocusedDate(){u&&u(y)||k(y)},selectDate(e){k(e)},isFocused:x,setFocused:D,isInvalid:e=>gG(e,i,s),isSelected(e){return null!=h&&hN(e,h)&&!this.isCellDisabled(e)&&!this.isCellUnavailable(e)},isCellFocused:e=>x&&y&&hN(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 hN(e,b)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=E.add({days:1});return hN(e,E)||this.isInvalid(e)},getDatesInWeek(e,t=b){let n=t.add({weeks:e}),a=[],o=hj(n=hz(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(hN(n,e))break;n=e}for(;a.length<7;)a.push(null);return a}}}function g3(e){let t={...e};for(let n in e)t[n]=1;return t}function g6(e,t){return e&&t?(0>t.compare(e)&&([e,t]=[t,e]),{start:hP(e),end:hP(t)}):null}function g5(e,t){return(e=hR(e,t?.calendar||new f6),t&&"hour"in t)?t.set(e):e}function g9(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 g8=(0,lm.createContext)(null),g7=(0,lm.createContext)(null),ye=(0,lm.createContext)(null),yt=(0,lm.createContext)(null),yn=(0,lm.forwardRef)(function(e,t){[e,t]=mM(e,t,g8);let{locale:n}=fR(),r=g2({...e,locale:n,createCalendar:gZ}),{calendarProps:a,prevButtonProps:o,nextButtonProps:i,errorMessageProps:s,title:l}=h3(e,r),u=mN({...e,values:{state:r,isDisabled:e.isDisabled||!1,isInvalid:r.isValueInvalid},defaultClassName:"react-aria-Calendar"});return lp().createElement("div",{...u,...a,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":r.isValueInvalid||void 0},lp().createElement(mO,{values:[[fm,{slots:{previous:o,next:i}}],[ff,{"aria-hidden":!0,level:2,children:l}],[ye,r],[g8,e],[fh,{slots:{errorMessage:s}}]]},lp().createElement(h5,null,lp().createElement("h2",null,a["aria-label"])),u.children,lp().createElement(h5,null,lp().createElement("button",{"aria-label":i["aria-label"],disabled:i.isDisabled,onClick:()=>r.focusNextPage(),tabIndex:-1}))))}),yr=(0,lm.forwardRef)(function(e,t){[e,t]=mM(e,t,g7);let{locale:n}=fR(),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]=g4(t,n||null,r),[m,p]=(0,lm.useState)(null),f="center";if(c&&c.start&&c.end){let e=gY(hP(c.start),i,o,s,l).add(i).subtract({days:1});c.end.compare(e)>0&&(f="start")}let h=(0,lm.useRef)(null),[g,y]=(0,lm.useState)(null),v=(0,lm.useMemo)(()=>hq(s,g?.start),[s,g]),b=(0,lm.useMemo)(()=>hY(l,g?.end),[l,g]),w=g2({...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:g9(t,w,-1),end:g9(t,w,1)},y(h.current)):(h.current=null,y(null))},[D,E]=(0,lm.useState)(w.visibleRange);h$(w.visibleRange.start,D.start)&&h$(w.visibleRange.end,D.end)||(x(m),E(w.visibleRange));let _=e=>{e?(p(e),x(e)):(p(null),x(null))},S=m?g6(m,w.focusedDate):c&&g6(c.start,c.end),C=t=>{if(e.isReadOnly)return;let n=g0(gQ(t,v,b),w.visibleRange.start,e.isDateUnavailable);if(n)if(m){let e=g6(m,n);e&&d({start:g5(e.start,c?.start),end:g5(e.end,c?.end)}),_(null)}else _(n)},[k,P]=(0,lm.useState)(!1),{isDateUnavailable:T}=e,R=(0,lm.useMemo)(()=>!!c&&!m&&(!!(T&&(T(c.start)||T(c.end)))||gG(c.start,s,l)||gG(c.end,s,l)),[T,c,m,s,l]),O=e.isInvalid||"invalid"===e.validationState||R;return{...w,value:c,setValue:d,anchorDate:m,setAnchorDate:_,highlightedRange:S,validationState:O?"invalid":null,isValueInvalid:O,selectFocusedDate(){C(w.focusedDate)},selectDate:C,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)||gG(e,h.current?.start,h.current?.end),isDragging:k,setDragging:P,clearSelection(){_(null),d(null)}}}({...e,locale:n,createCalendar:gZ}),{calendarProps:a,prevButtonProps:o,nextButtonProps:i,errorMessageProps:s,title:l}=function(e,t,n){let{commitBehavior:r="select",...a}=e,o=h3(a,t),i=(0,lm.useRef)(!1),s=(0,lm.useRef)("u">typeof window?window:null);h9(s,"pointerdown",e=>{i.current=0===e.width&&0===e.height});let l={clear:()=>t.clearSelection(),reset:()=>t.setAnchorDate(null),select:()=>t.selectFocusedDate()};return h9(s,"pointerup",e=>{if(i.current){i.current=!1;return}if(t.setDragging(!1),!t.anchorDate)return;let a=e.target;n.current&&m0(n.current)&&(!mX(n.current,a)||!a.closest('button, [role="button"]'))&&l[r]()}),o.calendarProps.onBlur=e=>{n.current&&(e.relatedTarget&&mX(n.current,e.relatedTarget)||!t.anchorDate||l[r]())},h9(n,"touchmove",e=>{t.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),o}(e,r,t),u=mN({...e,values:{state:r,isDisabled:e.isDisabled||!1,isInvalid:r.isValueInvalid},defaultClassName:"react-aria-RangeCalendar"});return lp().createElement("div",{...u,...a,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":r.isValueInvalid||void 0},lp().createElement(mO,{values:[[fm,{slots:{previous:o,next:i}}],[ff,{"aria-hidden":!0,level:2,children:l}],[yt,r],[g7,e],[fh,{slots:{errorMessage:s}}]]},lp().createElement(h5,null,lp().createElement("h2",null,a["aria-label"])),u.children,lp().createElement(h5,null,lp().createElement("button",{"aria-label":i["aria-label"],disabled:i.isDisabled,onClick:()=>r.focusNextPage(),tabIndex:-1}))))}),ya=(0,lm.createContext)(null),yo=(0,lm.forwardRef)(function(e,t){var n,r;let a=(0,lm.useContext)(ye),o=(0,lm.useContext)(yt),i=m$(g8),s=m$(g7),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}=fR(),i=h0(n,r,t.timeZone,!0),{ariaLabel:s,ariaLabelledBy:l}=hX.get(t),u=h4({"aria-label":[s,i].filter(Boolean).join(", "),"aria-labelledby":l}),c=fU({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:d}=fR(),m=(0,lm.useMemo)(()=>{let e=hz(hL(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=hG(n,d,a);return{gridProps:mT(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:hH(u),weekdayStyle:e.weekdayStyle,firstDayOfWeek:c},l);return lp().createElement(ya.Provider,{value:{headerProps:m,weekDays:p,startDate:u,firstDayOfWeek:c}},lp().createElement("table",{...mZ(e),...d,ref:t,style:e.style,className:null!=(r=e.className)?r:"react-aria-CalendarGrid"},"function"!=typeof e.children?e.children:lp().createElement(lp().Fragment,null,lp().createElement(yi,null,e=>lp().createElement(ys,null,e)),lp().createElement(yl,null,e.children))))}),yi=(0,lm.forwardRef)(function(e,t){let{children:n,style:r,className:a}=e,{headerProps:o,weekDays:i}=(0,lm.useContext)(ya);return lp().createElement("thead",{...mZ(e),...o,ref:t,style:r,className:a||"react-aria-CalendarGridHeader"},lp().createElement("tr",null,i.map((e,t)=>lp().cloneElement(n(e),{key:t}))))}),ys=(0,lm.forwardRef)(function(e,t){let{children:n,style:r,className:a}=e;return lp().createElement("th",{...mZ(e),ref:t,style:r,className:a||"react-aria-CalendarHeaderCell"},n)}),yl=(0,lm.forwardRef)(function(e,t){let{children:n,style:r,className:a}=e,o=(0,lm.useContext)(ye),i=(0,lm.useContext)(yt),s=null!=o?o:i,{startDate:l,firstDayOfWeek:u}=(0,lm.useContext)(ya),{locale:c}=fR(),d=hG(l,c,u);return lp().createElement("tbody",{...mZ(e),ref:t,style:r,className:a||"react-aria-CalendarGridBody"},[...Array(d).keys()].map(e=>lp().createElement("tr",{key:e},s.getDatesInWeek(e,l).map((e,t)=>e?lp().cloneElement(n(e),{key:t}):lp().createElement("td",{key:t})))))}),yu=(0,lm.forwardRef)(function({date:e,...t},n){var r,a,o;let i=(0,lm.useContext)(ye),s=(0,lm.useContext)(yt),l=null!=i?i:s,{startDate:u}=null!=(r=(0,lm.useContext)(ya))?r:{startDate:l.visibleRange.start},c=(0,lm.useRef)(null),{cellProps:d,buttonProps:m,...p}=function(e,t,n){var r;let a,{date:o,isDisabled:i}=e,{errorMessageId:s,selectedDateDescription:l}=hX.get(t),u=fX((r=fM)&&r.__esModule?r.default:r,"@react-aria/calendar"),c=fU({weekday:"long",day:"numeric",month:"long",year:"numeric",era:hQ(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&&hN(t.value,o));h&&(d=!0),o=fA(o,h$);let g=(0,lm.useMemo)(()=>o.toDate(t.timeZone),[o,t.timeZone]),y=hN(o,hL(t.timeZone)),v=(0,lm.useMemo)(()=>{let e="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(hN(o,t.value.start)||hN(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&&hN(o,t.minValue)?e+=", "+u.format("minimumDate"):t.maxValue&&hN(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=go(b),x=(0,lm.useRef)(!1),D=(0,lm.useRef)(!1),E=(0,lm.useRef)(void 0),{pressProps:_,isPressed:S}=p6({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(hN(o,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(o),t.setFocused(!0),t.setDragging(!0),D.current=!0;return}else if(hN(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=hN(o,t.focusedDate)?0:-1),(0,lm.useEffect)(()=>{m&&n.current&&(mG(n.current),"pointer"!==pg&&((e=document)=>e.activeElement)()===n.current&&gn(n.current,{containingElement:h7(n.current)}))},[m,n]);let C=fU({day:"numeric",timeZone:t.timeZone,calendar:o.calendar.identifier}),k=(0,lm.useMemo)(()=>C.formatToParts(g).find(e=>"day"===e.type).value,[C,g]);return{cellProps:{role:"gridcell","aria-disabled":!f||void 0,"aria-selected":d||void 0,"aria-invalid":h||void 0},buttonProps:mT(_,{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=mQ(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:k}}({date:e},l,c),{hoverProps:f,isHovered:h}=fl({...t,isDisabled:p.isDisabled}),{focusProps:g,isFocusVisible:y}=fr();y&&(y=p.isFocused);let v=(a=u,o=hR(o=e,a.calendar),a=hW(a),o=hW(o),a.era!==o.era||a.year!==o.year||a.month!==o.month),b=!1,w=!1;"highlightedRange"in l&&l.highlightedRange&&(b=hN(e,l.highlightedRange.start),w=hN(e,l.highlightedRange.end));let x=mN({...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 lp().createElement("td",{...d,ref:n},lp().createElement("div",{...mT(mZ(t),m,g,f,D,x),ref:c}))}),yc=(0,lm.createContext)({}),yd=(0,lm.forwardRef)(function(e,t){var n,r;[e,t]=mM(e,t,yc);let{isDisabled:a,isInvalid:o,onHoverStart:i,onHoverChange:s,onHoverEnd:l,...u}=e,{hoverProps:c,isHovered:d}=fl({onHoverStart:i,onHoverChange:s,onHoverEnd:l,isDisabled:a}),{isFocused:m,isFocusVisible:p,focusProps:f}=fr({within:!0});null!=a||(a=!!e["aria-disabled"]&&"false"!==e["aria-disabled"]),null!=o||(o=!!e["aria-invalid"]&&"false"!==e["aria-invalid"]);let h=mN({...e,values:{isHovered:d,isFocusWithin:m,isFocusVisible:p,isDisabled:a,isInvalid:o},defaultClassName:"react-aria-Group"});return lp().createElement("div",{...mT(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)}),ym=(0,lm.createContext)({}),yp=fc(function(e,t){[e,t]=mM(e,t,ym);let{hoverProps:n,isHovered:r}=fl(e),{isFocused:a,isFocusVisible:o,focusProps:i}=fr({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e["aria-invalid"]&&"false"!==e["aria-invalid"],l=mN({...e,values:{isHovered:r,isFocused:a,isFocusVisible:o,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:"react-aria-Input"});return lp().createElement("input",{...mT((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 yf(e,t,n,r){return e.createTreeWalker(t,n,r)}let yh=lp().createContext(null),yg="react-aria-focus-scope-restore",yy=null;function yv(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,lm.useRef)(null),w=(0,lm.useRef)(null),x=(0,lm.useRef)([]),{parentNode:D}=(0,lm.useContext)(yh)||{},E=(0,lm.useMemo)(()=>new y$({scopeRef:x}),[x]);mf(()=>{let e=D||yM.root;if(yM.getTreeNode(e.scopeRef)&&yy&&!yE(yy,e.scopeRef)){let t=yM.getTreeNode(yy);t&&(e=t)}e.addChild(E),yM.addNode(E)},[E,D]),mf(()=>{let e=yM.getTreeNode(x);e&&(e.contain=!!g)},[g]),mf(()=>{let e=b.current?.nextSibling,t=[],n=e=>e.stopPropagation();for(;e&&e!==w.current;)t.push(e),e.addEventListener(yg,n),e=e.nextSibling;return x.current=t,()=>{for(let e of t)e.removeEventListener(yg,n)}},[h]),mf(()=>{if(n||r)return;let e=t.current,a=mq(e?e[0]:void 0),o=e=>{let n=mQ(e);yx(n,t.current)?yy=t:yD(n)||(yy=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,lm.useRef)(void 0),m=(0,lm.useRef)(void 0),mf(()=>{let e=a.current;if(!o){m.current&&(cancelAnimationFrame(m.current),m.current=void 0);return}let t=mq(e?e[0]:void 0),n=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!yw(a)||e.isComposing)return;let n=((e=document)=>e.activeElement)(t),r=a.current;if(!r||!yx(n,r))return;let o=yT(yb(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&&(y_(i,!0),i instanceof mJ(i).HTMLInputElement&&i.select())},r=e=>{(!yy||yE(yy,a))&&yx(mQ(e),a.current)?(yy=a,d.current=mQ(e)):yw(a)&&!yD(mQ(e),a)?d.current?d.current.focus():yy&&yy.current&&yC(yy.current):yw(a)&&(d.current=mQ(e))},i=e=>{m.current&&cancelAnimationFrame(m.current),m.current=requestAnimationFrame(()=>{let n=pg,r=("virtual"===n||null===n)&&pm()&&pd(),o=((e=document)=>e.activeElement)(t);if(!r&&o&&yw(a)&&!yD(o,a)){yy=a;let t=mQ(e);t&&t.isConnected?(d.current=t,d.current?.focus()):yy.current&&yC(yy.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]),mf(()=>()=>{m.current&&cancelAnimationFrame(m.current)},[m]),i=x,s=y,l=g,p=(0,lm.useRef)("u">typeof document?((e=document)=>e.activeElement)(mq(i.current?i.current[0]:void 0)):null),mf(()=>{let e=i.current,t=mq(e?e[0]:void 0);if(!s||l)return;let n=()=>{(!yy||yE(yy,i))&&yx(((e=document)=>e.activeElement)(t),i.current)&&(yy=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]),mf(()=>{let e=mq(i.current?i.current[0]:void 0);if(!s)return;let t=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!yw(i)||t.isComposing)return;let n=e.activeElement;if(!yD(n,i)||!yk(i))return;let r=yM.getTreeNode(i);if(!r)return;let a=r.nodeToRestore,o=yT(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||!yD(s,i))&&a){o.currentNode=a;do s=t.shiftKey?o.previousNode():o.nextNode();while(yD(s,i));(t.preventDefault(),t.stopPropagation(),s)?y_(s,!0):yD(a)?y_(a,!0):n.blur()}};return l||e.addEventListener("keydown",t,!0),()=>{l||e.removeEventListener("keydown",t,!0)}},[i,s,l]),mf(()=>{let e=mq(i.current?i.current[0]:void 0);if(!s)return;let t=yM.getTreeNode(i);if(t)return t.nodeToRestore=p.current??void 0,()=>{let t=yM.getTreeNode(i);if(!t)return;let n=t.nodeToRestore,r=((e=document)=>e.activeElement)(e);if(s&&n&&(r&&yD(r,i)||r===e.body&&yk(i))){let t=yM.clone();requestAnimationFrame(()=>{if(e.activeElement===e.body){let e=t.getTreeNode(i);for(;e;){if(e.nodeToRestore&&e.nodeToRestore.isConnected)return void yP(e.nodeToRestore);e=e.parent}for(e=t.getTreeNode(i);e;){if(e.scopeRef&&e.scopeRef.current&&yM.getTreeNode(e.scopeRef))return void yP(yS(e.scopeRef.current,!0));e=e.parent}}})}}},[i,s]),u=x,c=v,f=lp().useRef(c),(0,lm.useEffect)(()=>{f.current&&(yy=u,!yx(((e=document)=>e.activeElement)(mq(u.current?u.current[0]:void 0)),yy.current)&&u.current&&yC(u.current)),f.current=!1},[u]),(0,lm.useEffect)(()=>{let e=((e=document)=>e.activeElement)(mq(x.current?x.current[0]:void 0)),t=null;if(yx(e,x.current)){for(let n of yM.traverse())n.scopeRef&&yx(e,n.scopeRef.current)&&(t=n);t===yM.getTreeNode(x)&&(yy=t.scopeRef)}},[x]),mf(()=>()=>{let e=yM.getTreeNode(x)?.parent?.scopeRef??null;(x===yy||yE(x,yy))&&(!e||yM.getTreeNode(e))&&(yy=e),yM.removeTreeNode(x)},[x]);let _=(0,lm.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)(mq(n[0]??void 0)),l=n[0].previousElementSibling,u=yT(yb(n),{tabbable:a,accept:i},n);u.currentNode=yx(s,n)?s:l;let c=u.nextNode();return!c&&o&&(u.currentNode=l,c=u.nextNode()),c&&y_(c,!0),c},focusPrevious(t={}){let n=e.current,{from:r,tabbable:a,wrap:o,accept:i}=t,s=r||((e=document)=>e.activeElement)(mq(n[0]??void 0)),l=n[n.length-1].nextElementSibling,u=yT(yb(n),{tabbable:a,accept:i},n);u.currentNode=yx(s,n)?s:l;let c=u.previousNode();return!c&&o&&(u.currentNode=l,c=u.previousNode()),c&&y_(c,!0),c},focusFirst(t={}){let n=e.current,{tabbable:r,accept:a}=t,o=yT(yb(n),{tabbable:r,accept:a},n);o.currentNode=n[0].previousElementSibling;let i=o.nextNode();return i&&y_(i,!0),i},focusLast(t={}){let n=e.current,{tabbable:r,accept:a}=t,o=yT(yb(n),{tabbable:r,accept:a},n);o.currentNode=n[n.length-1].nextElementSibling;let i=o.previousNode();return i&&y_(i,!0),i}}},[]),S=(0,lm.useMemo)(()=>({focusManager:_,parentNode:E}),[E,_]);return lp().createElement(yh.Provider,{value:S},lp().createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:b}),h,lp().createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:w}))}function yb(e){return e[0].parentElement}function yw(e){let t=yM.getTreeNode(yy);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function yx(e,t){return!!e&&!!t&&t.some(t=>mX(t,e))}function yD(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of yM.traverse(yM.getTreeNode(t)))if(n&&yx(e,n.current))return!0;return!1}function yE(e,t){let n=yM.getTreeNode(t)?.parent;for(;n;){if(n.scopeRef===e)return!0;n=n.parent}return!1}function y_(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch{}}else try{pj(e)}catch{}}function yS(e,t=!0){let n=e[0].previousElementSibling,r=yb(e),a=yT(r,{tabbable:t},e);a.currentNode=n;let o=a.nextNode();return t&&!o&&((a=yT(r=yb(e),{tabbable:!1},e)).currentNode=n,o=a.nextNode()),o}function yC(e,t=!0){y_(yS(e,t))}function yk(e){let t=yM.getTreeNode(yy);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function yP(e){e.dispatchEvent(new CustomEvent(yg,{bubbles:!0,cancelable:!0}))&&y_(e)}function yT(e,t,n){let r=t?.tabbable?m9:m5,a=mq(e?.nodeType===Node.ELEMENT_NODE?e:null),o=yf(a,e||a,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>mX(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(mq(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)).filter(e=>!e.form);let t=e.form.elements.namedItem(e.name),n=mJ(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||yx(e,n))&&(!t?.accept||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});return t?.from&&(o.currentNode=t.from),o}function yR(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)(mq(r)),u=yT(r,{tabbable:o,accept:s});mX(r,l)&&(u.currentNode=l);let c=u.nextNode();return!c&&i&&(u.currentNode=r,c=u.nextNode()),c&&y_(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)(mq(r)),u=yT(r,{tabbable:o,accept:s});if(mX(r,l))u.currentNode=l;else{let e=yO(u);return e&&y_(e,!0),e??null}let c=u.previousNode();if(!c&&i){u.currentNode=r;let e=yO(u);if(!e)return null;c=e}return c&&y_(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=yT(r,{tabbable:a,accept:o}).nextNode();return i&&y_(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=yO(yT(r,{tabbable:a,accept:o}));return i&&y_(i,!0),i??null}}}function yO(e){let t,n;do(t=e.lastChild())&&(n=t);while(t);return n}class yN{constructor(){this.fastMap=new Map,this.root=new y$({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 y$({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&&yx(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 yN;for(let t of this.traverse())e.addTreeNode(t.scopeRef,t.parent?.scopeRef??null,t.nodeToRestore);return e}}class y${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 yM=new yN;var yA={};function yj(e,t,n){let{direction:r}=fR(),a=(0,lm.useMemo)(()=>yR(t),[t]),o=()=>{if(!t.current)return;let e=window.event?mQ(window.event):null,n=yT(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}=p6({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){"mouse"===e.pointerType&&o()},onPress(e){("touch"===e.pointerType||"pen"===e.pointerType)&&o()}});return mT(i,{onKeyDown:o=>{if(mX(o.currentTarget,mQ(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=mQ(o),n=yI(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=mQ(o),n=yI(t.current,e.getBoundingClientRect().left,1);n&&n.focus()}}else a.focusNext()}}})}function yI(e,t,n){let r=yT(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 yL(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=mC(t);let i=mC(),s={};return n&&(r=r?`${i} ${r}`:i,s={id:i,htmlFor:"label"===o?t:void 0}),{labelProps:s,fieldProps:h4({id:t,"aria-label":a,"aria-labelledby":r})}}(e),s=mk([!!t,!!n,r,a]),l=mk([!!t,!!n,r,a]);return{labelProps:o,fieldProps:i=mT(i,{"aria-describedby":[s,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),descriptionProps:{id:s},errorMessageProps:{id:l}}}function yF(e,t,n){let r=pJ(e=>{n&&!e.defaultPrevented&&n(t)});(0,lm.useEffect)(()=>{let t=e?.current?.form;return t?.addEventListener("reset",r),()=>{t?.removeEventListener("reset",r)}},[e])}function yB(e,t,n){let{validationBehavior:r,focus:a}=e;mf(()=>{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,lm.useRef)(!1),i=pJ(()=>{o.current||t.resetValidation()}),s=pJ(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(),pg="keyboard",pD("keyboard",null));e.preventDefault()}),l=pJ(()=>{t.commitValidation()});(0,lm.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&&mQ(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])}yA={"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 yV=new WeakMap,yU="__reactAriaDateFieldRole",yW="__reactAriaDateFieldFocusManager";function yH(e,t,n){var r;let a,{isInvalid:o,validationErrors:i,validationDetails:s}=t.displayValidation,{labelProps:l,fieldProps:u,descriptionProps:c,errorMessageProps:d}=yL({...e,labelElementType:"span",isInvalid:o,errorMessage:e.errorMessage||i}),m=(0,lm.useRef)(null),{focusWithinProps:p}=fn({...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=fX((r=yA)&&r.__esModule?r.default:r,"@react-aria/datepicker"),h="hour"===t.maxGranularity?"selectedTimeDescription":"selectedDateDescription",g="hour"===t.maxGranularity?"time":"date",y=go(t.value?f.format(h,{[g]:t.formatValue({month:"long"})}):""),v="presentation"===e[yU]?u["aria-describedby"]:[y["aria-describedby"],u["aria-describedby"]].filter(Boolean).join(" ")||void 0,b=e[yW],w=(0,lm.useMemo)(()=>b||yR(n),[b,n]),x=yj(t,n,"presentation"===e[yU]);yV.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:[l.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:v,focusManager:w});let D=(0,lm.useRef)(e.autoFocus);a="presentation"===e[yU]?{role:"presentation"}:mT(u,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":v}),(0,lm.useEffect)(()=>{D.current&&w.focusFirst(),D.current=!1},[w]),yF(e.inputRef,t.defaultValue,t.setValue),yB({...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 _=mZ(e);return{labelProps:{...l,onClick:()=>{w.focusFirst()}},fieldProps:mT(_,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 yz={};yz={"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 yK={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},yZ={...yK,customError:!0,valid:!1},yG={isInvalid:!1,validationDetails:yK,validationErrors:[]},yY=(0,lm.createContext)({}),yq="__reactAriaFormValidationState";function yJ(e){if(e[yq]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:a,commitValidation:o}=e[yq];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:yZ}:null,u=(0,lm.useMemo)(()=>i&&null!=a?yQ(function(e,t){if("function"==typeof e){let n=e(t);if(n&&"boolean"!=typeof n)return yX(n)}return[]}(i,a)):null,[i,a]);o?.validationDetails.valid&&(o=void 0);let c=(0,lm.useContext)(yY),d=(0,lm.useMemo)(()=>r?Array.isArray(r)?r.flatMap(e=>yX(c[e])):yX(c[r]):[],[c,r]),[m,p]=(0,lm.useState)(c),[f,h]=(0,lm.useState)(!1);c!==m&&(p(c),h(!1));let g=(0,lm.useMemo)(()=>yQ(f?[]:d),[f,d]),y=(0,lm.useRef)(yG),[v,b]=(0,lm.useState)(yG),w=(0,lm.useRef)(yG),[x,D]=(0,lm.useState)(!1);return(0,lm.useEffect)(()=>{if(!x)return;D(!1);let e=u||o||y.current;y0(e,w.current)||(w.current=e,b(e))}),{realtimeValidation:l||g||u||o||yG,displayValidation:"native"===s?l||g||v:l||g||u||o||v,updateValidation(e){"aria"!==s||y0(v,e)?y.current=e:b(e)},resetValidation(){y0(yG,w.current)||(w.current=yG,b(yG)),"native"===s&&D(!1),h(!0)},commitValidation(){"native"===s&&D(!0),h(!0)}}}(e)}function yX(e){return e?Array.isArray(e)?e:[e]:[]}function yQ(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:yZ}:null}function y0(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 y1(...e){let t=new Set,n=!1,r={...yK};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 y4=new fK((en=yz)&&en.__esModule?en.default:en);function y2(){let e="u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return e}function y3(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=y2(),r=new fY(e,fK.getGlobalDictionaryForPackage("@react-stately/datepicker")||y4),l=new fI(e,y9({},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 y6={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},y5={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function y9(e,t){e={...t.shouldForceLeadingZeros?y5:y6,...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 y8(e){return e&&"hour"in e?e:new hy}function y7(e,t){return null===e?null:e?hR(e,t):void 0}function ve(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,lm.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 vt=new fK({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 vn{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]=va(this.hour,t);this.dayPeriod=e,this.hour=n}}copy(){let e=new vn(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]=va(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=va(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]=va(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=vr(n,t,0,e.length-1),a.era=e[n];break}case"year":{let r=new hg(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=vr(a.month??1,t,1,this.calendar.getMaximumMonthsInYear());break;case"day":a.day=vr(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]=va((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=vr(e,t,r.minValue,r.maxValue),null==a.dayPeriod&&"hour"in n&&(a.dayPeriod=va(n.hour,this.hourCycle)[0])}break}case"dayPeriod":a.dayPeriod=vr(a.dayPeriod??0,t,0,1);break;case"minute":a.minute=vr(a.minute??0,t,0,59,!0);break;case"second":a.second=vr(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 vr(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 va(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 vo=n(9264);let vi={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},vs={year:5,month:2,day:7,hour:2,minute:15,second:15},vl={dayperiod:"dayPeriod",relatedYear:"year",yearName:"literal",unknown:"literal"};function vu(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]=ve(c,e.granularity),p=m||"UTC";if(c&&!(d in c))throw Error("Invalid granularity "+d+" for value "+c.toString());let[f,h]=(0,lm.useMemo)(()=>{let r=new fI(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]=g4(e.value,e.defaultValue??null,e.onChange),[v]=(0,lm.useState)(g),b=(0,lm.useMemo)(()=>y7(g,f)??null,[g,f]),[w,x]=(0,lm.useState)(()=>new vn(f,h,b)),D="gregory"===f.identifier&&"BC"===w.era,E=(0,lm.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,lm.useMemo)(()=>y9({},E),[E]),S=(0,lm.useMemo)(()=>new fI(t,_),[t,_]),C=(0,lm.useMemo)(()=>S.resolvedOptions(),[S]),k=(0,lm.useMemo)(()=>(function(e,t,n,r){if(e)return y7(e,n);let a=hR(hI(r??hU()).set({hour:0,minute:0,second:0,millisecond:0}),n);return"year"===t||"month"===t||"day"===t?hP(a):r?a:hT(a)})(e.placeholderValue,d,f,m),[e.placeholderValue,d,f,m]),P=(0,lm.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,lm.useState)(b),[O,N]=(0,lm.useState)(f),[$,M]=(0,lm.useState)(h);b===T&&h===$&&hM(f,O)||(w=new vn(f,h,b),R(b),N(f),M(h),x(w));let A=t=>{if(!e.isDisabled&&!e.isReadOnly)if(null==t||t instanceof vn&&t.isCleared(P))x(new vn(f,h,b)),y(null);else if(t instanceof vn){if(t.isComplete(P)){let e=t.toValue(b??k);if(t.validate(e,P)){let t=hR(e,c?.calendar||new f6);if(!g||0!==t.compare(g)){x(new vn(f,h,b)),y(t);return}}}x(t)}else t=hR(t,c?.calendar||new f6),x(new vn(f,h,b)),y(t)},j=(0,lm.useMemo)(()=>w.toValue(b??k).toDate(p),[w,p,b,k]),I=(0,lm.useMemo)(()=>(function(e,t,n,r,a,o,i){let s=["hour","minute","second"],l=n.formatToParts(e),u=new(0,vo.K)(o,{useGrouping:!1}),c=new(0,vo.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=vl[e.type]||e.type,r=vi[n];"era"===n&&1===a.getEras().length&&(r=!1);let l=vi[n]&&null==t[e.type],u=vi[n]?(m=e.value,"era"===n||"dayPeriod"===n?m:"year"===n||"month"===n||"day"===n?vt.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,C,f,t,d),[j,S,C,w,f,t,d]),L=(e,t)=>{A(w.cycle(e,t,k,P))},F=(0,lm.useMemo)(()=>y3(g,s,l,u,E),[g,s,l,u,E]),B=yJ({...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,vs[e]||1)},decrementPage(e){L(e,-(vs[e]||1))},incrementToMax(e){let t="hour"===e&&"h12"===h?11:w.getSegmentLimits(e).maxValue;A(w.set(e,t,k))},decrementToMin(e){let t="hour"===e&&"h12"===h?12:w.getSegmentLimits(e).minValue;A(w.set(e,t,k))},setSegment(e,t){A(w.set(e,t,k))},confirmPlaceholder(){if(!e.isDisabled&&!e.isReadOnly&&w.isComplete(P)){let e=hR(w.toValue(b??k),c?.calendar||new f6);g&&0===e.compare(g)||y(e),x(new vn(f,h,b))}},clearSegment(e){let t=w;"timeZoneName"!==e&&"literal"!==e&&(t=w.clear(e)),A(t)},formatValue:e=>b?new fI(t,y9(e,E)).format(j):"",getDateFormatter:(e,t)=>new fI(e,y9({},{...E,...t}))}}let vc=(0,lm.createContext)(null),vd=(0,lm.createContext)(null),vm=(0,lm.createContext)(null),vp=(0,lm.forwardRef)(function(e,t){let n=(0,lm.useContext)(vd),r=(0,lm.useContext)(vm);return n||r?lp().createElement(vh,{...e,ref:t}):lp().createElement(vf,{...e,ref:t})}),vf=(0,lm.forwardRef)((e,t)=>{let[n,r]=mM({slot:e.slot},t,vc),{locale:a}=fR(),o=vu({...n,locale:a,createCalendar:gZ}),i=(0,lm.useRef)(null),{fieldProps:s,inputProps:l}=yH({...n,inputRef:i},o,r);return lp().createElement(mO,{values:[[vd,o],[ym,{...l,ref:i}],[yc,{...s,ref:r,isInvalid:o.isInvalid}]]},lp().createElement(vh,e))}),vh=(0,lm.forwardRef)((e,t)=>{let{className:n,children:r}=e,a=(0,lm.useContext)(vd),o=(0,lm.useContext)(vm),i=null!=a?a:o;return lp().createElement(lp().Fragment,null,lp().createElement(yd,{...e,ref:t,slot:e.slot||void 0,className:null!=n?n:"react-aria-DateInput",isInvalid:i.isInvalid},i.segments.map((e,t)=>(0,lm.cloneElement)(r(e),{key:t}))),lp().createElement(yp,null))});function vg({children:e}){let t=(0,lm.useMemo)(()=>({register:()=>{}}),[]);return lp().createElement(pY.Provider,{value:t},e)}lp().forwardRef(({children:e,...t},n)=>{let r=(0,lm.useRef)(!1),a=(0,lm.useContext)(pY),o=mT(a||{},{...t,register(){r.current=!0,a&&a.register()}});return o.ref=mc(n||a?.ref),pF(a,o.ref),(0,lm.useEffect)(()=>{r.current||(r.current=!0)},[]),lp().createElement(pY.Provider,{value:o},e)});let vy=(0,lm.createContext)({});function vv(){return(0,lm.useContext)(vy)??{}}let vb=lp().createContext(null);function vw(e){let t=mE(),{portalContainer:n=t?null:document.body,isExiting:r}=e,[a,o]=(0,lm.useState)(!1),i=(0,lm.useMemo)(()=>({contain:a,setContain:o}),[a,o]),{getContainer:s}=vv();if(!e.portalContainer&&s&&(n=s()),!n)return null;let l=e.children;return e.disableFocusManagement||(l=lp().createElement(yv,{restoreFocus:!0,contain:(e.shouldContainFocus||a)&&!r},l)),l=lp().createElement(vb.Provider,{value:i},lp().createElement(vg,null,l)),p0().createPortal(l,n)}let vx=(0,lm.createContext)(null),vD=(0,lm.createContext)(null),vE=(0,lm.forwardRef)(function(e,t){let n=e["aria-labelledby"];[e,t]=mM(e,t,vx);let{dialogProps:r,titleProps:a}=function(e,t){let n,r,{role:a="dialog"}=e,o=mk();o=e["aria-label"]?void 0:o;let i=(0,lm.useRef)(!1);return(0,lm.useEffect)(()=>{if(t.current&&!m0(t.current)){pj(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(),pj(t.current)),i.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),n=(0,lm.useContext)(vb),mf(()=>{r?.(!0)},[r=n?.setContain]),(0,lm.useRef)(!1),(0,lm.useEffect)(()=>{}),{dialogProps:{...mZ(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,lm.useContext)(vD);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=mN({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(null==o?void 0:o.close)||(()=>{})}});return lp().createElement("section",{...mZ(e),...r,...i,ref:t,slot:e.slot||void 0},lp().createElement(mO,{values:[[ff,{slots:{[mR]:{},title:{...a,level:2}}}],[fm,{slots:{[mR]:{},close:{onPress:()=>null==o?void 0:o.close()}}}]]},i.children))}),v_=(0,lm.createContext)(null),vS=(0,lm.forwardRef)(function(e,t){let n=(0,lm.useContext)(v_);return(null==n?void 0:n.isInvalid)?lp().createElement(vC,{...e,ref:t}):null}),vC=(0,lm.forwardRef)((e,t)=>{let n=(0,lm.useContext)(v_),r=mZ(e),a=mN({...e,defaultClassName:"react-aria-FieldError",defaultChildren:0===n.validationErrors.length?void 0:n.validationErrors.join(" "),values:n});return null==a.children?null:lp().createElement(fg,{slot:"errorMessage",...r,...a,ref:t})}),vk=(0,lm.createContext)(null),vP=(0,lm.createContext)({}),vT=fc(function(e,t){[e,t]=mM(e,t,vP);let{elementType:n="label",...r}=e;return lp().createElement(n,{className:"react-aria-Label",...r,ref:t})}),vR=(0,lm.createContext)({placement:"bottom"}),vO="u">typeof HTMLElement&&"inert"in HTMLElement.prototype,vN=new WeakMap,v$=[];function vM(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}function vA(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 vj(e,t,n,r){t=Number(t),n=Number(n);let a=(e-(isNaN(t)?0:t))%r,o=vA(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(vA(n/r,r))*r):o<t?o=t:!isNaN(n)&&o>n&&(o=t+Math.floor(vA((n-t)/r,r))*r),o=vA(o,r)}let vI={top:"top",bottom:"top",left:"left",right:"left"},vL={top:"bottom",bottom:"top",left:"right",right:"left"},vF={top:"left",left:"top"},vB={top:"height",left:"width"},vV={width:"totalWidth",height:"totalHeight"},vU={};function vW(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}=vY(e,!1)),l.top=e.scrollTop,l.left=e.scrollLeft,a=n,o=r;return pc()&&("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 vH(e,t,n,r,a,o,i){let s=a.scroll[e]??0,l=r[vB[e]],u=i[e]+r.scroll[vI[e]]+o,c=i[e]+r.scroll[vI[e]]+l-o,d=t-s+r.scroll[vI[e]]+i[e]-r[vI[e]],m=t-s+n+r.scroll[vI[e]]+i[e]-r[vI[e]];return d<u?u-d:m>c?Math.max(c-m,u-d):0}function vz(e){if(vU[e])return vU[e];let[t,n]=e.split(" "),r=vI[t]||"right",a=vF[r];vI[n]||(n="center");let o=vB[r],i=vB[a];return vU[e]={placement:t,crossPlacement:n,axis:r,crossAxis:a,size:o,crossSize:i},vU[e]}function vK(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]=vM(y[f],v,b),d===p){let t=s?c[h]:c[vV[h]];y[vL[p]]=Math.floor(t-e[p]+a)}else y[p]=Math.floor(e[p]+e[h]+a);return y}function vZ(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[vL[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[vL[u]]-a)}function vG(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 vY(e,t){let{top:n,left:r,width:a,height:o}=vG(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 vq(e,t,n){let r,a=window.getComputedStyle(e);if("fixed"===a.position)r=vG(e,n);else{r=vY(e,n);let a=vY(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 vJ(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 vX=new WeakMap;function vQ(e){let{ref:t,box:n,onResize:r}=e,a=pJ(r);(0,lm.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 v0="u">typeof document?window.visualViewport:null;function v1(e){var t;let{direction:n}=fR(),{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,lm.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,lm.useRef)(v0?.scale);(0,lm.useEffect)(()=>{h&&(D.current=v0?.scale)},[h]);let E=(0,lm.useCallback)(()=>{var e;if(!1===f||!h||!o.current||!a.current||!d||v0?.scale!==D.current)return;let t=null;if(s.current&&m0(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&&!vJ(t)&&(t=document.documentElement),null==t)for(t=e.parentElement;t&&!vJ(t);)t=t.parentElement;return t||document.documentElement}(o):document.documentElement,y=g===document.documentElement,v=window.getComputedStyle(g).position,b=y?vY(a,!1):vq(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=vY(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=vW(u,h),E=vW(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}:vq(u,g,!1);else{let e=vG(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=vz(e),{size:_,crossAxis:S,crossSize:C,placement:k,crossPlacement:P}=E,T=vK(t,i,n,E,u,c,l,d,p,f,s),R=u,O=vZ(i,l,t,r,a+u,E,s,h);if(o&&n[_]>O){let e=vz(`${vL[k]} ${P}`),o=vK(t,i,n,e,u,c,l,d,p,f,s);vZ(i,l,t,r,a+u,e,s,h)>O&&(E=e,T=o,R=u)}let N="bottom";"top"===E.axis?"top"===E.placement?N="top":"bottom"===E.placement&&(N="bottom"):"top"===E.crossAxis&&("top"===E.crossPlacement?N="bottom":"bottom"===E.crossPlacement&&(N="top"));let $=vH(S,T[S],n[C],i,s,a,l);T[S]+=$;let M=(y=T,v=n.height,b=N,w=(null!=y.top?y.top:s[vV.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),$=vH(S,(T=vK(t,i,n,E,R,c,l,d,p,f,s))[S],n[C],i,s,a,l),T[S]+=$;let A={},j=t[S]-T[S]-r[vI[S]],I=j+.5*t[C],L=p/2+f,F="left"===vI[S]?(r.left??0)+(r.right??0):(r.top??0)+(r.bottom??0),B=n[C]-F-p/2-f,V=vM(I,t[S]+p/2-(T[S]+r[vI[S]]),t[S]+t[C]-p/2-(T[S]+r[vI[S]]));A[S]=vM(V,L,B),({placement:k,crossPlacement:P}=E),p?j=A[S]:"right"===P?j+=t[C]:"center"===P&&(j+=t[C]/2);let U="left"===k||"top"===k?n[_]:0,W={x:"top"===k||"bottom"===k?j:U,y:"left"===k||"right"===k?j:U};return{position:T,maxHeight:M,arrowOffsetLeft:A.left,arrowOffsetTop:A.top,placement:k,triggerAnchorPoint:W}}(r,b,w,x,s,l,D,E,n,c,d,!!v&&"static"!==v,m,p,f,mX(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?vG(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);mf(E,x),mf(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t=E]),vQ({ref:o,onResize:E}),vQ({ref:a,onResize:E});let _=(0,lm.useRef)(!1);mf(()=>{let e,t=()=>{_.current=!0,clearTimeout(e),e=setTimeout(()=>{_.current=!1},500),E()},n=()=>{_.current&&t()};return v0?.addEventListener("resize",t),v0?.addEventListener("scroll",n),()=>{v0?.removeEventListener("resize",t),v0?.removeEventListener("scroll",n)}},[E]);let S=(0,lm.useCallback)(()=>{_.current||g?.()},[g,_]);return!function(e){let{triggerRef:t,isOpen:n,onClose:r}=e;(0,lm.useEffect)(()=>{if(!n||null===r)return;let e=e=>{let n=mQ(e);if(!t.current||n instanceof Node&&!mX(n,t.current)||n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)return;let a=r||vX.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}}function v4(e,t){if(e.button>0)return!1;let n=mQ(e);if(n){let e=n.ownerDocument;if(!e||!mX(e.documentElement,n)||n.closest("[data-react-aria-top-layer]"))return!1}return!!t.current&&!e.composedPath().includes(t.current)}let v2=[],v3=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function v6(e){return e instanceof HTMLInputElement&&!v3.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}let v5="u">typeof document&&window.visualViewport,v9=0;function v8(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function v7(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function be(e,t){t||!v5?bt(e):v5.addEventListener("resize",()=>bt(e),{once:!0})}function bt(e){let t=document.scrollingElement||document.documentElement,n=e;for(;n&&n!==t;){let e=h7(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;v5&&(n=Math.min(n,v5.offsetTop+v5.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 bn={};function br(e){var t;let{onDismiss:n,...r}=e,a=h4(r,fX((t=bn)&&t.__esModule?t.default:t,"@react-aria/overlays").format("dismiss"));return lp().createElement(h5,null,lp().createElement("button",{...a,tabIndex:-1,onClick:()=>{n&&n()},style:{width:1,height:1}}))}function ba(e,t=!0){let[n,r]=(0,lm.useState)(!0),a=n&&t;return mf(()=>{if(a&&e.current&&"getAnimations"in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,a]),bi(e,a,(0,lm.useCallback)(()=>r(!1),[])),a}function bo(e,t){let[n,r]=(0,lm.useState)(t?"open":"closed");switch(n){case"open":t||r("exiting");break;case"closed":case"exiting":t&&r("open")}let a="exiting"===n;return bi(e,a,(0,lm.useCallback)(()=>{r(e=>"exiting"===e?"closed":e)},[])),a}function bi(e,t,n){mf(()=>{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,pQ.flushSync)(()=>{n()})}),()=>{r=!0}}},[e,t,n])}bn={"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 bs=null,bl=new Set,bu=new Map,bc=!1,bd=!1;function bm(e,t){for(let n of bl)n(e,t)}function bp(e){bc=!0,e.metaKey||!pi()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(bs="keyboard",bm("keyboard",e))}function bf(e){bs="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(bc=!0,bm("pointer",e))}function bh(e){pf(e)&&(bc=!0,bs="virtual")}function bg(e){e.target!==window&&e.target!==document&&e.isTrusted&&(bc||bd||(bs="virtual",bm("virtual",e)),bc=!1,bd=!1)}function by(){bc=!1,bd=!0}function bv(e){if("u"<typeof window||bu.get(mJ(e)))return;let t=mJ(e),n=mq(e),r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){bc=!0,r.apply(this,arguments)},n.addEventListener("keydown",bp,!0),n.addEventListener("keyup",bp,!0),n.addEventListener("click",bh,!0),t.addEventListener("focus",bg,!0),t.addEventListener("blur",by,!1),"u">typeof PointerEvent?(n.addEventListener("pointerdown",bf,!0),n.addEventListener("pointermove",bf,!0),n.addEventListener("pointerup",bf,!0)):(n.addEventListener("mousedown",bf,!0),n.addEventListener("mousemove",bf,!0),n.addEventListener("mouseup",bf,!0)),t.addEventListener("beforeunload",()=>{bb(e)},{once:!0}),bu.set(t,{focus:r})}let bb=(e,t)=>{let n=mJ(e),r=mq(e);t&&r.removeEventListener("DOMContentLoaded",t),bu.has(n)&&(n.HTMLElement.prototype.focus=bu.get(n).focus,r.removeEventListener("keydown",bp,!0),r.removeEventListener("keyup",bp,!0),r.removeEventListener("click",bh,!0),n.removeEventListener("focus",bg,!0),n.removeEventListener("blur",by,!1),"u">typeof PointerEvent?(r.removeEventListener("pointerdown",bf,!0),r.removeEventListener("pointermove",bf,!0),r.removeEventListener("pointerup",bf,!0)):(r.removeEventListener("mousedown",bf,!0),r.removeEventListener("mousemove",bf,!0),r.removeEventListener("mouseup",bf,!0)),bu.delete(n))};function bw(e){let[t,n]=g4(e.isOpen,e.defaultOpen||!1,e.onOpenChange),r=(0,lm.useCallback)(()=>{n(!0)},[n]),a=(0,lm.useCallback)(()=>{n(!1)},[n]),o=(0,lm.useCallback)(()=>{n(!t)},[n,t]);return{isOpen:t,setOpen:n,open:r,close:a,toggle:o}}"u">typeof document&&("loading"!==(f=mq(void 0)).readyState?bv(void 0):f.addEventListener("DOMContentLoaded",()=>{bv(void 0)}));let bx=(0,lm.createContext)(null),bD=(0,lm.createContext)(null),bE=(0,lm.forwardRef)(function(e,t){[e,t]=mM(e,t,bx);let n=(0,lm.useContext)(vD),r=bw(e),a=null==e.isOpen&&null==e.defaultOpen&&n?n:r,o=bo(t,a.isOpen)||e.isExiting||!1,i=(0,lm.useContext)(fu),{direction:s}=fR();if(i){let t=e.children;return"function"==typeof t&&(t=t({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),lp().createElement(lp().Fragment,null,t)}return!a||a.isOpen||o?lp().createElement(b_,{...e,triggerRef:e.triggerRef,state:a,popoverRef:t,isExiting:o,dir:s}):null});function b_({state:e,isExiting:t,UNSTABLE_portalContainer:n,...r}){var a,o;let i=(0,lm.useRef)(null),[s,l]=(0,lm.useState)(0),u=(0,lm.useRef)(null),d=(0,lm.useContext)(bD),m=d&&"SubmenuTrigger"===r.trigger;mf(()=>{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,u="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,lm.useRef)(void 0);(0,lm.useEffect)(()=>{if(a&&!v2.includes(t))return v2.push(t),()=>{let e=v2.indexOf(t);e>=0&&v2.splice(e,1)}},[a,t]);let u=()=>{v2[v2.length-1]===t&&n&&n()};!function(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:a}=e,o=(0,lm.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),i=pJ(e=>{n&&v4(e,t)&&(a&&a(e),o.current.isPointerDown=!0)}),s=pJ(e=>{n&&n(e)});(0,lm.useEffect)(()=>{let e=o.current;if(r)return;let n=mq(t.current);if("u">typeof PointerEvent){let r=n=>{e.isPointerDown&&v4(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(mQ(e)))&&(v2[v2.length-1]===t&&e.stopPropagation(),l.current===t&&u()),l.current=void 0}:void 0,onInteractOutsideStart:e=>{let n=v2[v2.length-1];l.current=n,(!s||s(mQ(e)))&&n===t&&e.stopPropagation()}});let{focusWithinProps:c}=fn({isDisabled:!r,onBlurWithin:e=>{!(!e.relatedTarget||yD(e.relatedTarget,yy))&&(!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||u,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:s},a??r),{overlayProps:p,arrowProps:f,placement:h,triggerAnchorPoint:g}=v1({...l,targetRef:n,overlayRef:r,isOpen:t.isOpen,onClose:o&&!u?t.close:null});return!function(e={}){let{isDisabled:t}=e;mf(()=>{if(!t){let e,t,n,r,a,o,i,s;return 1==++v9&&(c=pu()?(t=v8(document.documentElement,"overflow","hidden"),n=!1,r=document.createElement("style"),(a=pG())&&(r.nonce=a),r.textContent=`
|
|
35
35
|
@layer {
|
|
36
36
|
* {
|
|
37
37
|
overscroll-behavior: contain;
|
|
38
38
|
}
|
|
39
|
-
}`.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=ma(v0(document,"touchstart",t=>{let r=mH(t);e=hQ(r)?r:h0(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=mH(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}):ma((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&&c()}}},[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=v_[v_.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=mU(e?.[0])).Element?{root:n}:n,i=o?.root??document.body,s=o?.shouldUseInert&&vD,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(mW(e,t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},n=yo(mV(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=vE.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),vE.set(e,n+1))},v_.length&&v_[v_.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=>mW(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()}},v_.push(f),()=>{for(let e of(p.disconnect(),u)){let t=vE.get(e);null!=t&&(1===t?(c(e,!1),vE.delete(e)):vE.set(e,t-1))}f===v_[v_.length-1]?(v_.pop(),v_.length&&v_[v_.length-1].observe()):v_.splice(v_.indexOf(f),1)}}},[o,t.isOpen,r,a]),{popoverProps:mw(d,p),arrowProps:f,underlayProps:m,placement:h,triggerAnchorPoint:g}}({...r,offset:null!=(a=r.offset)?a:8,arrowSize:s,groupRef:m?d:u},e),y=r.popoverRef,v=v6(y,!!g)||r.isEntering||!1,b=mE({...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);mo(()=>{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=mV(e=y.current)),"virtual"===v8?pC(()=>{((e=document)=>e.activeElement)(t)===n&&e.isConnected&&mF(e)}):mF(e))},[x,y]);let E={...p.style,...b.style},_=la().createElement("div",{...mw(mL(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(v3,{onDismiss:e.close}),la().createElement(vx.Provider,{value:{...h,placement:g,ref:i}},b.children),la().createElement(v3,{onDismiss:e.close}));return m?la().createElement(vd,{...r,shouldContainFocus:x,isExiting:t,portalContainer:null!=(o=null!=n?n:null==d?void 0:d.current)?o:void 0},_):la().createElement(vd,{...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:u,style:{display:"contents"}},la().createElement(bp.Provider,{value:u},_)))}function bg(e){return e?.start!=null&&null!=e.end}let by=(0,lr.createContext)(null),bv=(0,lr.createContext)(null),bb=(0,lr.createContext)(null),bw=(0,lr.createContext)(null),bx=(0,lr.forwardRef)(function(e,t){var n,r;[e,t]=mS(e,t,by);let{validationBehavior:a}=m_(vv)||{},o=null!=(r=null!=(n=e.validationBehavior)?n:a)?r:"native",i=function(e){let t=bd(e),[n,r]=gZ(e.value,e.defaultValue||null,e.onChange),[a]=(0,lr.useState)(n),o=n||e.placeholderValue||null,[i,s]=y1(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)(()=>yY(n,y,v,b,g),[n,y,v,b,g]),x=yU({...e,value:n,builtinValidation:w}),D=x.displayValidation.isInvalid,E=e.validationState||(D?"invalid":null),_=(e,t)=>{r("timeZone"in t?t.set(hb(e)):hw(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 fP(e,yX(t,g)).format(l):"",getDateFormatter:(e,t)=>new fP(e,yX({},{...g,...t}))}}({...e,validationBehavior:o}),s=(0,lr.useRef)(null),[l,u]=mC(!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=my(),o=my(),i=my(),s=fW((r=yC)&&r.__esModule?r.default:r,"@react-aria/datepicker"),{isInvalid:l,validationErrors:u,validationDetails:c}=t.displayValidation,{labelProps:d,fieldProps:m,descriptionProps:p,errorMessageProps:f}=yT({...e,labelElementType:"span",isInvalid:l,errorMessage:e.errorMessage||u}),h=yk(t,n),g=m["aria-labelledby"]||m.id,{locale:y}=fx(),v=t.formatValue(y,{month:"long"}),b=h5(v?s.format("selectedDateDescription",{date:v}):""),w=[b["aria-describedby"],m["aria-describedby"]].filter(Boolean).join(" ")||void 0,x=mL(e),D=(0,lr.useMemo)(()=>yx(n),[n]),E=(0,lr.useRef)(!1),{focusWithinProps:_}=p2({...e,isDisabled:t.isOpen,onBlurWithin:t=>{mW(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:mw(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,[y$]:"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,[yV]: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}}({...mk(e),label:u,validationBehavior:o},i,s),[b,w]=(0,lr.useState)(null),x=(0,lr.useCallback)(()=>{s.current&&w(s.current.offsetWidth+"px")},[]);vH({ref:s,onResize:x});let{focusProps:D,isFocused:E,isFocusVisible:_}=p3({within:!0}),S=mE({...e,values:{state:i,isFocusWithin:E,isFocusVisible:_,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DatePicker"}),C=mL(e);return delete C.id,la().createElement(mD,{values:[[bb,i],[yt,{...c,ref:s,isInvalid:i.isInvalid}],[vt,m],[fr,{...p,isPressed:i.isOpen}],[vb,{...d,ref:l,elementType:"span"}],[gQ,h],[vp,i],[bm,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":b}}],[vm,f],[fi,{slots:{description:g,errorMessage:y}}],[vh,v]]},la().createElement("div",{...D,...C,...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}))}),bD=(0,lr.forwardRef)(function(e,t){var n,r;[e,t]=mS(e,t,bv);let{validationBehavior:a}=m_(vv)||{},o=null!=(r=null!=(n=e.validationBehavior)?n:a)?r:"native",i=function(e){let t=bd(e),[n,r]=gZ(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}),bg(s)?r(s):r(null)},[u,c]=y1(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&&bg(s)&&(p=s,"hour"in s.start&&(h=s));let y=(e,t)=>{l({start:"timeZone"in t.start?t.start.set(hb(e.start)):hw(e.start,t.start),end:"timeZone"in t.end?t.end.set(hb(e.end)):hw(e.end,t.end)}),f(null),g(null),C.commitValidation()},v=n=>{let r="function"==typeof m?m():m;d?bg(n)&&(r||h?.start&&h?.end)?y(n,{start:h?.start||yQ(e.placeholderValue),end:h?.end||yQ(e.placeholderValue)}):f(n):bg(n)?(l(n),C.commitValidation()):f(n),r&&t.setOpen(!1)},b=e=>{bg(p)&&bg(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=yK(yY(e?.start??null,D,E,_,x),yY(e?.end??null,D,E,_,x)),e?.end!=null&&null!=e.start&&0>e.end.compare(e.start)&&(t=yK(t,{isInvalid:!0,validationErrors:[(fI.getGlobalDictionaryForPackage("@react-stately/datepicker")||yZ).getStringForLocale("rangeReversed",yG())],validationDetails:{...yI,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),t},[s,D,E,_,x]),C=yU({...e,value:n,name:(0,lr.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:S}),k=C.displayValidation.isInvalid,P=e.validationState||(k?"invalid":null);return{...C,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)&&bg(p)&&d&&y(p,{start:h?.start||yQ(e.placeholderValue),end:h?.end||yQ(e.placeholderValue)}),t.setOpen(n)},validationState:P,isInvalid:k,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=yX(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 fP(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 fP(t,yX(n,{granularity:l,timeZone:i,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:m.format(c),end:r.format(d)}},getDateFormatter:(e,t)=>new fP(e,yX({},{...x,...t}))}}({...e,validationBehavior:o}),s=(0,lr.useRef)(null),[l,u]=mC(!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=fW((r=yC)&&r.__esModule?r.default:r,"@react-aria/datepicker"),{isInvalid:o,validationErrors:i,validationDetails:s}=t.displayValidation,{labelProps:l,fieldProps:u,descriptionProps:c,errorMessageProps:d}=yT({...e,labelElementType:"span",isInvalid:o,errorMessage:e.errorMessage||i}),m=u["aria-labelledby"]||u.id,{locale:p}=fx(),f=t.formatValue(p,{month:"long"}),h=h5(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=my(),b=my(),w=yk(t,n),x=[h["aria-describedby"],u["aria-describedby"]].filter(Boolean).join(" ")||void 0,D=(0,lr.useMemo)(()=>yx(n,{accept:e=>e.id!==v}),[n,v]),E={[yM]:D,[y$]:"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},_=mL(e),S=(0,lr.useRef)(!1),{focusWithinProps:C}=p2({...e,isDisabled:t.isOpen,onBlurWithin:t=>{mW(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))}}),k=(0,lr.useRef)(yF),P=(0,lr.useRef)(yF);return{groupProps:mw(_,w,u,h,C,{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,[yV]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){k.current=e,t.updateValidation(yK(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,[yV]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){P.current=e,t.updateValidation(yK(k.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}}({...mk(e),label:u,validationBehavior:o},i,s),[w,x]=(0,lr.useState)(null),D=(0,lr.useCallback)(()=>{s.current&&x(s.current.offsetWidth+"px")},[]);vH({ref:s,onResize:D});let{focusProps:E,isFocused:_,isFocusVisible:S}=p3({within:!0}),C=mE({...e,values:{state:i,isFocusWithin:_,isFocusVisible:S,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DateRangePicker"}),k=mL(e);return delete k.id,la().createElement(mD,{values:[[bw,i],[yt,{...c,ref:s,isInvalid:i.isInvalid}],[fr,{...f,isPressed:i.isOpen}],[vb,{...d,ref:l,elementType:"span"}],[g0,g],[vp,i],[bm,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":w}}],[vm,h],[vt,{slots:{start:m,end:p}}],[fi,{slots:{description:y,errorMessage:v}}],[vh,b]]},la().createElement("div",{...E,...k,...C,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 bE(e){return la().createElement(fw,e)}function b_(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 hs||e instanceof hu||e instanceof hc)return t?hx(e,t):e;{let n=uJ()(e).toDate(),r=new hs(n.getFullYear(),n.getMonth()+1,n.getDate());return t?hx(r,t):r}}function bS(e){if(e)return e.toDate(h$())}function bC(e){if("string"==typeof e&&0!==e.trim().length)try{return new Intl.Locale(e.replace(/[_@]/g,"-")).toString()}catch{return}}function bk(e){let t=e??"",n=bC(t);if(!n)return t;try{return new Intl.DisplayNames([n],{type:"language"}).of(n)??t}catch{return t}}function bP(){let e=window.i18next.language,t=bC(e)??e;return"ht"===t&&(t="fr-HT"),t}if("u">typeof navigator){let e=navigator;er=Array.isArray(e.languages)?e.languages[0]:e.language}else if("u">typeof process){let e=process.env;er=e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}var bT=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch{return"en-US"}}(er||"en-US"),bR=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},bO={};for(let e=1;e<100;e++)bO[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var bN={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},b$="[1234567890一二三四五六七八九〇\\d]",bM={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},bA={},bj={"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},bI={zone:bj,year:bO,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:{}},bL={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(bj).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,}"},bF={...bL,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}"},bB={},bV=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(t=bT){return bB[t.toLowerCase()]||(bB[t.toLowerCase()]=new e(t)),bB[t.toLowerCase()]}constructor(e=bT){this.locale=e,this.lookups={...bI},this.vars={...bL};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=bM: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(bA[e])return bA[e];if("fullwide"===e||"hanidec"===e)return{group:b$,lookup:{...bM}};let t=bN[e];if(!t)return{group:"\\d",lookup:{...bM}};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 bA[e]={group:`[${n}-${r}]`,lookup:a},bA[e]}(this.numberingSystem);for(let n in this.lookups.digit=t,bF)bF.hasOwnProperty(n)&&(this.vars[n]=bF[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")}},bU=["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"],bW={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},bH=()=>new Date;function bz(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 bK=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"],bG={};function bY(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 bq=[[/([^\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"]],bJ={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," "],...bq],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:bq,id:bq,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function bX(e,t=bT){let n=function(e){if(!bG[e]){var t,n;let r,a,o=bV.factory(e);bG[e]=new bK({doneChecker:bY,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:bz(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:o.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:bz(["","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:bz(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:o.compile(`^(${b$}{2,4})\\s*\u5E74\\s*(${b$}{1,2})\\s*\u6708\\s*(${b$}{1,2})\\s*\u65E5$`),handler:bz(["","year","month","day"])},{name:"korean",regex:o.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:bz(["","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:bz(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let t=bH(),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?bW[n]:(n=n.replace(/s$/,"")).toLowerCase())&&(n="day",t*=7),("-"===e||r)&&(t*=-1);let a=bH();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:bz(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:o.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:bz(["","hour","minute","second","millisecond","zone"])},{name:"hms12",regex:o.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:bz(["","hour","minute","second","meridiem"])},{name:"hms24",regex:o.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:bz(["","hour","minute","second","millisecond"])},{name:"hm12",regex:o.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:bz(["","hour","minute","meridiem"])},{name:"hm24",regex:o.compile("(_H24_):(_MIN_)"),handler:bz(["","hour","minute"])},{name:"h12",regex:o.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:bz(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:bz(["","year","month","day"])},{name:"yearMonthnameDay",regex:o.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:bz(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:o.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:bz(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:o.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:bz(["","monthname","day","","year"])},{name:"dayMonthname",regex:o.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:bz(["","day","","monthname"])},{name:"monthnameDay",regex:o.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:bz(["","monthname","day"])},{name:"hmsNoMeridiem",regex:o.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:bz(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:o.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:bz(["","hour","minute"])},{name:"ymd",regex:o.compile("(_YEAR4_)([.-])(_MONTH_)\\2+(_DAY_)"),handler:bz(["","year","","month","day"])},{name:"mdy",regex:o.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:bz(["","month","","day","year"])},{name:"dmy",regex:o.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:bz(["","day","month","year"])},{name:"yearLoose",regex:o.compile("_YEAR4_"),handler:bz(["year"])},{name:"dayMonthnameLoose",regex:o.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:bz(["","day","monthname"])},{name:"monthnameDayLoose",regex:o.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:bz(["","monthname","day"])},{name:"monthname",regex:o.compile("_MONTHNAME_"),handler:bz(["monthname"])},{name:"year4",regex:o.compile("_YEAR4_"),handler:bz(["year"])},{name:"md",regex:o.compile("(_MONTH_)[/-](_DAY_)"),handler:bz(["","month","day"])},{name:"dm",regex:o.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:bz(["","day","month"])},{name:"day",regex:o.compile("_DAY_"),handler:bz(["day"])},{name:"year2",regex:o.compile("_YEAR2_"),handler:bz(["year"])},{name:"onlyZone",regex:o.compile("_ZONE_"),handler:bz(["zone"])}],a=o.baseName.slice(0,5),bU.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=bO[t.year]),t.year&&"buddhist"===n.dateOptions.calendar&&(t.year-=543),t})})}return bG[e]}(t),r=function(e,t){let n=bJ[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 bQ(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let t=new bR(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 bR(t.valueOf()-60*e.offset*1e3):t}function b0(e,t=bT){let n=bX(e,t),r=n.invalid?new bR(NaN):bQ(n);return r.isValid()||(r.invalid=`Unable to parse date "${e}"`),r}function b1(e,t=bT){return e instanceof Date?new bR(e.valueOf()):"number"==typeof e?new bR(e):b0(e,t)}Date.fromString=bR.fromString=b0,Date.fromAny=bR.fromAny=b1,"u">typeof window&&(window.anyDateParser={fromString:b0,fromAny:b1,fromObject:bQ,attempt:bX});var b4=n(4397),b2=n(7657);let b3=function(e){return null==e};function b6(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}uJ().extend(uX),uJ().extend(b2),uJ().extend(b4);let b5="YYYY-MM-DDTHH:mm:ss.SSSZZ",b9=/^(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?$/;function b8(e,t){let n=b9.exec(e);if(!n)return bX(e,t);let r=Number(n[1]),a=void 0===n[2]?void 0:Number(n[2]),o=void 0===n[3]?void 0:Number(n[3]),i=new Date(0);return(i.setUTCFullYear(r,(a??1)-1,o??1),i.getUTCFullYear()!==r||i.getUTCMonth()!==(a??1)-1||i.getUTCDate()!==(o??1))?{invalid:`Invalid ISO calendar date '${e}'`}:{year:r,...void 0!==a&&{month:a},...void 0!==o&&{day:o}}}function b7(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&uJ()(e,b5).isValid()}function we(e){return uJ()(e).isToday()}function wt(e){return b7(e)?uJ()(e,b5).toDate():null}function wn(e,t=!1){let n=uJ()(e);return t&&(n=n.utc()),n.format(b5)}function wr(e){return uJ()(e).toDate()}var wa=new WeakMap;let wo=new class{register(e,t){b6(this,wa).set(e,t)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let t=`${e.language}-${e.region}`;if(b6(this,wa).has(t))return b6(this,wa).get(t)}if(e.language&&b6(this,wa).has(e.language))return b6(this,wa).get(e.language);let t=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return b6(this,wa).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,wa,{writable:!0,value:new Map})}};function wi(e,t){wo.register(e,t)}function ws(e){let t=e??bP();return wo.getCalendar(t instanceof Intl.Locale?t:new Intl.Locale(t))}let wl={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function wu(e,t={}){let n=b8(e,bP());if(n.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!b3(n.day)&&b3(n.month)&&(n=Object.assign({},tf(n,"day"),{month:n.day})),n.month&&(n.month-=1),n.day&&(n=Object.assign({},tf(n,"day"),{date:n.day}));let r=uJ()().set(n).toDate();return b3(n.year)&&(t.year=!1),b3(n.month)&&(t.month=!1),b3(n.date)&&(t.day=!1),wc(r,t)}function wc(e,t){let n,r=t?.locale??bP(),a=new Intl.Locale(r),{calendar:o,mode:i,time:s,day:l,month:u,year:c,noToday:d,numberingSystem:m}={...wl,...{noToday:"am"===a.language},...t},p={calendar:o??ws(a),year:c?"numeric":void 0,month:u?"short":void 0,day:l?"2-digit":void 0,numberingSystem:m},f=uJ()(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(wd("-"))),"wide"==i&&(t=t.map(wd(" — "))),"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+=`, ${wm(e)}`),n}let wd=e=>(t,n,r)=>"literal"!==t.type||" "!==t.value||n<r.length-1&&"era"===r[n+1].type?t:{type:"literal",value:e};function wm(e){return e.toLocaleTimeString(bP(),{hour:"2-digit",minute:"2-digit"})}function wp(e,t){return wc(e,{...t,time:!0})}function wf(e,t){let n=ws("string"==typeof t?new Intl.Locale(t):t);return n?hx(e,gL(n)):e}function wh(e,t){return new Intl.DurationFormat(bP(),t).format(e)}function wg(e,t){if(null==e)return null;if("string"==typeof e){let n=b8(e,bP());return n.invalid?(console.warn(`Could not interpret '${e}' as a date`),null):(n.day&&!n.month&&(n={...tf(n,"day"),...{month:n.day}}),n.month&&(n.month-=1),n.day&&(n={...tf(n,"day"),...{date:n.day}}),uJ()(t).set(n))}return uJ()(e)}let wy=["years","months","days","hours","minutes","seconds"],wv={second:"seconds",minute:"minutes",hour:"hours",day:"days",month:"months",year:"years"},wb={seconds:45,minutes:45,hours:22,days:26,months:11,years:1/0};function ww(e,t=uJ()(),n){let r,a=uJ()(t),o=wg(e,a);if(null==o)return null;if("string"==typeof n){let e=wv[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?wv[l]??l:void 0;return e="auto"===s||void 0===s?function(e,t,n){let r=wy.indexOf(n);for(let a=0;a<wy.length;a++){let o=wy[a];if(t.diff(e,o)>0)return a<=r?o:n}return n}(o,a,t??"seconds"):wv[s]??s,function(e,t,n,r){let a=wy.indexOf(n),o=wy.indexOf(r),i=wy.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={...wb};if(e)for(let[n,r]of Object.entries(e))void 0!==r&&(t[wv[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 wx={style:"short",localeMatcher:"lookup"};function wD(e,t=uJ()(),n){let r=ww(e,t,n);return null==r?null:wh(r,"object"==typeof n&&n.formatOptions?{...wx,...n.formatOptions}:wx)}let wE=(0,lr.createContext)(null);function w_(){let e=uo({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,t=(0,lr.useMemo)(()=>{let t=bP();return e[t]&&(t=e[t]),t},[window.i18next.language]),n=(0,lr.useMemo)(()=>{let e=ws(t);return void 0!==e?gL(e):void 0},[t]),r=(0,lr.useMemo)(()=>new Intl.Locale(t,{calendar:n?.identifier}),[t,n]),a=(0,lr.useMemo)(()=>n?hx(hT(h$()),n):hT(h$()),[n]);return{calendar:n,intlLocale:r,today_:a}}let wS=new hs(1793,1,1);var wC={};function wk(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}function wP(e={}){let{locale:t}=fx();return(0,lr.useMemo)(()=>new(0,y5.K)(t,e),[t,e])}wC={"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 wT={};wT={"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 wR=()=>{};function wO(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=fW((t=wT)&&t.__esModule?t.default:t,"@react-aria/spinbutton"),y=(0,lr.useRef)(!1),v=(0,lr.useCallback)(()=>{clearTimeout(n.current),y.current=!1},[]),b=pU(()=>{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&&(fD&&fD.clear("assertive"),fE(E,"assertive"))},[E]);let _=(0,lr.useCallback)(()=>{v()},[v]),S=pU(c??wR),C=pU(m??wR),k=pU(()=>{(void 0===i||isNaN(i)||void 0===r||isNaN(r)||r<i)&&(S(),P(60))}),P=pU(e=>{b(),y.current=!0,n.current=window.setTimeout(k,e)}),T=pU(()=>{(void 0===o||isNaN(o)||void 0===r||isNaN(r)||r>o)&&(C(),R(60))}),R=pU(e=>{b(),y.current=!0,n.current=window.setTimeout(T,e)}),O=e=>{e.preventDefault()},{addGlobalListener:N,removeAllGlobalListeners:$}=pW(),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")):(N(window,"pointercancel",_,{capture:!0}),M.current=!1,j("touch")),N(window,"contextmenu",O)},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")):(N(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 wN=null;var w$=n(2103);function wM(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 wA=(0,lr.createContext)(null),wj=(0,lr.createContext)(null),wI=(0,lr.forwardRef)(function(e,t){var n,r;[e,t]=mS(e,t,wA);let{validationBehavior:a}=m_(vv)||{},o=null!=(r=null!=(n=e.validationBehavior)?n:a)?r:"native",{locale:i}=fx(),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)?vS(e,t,n):vk(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]=gZ(o,isNaN(i)?NaN:i,s),[h]=(0,lr.useState)(p),[g,y]=(0,lr.useState)(()=>isNaN(p)?"":new(0,y5.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,y5.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=yU({...e,value:p}),_=void 0===r||isNaN(r)?1:r;"percent"===x.style&&(void 0===r||isNaN(r))&&(_=.01);let[S,C]=(0,lr.useState)(p),[k,P]=(0,lr.useState)(l),[T,R]=(0,lr.useState)(a);Object.is(p,S)&&l===k&&a===T||(y(D(p)),C(p),P(l),R(a));let O=(0,lr.useMemo)(()=>v.parse(g),[v,g]),N=(e,r=0)=>{if(isNaN(O))return vk(isNaN(r)?0:r,t,n,_);{let r=vk(O,t,n,_);return"+"===e&&r>O||"-"===e&&r<O?r:vk(wM(e,O,_),t,n,_)}},$=(0,lr.useMemo)(()=>!u&&!c&&(isNaN(O)||void 0===n||isNaN(n)||vk(O,t,n,_)>O||wM("+",O,_)<=n),[u,c,t,n,_,O]),M=(0,lr.useMemo)(()=>!u&&!c&&(isNaN(O)||void 0===t||isNaN(t)||vk(O,t,n,_)<O||wM("-",O,_)>=t),[u,c,t,n,_,O]);return{...E,validate:e=>v.isValidPartialNumber(e,t,n),increment:()=>{let e=N("+",t);e===p&&y(D(e)),f(e),E.commitValidation()},incrementToMax:()=>{null!=n&&(f(vk(n,t,n,_)),E.commitValidation())},decrement:()=>{let e=N("-",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:O,defaultNumberValue:isNaN(i)?h:i,setNumberValue:f,setInputValue:y,inputValue:g,commit:e=>{let t=void 0===e?g:e,n=O;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]=mC(!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:C,onKeyDown:k,onKeyUp:P,description:T,errorMessage:R,isWheelDisabled:O,...N}=e,{increment:$,incrementToMax:M,decrement:A,decrementToMin:j,numberValue:I,inputValue:L,commit:F,commitValidation:B}=t,V=fW((r=wC)&&r.__esModule?r.default:r,"@react-aria/numberfield"),U=(0,lr.useCallback)(()=>{let e=n.current?.value??"";(0,pH.flushSync)(()=>{F()}),n.current?.value!==e&&fE(n.current?.value??"","assertive")},[F,n]),W=my(p),{focusProps:H}=pP({onBlur(){U()}}),z=wP(E),K=(0,lr.useMemo)(()=>z.resolvedOptions(),[z]),Z=wP({...E,currencySign:void 0}),G=(0,lr.useMemo)(()=>isNaN(I)?"":Z.format(I),[Z,I]),{spinButtonProps:Y,incrementButtonProps:q,decrementButtonProps:J}=wO({isDisabled:g,isReadOnly:y,isRequired:v,maxValue:w,minValue:b,onIncrement:$,onIncrementToMax:M,onDecrement:A,onDecrementToMin:j,value:I,textValue:G}),[X,Q]=(0,lr.useState)(!1),{focusWithinProps:ee}=p2({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]);hX(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:O||g||y||!X},n);let et=(K.maximumFractionDigits??0)>0,en=void 0===t.minValue||isNaN(t.minValue)||t.minValue<0,er="numeric";m8()?en?er="text":et&&(er="decimal"):pr()&&(en?er="numeric":et&&(er="decimal"));let ea=mL(e),eo=(0,lr.useCallback)(e=>{e.nativeEvent.isComposing||("Enter"===e.key?((0,pH.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=pU(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(!wk()||!n.current)return;let e=n.current;return e.addEventListener("beforeinput",r,!1),()=>{e.removeEventListener("beforeinput",r,!1)}},[n]);let a=wk()?null:e=>{let n=mH(e).value.slice(0,mH(e).selectionStart)+e.data+mH(e).value.slice(mH(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]=gZ(e.value,e.defaultValue||"",e.onChange),{focusableProps:c}=pN(e,t),d=yU({...e,value:l}),{isInvalid:m,validationErrors:p,validationDetails:f}=d.displayValidation,{labelProps:h,fieldProps:g,descriptionProps:y,errorMessageProps:v}=yT({...e,isInvalid:m,errorMessage:e.errorMessage||p}),b=mL(e,{labelable:!0}),w={type:i,pattern:e.pattern},[x]=(0,lr.useState)(l);return yR(t,e.defaultValue??x,u),yO(e,d,t),{labelProps:h,inputProps:mw(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(mH(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:mw(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}}({...N,...ea,name:void 0,form:void 0,label:D,autoFocus:x,isDisabled:g,isReadOnly:y,isRequired:v,validate:void 0,[yV]: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:C,onKeyDown:(0,lr.useMemo)(()=>ma(eo,k),[eo,k]),onKeyUp:P,onPaste:t=>{e.onPaste?.(t);let n=mH(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);yR(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,mo(()=>{let e=s.current;if("validate"!==i||a.realtimeValidation.isInvalid||!e||e.disabled||(!wN&&"u">typeof document&&((wN=document.createElement("input")).type="number"),!wN))return;wN.min=null==l||isNaN(l)?"":String(l),wN.max=null==u||isNaN(u)?"":String(u),wN.step=null==c||isNaN(c)?"":String(c),wN.value=null==d||isNaN(d)?"":String(d);let t=e.validity.valid&&wN.validity.valid,n=e.validationMessage||wN.validationMessage,r={isInvalid:!t,validationErrors:n?[n]:[],validationDetails:{badInput:e.validity.badInput,customError:e.validity.customError,patternMismatch:e.validity.patternMismatch,rangeOverflow:wN.validity.rangeOverflow,rangeUnderflow:wN.validity.rangeUnderflow,stepMismatch:wN.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||wN.validity.valid||e.setCustomValidity(wN.validationMessage)});let ep=mw(Y,H,ec,{role:null,"aria-roledescription":pe()?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=my(),ey=my(),ev=mw(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=mw(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}}({...mk(e),label:c,validationBehavior:o},s,l),b=mE({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:v.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),w=mL(e);return delete w.id,la().createElement(mD,{values:[[wj,s],[yt,m],[yr,{...p,ref:l}],[vb,{...d,ref:u}],[fr,{slots:{increment:f,decrement:h}}],[fi,{slots:{description:g,errorMessage:y}}],[vh,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 wL(e,t){return Number.parseInt(wc(e,{calendar:t.calendar,locale:t.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}let wF=(0,lr.forwardRef)(function(e,t){let{className:n}=e,r=(0,lr.useContext)(g1),a=(0,lr.useContext)(g4),o=r??a,i=(0,lr.useContext)(wE),s=h$(),l=wc(o.visibleRange.start.toDate(s),{calendar:i.calendar,locale:i.baseName,day:!1,year:!1,noToday:!0}),u=wL(o.visibleRange.start.toDate(s),i),c=o.maxValue?wL(o.maxValue.toDate(s),i):void 0,d=o.minValue?wL(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,li.jsxs)("span",{ref:t,className:n,children:[(0,li.jsx)("span",{children:l}),(0,li.jsxs)(wI,{formatOptions:{useGrouping:!1},maxValue:c,minValue:d,onChange:m,value:u,children:[(0,li.jsx)(ya,{}),(0,li.jsxs)(yn,{children:[(0,li.jsx)(fa,{slot:"increment",children:(0,li.jsx)(cF,{size:8})}),(0,li.jsx)(fa,{slot:"decrement",children:(0,li.jsx)(cj,{size:8})})]})]})]})}),wB="-esm-form-engine__datepicker-module__inputGroup___gBam-",wV="-esm-form-engine__datepicker-module__inputSegment___wIJDZ",wU="-esm-form-engine__datepicker-module__dateInputWrapper___LiY68",wW="-esm-form-engine__datepicker-module__invalidText___A4cv4",wH="-esm-form-engine__datepicker-module__flatButton___HcpME",wz="-esm-form-engine__datepicker-module__flatButtonMd___eFpyF",wK="-esm-form-engine__datepicker-module__flatButtonSm___tsawR",wZ="-esm-form-engine__datepicker-module__flatButtonLg___4HG5y";function wG({children:e}){let t=(0,lr.useContext)(bb),n=(0,lr.useContext)(bw),r=t??n,a=uL(()=>r?.close());return(0,li.jsx)(vf,{className:"-esm-form-engine__datepicker-module__dialog___DaqYi",ref:a,children:e})}let wY=(0,lr.forwardRef)(function({variant:e,today_:t,minDate:n,maxDate:r},a){let o="range"===e;return(0,li.jsx)(bf,{ref:a,className:"-esm-form-engine__datepicker-module__popover___nAPzC",placement:"bottom start",offset:1,isNonModal:!0,children:(0,li.jsx)(wG,{children:(0,li.jsxs)(o?g3:g2,{...o?{minValue:n,maxValue:r,className:"cds--date-picker__calendar"}:{},children:[(0,li.jsxs)("header",{className:"-esm-form-engine__datepicker-module__header___rPv3L",children:[(0,li.jsx)(fa,{className:cu()(wH,wz),slot:"previous",children:(0,li.jsx)(cK,{size:16})}),(0,li.jsx)(wF,{className:"-esm-form-engine__datepicker-module__monthYear___Rw4qE"}),(0,li.jsx)(fa,{className:cu()(wH,wz),slot:"next",children:(0,li.jsx)(cZ,{size:16})})]}),(0,li.jsx)(g5,{className:"-esm-form-engine__datepicker-module__calendarGrid___yKV-n",children:e=>(0,li.jsx)(ye,{className:cu()("cds--date-picker__day",{"-esm-form-engine__datepicker-module__today___KzMTn":0===t.compare(e)}),date:e},e.toString())})]})})})}),wq=(0,lr.forwardRef)(function(e,t){let n=(0,lr.useContext)(bb),[r,a]=mS({slot:e.slot},t,vt),{locale:o}=fx(),i=ve({...r,locale:o,createCalendar:gL}),s=(0,lr.useRef)(null),{fieldProps:l,inputProps:u}=yA({...r,inputRef:s},i,a),c=(0,lr.useCallback)(()=>{i.isDisabled||n.toggle()},[]);return(0,li.jsxs)(mD,{values:[[vn,i],[yr,{...u,ref:s}],[yt,{...l,ref:a,isInvalid:i.isInvalid}]],children:[(0,li.jsx)(yn,{...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,li.jsx)(ya,{})]})}),wJ=(0,lr.forwardRef)(function(e,t){let n=(0,lr.useContext)(bb),r=(0,lr.useContext)(bw);return(n??r).isInvalid?(0,li.jsx)(d1,{ref:t,size:16,...e}):(0,li.jsx)(cA,{ref:t,size:16,...e})});class wX{constructor(e,t){this.locale=e,this.dictionary=t}of(e){return this.dictionary.getStringForLocale(e,this.locale)}}let wQ=new Map,w0=(0,lr.forwardRef)(function({segment:e,...t},n){let r=(0,lr.useContext)(vn),a=mt(n),{segmentProps:o}=function(e,t,n){let r,a,o,i,s=(0,lr.useRef)(""),{locale:l,direction:u}=fx(),c=function(){var e;let{locale:t}=fx(),n=fU((e=yC)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,lr.useMemo)(()=>{try{return new Intl.DisplayNames(t,{type:"dateTimeField"})}catch{return new wX(t,n)}},[t,n])}(),{ariaLabel:d,ariaLabelledBy:m,ariaDescribedBy:p,focusManager:f}=yN.get(t),h=e.isPlaceholder?"":e.text,g=(0,lr.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),y=f$({month:"long",timeZone:g.timeZone}),v=f$({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}=wO({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}=fx(),n=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(wQ.has(n))return wQ.get(n);let r=new Intl.Collator(t,e);return wQ.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=f$({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]),C=f$({year:"numeric",era:"narrow",timeZone:"UTC"}),k=(0,lr.useMemo)(()=>{if("era"!==e.type)return[];let n=hx(new hs(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:C.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},[C,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=k.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}}};hX((0,lr.useRef)("u">typeof document?document:null),"selectionchange",()=>{let e=window.getSelection();e?.anchorNode&&mW(n.current,e?.anchorNode)&&e.collapse(n.current)});let T=(0,lr.useRef)("");hX(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)}}),hX(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))}),mo(()=>{let e=n.current;return()=>{((e=document)=>e.activeElement)()===e&&(f.focusPrevious()||f.focusNext())}},[n,f]);let R=pe()||"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 O=my(),N=!t.isDisabled&&!t.isReadOnly&&e.isEditable,$="literal"===e.type?"":c.of(e.type),M=hZ({"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:mw(b,M,{id:O,...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:N,suppressContentEditableWarning:N,spellCheck:N?"false":void 0,autoCorrect:N?"off":void 0,[parseInt(la().version,10)>=17?"enterKeyHint":"enterkeyhint"]:N?"next":void 0,inputMode:t.isDisabled||"dayPeriod"===e.type||"era"===e.type||!N?void 0:"numeric",tabIndex:t.isDisabled?void 0:0,onKeyDown:e=>{if("a"===e.key&&(m9()?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&&h2(n.current,{containingElement:h0(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}=p3(),{hoverProps:u,isHovered:c}=p7({...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,li.jsx)("span",{...mw(mL(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})}),w1={short:!1,size:"md"},w4=(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}={...w1,...e},{calendar:b,intlLocale:w,today_:x}=w_(),D=(0,lr.useId)(),E=!!(u??l),_=(0,lr.useMemo)(()=>b_(r,b),[r,b]),S=(0,lr.useMemo)(()=>b_(y,b,!0),[y,b]),C=(0,lr.useMemo)(()=>b_(d,b),[d,b]),k=(0,lr.useMemo)(()=>b_(m??wS,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?.(bS(e)))),[f,p]);return(0,li.jsx)(bE,{locale:w.toString(),children:(0,li.jsx)("div",{className:cu()("cds--form-item",n),children:(0,li.jsx)(mD,{values:[[wE,w]],children:(0,li.jsxs)(bx,{className:cu()("cds--date-picker","cds--date-picker--single",{"cds--date-picker--short":h,"cds--date-picker--light":c}),defaultValue:_,isDisabled:a,isInvalid:P,maxValue:C,minValue:k,value:S,shouldForceLeadingZeros:"en"===w.language||void 0,...v,onChange:T,children:[(0,li.jsxs)("div",{className:"cds--date-picker-container",children:[E&&(0,li.jsx)(vw,{className:cu()("cds--label",{"cds--label--disabled":a}),htmlFor:D,children:u??l}),(0,li.jsxs)(yn,{className:wB,children:[(0,li.jsx)(wq,{id:E?D:void 0,ref:t,className:cu()("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,li.jsx)(w0,{className:wV,segment:e}):(0,li.jsx)(la().Fragment,{})}),(0,li.jsx)(fa,{className:cu()(wH,{[wK]:"sm"===g,[wz]:"md"===g||!g||0===g.length,[wZ]:"lg"===g}),children:(0,li.jsx)(wJ,{})})]}),(0,li.jsx)(vg,{className:wW,children:i})]}),(0,li.jsx)(wY,{variant:"single",today_:x})]})})})})}),w2=(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}=w_(),w=(0,lr.useId)(),x=!!(s??i),D=(0,lr.useMemo)(()=>{if(f)return{start:b_(f[0],y,!1),end:b_(f[1],y,!1)}},[f,y]),E=(0,lr.useMemo)(()=>{if(t)return{start:b_(t[0],y,!1),end:b_(t[1],y,!1)}},[t,y]),_=(0,lr.useMemo)(()=>b_(c??wS,y,!0),[c,y]),S=(0,lr.useMemo)(()=>b_(u,y,!0),[u,y]),C=(0,lr.useMemo)(()=>n||o,[n,o]),k=(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?.([bS(e.start),bS(e.end)]))),[m,d]);return(0,li.jsx)(bE,{locale:v.toString(),children:(0,li.jsx)("div",{className:cu()("cds--form-item",e),children:(0,li.jsx)(mD,{values:[[wE,v]],children:(0,li.jsx)(bD,{id:x?w:void 0,className:cu()("cds--date-picker",{"cds--date-picker--light":l,"cds--date-picker--disabled":a}),isInvalid:C,shouldForceLeadingZeros:"en"===v.language||void 0,maxValue:S,minValue:_,value:D,defaultValue:E,ref:g,isDisabled:a,...h,onChange:k,children:(0,li.jsxs)("div",{className:"cds--date-picker-container",children:[x&&(0,li.jsx)(vw,{className:cu()("cds--label",{"cds--label--disabled":a}),htmlFor:w,children:s??i}),(0,li.jsxs)(yn,{className:wB,children:[(0,li.jsxs)("div",{className:cu()("-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,li.jsx)(va,{className:cu()("cds--date-picker-input__wrapper","-esm-form-engine__datepicker-module__startInput___cWw-5",wU),slot:"start",children:e=>(0,li.jsx)(w0,{className:wV,segment:e})}),(0,li.jsx)("div",{className:"-esm-form-engine__datepicker-module__separator___Ddb4g",children:(0,li.jsx)("span",{"aria-hidden":"true","data-readonly":!0,children:"–"})}),(0,li.jsx)(va,{className:cu()("cds--date-picker-input__wrapper","-esm-form-engine__datepicker-module__endInput___xdYOl",wU),slot:"end",children:e=>(0,li.jsx)(w0,{className:wV,segment:e})})]}),(0,li.jsx)(fa,{className:cu()(wH,{[wK]:"sm"===p,[wz]:"md"===p||!p||0===p.length,[wZ]:"lg"===p}),children:(0,li.jsx)(wJ,{})})]}),(0,li.jsx)(vg,{className:wW,children:r}),(0,li.jsx)(wY,{variant:"range",today_:b,minDate:_,maxDate:S})]})})})})})}),w3=la().createContext(null);function w6(e){let{children:t}=e,n=(0,lr.useContext)(w3),[r,a]=(0,lr.useState)(0),o=(0,lr.useMemo)(()=>({parent:n,modalCount:r,addModal(){a(e=>e+1),n&&n.addModal()},removeModal(){a(e=>e-1),n&&n.removeModal()}}),[n,r]);return la().createElement(w3.Provider,{value:o},t)}function w5(e){let t,{modalProviderProps:n}={modalProviderProps:{"aria-hidden":!!(t=(0,lr.useContext)(w3))&&t.modalCount>0||void 0}};return la().createElement("div",{"data-overlay-container":!0,...e,...n})}function w9(e){return la().createElement(w6,null,la().createElement(w5,e))}function w8(e){let t=mf(),{portalContainer:n=t?null:document.body,...r}=e,{getContainer:a}=vu();if(!e.portalContainer&&a&&(n=a()),la().useEffect(()=>{if(n?.closest("[data-overlay-container]"))throw Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.")},[n]),!n)return null;let o=la().createElement(w9,r);return pz().createPortal(o,n)}let w7=la().createContext(null),xe=la().forwardRef(function(e,t){let{children:n,...r}=e,a=mt(t),o={...r,ref:a};return la().createElement(w7.Provider,{value:o},n)}),xt={},xn=0,xr=!1,xa=null,xo=null;function xi(e={}){let{delay:t=1500,closeDelay:n=500}=e,{isOpen:r,open:a,close:o}=bd(e),i=(0,lr.useMemo)(()=>`${++xn}`,[]),s=(0,lr.useRef)(null),l=(0,lr.useRef)(o),u=()=>{xt[i]=m},c=()=>{for(let e in xt)e!==i&&(xt[e](!0),delete xt[e])},d=()=>{s.current&&clearTimeout(s.current),s.current=null,c(),u(),xr=!0,a(),xa&&(clearTimeout(xa),xa=null),xo&&(clearTimeout(xo),xo=null)},m=e=>{e||n<=0?(s.current&&clearTimeout(s.current),s.current=null,l.current()):s.current||(s.current=setTimeout(()=>{s.current=null,l.current()},n)),xa&&(clearTimeout(xa),xa=null),xr&&(xo&&clearTimeout(xo),xo=setTimeout(()=>{delete xt[i],xo=null,xr=!1},Math.max(500,n)))};return(0,lr.useEffect)(()=>{l.current=o},[o]),(0,lr.useEffect)(()=>()=>{s.current&&clearTimeout(s.current),xt[i]&&delete xt[i]},[i]),{isOpen:r,open:e=>{e||!(t>0)||s.current?d():(c(),u(),r||xr?r||d():(xa&&clearTimeout(xa),xa=setTimeout(()=>{xa=null,xr=!0,d()},t)))},close:m}}let xs=(0,lr.createContext)(null),xl=(0,lr.createContext)(null);function xu(e){let t=xi(e),n=(0,lr.useRef)(null),{triggerProps:r,tooltipProps:a}=function(e,t,n){let{isDisabled:r,trigger:a,shouldCloseOnPress:o=!0}=e,i=my(),s=(0,lr.useRef)(!1),l=(0,lr.useRef)(!1),u=()=>{(s.current||l.current)&&t.open(l.current)},c=e=>{s.current||l.current||t.close(e)};(0,lr.useEffect)(()=>{let e=e=>{n&&n.current&&"Escape"===e.key&&(e.stopPropagation(),t.close(!0))};if(t.isOpen)return document.addEventListener("keydown",e,!0),()=>{document.removeEventListener("keydown",e,!0)}},[n,t]);let d=()=>{o&&(l.current=!1,s.current=!1,c(!0))},{hoverProps:m}=p7({isDisabled:r,onHoverStart:()=>{"focus"!==a&&("pointer"===ps?s.current=!0:s.current=!1,u())},onHoverEnd:()=>{"focus"!==a&&(l.current=!1,s.current=!1,c())}}),{focusableProps:p}=pN({isDisabled:r,onFocus:()=>{px()&&(l.current=!0,u())},onBlur:()=>{l.current=!1,s.current=!1,c(!0)}},n);return{triggerProps:{"aria-describedby":t.isOpen?i:void 0,...mw(p,m,{onPointerDown:d,onKeyDown:d}),tabIndex:void 0},tooltipProps:{id:i}}}(e,t,n);return la().createElement(mD,{values:[[xs,t],[xl,{...a,triggerRef:n}]]},la().createElement(xe,{...r,ref:n},e.children))}let xc=(0,lr.forwardRef)(function({UNSTABLE_portalContainer:e,...t},n){[t,n]=mS(t,n,xl);let r=(0,lr.useContext)(xs),a=xi(t),o=null==t.isOpen&&null==t.defaultOpen&&r?r:a,i=v5(n,o.isOpen)||t.isExiting||!1;return o.isOpen||i?la().createElement(w8,{portalContainer:e},la().createElement(xd,{...t,tooltipRef:n,isExiting:i})):null});function xd(e){let t=(0,lr.useContext)(xs),n=(0,lr.useRef)(null),[r,a]=(0,lr.useState)(0);mo(()=>{n.current&&t.isOpen&&a(n.current.getBoundingClientRect().width)},[t.isOpen,n]);let{overlayProps:o,arrowProps:i,placement:s}=vK({placement:e.placement||"top",targetRef:e.triggerRef,overlayRef:e.tooltipRef,offset:e.offset,crossOffset:e.crossOffset,isOpen:t.isOpen,arrowSize:r,arrowBoundaryOffset:e.arrowBoundaryOffset,shouldFlip:e.shouldFlip,onClose:()=>t.close(!0)}),l=v6(e.tooltipRef,!!s)||e.isEntering||!1,u=mE({...e,defaultClassName:"react-aria-Tooltip",values:{placement:s,isEntering:l,isExiting:e.isExiting,state:t}}),{tooltipProps:c}=function(e,t){let n=mL(e,{labelable:!0}),{hoverProps:r}=p7({onHoverStart:()=>t?.open(!0),onHoverEnd:()=>t?.close()});return{tooltipProps:mw(n,r,{role:"tooltip"})}}(e=mw(e,o),t);return la().createElement("div",{...c,ref:e.tooltipRef,...u,style:{...o.style,...u.style},"data-placement":null!=s?s:void 0,"data-entering":l||void 0,"data-exiting":e.isExiting||void 0},la().createElement(vx.Provider,{value:{...i,placement:s,ref:n}},u.children))}let xm=({diagnoses:e,showCertainty:t=!1})=>{let{diagnosisTags:n}=uo({externalModuleName:"@openmrs/esm-styleguide"});return(0,li.jsx)("div",{className:"-esm-form-engine__diagnosis-tags-module__container___1iigI",children:e.map(e=>{let r=t&&"PROVISIONAL"===e.certainty,a=1===e.rank?n?.primaryColor??"blue":n?.secondaryColor??"gray";return(0,li.jsx)(xp,{color:a,isProvisional:r,name:e.display},e.uuid)})})};function xp({color:e,isProvisional:t,name:n}){let[r,a]=(0,lr.useState)(!1),[o,i]=(0,lr.useState)(!1),[s,l]=(0,lr.useState)(!1),u=s||o,c=(0,lr.useRef)(null);(0,lr.useLayoutEffect)(()=>{let e=c.current;if(!e)return;let t=()=>{let t=e.scrollWidth>e.clientWidth;l(t),t||a(!1)};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[n,t,u]);let d=cu()("cds--tag","cds--tag--md","cds--layout--size-md",`cds--tag--${e}`,"-esm-form-engine__diagnosis-tags-module__diagnosisTag___mQ28X"),m=(0,li.jsxs)(li.Fragment,{children:[t&&(0,li.jsxs)(li.Fragment,{children:[(0,li.jsx)("span",{"aria-hidden":"true",className:"-esm-form-engine__diagnosis-tags-module__provisionalMark___S+J53",children:"?"}),(0,li.jsxs)("span",{className:"cds--visually-hidden",children:[aL("provisional","Provisional")," "]})]}),(0,li.jsx)("span",{ref:c,className:"cds--tag__label",children:n})]});return u?(0,li.jsxs)(xu,{delay:0,closeDelay:150,isOpen:r,onOpenChange:a,children:[(0,li.jsx)(fa,{className:d,"data-testid":"diagnosis-tag",onFocusChange:i,onPress:()=>a(!0),children:m}),(0,li.jsx)(xc,{className:"-esm-form-engine__diagnosis-tags-module__tagTooltip___50O3+",placement:"bottom",offset:4,containerPadding:8,children:n})]}):(0,li.jsx)("span",{className:d,"data-testid":"diagnosis-tag",children:m})}let xf={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"},xh=({width:e="64",height:t="64"})=>(0,li.jsx)("svg",{width:e,height:t,viewBox:"0 0 64 64",children:(0,li.jsx)("use",{href:"#omrs-empty-data-illustration"})}),xg=e=>{let t="tablet"===uN(),n=e.launchForm;return(0,li.jsx)(cf.Layer,{className:xf.layer,children:(0,li.jsxs)(cf.Tile,{className:xf.tile,children:[(0,li.jsx)("div",{className:t?xf.tabletHeading:xf.desktopHeading,children:(0,li.jsx)("h4",{children:e.headerTitle})}),(0,li.jsx)(xh,{}),(0,li.jsx)("p",{className:xf.content,children:aL("emptyStateText","There are no {{displayText}} to display",{displayText:e.displayText})}),(0,li.jsx)("p",{className:xf.action,children:n&&(0,li.jsx)(cf.Button,{onClick:()=>n(),kind:"ghost",size:t?"lg":"sm",children:aL("recordNewEntry","Record {{ displayText }}",{displayText:e.displayText})})})]})})},xy=({error:e,headerTitle:t})=>{let n="tablet"===uN();return(0,li.jsx)(cf.Layer,{children:(0,li.jsxs)(cf.Tile,{className:"-esm-form-engine__error-state-module__tile___mzWLn",children:[(0,li.jsx)("div",{className:n?"-esm-form-engine__error-state-module__tabletHeading___l7Cpn":"-esm-form-engine__error-state-module__desktopHeading___p57fl",children:(0,li.jsx)("h4",{children:t})}),(0,li.jsxs)("p",{className:"-esm-form-engine__error-state-module__errorMessage___0fU6v",children:[aL("error","Error")," ",`${e?.response?.status}: `,e?.response?.statusText]}),(0,li.jsx)("p",{className:"-esm-form-engine__error-state-module__errorCopy___xkVog",children:aL("errorCopy")})]})})},xv=xy,xb=la().forwardRef((e,t)=>{let{slotName:n,basePath:r,componentContext:a,state:o}=uA(),i=window.location??{pathname:""},s=lb(n??"");return e.isChildOfHeader&&n&&s.length>0?(0,li.jsxs)(cf.SideNav,{"aria-label":aL("leftNavigation","Left navigation"),className:"-esm-form-engine__left-nav-module__leftNav___czP9T",expanded:!0,isFixedNav:!0,ref:t,...e,children:[(0,li.jsx)(lD,{name:"global-nav-menu-slot"}),n?(0,li.jsx)(l3,{value:a,fallback:(0,li.jsx)(lD,{name:n,state:{basePath:r,currentPath:i,...o}}),children:(0,li.jsx)(lo.Provider,{value:a,children:(0,li.jsx)(lD,{name:n,state:{basePath:r,currentPath:i,...o}})})}):null]}):null}),xw=({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}=uu()(t,a1,{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=us(n),{data:a,isLoading:o,isValidating:i,setSize:s,error:l}=u_()(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=`${aX}/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()},a1);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=uF((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,li.jsxs)(li.Fragment,{children:[(0,li.jsx)(cf.Search,{"aria-describedby":p?`${s}-error`:void 0,labelText:aL("searchForLocation"),id:s,placeholder:aL("searchForLocation"),onChange:e=>g(e.target.value),size:"lg"}),p&&(0,li.jsx)("div",{className:"-esm-form-engine__location-picker-module__errorNotification___NfvTe",id:`${s}-error`,children:(0,li.jsx)(cf.InlineNotification,{kind:"error",subtitle:aL("errorLoadingLoginLocations","Unable to load login locations. Please try again or contact support if the problem persists."),title:aL("error","Error")})}),(0,li.jsx)("div",{className:"-esm-form-engine__location-picker-module__searchResults___agplm",children:c?(0,li.jsx)("div",{className:"-esm-form-engine__location-picker-module__loadingContainer___EHghS",children:Array.from({length:5}).map((e,t)=>(0,li.jsx)(cf.RadioButtonSkeleton,{className:"-esm-form-engine__location-picker-module__radioButtonSkeleton___up5rH",role:"progressbar"},t))}):(0,li.jsxs)(li.Fragment,{children:[(0,li.jsx)("div",{className:"-esm-form-engine__location-picker-module__locationResultsContainer___06YOS",children:h.length>0?(0,li.jsx)(cf.RadioButtonGroup,{name:"loginLocations",onChange:e=>{a(e?.toString())},orientation:"vertical",valueSelected:e,children:h.map((e,t)=>(0,li.jsx)(cf.RadioButton,{className:"-esm-form-engine__location-picker-module__locationRadioButton___yKif7",id:e.resource.id,labelText:(0,li.jsx)("span",{ref:t===v?y:null,children:e.resource.name}),name:e.resource.name,value:e.resource.id},e.resource.id))}):(0,li.jsx)("div",{className:"-esm-form-engine__location-picker-module__emptyState___cPWp8",children:(0,li.jsx)("p",{className:"-esm-form-engine__location-picker-module__locationNotFound___b14++",children:aL("noResultsToDisplay")})})}),m&&(0,li.jsx)("div",{className:"-esm-form-engine__location-picker-module__loadingIcon___GVlrq",children:(0,li.jsx)(cf.InlineLoading,{description:aL("loading")})})]})})]})},xx=V("modalState",{modalContainer:null,modalStack:[]}),xD=0;async function xE(e,t,n={}){let r=sJ(t),a=null;if(e){if(!r)throw Error(`No modal named '${t}' has been registered.`);let{load:o}=r,i=await o(),s=xD++;a=await s7({...i,name:`${t}-${s}`},{...n,domElement:e})}else P(`Failed to launch modal. Please notify your administrator. Modal name: ${t}`);return a}function x_(e){return"TO_BE_DELETED"===e.state||"DELETED"===e.state}function xS(e,t){t?.unmount&&(t.unmountPromise?.catch(()=>{}),t.unmount().catch(t=>{console.error(`The modal '${e}' failed to unmount`,t)}))}function xC(e){return e.find(e=>!x_(e))}function xk(e,t){e.container&&(e.container.style.visibility=t?"unset":"hidden")}let xP=window.getComputedStyle(document.body).overflow;function xT({modalStack:e,modalContainer:t}){if(t)if(e.length){t.style.visibility||(addEventListener("keydown",xO),document.body.style.overflow="hidden",t.style.visibility="unset");let n=xC(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=>{x_(e)?xS(e.modalName,r):r?(e.parcel=r,t.prepend(n),xk(e,xC(xx.getState().modalStack)===e),r.mountPromise.then(()=>{x_(e)||(e.state="MOUNTED")},t=>{P(t),e.parcel=null,xR(e)})):xR(e)},t=>{P(t),xR(e)});break}case"MOUNTING":case"MOUNTED":xk(e,e===n);break;case"TO_BE_DELETED":e.state="DELETED",e.onClose(),xS(e.modalName,e.parcel),e.container?.remove(),setTimeout(()=>{let t=xx.getState();xx.setState({...t,modalStack:t.modalStack.filter(t=>t!==e)})},0)}})}else t.style.removeProperty("visibility"),document.body.style.overflow=xP,removeEventListener("keydown",xO)}function xR(e){if(x_(e))return;e.state="TO_BE_DELETED";let t=xx.getState();xx.setState({...t,modalStack:[...t.modalStack]})}function xO(e){"Escape"===e.key&&function(){let[e]=xx.getState().modalStack;e&&xR(e)}()}function xN(e){xx.subscribe(xT),xx.setState({...xx.getState(),modalContainer:e})}function x$(e,t={},n=()=>{}){let r=()=>{let e=xx.getState().modalStack.find(e=>e.onClose===n);e&&xR(e)};if(sJ(e)){var a;let o,i;a={state:"NEW",onClose:n,modalName:e,props:{close:r,...t}},i=[a,...(o=xx.getState()).modalStack],xx.setState({...o,modalStack:i})}else P(`Failed to launch modal. Please notify your administrator. Modal name: "${e}"`);return r}var xM=n(5992);let xA=({notification:e})=>{let{description:t,action:n,kind:r,critical:a,title:o,onAction:i}=e;return(0,li.jsx)(cf.ActionableNotification,{actionButtonLabel:n,kind:r||"info",lowContrast:a,subtitle:t,title:o||"",inline:!0,onActionButtonClick:i})},xj=({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,li.jsx)(li.Fragment,{children:t.map(e=>(0,li.jsx)(xA,{notification:e},e.id))})},xI=({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,li.jsx)(cf.ActionableNotification,{kind:a||"info",actionButtonLabel:c,"aria-label":aL("closesActionableNotification","Closes actionable notification"),onActionButtonClick:()=>{n(),s&&d(s)},statusIconDescription:aL("actionableNotification","Actionable notification"),subtitle:r,title:o,lowContrast:i,inline:!0,...u})},xL=({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,li.jsx)(li.Fragment,{children:t.map(e=>(0,li.jsx)(xI,{notification:e},e.id))})};class xF{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 xB=new xF,xV=0,xU=new xF,xW=0;function xH(e){e&&(0,lE.createRoot)(e).render((0,li.jsx)(xj,{subject:xB}))}function xz(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&(t instanceof Error||!(0,xM.A)(t)))?(e.description instanceof Error&&(e.description=e.description.toLocaleString()),setTimeout(()=>{xB.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 xK(e){e&&(0,lE.createRoot)(e).render((0,li.jsx)(xL,{subject:xU}))}function xZ(e){var t;e&&("string"==typeof(t=e.actionButtonLabel)?t.trim().length>0:"object"==typeof t&&!(0,xM.A)(t))?setTimeout(()=>{xU.next({...e,id:xW++})},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}let xG=["NORMAL","HIGH","CRITICALLY_HIGH","OFF_SCALE_HIGH","LOW","CRITICALLY_LOW","OFF_SCALE_LOW"],xY=["critically_low","critically_high","high","low","normal","off_scale_low","off_scale_high"],xq={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"},xJ=({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?`${aJ}/conceptreferencerange/?patient=${t}&concept=${e}&v=full`:`${aJ}/conceptreferencerange/?concept=${e}&v=full`);let{data:r,error:a,isLoading:o}=uu()(n,a1),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":xG.includes(r)?r.toLowerCase():xY.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:aL("notAvailable","Not available"),w=cu()({[xq["critically-low"]]:"critically_low"===m||"off_scale_low"===m,[xq["critically-high"]]:"critically_high"===m||"off_scale_high"===m,[xq.low]:"low"===m,[xq.high]:"high"===m,[xq["off-scale-low"]]:"off_scale_low"===m,[xq["off-scale-high"]]:"off_scale_high"===m}),x=cu()({[xq.container]:!0,[xq.card]:!0,[xq["critical-value"]]:p,[xq["abnormal-value"]]:f&&!p}),D=cu()({[xq.cell]:!0,[w]:!0});return"cell"===i?(0,li.jsxs)("div",{className:D,children:[b,v&&t?` ${t}`:""]}):(0,li.jsxs)("section",{className:x,"data-testid":"numeric-observation-card",children:[n&&(0,li.jsxs)("div",{className:xq["label-container"],children:[(0,li.jsx)("span",{id:h,className:xq.label,children:n}),f&&(0,li.jsx)("span",{className:xq[m.replace("_","-")],title:aL("abnormalValue","Abnormal value")})]}),(0,li.jsxs)("div",{className:xq["value-container"],children:[(0,li.jsx)("span",{id:g,"aria-labelledby":h&&y?`${h} ${y}`:h||y||void 0,className:xq.value,children:b}),v&&t&&(0,li.jsx)("span",{id:y,className:xq.units,children:t})]})]})},xX="-esm-form-engine__page-header-module__pageHeader___6TOjO",xQ=e=>{if("children"in e){let{children:t,className:n,...r}=e;return(0,li.jsx)("div",{className:cu()(xX,n),...r,children:t})}{let{title:t,illustration:n,className:r,...a}=e;return(0,li.jsx)("div",{className:cu()(xX,r),...a,children:(0,li.jsx)(x0,{title:t,illustration:n})})}},x0=({title:e,illustration:t,className:n})=>{let[r,a]=(0,lr.useState)(null);return(0,lr.useEffect)(()=>{t9("@openmrs/esm-styleguide").then(e=>{a(e)})},[]),(0,li.jsxs)("div",{className:cu()("-esm-form-engine__page-header-module__pageHeaderContent___mCImT",n),children:[t,(0,li.jsxs)("div",{className:"-esm-form-engine__page-header-module__pageLabels___kqDS+",children:[r?.implementationName&&(0,li.jsx)("p",{children:aL(r.implementationName)}),(0,li.jsx)("h1",{className:"-esm-form-engine__page-header-module__pageName___SbZBC",children:e})]})]})},x1=({totalItems:e,pageSize:t,onPageNumberChange:n,pageNumber:r,dashboardLinkUrl:a,currentItems:o,dashboardLinkLabel:i})=>{let{pageSizes:s,pageItemsCount:l}=uU(t,e,r,o),u="tablet"===uN(),c=aL("paginationItemsCount","{{pageItemsCount}} / {{totalItems}} items",{totalItems:e,pageItemsCount:l});return(0,li.jsx)(li.Fragment,{children:e>0&&(0,li.jsxs)("div",{className:cu()({"-esm-form-engine__pagination-module__tablet___82gj1":u,"-esm-form-engine__pagination-module__desktop___6yI8e":!u}),children:[(0,li.jsxs)("div",{children:[c,a&&(0,li.jsx)(ls,{to:a,className:"-esm-form-engine__pagination-module__configurableLink___oIqma",children:i??aL("seeAll","See all")})]}),(0,li.jsx)(cf.Pagination,{className:"-esm-form-engine__pagination-module__pagination___A-Lcg",page:r,pageSize:t,pageSizes:s,totalItems:e,onChange:n,pageRangeText:(e,t)=>aL("paginationOfPages","of {{count}} pages",{count:t}),size:u?"lg":"sm"})]})})};function x4(e){return x3(x5(e,"usual","official"))}function x2(e){return x4(e)}function x3(e){var t;let n;return e?e.text??(n=(t=e).given??[],(t.family?n.concat(t.family):n).join(" ")):""}function x6(e){return x3(e)}function x5(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 x9(e,t=uJ()()){let n=uJ()(t),r=wg(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 x8(e,t=uJ()()){let n=x9(e,t);if(null==n)return null;let r={style:"short",localeMatcher:"lookup"};return"minutes"in n&&0===n.minutes&&(r.minutesDisplay="always"),wh(n,r)}let x7={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 De({showIdentifierLabel:e,type:t,value:n}){return(0,li.jsx)("span",{className:x7.primaryIdentifier,children:(0,li.jsxs)(cf.Tag,{className:x7.tag,type:"gray",children:[e&&t?.text&&(0,li.jsxs)("span",{className:x7.label,children:[t.text,": "]}),(0,li.jsx)("span",{className:x7.value,children:n})]})})}function Dt({showIdentifierLabel:e,type:t,value:n}){return(0,li.jsxs)(cf.FormLabel,{className:x7.secondaryIdentifier,id:`patient-banner-identifier-${n}`,children:[e&&(0,li.jsxs)("span",{className:x7.label,children:[t?.text,": "]}),(0,li.jsx)("span",{className:x7.value,children:n})]})}function Dn({identifiers:e,showIdentifierLabel:t}){let{excludePatientIdentifierCodeTypes:n}=uo(),{primaryIdentifierCode:r}=uz(),a=e?.filter(e=>{let t=e.type?.coding?.[0]?.code;return t&&!n?.uuids.includes(t)})??[];return(0,li.jsx)(li.Fragment,{children:a?.length?a.map(({value:e,type:n},o)=>(0,li.jsxs)(la().Fragment,{children:[(0,li.jsx)("span",{className:x7.identifier,children:n?.coding?.[0]?.code===r?(0,li.jsx)(De,{showIdentifierLabel:t,type:n,value:e}):(0,li.jsx)(Dt,{showIdentifierLabel:t,type:n,value:e})}),o<a.length-1&&(0,li.jsx)("span",{className:x7.separator,children:"\xb7"})]},e)):""})}let Dr={Female:c6,Male:c5,Other:c9,Unknown:c8},Da=({gender:e})=>{let t=Dr[e];return t?(0,li.jsx)(t,{fill:"#525252"}):null},Do={male:"Male",female:"Female",other:"Other",unknown:"Unknown"};function Di({patient:e,renderedFrom:t}){var n;let r,a,o=x4(e),i=e?.gender&&(a=Do[r=(n=e.gender).toLowerCase()]??"Unknown",{displayText:aL(r,n),iconKey:a}),s=(0,lr.useMemo)(()=>({patientUuid:e.id,patient:e,renderedFrom:t}),[e.id,e,t]);return(0,li.jsxs)("div",{className:x7.patientInfo,children:[(0,li.jsx)("div",{className:cu()(x7.row,x7.patientNameRow),children:(0,li.jsxs)("div",{className:x7.flexRow,children:[(0,li.jsx)("span",{className:x7.patientName,children:o}),i&&(0,li.jsxs)("div",{className:x7.gender,children:[(0,li.jsx)(Da,{gender:i.iconKey}),(0,li.jsx)("span",{children:i.displayText})]}),(0,li.jsx)(lD,{className:x7.tagsSlot,name:"patient-banner-tags-slot",state:s})]})}),(0,li.jsxs)("div",{className:x7.demographics,children:[e.birthDate&&(0,li.jsxs)(li.Fragment,{children:[(0,li.jsx)("span",{children:x8(e.birthDate)}),(0,li.jsx)("span",{className:x7.separator,children:"\xb7"}),(0,li.jsx)("span",{children:wu(e.birthDate,{time:!1,noToday:!0})}),(0,li.jsx)("span",{className:x7.separator,children:"\xb7"})]}),(0,li.jsx)(Dn,{identifiers:e.identifier,showIdentifierLabel:!0}),(0,li.jsx)(lD,{className:x7.extensionSlot,name:"patient-banner-bottom-slot",state:s})]})]})}var Ds=n(8282);function Dl({patient:e,patientUuid:t,actionsSlotName:n,additionalActionsSlotState:r}){let[a,o]=(0,lr.useState)(!1),{extensions:i}=lw(n),s="tablet"===uN(),l=uL(()=>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,li.jsx)("div",{className:"-esm-form-engine__patient-banner-actions-menu-module__overflowMenuContainer___FbFcO",children:(0,li.jsxs)("div",{"data-overflow-menu":!0,className:cu()("cds--overflow-menu",cy),ref:l,children:[(0,li.jsxs)("button",{className:cu()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":a},cw),"aria-controls":p,"aria-expanded":a,"aria-haspopup":"true",id:m,onClick:f,onKeyDown:g,ref:u,children:[(0,li.jsx)("span",{className:"-esm-form-engine__patient-banner-actions-menu-module__actionsButtonText___hk4xW",children:aL("actions","Actions")})," ",(0,li.jsx)(Ds.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}})]}),(0,li.jsxs)("div",{className:cu()("cds--overflow-menu-options","cds--overflow-menu--flip",cv,{[cb]:a}),"aria-labelledby":m,"data-floating-menu-direction":"bottom",id:p,onKeyDown:g,ref:c,role:"menu",tabIndex:-1,children:[(0,li.jsx)("ul",{className:cu()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":s}),children:(0,li.jsx)(lD,{name:n,state:y},n)}),(0,li.jsx)("span",{})]})]})})}var Du=n(5570),Dc=n.n(Du);function Dd(e){let{patientPhotoConceptUuid:t}=uo({externalModuleName:"@openmrs/esm-styleguide"}),n=t?`${aJ}/obs?patient=${e}&concept=${t}&v=full`:null,{data:r,error:a,isLoading:o}=lB()(e?n:null,a1),i=r?.data?.results[0];return{data:i?{dateTime:i?.obsDatetime,imageSrc:i?.value?.links?.uri}:null,error:a,isLoading:o}}let Dm=({width:e=56,height:t=56,"aria-label":n})=>{let{t:r}=(0,lL.useTranslation)();return(0,li.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,li.jsx)("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),(0,li.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"})]})},Dp="-esm-form-engine__patient-photo-module__avatar___thboZ";function Df({patientUuid:e,patientName:t,alt:n}){let{data:r,isLoading:a}=Dd(e),[o,i]=(0,lr.useState)(null),[s,l]=(0,lr.useState)(!1),u=(0,lr.useMemo)(()=>Dc().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?aL("patientPhotoAlt","Profile photo of {{patientName}}",{patientName:t}):aL("patientAvatarAlt","Avatar for {{patientName}}",{patientName:t})),[n,o,t]);return a||s?(0,li.jsx)(cf.SkeletonIcon,{className:"-esm-form-engine__patient-photo-module__skeleton___WWtyX","data-testid":"skeleton-icon"}):r?.imageSrc&&!o?(0,li.jsx)(Dm,{"aria-label":aL("patientPhotoPlaceholder","Photo placeholder for {{patientName}}",{patientName:t})}):o?(0,li.jsx)("div",{"aria-label":c,children:(0,li.jsx)("img",{className:Dp,src:o,alt:c,title:t})}):(0,li.jsx)("div",{"aria-label":c,children:(0,li.jsx)("div",{className:Dp,title:t,style:{backgroundImage:u.toDataUrl(),backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:(0,li.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 Dh=["omrs-pict-appointments","omrs-pict-assessment-1","omrs-pict-assessment-2","omrs-pict-blood-bank","omrs-pict-cardiology","omrs-pict-cohorts","omrs-pict-concept-dictionary","omrs-pict-ct-scan","omrs-pict-data-entry","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-documents","omrs-pict-patient-search","omrs-pict-patients","omrs-pict-payments-desk","omrs-pict-pharmacy","omrs-pict-pharmacy-2","omrs-pict-registration","omrs-pict-reports","omrs-pict-service-queues","omrs-pict-stock-management","omrs-pict-system-administration","omrs-pict-transfer","omrs-pict-triage","omrs-pict-x-ray"],Dg=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-appointments",pictogramProps:e})})),Dy=Dg,Dv=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-assessment-1",pictogramProps:e})})),Db=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-assessment-2",pictogramProps:e})})),Dw=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-blood-bank",pictogramProps:e})})),Dx=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-cardiology",pictogramProps:e})})),DD=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-cohorts",pictogramProps:e})})),DE=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-concept-dictionary",pictogramProps:e})})),D_=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-ct-scan",pictogramProps:e})})),DS=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-data-entry",pictogramProps:e})})),DC=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-dentistry",pictogramProps:e})})),Dk=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-digital-trust",pictogramProps:e})})),DP=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-emergency-department",pictogramProps:e})})),DT=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-facility",pictogramProps:e})})),DR=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-geriatrics",pictogramProps:e})})),DO=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-gynaecology",pictogramProps:e})})),DN=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),D$=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),DM=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-labs-2",pictogramProps:e})})),DA=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-metadata-export",pictogramProps:e})})),Dj=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-obstetrics",pictogramProps:e})})),DI=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-patient-documents",pictogramProps:e})})),DL=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-patient-search",pictogramProps:e})})),DF=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-patients",pictogramProps:e})})),DB=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-payments-desk",pictogramProps:e})})),DV=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),DU=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-pharmacy-2",pictogramProps:e})})),DW=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-registration",pictogramProps:e})})),DH=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-reports",pictogramProps:e})})),Dz=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),DK=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),DZ=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-system-administration",pictogramProps:e})})),DG=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-transfer",pictogramProps:e})})),DY=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-triage",pictogramProps:e})})),Dq=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,li.jsx)(D0,{ref:t,pictogram:"omrs-pict-x-ray",pictogramProps:e})})),DJ=DT,DX=DF,DQ=(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,li.jsx)(l3,{value:a.current,fallback:t,children:(0,li.jsx)(D0,{ref:r,pictogram:e,pictogramProps:n})})})),D0=(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,li.jsx)("svg",{ref:n,className:cu()("-esm-form-engine__pictograms-module__pictogram___ooPKM",r),height:a,width:a,children:(0,li.jsx)("use",{href:`#${e}`})})})),D1=({children:e})=>"tablet"===uN()?(0,li.jsx)(cf.Layer,{children:e}):(0,li.jsx)(li.Fragment,{children:e}),D4=({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,li.jsx)(cf.ActionableNotification,{actionButtonLabel:p,"aria-label":aL("closeSnackbar","Close snackbar"),className:cu()("-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:aL("snackbarNotification","Snackbar notification"),subtitle:s,title:c,...m})},D2=({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,li.jsx)(li.Fragment,{children:t.map(e=>(0,li.jsx)(D4,{snackbar:e,closeSnackbar:()=>r(e)},e.id))})},D3=new xF,D6=0;function D5(e){e&&(0,lE.createRoot)(e).render((0,li.jsx)(D2,{subject:D3}))}function D9(e){var t;e&&"string"==typeof(t=e.title)&&t.trim().length>0?setTimeout(()=>{D3.next({...e,id:D6++})},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}let D8=({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,li.jsx)("div",{children:(0,li.jsx)(cf.ActionableNotification,{actionButtonLabel:i,kind:r||"info",lowContrast:a,subtitle:n,title:o||"",onActionButtonClick:l,onClose:t})})},D7=({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,li.jsx)(li.Fragment,{children:t.map(e=>(0,li.jsx)(D8,{toast:e,closeToast:()=>r(e)},e.id))})},Ee=new xF,Et=0;function En(e){e&&(0,lE.createRoot)(e).render((0,li.jsx)(D7,{subject:Ee}))}function Er(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!(0,xM.A)(t))?setTimeout(()=>{Ee.next({...e,id:Et++})},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}let Ea="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Eo=new Uint8Array(16),Ei=[];for(let e=0;e<256;++e)Ei.push((e+256).toString(16).slice(1));let Es=function(e,t,n){if(Ea&&!t&&!e)return Ea();let r=(e=e||{}).random??e.rng?.()??function(){if(!d){if("u"<typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");d=crypto.getRandomValues.bind(crypto)}return d(Eo)}();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(Ei[e[t+0]]+Ei[e[t+1]]+Ei[e[t+2]]+Ei[e[t+3]]+"-"+Ei[e[t+4]]+Ei[e[t+5]]+"-"+Ei[e[t+6]]+Ei[e[t+7]]+"-"+Ei[e[t+8]]+Ei[e[t+9]]+"-"+Ei[e[t+10]]+Ei[e[t+11]]+Ei[e[t+12]]+Ei[e[t+13]]+Ei[e[t+14]]+Ei[e[t+15]]).toLowerCase()}(r)};async function El(e,t){let{openedGroup:n}=sX.getState();if(n){if(n.groupName===e&&Ed(n.props,t))return!0;else if(!await Ef({reason:"CLOSE_WORKSPACE_GROUP",explicit:!1}))return!1}return sX.setState(n=>({...n,openedGroup:{groupName:e,props:t},openedWindows:[]})),!0}async function Eu(e){let{openedGroup:t,openedWindows:n}=sX.getState();if(t){if(n.length>0&&!(e||await Ef({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})))return!1;sX.setState(e=>({...e,openedGroup:null,openedWindows:[]}))}return!0}async function Ec(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||!Ed(i.props,r)))return!!await Ef({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})&&(sX.setState({...a,openedGroup:{groupName:l.name,props:r},openedWindows:[{windowName:s,openedWorkspaces:[ES(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(Ed(r.props,n)){let d=c.find(t=>t.workspaceName===e);return d&&Ed(d.props,t)?((i||u!==a.openedWindows.length-1)&&sX.setState(Ew.restoreWindow(a,s)),!0):!!await Ef({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:[ES(e,t)],props:r?.props??n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return!!await Ef({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:[ES(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:[ES(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0):!!await Ef({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:[ES(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}function Ed(e,t){return null==e||null==t||O(e,t)}function Em(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}function Ep(e){return 0===e.length?Promise.resolve(!0):new Promise(t=>{let n=x$("workspace2-close-prompt",{size:"sm",onConfirm:()=>{n(),t(!0)},onCancel:()=>{n(),t(!1)},affectedWorkspaceTitles:e.map(e=>e.title??"")})})}function Ef(e){let{openedWindows:t}=sX.getState(),n=[];switch(e.reason){case"CLOSE_WORKSPACE_GROUP":n=t.flatMap(e=>Em(e));break;case"CLOSE_WINDOW":{let r=t.find(t=>t.windowName===e.windowName);if(!r)throw Error(`Window ${e.windowName} not found in opened windows.`);n=Em(r);break}case"CLOSE_WORKSPACE":{let r=t.find(t=>t.windowName===e.windowName);if(!r)throw Error(`Window ${e.windowName} not found in opened windows.`);n=Em(r,e.workspaceName);break}case"CLOSE_OTHER_WINDOWS":n=t.filter(t=>t.windowName!==e.windowNameToSpare).flatMap(e=>Em(e))}return Ep(n)}function Eh(e,t){return Ep(Em(e,t))}function Eg(e,t){let n=e.openedWorkspaces.findIndex(e=>e.workspaceName===t);return n<0?e:0===n?null:{...e,openedWorkspaces:e.openedWorkspaces.slice(0,n)}}function Ey(e,t,n,r){let{registeredWorkspacesByName:a}=sX.getState(),o=a[n];if(!o)throw Error(`No workspace named "${n}" registered`);let i=a[t];if(!i)throw Error(`No workspace named "${t}" registered`);if(i.window!==o.window)throw Error(`Child workspace ${n} does not belong to the same workspace window as parent workspace ${t}`);if(o.window!==e.windowName)throw Error(`Cannot open child workspace ${n} as window ${o.window} is not opened`);let{openedWorkspaces:s}=e,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{...e,openedWorkspaces:[...u,ES(n,r)]}}function Ev(e,t,n){let r=e.openedWorkspaces.findIndex(e=>e.uuid===t);if(r<0)return e;let a=e.openedWorkspaces[r];if(Object.keys(n).every(e=>a[e]===n[e]))return e;let o=[...e.openedWorkspaces];return o[r]={...a,...n},{...e,openedWorkspaces:o}}function Eb(e,t,n){let r=e.openedWindows.findIndex(e=>e.openedWorkspaces.some(e=>e.uuid===t));if(r<0)return e;let a=e.openedWindows[r],o=Ev(a,t,n);if(o===a)return e;let i=[...e.openedWindows];return i[r]=o,{...e,openedWindows:i}}let Ew={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=e.openedWindows.findIndex(e=>e.openedWorkspaces.some(e=>e.workspaceName===t));if(n<0)return e;let r=Eg(e.openedWindows[n],t),a=[...e.openedWindows],o=e.isMostRecentlyOpenedWindowHidden;if(null===r){let t=n===e.openedWindows.length-1;a.splice(n,1),t&&a.length>0&&(o=!1)}else a[n]=r;return{...e,openedWindows:a,isMostRecentlyOpenedWindowHidden:o}},openChildWorkspace(e,t,n,r){let a=e.registeredWorkspacesByName[n];if(!a)throw Error(`No workspace named "${n}" registered`);let o=e.openedWindows.findIndex(e=>e.windowName===a.window);if(-1==o)throw Error(`Cannot open child workspace ${n} as window ${a.window} is not opened`);let i=[...e.openedWindows];return i[o]=Ey(e.openedWindows[o],t,n,r),{...e,openedWindows:i}},setHasUnsavedChanges:(e,t,n)=>Eb(e,t,{hasUnsavedChanges:n}),setWorkspaceTitle:(e,t,n)=>Eb(e,t,{title:n})};function Ex(){return lp(sX,Ew)}let ED=()=>(0,lr.useContext)(lR),EE=()=>Object.keys(sX.getState().registeredWorkspacesByName);function E_(e,t,n){let r=e.openedWorkspaces[e.openedWorkspaces.length-1];return(r?t[r.workspaceName]?.width:void 0)??n[e.windowName]?.width??"narrow"}function ES(e,t){return{workspaceName:e,props:t??{},hasUnsavedChanges:!1,uuid:Es()}}function EC(e,t,n){let r=sX.getState().registeredWorkspacesByName[e];return r?{windowName:r.window,openedWorkspaces:[ES(e,t)],props:n??null,maximized:!1}:null}let Ek=({title:e,children:t,hasUnsavedChanges:n=!1})=>{let{setHasUnsavedChanges:r,setWorkspaceTitle:a}=ED();return(0,lr.useEffect)(()=>{r(n??!1)},[n,r]),(0,lr.useEffect)(()=>{a(e)},[e,a]),(0,li.jsx)(li.Fragment,{children:t})};function EP(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 ET(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?EP(Object(n),!0).forEach(function(t){EO(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ER(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 EO(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EN(e){return(EN=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function E$(e,t){return(E$=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 EA=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&&E$(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=EN(i);e=n?Reflect.construct(t,arguments,EN(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),EO(EM(t=o.call(this,e)),"handleRef",function(e){t.el=e}),EO(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}))}),EO(EM(t),"getParcelProps",function(){var e=ET(ET({},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,ET({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 lR&&lR.Consumer?lr.createElement(lR.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):null;var t=lR&&lR.Consumer?lr.createElement(lR.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)}}],ER(i.prototype,r),a&&ER(i,a),i}();EO(EA,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});var Ej=n(8742);let EI=la().forwardRef(function({children:e,size:t=16,...n},r){return 16===t||"16"===t||"16px"===t?la().createElement(Ej.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},ea||(ea=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(Ej.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},eo||(eo=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 EL=n(4240),EF=n(8622);let EB={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"},EV=e=>e.registeredWorkspacesByName,EU=({lifeCycle:e,openedWorkspace:t,openedWindow:n,groupProps:r,actions:a,renderChrome:o,isRootWorkspace:i,isLeafWorkspace:s,showActionMenu:l})=>{let u=(0,lr.useMemo)(()=>t&&{closeWorkspace:async(e={})=>{let{closeWindow:r=!1,discardUnsavedChanges:o=!1}=e;return r?!!(o||await a.promptForClosingWorkspaces())&&(a.closeWorkspace(n.openedWorkspaces[0].workspaceName),!0):!!(o||await a.promptForClosingWorkspaces(t.workspaceName))&&(a.closeWorkspace(t.workspaceName),!0)},launchChildWorkspace:async(e,r)=>{let o=t.workspaceName,{openedWorkspaces:i}=n,s=i.findIndex(e=>e.workspaceName===o);-1===s||s!==i.length-1&&i.slice(s+1).some(e=>e.hasUnsavedChanges)&&!await a.promptForClosingWorkspaces(i[s+1].workspaceName)||a.openChildWorkspace(o,e,r||{})},setWorkspaceTitle:e=>a.setWorkspaceTitle(t.uuid,e),setHasUnsavedChanges:e=>a.setHasUnsavedChanges(t.uuid,e),workspaceName:t.workspaceName,workspaceProps:t.props,windowProps:n.props,groupProps:r,workspaceMeta:sX.getState().registeredWorkspacesByName[t.workspaceName]?.meta??{},isRootWorkspace:i,isLeafWorkspace:s,windowName:n.windowName,showActionMenu:l},[t,n,r,a,i,s,l]),c=!o&&!s,d=(0,lr.useMemo)(()=>e?(0,li.jsx)(EA,{config:e,mountParcel:lt,wrapWith:"div",wrapClassName:cu()(EB.workspaceContent,{[EB.hiddenExtraWorkspace]:c}),...u},t.workspaceName):null===e?(0,li.jsx)("div",{className:cu()(EB.workspaceContent,{[EB.hiddenExtraWorkspace]:c}),children:(0,li.jsx)(cf.InlineNotification,{kind:"error",title:aL("error"),subtitle:aL("somethingWentWrongTryReloading"),hideCloseButton:!0})}):null,[e,t.workspaceName,u,c]);return o?(0,li.jsx)("div",{children:(0,li.jsx)(EW,{openedWorkspace:t,openedWindow:n,isRootWorkspace:i,showActionMenu:l,closeWindow:()=>u.closeWorkspace({closeWindow:!0}),children:d})}):d??(0,li.jsx)(cf.InlineLoading,{className:cu()(EB.loader,{[EB.hiddenExtraWorkspace]:c}),description:`${aL("loading")}`})},EW=({openedWorkspace:e,openedWindow:t,isRootWorkspace:n,showActionMenu:r,closeWindow:a,children:o})=>{let i=uN(),{openedGroup:s,openedWindows:l,registeredWindowsByName:u,registeredWorkspacesByName:c,registeredGroupsByName:d,isMostRecentlyOpenedWindowHidden:m,setWindowMaximized:p,hideWindow:f}=Ex(),h=t.windowName,{maximized:g}=t,y=e.title??"",v=u[h],b=E_(t,c,u),w=v?.icon,x=v?.canMaximize,D=!!s&&d[s.groupName]?.persistence==="closable",E=!!w&&!D,_=l.findIndex(e=>e.windowName===h)<l.length-1||m,S=Object.values(u).some(e=>e.group===s?.groupName&&void 0!==e.icon);return(0,li.jsxs)("div",{className:cu()(EB.workspaceOuterContainer,{[EB.narrowWorkspace]:"narrow"===b,[EB.widerWorkspace]:"wider"===b,[EB.extraWideWorkspace]:"extra-wide"===b,[EB.isActionMenuOpened]:S}),children:[(0,li.jsx)("div",{className:cu()(EB.workspaceSpacer,{[EB.hidden]:_})}),(0,li.jsx)("div",{className:cu()(EB.workspaceMiddleContainer,{[EB.maximized]:g,[EB.hidden]:_,[EB.isRootWorkspace]:n,[EB.showActionMenu]:r}),children:(0,li.jsx)("div",{className:cu()(EB.workspaceInnerContainer,{[EB.maximized]:g,[EB.hidden]:_,[EB.isRootWorkspace]:n}),children:o?(0,li.jsxs)(li.Fragment,{children:[(0,li.jsxs)(cf.Header,{"aria-label":aL("workspaceHeader"),className:EB.header,children:[(0,li.jsx)(cf.HeaderName,{prefix:"",children:y}),(0,li.jsx)("div",{className:EB.overlayHeaderSpacer}),(0,li.jsx)(cf.HeaderGlobalBar,{className:EB.headerButtons,children:u$(i)?(0,li.jsxs)(li.Fragment,{children:[(x||g)&&(0,li.jsx)(cf.HeaderGlobalAction,{"aria-label":g?aL("minimize"):aL("maximize"),onClick:()=>p(h,!g),children:g?(0,li.jsx)(EI,{}):(0,li.jsx)(EL.hz,{})}),E&&(0,li.jsx)(cf.HeaderGlobalAction,{"aria-label":aL("hide"),onClick:()=>f(),children:(0,li.jsx)(cO,{})}),!D&&(0,li.jsx)(cf.HeaderGlobalAction,{"aria-label":aL("close"),onClick:a,children:(0,li.jsx)(cY,{})})]}):(0,li.jsxs)(li.Fragment,{children:[E&&(0,li.jsx)(cf.HeaderGlobalAction,{"aria-label":aL("hide"),onClick:()=>f(),children:(0,li.jsx)(EF.d3,{})}),(0,li.jsx)(cf.HeaderGlobalAction,{"aria-label":aL("close"),onClick:()=>{D?Eu():a()},children:(0,li.jsx)(cY,{})})]})})]}),o]}):(0,li.jsx)(cf.InlineLoading,{className:EB.loader,description:`${aL("loading")} ...`})})})]})},EH=({openedWindow:e,groupProps:t,actions:n,renderChrome:r,showActionMenu:a})=>{let{openedWorkspaces:o}=e,[i,s]=(0,lr.useState)({}),l=lm(sX,EV),u=(0,lr.useRef)(new Set);return(0,lr.useEffect)(()=>{let e=!1;return Promise.all(o.map(async t=>{let n=l[t.workspaceName];if(!n)return null;let{moduleName:r,component:a}=n;try{return[t.uuid,await u9(r,a)]}catch(n){return e||u.current.has(t.uuid)||(u.current.add(t.uuid),P(n)),[t.uuid,null]}})).then(t=>{e||s(Object.fromEntries(t.filter(e=>null!=e)))},P),()=>{e=!0}},[o,l]),(0,li.jsx)(li.Fragment,{children:o.map((s,l)=>(0,li.jsx)(EU,{openedWorkspace:s,openedWindow:e,groupProps:t,actions:n,renderChrome:r,lifeCycle:i[s.uuid],isRootWorkspace:0===l,isLeafWorkspace:l===o.length-1,showActionMenu:a},s.uuid))})},Ez=e=>e.registeredWorkspacesByName,EK=({name:e,workspaceProps:t,windowProps:n,groupProps:r,onWindowChanged:a})=>{let o=lm(sX,Ez),i=lm(sX,t=>{let n=t.registeredWorkspacesByName[e]?.window;return n?t.registeredWindowsByName[n]:void 0}),s={name:e,workspaceProps:t,windowProps:n,groupProps:r},l=(0,lr.useRef)(null),u=(0,lr.useRef)(null);if(!l.current){let a=EC(e,t,n);l.current=U({openedWindow:a,groupProps:r??null}),a&&(u.current=s)}let c=l.current;(0,lr.useEffect)(()=>{let a=u.current;if(a&&a.name===e&&O(a.workspaceProps,t)&&O(a.windowProps,n)&&O(a.groupProps,r))return;let o=EC(e,t,n);c.setState({openedWindow:o,groupProps:r??null},!0),u.current=o?s:null},[e,t,n,r,o,c]);let d=(0,lr.useMemo)(()=>(function(e){function t(t){e.setState(e=>{if(!e.openedWindow)return e;let n=t(e.openedWindow);return n===e.openedWindow?e:{...e,openedWindow:n}})}return{closeWorkspace(e){t(t=>Eg(t,e))},openChildWorkspace(e,n,r){t(t=>Ey(t,e,n,r))},setWorkspaceTitle(e,n){t(t=>Ev(t,e,{title:n}))},setHasUnsavedChanges(e,n){t(t=>Ev(t,e,{hasUnsavedChanges:n}))},promptForClosingWorkspaces(t){let{openedWindow:n}=e.getState();return n?Eh(n,t):Promise.resolve(!0)}}})(c),[c]),{openedWindow:m,groupProps:p}=lm(c),f=m?.openedWorkspaces[m.openedWorkspaces.length-1],h=f?.workspaceName??null,g=f?.title??"",y=m?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,v=i?.width??"narrow",b=(0,lr.useRef)(a);return(0,lr.useEffect)(()=>{b.current=a}),(0,lr.useEffect)(()=>{b.current?.({workspaceName:h,windowWidth:v,title:g,hasUnsavedChanges:y})},[h,v,g,y]),(0,li.jsx)("div",{className:"-esm-form-engine__exported-workspace-module__exportedWorkspace___3vwoL",children:m?(0,li.jsx)(EH,{openedWindow:m,groupProps:p,actions:d,renderChrome:!1,showActionMenu:!1}):null})},EZ="-esm-form-engine__action-menu-button2-module__container___pahg-",EG="-esm-form-engine__action-menu-button2-module__elementContainer___PzOdc",EY="-esm-form-engine__action-menu-button2-module__active___4O4Bs",Eq="-esm-form-engine__action-menu-button2-module__focused___+k5kD";function EJ({getIcon:e,hasUnsavedChanges:t,tagContent:n}){return(0,li.jsxs)(li.Fragment,{children:[e({size:16}),t?(0,li.jsx)("span",{className:"-esm-form-engine__action-menu-button2-module__interruptedTag___mS2yr",children:"!"}):(0,li.jsx)("span",{className:"-esm-form-engine__action-menu-button2-module__countTag___rb5CW",children:n})]})}let EX=({icon:e,label:t,tagContent:n,workspaceToLaunch:r,onBeforeWorkspaceLaunch:a,hidden:o,disabled:i})=>{let s=uN(),{openedWindows:l,restoreWindow:u,hideWindow:c,isMostRecentlyOpenedWindowHidden:d}=Ex(),{extension:m}=(0,lr.useContext)(lo),p=l.findIndex(e=>e.windowName===m?.extensionId),f=l[p],h=null!=f,g=h&&(p<l.length-1||d),y=h&&!g,v=f?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,b=async()=>{if(h)g?u(f.windowName):c();else if(await (a?.()??!0)){let{workspaceName:e,workspaceProps:t,windowProps:n}=r;Ec(e,t,n)}};return o?.(l)?null:"tablet"===s||"phone"===s?(0,li.jsxs)(cf.Button,{className:cu()(EZ,{[EY]:h&&!y,[Eq]:y}),iconDescription:t,kind:"ghost",onClick:b,role:"button",tabIndex:0,size:"md",disabled:i?.(l),children:[(0,li.jsx)("span",{className:EG,children:(0,li.jsx)(EJ,{hasUnsavedChanges:v,getIcon:e,tagContent:n})}),(0,li.jsx)("span",{children:t})]}):(0,li.jsx)(cf.IconButton,{align:"left","aria-label":t,className:cu()(EZ,{[EY]:h&&!y,[Eq]:y}),enterDelayMs:300,kind:"ghost",label:t,onClick:b,size:"md",disabled:i?.(l),children:(0,li.jsx)("div",{className:EG,children:(0,li.jsx)(EJ,{hasUnsavedChanges:v,getIcon:e,tagContent:n})})})};function EQ({showContactDetails:e,toggleContactDetails:t,className:n}){return(0,li.jsx)(cf.Button,{className:n,iconDescription:"Toggle contact details",kind:"ghost",onClick:t,renderIcon:e?cG:cz,children:e?aL("showLess","Show less"):aL("showMore","Show more")})}let E0={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"},E1=({patientUuid:e})=>{let{cohorts:t=[],isLoading:n}=function(e){let t=e?`${aJ}/cohortm/cohortmember?patient=${e}&v=custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))`:null,{data:n,isLoading:r}=lB()(t,a1),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,li.jsxs)(li.Fragment,{children:[(0,li.jsxs)("p",{className:E0.heading,children:[aL("patientLists","Patient Lists")," (",t?.length??0,")"]}),n?(0,li.jsx)(cf.InlineLoading,{description:`${aL("loading","Loading")} ...`,role:"progressbar"}):(0,li.jsxs)("ul",{children:[(()=>{if(t?.length>0){let e=t.sort((e,t)=>wr(e?.startDate).getTime()-wr(t?.startDate).getTime()).slice(0,3);return e?.map(e=>(0,li.jsx)("li",{children:(0,li.jsx)(ls,{to:`${window.spaBase}/home/patient-lists/${e.uuid}`,children:e.name},e.uuid)},e.uuid))}return(0,li.jsx)("li",{children:"--"})})(),t.length>3&&(0,li.jsx)("li",{className:E0.link,children:(0,li.jsx)(ls,{to:`${window.spaBase}/home/patient-lists`,children:aL("seeMoreLists","See {{count}} more lists",{count:t?.length-3})})})]})]})},E4=({patientId:e})=>{let{patient:t,isLoading:n}=uH(e),r=t?.address?.find(e=>"home"===e.use),a=e=>e.split("#")[1];return n?(0,li.jsx)(cf.InlineLoading,{description:`${aL("loading","Loading")} ...`,role:"progressbar"}):(0,li.jsxs)(li.Fragment,{children:[(0,li.jsx)("p",{className:E0.heading,children:aL("address","Address")}),(0,li.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,li.jsxs)("li",{children:[aL(a(t.url),a(t.url)),": ",t.valueString]},`address-${e}-${n}`)):(0,li.jsxs)("li",{children:[aL(e,e),": ",t]},`address-${e}`)):(0,li.jsx)("li",{children:"--"})})]})},E2=({patientUuid:e})=>{let{isLoading:t,contactAttributes:n}=(e=>{let{contactAttributeTypes:t=[]}=uo({externalModuleName:"@openmrs/esm-patient-banner-app"}),{attributes:n,error:r,isLoading:a}=(e=>{let{data:t,error:n,isLoading:r}=uu()(`${aJ}/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)))`,a1);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?aL(e.attributeType.display,e.attributeType.display):"",e.value])]:[],[n]);return(0,li.jsxs)(li.Fragment,{children:[(0,li.jsx)("p",{className:E0.heading,children:aL("contactDetails","Contact Details")}),t?(0,li.jsx)(cf.InlineLoading,{description:`${aL("loading","Loading")} ...`,role:"progressbar"}):(0,li.jsx)("ul",{children:r.length?r.map(([e,t],n)=>(0,li.jsxs)("li",{children:[e,": ",t]},`${e}-${t}-${n}`)):(0,li.jsx)("li",{children:"--"})})]})},E3=({patientId:e})=>{let{data:t,isLoading:n}=function(e){let t=`${aJ}/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}=lB()(e?t:null,a1),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,li.jsxs)(li.Fragment,{children:[(0,li.jsx)("p",{className:E0.heading,children:aL("relationships","Relationships")}),n?(0,li.jsx)(cf.InlineLoading,{description:`${aL("loading","Loading")} ...`,role:"progressbar"}):(0,li.jsx)("ul",{children:t&&t.length>0?(0,li.jsx)(li.Fragment,{children:t.map(e=>(0,li.jsxs)("li",{className:E0.relationship,children:[(0,li.jsx)("div",{children:(0,li.jsx)(ls,{to:`${window.spaBase}/patient/${e.relativeUuid}/chart`,children:e.display})}),(0,li.jsx)("div",{children:e.relationshipType}),(0,li.jsx)("div",{children:`${e.relativeAge?e.relativeAge:"--"} ${e.relativeAge?1===e.relativeAge?aL("yearAbbreviation","yr"):aL("yearsAbbreviation","yrs"):""}`})]},e.uuid))}):(0,li.jsx)("li",{children:"--"})})]})};function E6({patientId:e,deceased:t}){return(0,li.jsxs)("div",{className:cu()(E0.contactDetails,{[E0.deceased]:t}),children:[(0,li.jsxs)("div",{className:E0.row,children:[(0,li.jsx)("div",{className:E0.col,children:(0,li.jsx)(E4,{patientId:e})}),(0,li.jsx)("div",{className:E0.col,children:(0,li.jsx)(E2,{patientUuid:e})})]}),(0,li.jsxs)("div",{className:E0.row,children:[(0,li.jsx)("div",{className:E0.col,children:(0,li.jsx)(E3,{patientId:e})}),(0,li.jsx)("div",{className:E0.col,children:(0,li.jsx)(E1,{patientUuid:e})})]})]})}function E5(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 E9="-esm-form-engine__action-menu2-module__container___5s3CM";function E8({workspaceGroup:e,groupProps:t}){let n=uN(),{persistence:r}=e;return(0,li.jsx)("aside",{className:"-esm-form-engine__action-menu2-module__sideRail___qwAz4",children:(0,li.jsxs)("div",{className:E9,children:["closable"==r&&u$(n)&&(0,li.jsx)(cf.IconButton,{align:"left",onClick:()=>Eu(),label:aL("close"),kind:"ghost",children:(0,li.jsx)(cY,{})}),(0,li.jsx)(lo.Provider,{value:{moduleName:e.moduleName,featureName:e.name},children:(0,li.jsx)(lD,{className:E9,name:e.name,state:{groupProps:t}})})]})})}function E7(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}}function _e(e){e&&(0,lE.createRoot)(e).render((0,li.jsx)(_t,{}))}function _t(){let{openedGroup:e,openedWindows:t,registeredGroupsByName:n,registeredWindowsByName:r}=Ex();if((0,lr.useEffect)(()=>il("before-page-changed",t=>{let{newPage:r,cancelNavigation:a,oldUrl:o,newUrl:i}=t;if(!e)return;if(r)return void a(Eu().then(e=>!e));let s=n[e.groupName],l=s?.scopePattern;l&&function(e,t,n){try{let r=new RegExp(e),a=E7(t),o=E7(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(Eu().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,li.jsxs)("div",{className:cu()("-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,li.jsx)("div",{className:"-esm-form-engine__workspace-windows-and-menu-module__workspaceWindowsContainer___zpk7G",children:t.map(t=>(0,li.jsx)(_n,{openedWindow:t,groupProps:e.props,showActionMenu:s},t.windowName))}),s&&(0,li.jsx)(E8,{workspaceGroup:a,groupProps:e.props})]})}function _n({openedWindow:e,groupProps:t,showActionMenu:n}){let{windowName:r}=e,a=(0,lr.useMemo)(()=>({closeWorkspace(e){sX.setState(t=>Ew.closeWorkspace(t,e))},openChildWorkspace(e,t,n){sX.setState(r=>Ew.openChildWorkspace(r,e,t,n))},setWorkspaceTitle(e,t){sX.setState(n=>Ew.setWorkspaceTitle(n,e,t))},setHasUnsavedChanges(e,t){sX.setState(n=>Ew.setHasUnsavedChanges(n,e,t))},promptForClosingWorkspaces(e){let t=sX.getState().openedWindows.find(e=>e.windowName===r);return t?Eh(t,e):Promise.resolve(!0)}}),[r]);return(0,li.jsx)(EH,{openedWindow:e,groupProps:t,actions:a,renderChrome:!0,showActionMenu:n})}function _r(e,t,n){if(null==e)return n;let r=bC(e);if(!r)return console.warn(`matchLocale: invalid requested locale tag: ${JSON.stringify(e)}`),n;let a=[];for(let e of t){let t=bC(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 _a(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}function _o(e){return!!e&&e.constructor===Object}var _i=n(7229);function _s(e){let[t,n,r]=e.split(".");return`${t}.${n}.${r}`}function _l(e,t){return _i(function(e){let t=e.indexOf("-");if(t>=0){let n=_s(e.slice(0,t)),r=e.slice(t+1);return`${n}-${r}`}return _s(e)}(t),e,{includePrerelease:!0})}async function _u(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 _c(a(i)),await e()}catch(e){o?.(e,i),n=e}while(r(i++));throw n}async function _c(e){if(!(e<=0))return new Promise(t=>setTimeout(t,e))}function _d(e,t,n,r){}function _m(e){}function _p(e){return Promise.resolve([])}function _f(e){return Promise.resolve([])}function _h(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 _g(e){return()=>{}}function _y(){return!0}}}]);
|
|
39
|
+
}`.trim(),document.head.prepend(r),o=HTMLElement.prototype.focus,HTMLElement.prototype.focus=function(e){let t=((e=document)=>e.activeElement)(),n=null!=t&&v6(t);o.call(this,{...e,preventScroll:!0}),e&&e.preventScroll||be(this,n)},i=mp(v7(document,"touchstart",t=>{let r=mQ(t);e=h8(r)?r:h7(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}),v7(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}),v7(document,"blur",e=>{let t=mQ(e),n=e.relatedTarget;if(n&&v6(n))n.focus({preventScroll:!0}),be(n,v6(t));else if(!n){let e=t.parentElement?.closest("[tabindex]");e?.focus({preventScroll:!0})}},!0)),()=>{t(),i(),r.remove(),HTMLElement.prototype.focus=o}):mp((s=window.innerWidth-document.documentElement.clientWidth)>0&&("scrollbarGutter"in document.documentElement.style?v8(document.documentElement,"scrollbarGutter","stable"):v8(document.documentElement,"paddingRight",`${s}px`)),v8(document.documentElement,"overflow","hidden"))),()=>{0==--v9&&c()}}},[t])}({isDisabled:o||!t.isOpen}),(0,lm.useEffect)(()=>{if(t.isOpen&&r.current)if(o){var e,n,i=a?.current??r.current;let t=v$[v$.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=mJ(e?.[0])).Element?{root:n}:n,i=o?.root??document.body,s=o?.shouldUseInert&&vO,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(mX(e,t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},n=yf(mq(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=vN.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),vN.set(e,n+1))},v$.length&&v$[v$.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=>mX(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()}},v$.push(f),()=>{for(let e of(p.disconnect(),u)){let t=vN.get(e);null!=t&&(1===t?(c(e,!1),vN.delete(e)):vN.set(e,t-1))}f===v$[v$.length-1]?(v$.pop(),v$.length&&v$[v$.length-1].observe()):v$.splice(v$.indexOf(f),1)}}},[o,t.isOpen,r,a]),{popoverProps:mT(d,p),arrowProps:f,underlayProps:m,placement:h,triggerAnchorPoint:g}}({...r,offset:null!=(a=r.offset)?a:8,arrowSize:s,groupRef:m?d:u},e),y=r.popoverRef,v=ba(y,!!g)||r.isEntering||!1,b=mN({...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,lm.useState)(!1);mf(()=>{y.current&&D(w&&!y.current.querySelector("[role=dialog]"))},[y,w]),(0,lm.useEffect)(()=>{var e;let t,n;x&&y.current&&!y.current.contains(document.activeElement)&&(n=((e=document)=>e.activeElement)(t=mq(e=y.current)),"virtual"===bs?pA(()=>{((e=document)=>e.activeElement)(t)===n&&e.isConnected&&mG(e)}):mG(e))},[x,y]);let E={...p.style,...b.style},_=lp().createElement("div",{...mT(mZ(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&&lp().createElement(br,{onDismiss:e.close}),lp().createElement(vR.Provider,{value:{...h,placement:g,ref:i}},b.children),lp().createElement(br,{onDismiss:e.close}));return m?lp().createElement(vw,{...r,shouldContainFocus:x,isExiting:t,portalContainer:null!=(o=null!=n?n:null==d?void 0:d.current)?o:void 0},_):lp().createElement(vw,{...r,shouldContainFocus:x,isExiting:t,portalContainer:n},!r.isNonModal&&e.isOpen&&lp().createElement("div",{"data-testid":"underlay",...f,style:{position:"fixed",inset:0}}),lp().createElement("div",{ref:u,style:{display:"contents"}},lp().createElement(bD.Provider,{value:u},_)))}function bS(e){return e?.start!=null&&null!=e.end}let bC=(0,lm.createContext)(null),bk=(0,lm.createContext)(null),bP=(0,lm.createContext)(null),bT=(0,lm.createContext)(null),bR=(0,lm.forwardRef)(function(e,t){var n,r;[e,t]=mM(e,t,bC);let{validationBehavior:a}=m$(vk)||{},o=null!=(r=null!=(n=e.validationBehavior)?n:a)?r:"native",i=function(e){let t=bw(e),[n,r]=g4(e.value,e.defaultValue||null,e.onChange),[a]=(0,lm.useState)(n),o=n||e.placeholderValue||null,[i,s]=ve(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,lm.useState)(null),[p,f]=(0,lm.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,lm.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,lm.useMemo)(()=>y3(n,y,v,b,g),[n,y,v,b,g]),x=yJ({...e,value:n,builtinValidation:w}),D=x.displayValidation.isInvalid,E=e.validationState||(D?"invalid":null),_=(e,t)=>{r("timeZone"in t?t.set(hP(e)):hT(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||y8(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||y8(e.defaultValue||e.placeholderValue)),t.setOpen(r)},validationState:E,isInvalid:D,formatValue:(e,t)=>l?new fI(e,y9(t,g)).format(l):"",getDateFormatter:(e,t)=>new fI(e,y9({},{...g,...t}))}}({...e,validationBehavior:o}),s=(0,lm.useRef)(null),[l,u]=mA(!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=mC(),o=mC(),i=mC(),s=fX((r=yA)&&r.__esModule?r.default:r,"@react-aria/datepicker"),{isInvalid:l,validationErrors:u,validationDetails:c}=t.displayValidation,{labelProps:d,fieldProps:m,descriptionProps:p,errorMessageProps:f}=yL({...e,labelElementType:"span",isInvalid:l,errorMessage:e.errorMessage||u}),h=yj(t,n),g=m["aria-labelledby"]||m.id,{locale:y}=fR(),v=t.formatValue(y,{month:"long"}),b=go(v?s.format("selectedDateDescription",{date:v}):""),w=[b["aria-describedby"],m["aria-describedby"]].filter(Boolean).join(" ")||void 0,x=mZ(e),D=(0,lm.useMemo)(()=>yR(n),[n]),E=(0,lm.useRef)(!1),{focusWithinProps:_}=fn({...e,isDisabled:t.isOpen,onBlurWithin:t=>{mX(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:mT(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,[yU]:"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,[yq]: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}}({...mj(e),label:u,validationBehavior:o},i,s),[b,w]=(0,lm.useState)(null),x=(0,lm.useCallback)(()=>{s.current&&w(s.current.offsetWidth+"px")},[]);vQ({ref:s,onResize:x});let{focusProps:D,isFocused:E,isFocusVisible:_}=fr({within:!0}),S=mN({...e,values:{state:i,isFocusWithin:E,isFocusVisible:_,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DatePicker"}),C=mZ(e);return delete C.id,lp().createElement(mO,{values:[[bP,i],[yc,{...c,ref:s,isInvalid:i.isInvalid}],[vc,m],[fm,{...p,isPressed:i.isOpen}],[vP,{...d,ref:l,elementType:"span"}],[g8,h],[vD,i],[bx,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":b}}],[vx,f],[fh,{slots:{description:g,errorMessage:y}}],[v_,v]]},lp().createElement("div",{...D,...C,...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}))}),bO=(0,lm.forwardRef)(function(e,t){var n,r;[e,t]=mM(e,t,bk);let{validationBehavior:a}=m$(vk)||{},o=null!=(r=null!=(n=e.validationBehavior)?n:a)?r:"native",i=function(e){let t=bw(e),[n,r]=g4(e.value,e.defaultValue||null,e.onChange),[a]=(0,lm.useState)(n),[o,i]=(0,lm.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}),bS(s)?r(s):r(null)},[u,c]=ve(s?.start||s?.end||e.placeholderValue||null,e.granularity),d="hour"===u||"minute"===u||"second"===u,m=e.shouldCloseOnSelect??!0,[p,f]=(0,lm.useState)(null),[h,g]=(0,lm.useState)(null);s&&bS(s)&&(p=s,"hour"in s.start&&(h=s));let y=(e,t)=>{l({start:"timeZone"in t.start?t.start.set(hP(e.start)):hT(e.start,t.start),end:"timeZone"in t.end?t.end.set(hP(e.end)):hT(e.end,t.end)}),f(null),g(null),C.commitValidation()},v=n=>{let r="function"==typeof m?m():m;d?bS(n)&&(r||h?.start&&h?.end)?y(n,{start:h?.start||y8(e.placeholderValue),end:h?.end||y8(e.placeholderValue)}):f(n):bS(n)?(l(n),C.commitValidation()):f(n),r&&t.setOpen(!1)},b=e=>{bS(p)&&bS(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,lm.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,lm.useMemo)(()=>{var e;let t;return e=s,t=y1(y3(e?.start??null,D,E,_,x),y3(e?.end??null,D,E,_,x)),e?.end!=null&&null!=e.start&&0>e.end.compare(e.start)&&(t=y1(t,{isInvalid:!0,validationErrors:[(fK.getGlobalDictionaryForPackage("@react-stately/datepicker")||y4).getStringForLocale("rangeReversed",y2())],validationDetails:{...yK,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),t},[s,D,E,_,x]),C=yJ({...e,value:n,name:(0,lm.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:S}),k=C.displayValidation.isInvalid,P=e.validationState||(k?"invalid":null);return{...C,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)&&bS(p)&&d&&y(p,{start:h?.start||y8(e.placeholderValue),end:h?.end||y8(e.placeholderValue)}),t.setOpen(n)},validationState:P,isInvalid:k,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=y9(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 fI(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 fI(t,y9(n,{granularity:l,timeZone:i,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:m.format(c),end:r.format(d)}},getDateFormatter:(e,t)=>new fI(e,y9({},{...x,...t}))}}({...e,validationBehavior:o}),s=(0,lm.useRef)(null),[l,u]=mA(!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=fX((r=yA)&&r.__esModule?r.default:r,"@react-aria/datepicker"),{isInvalid:o,validationErrors:i,validationDetails:s}=t.displayValidation,{labelProps:l,fieldProps:u,descriptionProps:c,errorMessageProps:d}=yL({...e,labelElementType:"span",isInvalid:o,errorMessage:e.errorMessage||i}),m=u["aria-labelledby"]||u.id,{locale:p}=fR(),f=t.formatValue(p,{month:"long"}),h=go(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=mC(),b=mC(),w=yj(t,n),x=[h["aria-describedby"],u["aria-describedby"]].filter(Boolean).join(" ")||void 0,D=(0,lm.useMemo)(()=>yR(n,{accept:e=>e.id!==v}),[n,v]),E={[yW]:D,[yU]:"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},_=mZ(e),S=(0,lm.useRef)(!1),{focusWithinProps:C}=fn({...e,isDisabled:t.isOpen,onBlurWithin:t=>{mX(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))}}),k=(0,lm.useRef)(yG),P=(0,lm.useRef)(yG);return{groupProps:mT(_,w,u,h,C,{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,[yq]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){k.current=e,t.updateValidation(y1(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,[yq]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){P.current=e,t.updateValidation(y1(k.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}}({...mj(e),label:u,validationBehavior:o},i,s),[w,x]=(0,lm.useState)(null),D=(0,lm.useCallback)(()=>{s.current&&x(s.current.offsetWidth+"px")},[]);vQ({ref:s,onResize:D});let{focusProps:E,isFocused:_,isFocusVisible:S}=fr({within:!0}),C=mN({...e,values:{state:i,isFocusWithin:_,isFocusVisible:S,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DateRangePicker"}),k=mZ(e);return delete k.id,lp().createElement(mO,{values:[[bT,i],[yc,{...c,ref:s,isInvalid:i.isInvalid}],[fm,{...f,isPressed:i.isOpen}],[vP,{...d,ref:l,elementType:"span"}],[g7,g],[vD,i],[bx,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":w}}],[vx,h],[vc,{slots:{start:m,end:p}}],[fh,{slots:{description:y,errorMessage:v}}],[v_,b]]},lp().createElement("div",{...E,...k,...C,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 bN(e){return lp().createElement(fT,e)}function b$(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 hg||e instanceof hv||e instanceof hb)return t?hR(e,t):e;{let n=u5()(e).toDate(),r=new hg(n.getFullYear(),n.getMonth()+1,n.getDate());return t?hR(r,t):r}}function bM(e){if(e)return e.toDate(hU())}function bA(e){if("string"==typeof e&&0!==e.trim().length)try{return new Intl.Locale(e.replace(/[_@]/g,"-")).toString()}catch{return}}function bj(e){let t=e??"",n=bA(t);if(!n)return t;try{return new Intl.DisplayNames([n],{type:"language"}).of(n)??t}catch{return t}}function bI(){let e=window.i18next.language,t=bA(e)??e;return"ht"===t&&(t="fr-HT"),t}if("u">typeof navigator){let e=navigator;er=Array.isArray(e.languages)?e.languages[0]:e.language}else if("u">typeof process){let e=process.env;er=e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}var bL=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch{return"en-US"}}(er||"en-US"),bF=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},bB={};for(let e=1;e<100;e++)bB[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var bV={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},bU="[1234567890一二三四五六七八九〇\\d]",bW={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},bH={},bz={"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},bK={zone:bz,year:bB,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:{}},bZ={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(bz).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,}"},bG={...bZ,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}"},bY={},bq=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(t=bL){return bY[t.toLowerCase()]||(bY[t.toLowerCase()]=new e(t)),bY[t.toLowerCase()]}constructor(e=bL){this.locale=e,this.lookups={...bK},this.vars={...bZ};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=bW: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(bH[e])return bH[e];if("fullwide"===e||"hanidec"===e)return{group:bU,lookup:{...bW}};let t=bV[e];if(!t)return{group:"\\d",lookup:{...bW}};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 bH[e]={group:`[${n}-${r}]`,lookup:a},bH[e]}(this.numberingSystem);for(let n in this.lookups.digit=t,bG)bG.hasOwnProperty(n)&&(this.vars[n]=bG[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")}},bJ=["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"],bX={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},bQ=()=>new Date;function b0(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 b1=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)}},b4=["year","month","day","hour","minute","second","millisecond","offset"],b2={};function b3(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 b6=[[/([^\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"]],b5={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," "],...b6],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:b6,id:b6,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function b9(e,t=bL){let n=function(e){if(!b2[e]){var t,n;let r,a,o=bq.factory(e);b2[e]=new b1({doneChecker:b3,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:b0(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:o.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:b0(["","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:b0(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:o.compile(`^(${bU}{2,4})\\s*\u5E74\\s*(${bU}{1,2})\\s*\u6708\\s*(${bU}{1,2})\\s*\u65E5$`),handler:b0(["","year","month","day"])},{name:"korean",regex:o.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:b0(["","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:b0(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let t=bQ(),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?bX[n]:(n=n.replace(/s$/,"")).toLowerCase())&&(n="day",t*=7),("-"===e||r)&&(t*=-1);let a=bQ();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:b0(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:o.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:b0(["","hour","minute","second","millisecond","zone"])},{name:"hms12",regex:o.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:b0(["","hour","minute","second","meridiem"])},{name:"hms24",regex:o.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:b0(["","hour","minute","second","millisecond"])},{name:"hm12",regex:o.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:b0(["","hour","minute","meridiem"])},{name:"hm24",regex:o.compile("(_H24_):(_MIN_)"),handler:b0(["","hour","minute"])},{name:"h12",regex:o.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:b0(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:b0(["","year","month","day"])},{name:"yearMonthnameDay",regex:o.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:b0(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:o.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:b0(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:o.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:b0(["","monthname","day","","year"])},{name:"dayMonthname",regex:o.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:b0(["","day","","monthname"])},{name:"monthnameDay",regex:o.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:b0(["","monthname","day"])},{name:"hmsNoMeridiem",regex:o.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:b0(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:o.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:b0(["","hour","minute"])},{name:"ymd",regex:o.compile("(_YEAR4_)([.-])(_MONTH_)\\2+(_DAY_)"),handler:b0(["","year","","month","day"])},{name:"mdy",regex:o.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:b0(["","month","","day","year"])},{name:"dmy",regex:o.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:b0(["","day","month","year"])},{name:"yearLoose",regex:o.compile("_YEAR4_"),handler:b0(["year"])},{name:"dayMonthnameLoose",regex:o.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:b0(["","day","monthname"])},{name:"monthnameDayLoose",regex:o.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:b0(["","monthname","day"])},{name:"monthname",regex:o.compile("_MONTHNAME_"),handler:b0(["monthname"])},{name:"year4",regex:o.compile("_YEAR4_"),handler:b0(["year"])},{name:"md",regex:o.compile("(_MONTH_)[/-](_DAY_)"),handler:b0(["","month","day"])},{name:"dm",regex:o.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:b0(["","day","month"])},{name:"day",regex:o.compile("_DAY_"),handler:b0(["day"])},{name:"year2",regex:o.compile("_YEAR2_"),handler:b0(["year"])},{name:"onlyZone",regex:o.compile("_ZONE_"),handler:b0(["zone"])}],a=o.baseName.slice(0,5),bJ.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(b4.includes(r)){let e=n.toInt(a);"number"==typeof e&&(t[r]=e)}return t.year<100&&(t.year=bB[t.year]),t.year&&"buddhist"===n.dateOptions.calendar&&(t.year-=543),t})})}return b2[e]}(t),r=function(e,t){let n=b5[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 b8(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let t=new bF(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 bF(t.valueOf()-60*e.offset*1e3):t}function b7(e,t=bL){let n=b9(e,t),r=n.invalid?new bF(NaN):b8(n);return r.isValid()||(r.invalid=`Unable to parse date "${e}"`),r}function we(e,t=bL){return e instanceof Date?new bF(e.valueOf()):"number"==typeof e?new bF(e):b7(e,t)}Date.fromString=bF.fromString=b7,Date.fromAny=bF.fromAny=we,"u">typeof window&&(window.anyDateParser={fromString:b7,fromAny:we,fromObject:b8,attempt:b9});var wt=n(4397),wn=n(7657);let wr=function(e){return null==e};function wa(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}u5().extend(u9),u5().extend(wn),u5().extend(wt);let wo="YYYY-MM-DDTHH:mm:ss.SSSZZ",wi=/^(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?$/;function ws(e,t){let n=wi.exec(e);if(!n)return b9(e,t);let r=Number(n[1]),a=void 0===n[2]?void 0:Number(n[2]),o=void 0===n[3]?void 0:Number(n[3]),i=new Date(0);return(i.setUTCFullYear(r,(a??1)-1,o??1),i.getUTCFullYear()!==r||i.getUTCMonth()!==(a??1)-1||i.getUTCDate()!==(o??1))?{invalid:`Invalid ISO calendar date '${e}'`}:{year:r,...void 0!==a&&{month:a},...void 0!==o&&{day:o}}}function wl(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&u5()(e,wo).isValid()}function wu(e){return u5()(e).isToday()}function wc(e){return wl(e)?u5()(e,wo).toDate():null}function wd(e,t=!1){let n=u5()(e);return t&&(n=n.utc()),n.format(wo)}function wm(e){return u5()(e).toDate()}var wp=new WeakMap;let wf=new class{register(e,t){wa(this,wp).set(e,t)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let t=`${e.language}-${e.region}`;if(wa(this,wp).has(t))return wa(this,wp).get(t)}if(e.language&&wa(this,wp).has(e.language))return wa(this,wp).get(e.language);let t=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return wa(this,wp).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,wp,{writable:!0,value:new Map})}};function wh(e,t){wf.register(e,t)}function wg(e){let t=e??bI();return wf.getCalendar(t instanceof Intl.Locale?t:new Intl.Locale(t))}let wy={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function wv(e,t={}){let n=ws(e,bI());if(n.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!wr(n.day)&&wr(n.month)&&(n=Object.assign({},tf(n,"day"),{month:n.day})),n.month&&(n.month-=1),n.day&&(n=Object.assign({},tf(n,"day"),{date:n.day}));let r=u5()().set(n).toDate();return wr(n.year)&&(t.year=!1),wr(n.month)&&(t.month=!1),wr(n.date)&&(t.day=!1),wb(r,t)}function wb(e,t){let n,r=t?.locale??bI(),a=new Intl.Locale(r),{calendar:o,mode:i,time:s,day:l,month:u,year:c,noToday:d,numberingSystem:m}={...wy,...{noToday:"am"===a.language},...t},p={calendar:o??wg(a),year:c?"numeric":void 0,month:u?"short":void 0,day:l?"2-digit":void 0,numberingSystem:m},f=u5()(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(ww("-"))),"wide"==i&&(t=t.map(ww(" — "))),"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+=`, ${wx(e)}`),n}let ww=e=>(t,n,r)=>"literal"!==t.type||" "!==t.value||n<r.length-1&&"era"===r[n+1].type?t:{type:"literal",value:e};function wx(e){return e.toLocaleTimeString(bI(),{hour:"2-digit",minute:"2-digit"})}function wD(e,t){return wb(e,{...t,time:!0})}function wE(e,t){let n=wg("string"==typeof t?new Intl.Locale(t):t);return n?hR(e,gZ(n)):e}function w_(e,t){return new Intl.DurationFormat(bI(),t).format(e)}function wS(e,t){if(null==e)return null;if("string"==typeof e){let n=ws(e,bI());return n.invalid?(console.warn(`Could not interpret '${e}' as a date`),null):(n.day&&!n.month&&(n={...tf(n,"day"),...{month:n.day}}),n.month&&(n.month-=1),n.day&&(n={...tf(n,"day"),...{date:n.day}}),u5()(t).set(n))}return u5()(e)}let wC=["years","months","days","hours","minutes","seconds"],wk={second:"seconds",minute:"minutes",hour:"hours",day:"days",month:"months",year:"years"},wP={seconds:45,minutes:45,hours:22,days:26,months:11,years:1/0};function wT(e,t=u5()(),n){let r,a=u5()(t),o=wS(e,a);if(null==o)return null;if("string"==typeof n){let e=wk[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?wk[l]??l:void 0;return e="auto"===s||void 0===s?function(e,t,n){let r=wC.indexOf(n);for(let a=0;a<wC.length;a++){let o=wC[a];if(t.diff(e,o)>0)return a<=r?o:n}return n}(o,a,t??"seconds"):wk[s]??s,function(e,t,n,r){let a=wC.indexOf(n),o=wC.indexOf(r),i=wC.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={...wP};if(e)for(let[n,r]of Object.entries(e))void 0!==r&&(t[wk[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 wR={style:"short",localeMatcher:"lookup"};function wO(e,t=u5()(),n){let r=wT(e,t,n);return null==r?null:w_(r,"object"==typeof n&&n.formatOptions?{...wR,...n.formatOptions}:wR)}let wN=(0,lm.createContext)(null);function w$(){let e=uf({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,t=(0,lm.useMemo)(()=>{let t=bI();return e[t]&&(t=e[t]),t},[window.i18next.language]),n=(0,lm.useMemo)(()=>{let e=wg(t);return void 0!==e?gZ(e):void 0},[t]),r=(0,lm.useMemo)(()=>new Intl.Locale(t,{calendar:n?.identifier}),[t,n]),a=(0,lm.useMemo)(()=>n?hR(hL(hU()),n):hL(hU()),[n]);return{calendar:n,intlLocale:r,today_:a}}let wM=new hg(1793,1,1);var wA={};function wj(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}function wI(e={}){let{locale:t}=fR();return(0,lm.useMemo)(()=>new(0,vo.K)(t,e),[t,e])}wA={"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 wL={};wL={"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 wF=()=>{};function wB(e){var t;let n=(0,lm.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=fX((t=wL)&&t.__esModule?t.default:t,"@react-aria/spinbutton"),y=(0,lm.useRef)(!1),v=(0,lm.useCallback)(()=>{clearTimeout(n.current),y.current=!1},[]),b=pJ(()=>{v()});(0,lm.useEffect)(()=>()=>b(),[]);let w=(0,lm.useRef)(!1),x=()=>{w.current=!0},D=()=>{w.current=!1},E=""===a?g.format("Empty"):(a||`${r}`).replace("-","−");(0,lm.useEffect)(()=>{w.current&&(fO&&fO.clear("assertive"),fN(E,"assertive"))},[E]);let _=(0,lm.useCallback)(()=>{v()},[v]),S=pJ(c??wF),C=pJ(m??wF),k=pJ(()=>{(void 0===i||isNaN(i)||void 0===r||isNaN(r)||r<i)&&(S(),P(60))}),P=pJ(e=>{b(),y.current=!0,n.current=window.setTimeout(k,e)}),T=pJ(()=>{(void 0===o||isNaN(o)||void 0===r||isNaN(r)||r>o)&&(C(),R(60))}),R=pJ(e=>{b(),y.current=!0,n.current=window.setTimeout(T,e)}),O=e=>{e.preventDefault()},{addGlobalListener:N,removeAllGlobalListeners:$}=pX(),M=(0,lm.useRef)(!1),[A,j]=(0,lm.useState)(null);(0,lm.useEffect)(()=>{"touch"===A?P(600):A&&P(400)},[A]);let[I,L]=(0,lm.useState)(null);return(0,lm.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")):(N(window,"pointercancel",_,{capture:!0}),M.current=!1,j("touch")),N(window,"contextmenu",O)},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")):(N(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 wV=null;var wU=n(2103);function wW(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 wH=(0,lm.createContext)(null),wz=(0,lm.createContext)(null),wK=(0,lm.forwardRef)(function(e,t){var n,r;[e,t]=mM(e,t,wH);let{validationBehavior:a}=m$(vk)||{},o=null!=(r=null!=(n=e.validationBehavior)?n:a)?r:"native",{locale:i}=fR(),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,lm.useCallback)(e=>void 0===r||isNaN(r)?vM(e,t,n):vj(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]=g4(o,isNaN(i)?NaN:i,s),[h]=(0,lm.useState)(p),[g,y]=(0,lm.useState)(()=>isNaN(p)?"":new(0,vo.K)(l,a).format(p)),v=(0,lm.useMemo)(()=>new(0,wU.d)(l,a),[l,a]),b=(0,lm.useMemo)(()=>v.getNumberingSystem(g),[v,g]),w=(0,lm.useMemo)(()=>new(0,vo.K)(l,{...a,numberingSystem:b}),[l,a,b]),x=(0,lm.useMemo)(()=>w.resolvedOptions(),[w]),D=(0,lm.useCallback)(e=>isNaN(e)||null===e?"":w.format(e),[w]),E=yJ({...e,value:p}),_=void 0===r||isNaN(r)?1:r;"percent"===x.style&&(void 0===r||isNaN(r))&&(_=.01);let[S,C]=(0,lm.useState)(p),[k,P]=(0,lm.useState)(l),[T,R]=(0,lm.useState)(a);Object.is(p,S)&&l===k&&a===T||(y(D(p)),C(p),P(l),R(a));let O=(0,lm.useMemo)(()=>v.parse(g),[v,g]),N=(e,r=0)=>{if(isNaN(O))return vj(isNaN(r)?0:r,t,n,_);{let r=vj(O,t,n,_);return"+"===e&&r>O||"-"===e&&r<O?r:vj(wW(e,O,_),t,n,_)}},$=(0,lm.useMemo)(()=>!u&&!c&&(isNaN(O)||void 0===n||isNaN(n)||vj(O,t,n,_)>O||wW("+",O,_)<=n),[u,c,t,n,_,O]),M=(0,lm.useMemo)(()=>!u&&!c&&(isNaN(O)||void 0===t||isNaN(t)||vj(O,t,n,_)<O||wW("-",O,_)>=t),[u,c,t,n,_,O]);return{...E,validate:e=>v.isValidPartialNumber(e,t,n),increment:()=>{let e=N("+",t);e===p&&y(D(e)),f(e),E.commitValidation()},incrementToMax:()=>{null!=n&&(f(vj(n,t,n,_)),E.commitValidation())},decrement:()=>{let e=N("-",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:O,defaultNumberValue:isNaN(i)?h:i,setNumberValue:f,setInputValue:y,inputValue:g,commit:e=>{let t=void 0===e?g:e,n=O;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,lm.useRef)(null),[u,c]=mA(!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:C,onKeyDown:k,onKeyUp:P,description:T,errorMessage:R,isWheelDisabled:O,...N}=e,{increment:$,incrementToMax:M,decrement:A,decrementToMin:j,numberValue:I,inputValue:L,commit:F,commitValidation:B}=t,V=fX((r=wA)&&r.__esModule?r.default:r,"@react-aria/numberfield"),U=(0,lm.useCallback)(()=>{let e=n.current?.value??"";(0,pQ.flushSync)(()=>{F()}),n.current?.value!==e&&fN(n.current?.value??"","assertive")},[F,n]),W=mC(p),{focusProps:H}=pI({onBlur(){U()}}),z=wI(E),K=(0,lm.useMemo)(()=>z.resolvedOptions(),[z]),Z=wI({...E,currencySign:void 0}),G=(0,lm.useMemo)(()=>isNaN(I)?"":Z.format(I),[Z,I]),{spinButtonProps:Y,incrementButtonProps:q,decrementButtonProps:J}=wB({isDisabled:g,isReadOnly:y,isRequired:v,maxValue:w,minValue:b,onIncrement:$,onIncrementToMax:M,onDecrement:A,onDecrementToMin:j,value:I,textValue:G}),[X,Q]=(0,lm.useState)(!1),{focusWithinProps:ee}=fn({isDisabled:g,onFocusWithinChange:Q});!function(e,t){let{onScroll:n,isDisabled:r}=e,a=(0,lm.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),n&&n({deltaX:e.deltaX,deltaY:e.deltaY}))},[n]);h9(t,"wheel",r?void 0:a)}({onScroll:(0,lm.useCallback)(e=>{!(Math.abs(e.deltaY)<=Math.abs(e.deltaX))&&(e.deltaY>0?$():e.deltaY<0&&A())},[A,$]),isDisabled:O||g||y||!X},n);let et=(K.maximumFractionDigits??0)>0,en=void 0===t.minValue||isNaN(t.minValue)||t.minValue<0,er="numeric";ps()?en?er="text":et&&(er="decimal"):pm()&&(en?er="numeric":et&&(er="decimal"));let ea=mZ(e),eo=(0,lm.useCallback)(e=>{e.nativeEvent.isComposing||("Enter"===e.key?((0,pQ.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=pJ(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,lm.useEffect)(()=>{if(!wj()||!n.current)return;let e=n.current;return e.addEventListener("beforeinput",r,!1),()=>{e.removeEventListener("beforeinput",r,!1)}},[n]);let a=wj()?null:e=>{let n=mQ(e).value.slice(0,mQ(e).selectionStart)+e.data+mQ(e).value.slice(mQ(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]=g4(e.value,e.defaultValue||"",e.onChange),{focusableProps:c}=pV(e,t),d=yJ({...e,value:l}),{isInvalid:m,validationErrors:p,validationDetails:f}=d.displayValidation,{labelProps:h,fieldProps:g,descriptionProps:y,errorMessageProps:v}=yL({...e,isInvalid:m,errorMessage:e.errorMessage||p}),b=mZ(e,{labelable:!0}),w={type:i,pattern:e.pattern},[x]=(0,lm.useState)(l);return yF(t,e.defaultValue??x,u),yB(e,d,t),{labelProps:h,inputProps:mT(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(mQ(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(lp().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,lm.useRef)(null);return{inputProps:mT(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}}({...N,...ea,name:void 0,form:void 0,label:D,autoFocus:x,isDisabled:g,isReadOnly:y,isRequired:v,validate:void 0,[yq]: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:C,onKeyDown:(0,lm.useMemo)(()=>mp(eo,k),[eo,k]),onKeyUp:P,onPaste:t=>{e.onPaste?.(t);let n=mQ(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);yF(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,mf(()=>{let e=s.current;if("validate"!==i||a.realtimeValidation.isInvalid||!e||e.disabled||(!wV&&"u">typeof document&&((wV=document.createElement("input")).type="number"),!wV))return;wV.min=null==l||isNaN(l)?"":String(l),wV.max=null==u||isNaN(u)?"":String(u),wV.step=null==c||isNaN(c)?"":String(c),wV.value=null==d||isNaN(d)?"":String(d);let t=e.validity.valid&&wV.validity.valid,n=e.validationMessage||wV.validationMessage,r={isInvalid:!t,validationErrors:n?[n]:[],validationDetails:{badInput:e.validity.badInput,customError:e.validity.customError,patternMismatch:e.validity.patternMismatch,rangeOverflow:wV.validity.rangeOverflow,rangeUnderflow:wV.validity.rangeUnderflow,stepMismatch:wV.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||wV.validity.valid||e.setCustomValidity(wV.validationMessage)});let ep=mT(Y,H,ec,{role:null,"aria-roledescription":pu()?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=mC(),ey=mC(),ev=mT(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=mT(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}}({...mj(e),label:c,validationBehavior:o},s,l),b=mN({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:v.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),w=mZ(e);return delete w.id,lp().createElement(mO,{values:[[wz,s],[yc,m],[ym,{...p,ref:l}],[vP,{...d,ref:u}],[fm,{slots:{increment:f,decrement:h}}],[fh,{slots:{description:g,errorMessage:y}}],[v_,v]]},lp().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&&lp().createElement("input",{type:"hidden",name:e.name,value:isNaN(s.numberValue)?"":s.numberValue}))});function wZ(e,t){return Number.parseInt(wb(e,{calendar:t.calendar,locale:t.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}let wG=(0,lm.forwardRef)(function(e,t){let{className:n}=e,r=(0,lm.useContext)(ye),a=(0,lm.useContext)(yt),o=r??a,i=(0,lm.useContext)(wN),s=hU(),l=wb(o.visibleRange.start.toDate(s),{calendar:i.calendar,locale:i.baseName,day:!1,year:!1,noToday:!0}),u=wZ(o.visibleRange.start.toDate(s),i),c=o.maxValue?wZ(o.maxValue.toDate(s),i):void 0,d=o.minValue?wZ(o.minValue.toDate(s),i):void 0,m=(0,lm.useCallback)(e=>{o.setFocusedDate(o.focusedDate.cycle("year",e-o.focusedDate.year))},[]);return o&&(0,lh.jsxs)("span",{ref:t,className:n,children:[(0,lh.jsx)("span",{children:l}),(0,lh.jsxs)(wK,{formatOptions:{useGrouping:!1},maxValue:c,minValue:d,onChange:m,value:u,children:[(0,lh.jsx)(yp,{}),(0,lh.jsxs)(yd,{children:[(0,lh.jsx)(fp,{slot:"increment",children:(0,lh.jsx)(cG,{size:8})}),(0,lh.jsx)(fp,{slot:"decrement",children:(0,lh.jsx)(cz,{size:8})})]})]})]})}),wY="-esm-form-engine__datepicker-module__inputGroup___gBam-",wq="-esm-form-engine__datepicker-module__inputSegment___wIJDZ",wJ="-esm-form-engine__datepicker-module__dateInputWrapper___LiY68",wX="-esm-form-engine__datepicker-module__invalidText___A4cv4",wQ="-esm-form-engine__datepicker-module__flatButton___HcpME",w0="-esm-form-engine__datepicker-module__flatButtonMd___eFpyF",w1="-esm-form-engine__datepicker-module__flatButtonSm___tsawR",w4="-esm-form-engine__datepicker-module__flatButtonLg___4HG5y";function w2({children:e}){let t=(0,lm.useContext)(bP),n=(0,lm.useContext)(bT),r=t??n,a=uZ(()=>r?.close());return(0,lh.jsx)(vE,{className:"-esm-form-engine__datepicker-module__dialog___DaqYi",ref:a,children:e})}let w3=(0,lm.forwardRef)(function({variant:e,today_:t,minDate:n,maxDate:r},a){let o="range"===e;return(0,lh.jsx)(bE,{ref:a,className:"-esm-form-engine__datepicker-module__popover___nAPzC",placement:"bottom start",offset:1,isNonModal:!0,children:(0,lh.jsx)(w2,{children:(0,lh.jsxs)(o?yr:yn,{...o?{minValue:n,maxValue:r,className:"cds--date-picker__calendar"}:{},children:[(0,lh.jsxs)("header",{className:"-esm-form-engine__datepicker-module__header___rPv3L",children:[(0,lh.jsx)(fp,{className:cv()(wQ,w0),slot:"previous",children:(0,lh.jsx)(c1,{size:16})}),(0,lh.jsx)(wG,{className:"-esm-form-engine__datepicker-module__monthYear___Rw4qE"}),(0,lh.jsx)(fp,{className:cv()(wQ,w0),slot:"next",children:(0,lh.jsx)(c4,{size:16})})]}),(0,lh.jsx)(yo,{className:"-esm-form-engine__datepicker-module__calendarGrid___yKV-n",children:e=>(0,lh.jsx)(yu,{className:cv()("cds--date-picker__day",{"-esm-form-engine__datepicker-module__today___KzMTn":0===t.compare(e)}),date:e},e.toString())})]})})})}),w6=(0,lm.forwardRef)(function(e,t){let n=(0,lm.useContext)(bP),[r,a]=mM({slot:e.slot},t,vc),{locale:o}=fR(),i=vu({...r,locale:o,createCalendar:gZ}),s=(0,lm.useRef)(null),{fieldProps:l,inputProps:u}=yH({...r,inputRef:s},i,a),c=(0,lm.useCallback)(()=>{i.isDisabled||n.toggle()},[]);return(0,lh.jsxs)(mO,{values:[[vd,i],[ym,{...u,ref:s}],[yc,{...l,ref:a,isInvalid:i.isInvalid}]],children:[(0,lh.jsx)(yd,{...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,lm.cloneElement)(e.children(t),{key:n}))}),(0,lh.jsx)(yp,{})]})}),w5=(0,lm.forwardRef)(function(e,t){let n=(0,lm.useContext)(bP),r=(0,lm.useContext)(bT);return(n??r).isInvalid?(0,lh.jsx)(me,{ref:t,size:16,...e}):(0,lh.jsx)(cH,{ref:t,size:16,...e})});class w9{constructor(e,t){this.locale=e,this.dictionary=t}of(e){return this.dictionary.getStringForLocale(e,this.locale)}}let w8=new Map,w7=(0,lm.forwardRef)(function({segment:e,...t},n){let r=(0,lm.useContext)(vd),a=mc(n),{segmentProps:o}=function(e,t,n){let r,a,o,i,s=(0,lm.useRef)(""),{locale:l,direction:u}=fR(),c=function(){var e;let{locale:t}=fR(),n=fJ((e=yA)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,lm.useMemo)(()=>{try{return new Intl.DisplayNames(t,{type:"dateTimeField"})}catch{return new w9(t,n)}},[t,n])}(),{ariaLabel:d,ariaLabelledBy:m,ariaDescribedBy:p,focusManager:f}=yV.get(t),h=e.isPlaceholder?"":e.text,g=(0,lm.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),y=fU({month:"long",timeZone:g.timeZone}),v=fU({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}=wB({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,lm.useMemo)(()=>new(0,wU.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}=fR(),n=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(w8.has(n))return w8.get(n);let r=new Intl.Collator(t,e);return w8.set(n,r),r}({usage:"search",sensitivity:"base"}),a=(0,lm.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,lm.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,lm.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,lm.useMemo)(()=>({startsWith:a,endsWith:o,contains:i}),[a,o,i])),E=fU({hour:"numeric",hour12:!0}),_=(0,lm.useMemo)(()=>{let e=new Date;return e.setHours(0),E.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[E]),S=(0,lm.useMemo)(()=>{let e=new Date;return e.setHours(12),E.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[E]),C=fU({year:"numeric",era:"narrow",timeZone:"UTC"}),k=(0,lm.useMemo)(()=>{if("era"!==e.type)return[];let n=hR(new hg(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:C.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},[C,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=k.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}}};h9((0,lm.useRef)("u">typeof document?document:null),"selectionchange",()=>{let e=window.getSelection();e?.anchorNode&&mX(n.current,e?.anchorNode)&&e.collapse(n.current)});let T=(0,lm.useRef)("");h9(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)}}),h9(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))}),mf(()=>{let e=n.current;return()=>{((e=document)=>e.activeElement)()===e&&(f.focusPrevious()||f.focusNext())}},[n,f]);let R=pu()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,lm.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])||t.isInvalid||(p=void 0);let O=mC(),N=!t.isDisabled&&!t.isReadOnly&&e.isEditable,$="literal"===e.type?"":c.of(e.type),M=h4({"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:mT(b,M,{id:O,...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:N,suppressContentEditableWarning:N,spellCheck:N?"false":void 0,autoCorrect:N?"off":void 0,[parseInt(lp().version,10)>=17?"enterKeyHint":"enterkeyhint"]:N?"next":void 0,inputMode:t.isDisabled||"dayPeriod"===e.type||"era"===e.type||!N?void 0:"numeric",tabIndex:t.isDisabled?void 0:0,onKeyDown:e=>{if("a"===e.key&&(pi()?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&&gn(n.current,{containingElement:h7(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}=fr(),{hoverProps:u,isHovered:c}=fl({...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,lm.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,lm.useCallback)(e=>{e.stopPropagation()},[]);return(0,lh.jsx)("span",{...mT(mZ(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})}),xe={short:!1,size:"md"},xt=(0,lm.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}={...xe,...e},{calendar:b,intlLocale:w,today_:x}=w$(),D=(0,lm.useId)(),E=!!(u??l),_=(0,lm.useMemo)(()=>b$(r,b),[r,b]),S=(0,lm.useMemo)(()=>b$(y,b,!0),[y,b]),C=(0,lm.useMemo)(()=>b$(d,b),[d,b]),k=(0,lm.useMemo)(()=>b$(m??wM,b),[m,b]),P=(0,lm.useMemo)(()=>o||s,[o,s]),T=(0,lm.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?.(bM(e)))),[f,p]);return(0,lh.jsx)(bN,{locale:w.toString(),children:(0,lh.jsx)("div",{className:cv()("cds--form-item",n),children:(0,lh.jsx)(mO,{values:[[wN,w]],children:(0,lh.jsxs)(bR,{className:cv()("cds--date-picker","cds--date-picker--single",{"cds--date-picker--short":h,"cds--date-picker--light":c}),defaultValue:_,isDisabled:a,isInvalid:P,maxValue:C,minValue:k,value:S,shouldForceLeadingZeros:"en"===w.language||void 0,...v,onChange:T,children:[(0,lh.jsxs)("div",{className:"cds--date-picker-container",children:[E&&(0,lh.jsx)(vT,{className:cv()("cds--label",{"cds--label--disabled":a}),htmlFor:D,children:u??l}),(0,lh.jsxs)(yd,{className:wY,children:[(0,lh.jsx)(w6,{id:E?D:void 0,ref:t,className:cv()("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,lh.jsx)(w7,{className:wq,segment:e}):(0,lh.jsx)(lp().Fragment,{})}),(0,lh.jsx)(fp,{className:cv()(wQ,{[w1]:"sm"===g,[w0]:"md"===g||!g||0===g.length,[w4]:"lg"===g}),children:(0,lh.jsx)(w5,{})})]}),(0,lh.jsx)(vS,{className:wX,children:i})]}),(0,lh.jsx)(w3,{variant:"single",today_:x})]})})})})}),xn=(0,lm.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}=w$(),w=(0,lm.useId)(),x=!!(s??i),D=(0,lm.useMemo)(()=>{if(f)return{start:b$(f[0],y,!1),end:b$(f[1],y,!1)}},[f,y]),E=(0,lm.useMemo)(()=>{if(t)return{start:b$(t[0],y,!1),end:b$(t[1],y,!1)}},[t,y]),_=(0,lm.useMemo)(()=>b$(c??wM,y,!0),[c,y]),S=(0,lm.useMemo)(()=>b$(u,y,!0),[u,y]),C=(0,lm.useMemo)(()=>n||o,[n,o]),k=(0,lm.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?.([bM(e.start),bM(e.end)]))),[m,d]);return(0,lh.jsx)(bN,{locale:v.toString(),children:(0,lh.jsx)("div",{className:cv()("cds--form-item",e),children:(0,lh.jsx)(mO,{values:[[wN,v]],children:(0,lh.jsx)(bO,{id:x?w:void 0,className:cv()("cds--date-picker",{"cds--date-picker--light":l,"cds--date-picker--disabled":a}),isInvalid:C,shouldForceLeadingZeros:"en"===v.language||void 0,maxValue:S,minValue:_,value:D,defaultValue:E,ref:g,isDisabled:a,...h,onChange:k,children:(0,lh.jsxs)("div",{className:"cds--date-picker-container",children:[x&&(0,lh.jsx)(vT,{className:cv()("cds--label",{"cds--label--disabled":a}),htmlFor:w,children:s??i}),(0,lh.jsxs)(yd,{className:wY,children:[(0,lh.jsxs)("div",{className:cv()("-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,lh.jsx)(vp,{className:cv()("cds--date-picker-input__wrapper","-esm-form-engine__datepicker-module__startInput___cWw-5",wJ),slot:"start",children:e=>(0,lh.jsx)(w7,{className:wq,segment:e})}),(0,lh.jsx)("div",{className:"-esm-form-engine__datepicker-module__separator___Ddb4g",children:(0,lh.jsx)("span",{"aria-hidden":"true","data-readonly":!0,children:"–"})}),(0,lh.jsx)(vp,{className:cv()("cds--date-picker-input__wrapper","-esm-form-engine__datepicker-module__endInput___xdYOl",wJ),slot:"end",children:e=>(0,lh.jsx)(w7,{className:wq,segment:e})})]}),(0,lh.jsx)(fp,{className:cv()(wQ,{[w1]:"sm"===p,[w0]:"md"===p||!p||0===p.length,[w4]:"lg"===p}),children:(0,lh.jsx)(w5,{})})]}),(0,lh.jsx)(vS,{className:wX,children:r}),(0,lh.jsx)(w3,{variant:"range",today_:b,minDate:_,maxDate:S})]})})})})})}),xr=lp().createContext(null);function xa(e){let{children:t}=e,n=(0,lm.useContext)(xr),[r,a]=(0,lm.useState)(0),o=(0,lm.useMemo)(()=>({parent:n,modalCount:r,addModal(){a(e=>e+1),n&&n.addModal()},removeModal(){a(e=>e-1),n&&n.removeModal()}}),[n,r]);return lp().createElement(xr.Provider,{value:o},t)}function xo(e){let t,{modalProviderProps:n}={modalProviderProps:{"aria-hidden":!!(t=(0,lm.useContext)(xr))&&t.modalCount>0||void 0}};return lp().createElement("div",{"data-overlay-container":!0,...e,...n})}function xi(e){return lp().createElement(xa,null,lp().createElement(xo,e))}function xs(e){let t=mE(),{portalContainer:n=t?null:document.body,...r}=e,{getContainer:a}=vv();if(!e.portalContainer&&a&&(n=a()),lp().useEffect(()=>{if(n?.closest("[data-overlay-container]"))throw Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.")},[n]),!n)return null;let o=lp().createElement(xi,r);return p0().createPortal(o,n)}let xl=lp().createContext(null),xu=lp().forwardRef(function(e,t){let{children:n,...r}=e,a=mc(t),o={...r,ref:a};return lp().createElement(xl.Provider,{value:o},n)}),xc={},xd=0,xm=!1,xp=null,xf=null;function xh(e={}){let{delay:t=1500,closeDelay:n=500}=e,{isOpen:r,open:a,close:o}=bw(e),i=(0,lm.useMemo)(()=>`${++xd}`,[]),s=(0,lm.useRef)(null),l=(0,lm.useRef)(o),u=()=>{xc[i]=m},c=()=>{for(let e in xc)e!==i&&(xc[e](!0),delete xc[e])},d=()=>{s.current&&clearTimeout(s.current),s.current=null,c(),u(),xm=!0,a(),xp&&(clearTimeout(xp),xp=null),xf&&(clearTimeout(xf),xf=null)},m=e=>{e||n<=0?(s.current&&clearTimeout(s.current),s.current=null,l.current()):s.current||(s.current=setTimeout(()=>{s.current=null,l.current()},n)),xp&&(clearTimeout(xp),xp=null),xm&&(xf&&clearTimeout(xf),xf=setTimeout(()=>{delete xc[i],xf=null,xm=!1},Math.max(500,n)))};return(0,lm.useEffect)(()=>{l.current=o},[o]),(0,lm.useEffect)(()=>()=>{s.current&&clearTimeout(s.current),xc[i]&&delete xc[i]},[i]),{isOpen:r,open:e=>{e||!(t>0)||s.current?d():(c(),u(),r||xm?r||d():(xp&&clearTimeout(xp),xp=setTimeout(()=>{xp=null,xm=!0,d()},t)))},close:m}}let xg=(0,lm.createContext)(null),xy=(0,lm.createContext)(null);function xv(e){let t=xh(e),n=(0,lm.useRef)(null),{triggerProps:r,tooltipProps:a}=function(e,t,n){let{isDisabled:r,trigger:a,shouldCloseOnPress:o=!0}=e,i=mC(),s=(0,lm.useRef)(!1),l=(0,lm.useRef)(!1),u=()=>{(s.current||l.current)&&t.open(l.current)},c=e=>{s.current||l.current||t.close(e)};(0,lm.useEffect)(()=>{let e=e=>{n&&n.current&&"Escape"===e.key&&(e.stopPropagation(),t.close(!0))};if(t.isOpen)return document.addEventListener("keydown",e,!0),()=>{document.removeEventListener("keydown",e,!0)}},[n,t]);let d=()=>{o&&(l.current=!1,s.current=!1,c(!0))},{hoverProps:m}=fl({isDisabled:r,onHoverStart:()=>{"focus"!==a&&("pointer"===pg?s.current=!0:s.current=!1,u())},onHoverEnd:()=>{"focus"!==a&&(l.current=!1,s.current=!1,c())}}),{focusableProps:p}=pV({isDisabled:r,onFocus:()=>{pR()&&(l.current=!0,u())},onBlur:()=>{l.current=!1,s.current=!1,c(!0)}},n);return{triggerProps:{"aria-describedby":t.isOpen?i:void 0,...mT(p,m,{onPointerDown:d,onKeyDown:d}),tabIndex:void 0},tooltipProps:{id:i}}}(e,t,n);return lp().createElement(mO,{values:[[xg,t],[xy,{...a,triggerRef:n}]]},lp().createElement(xu,{...r,ref:n},e.children))}let xb=(0,lm.forwardRef)(function({UNSTABLE_portalContainer:e,...t},n){[t,n]=mM(t,n,xy);let r=(0,lm.useContext)(xg),a=xh(t),o=null==t.isOpen&&null==t.defaultOpen&&r?r:a,i=bo(n,o.isOpen)||t.isExiting||!1;return o.isOpen||i?lp().createElement(xs,{portalContainer:e},lp().createElement(xw,{...t,tooltipRef:n,isExiting:i})):null});function xw(e){let t=(0,lm.useContext)(xg),n=(0,lm.useRef)(null),[r,a]=(0,lm.useState)(0);mf(()=>{n.current&&t.isOpen&&a(n.current.getBoundingClientRect().width)},[t.isOpen,n]);let{overlayProps:o,arrowProps:i,placement:s}=v1({placement:e.placement||"top",targetRef:e.triggerRef,overlayRef:e.tooltipRef,offset:e.offset,crossOffset:e.crossOffset,isOpen:t.isOpen,arrowSize:r,arrowBoundaryOffset:e.arrowBoundaryOffset,shouldFlip:e.shouldFlip,onClose:()=>t.close(!0)}),l=ba(e.tooltipRef,!!s)||e.isEntering||!1,u=mN({...e,defaultClassName:"react-aria-Tooltip",values:{placement:s,isEntering:l,isExiting:e.isExiting,state:t}}),{tooltipProps:c}=function(e,t){let n=mZ(e,{labelable:!0}),{hoverProps:r}=fl({onHoverStart:()=>t?.open(!0),onHoverEnd:()=>t?.close()});return{tooltipProps:mT(n,r,{role:"tooltip"})}}(e=mT(e,o),t);return lp().createElement("div",{...c,ref:e.tooltipRef,...u,style:{...o.style,...u.style},"data-placement":null!=s?s:void 0,"data-entering":l||void 0,"data-exiting":e.isExiting||void 0},lp().createElement(vR.Provider,{value:{...i,placement:s,ref:n}},u.children))}let xx=({diagnoses:e,showCertainty:t=!1})=>{let{diagnosisTags:n}=uf({externalModuleName:"@openmrs/esm-styleguide"});return(0,lh.jsx)("div",{className:"-esm-form-engine__diagnosis-tags-module__container___1iigI",children:e.map(e=>{let r=t&&"PROVISIONAL"===e.certainty,a=1===e.rank?n?.primaryColor??"blue":n?.secondaryColor??"gray";return(0,lh.jsx)(xD,{color:a,isProvisional:r,name:e.display},e.uuid)})})};function xD({color:e,isProvisional:t,name:n}){let[r,a]=(0,lm.useState)(!1),[o,i]=(0,lm.useState)(!1),[s,l]=(0,lm.useState)(!1),u=s||o,c=(0,lm.useRef)(null);(0,lm.useLayoutEffect)(()=>{let e=c.current;if(!e)return;let t=()=>{let t=e.scrollWidth>e.clientWidth;l(t),t||a(!1)};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[n,t,u]);let d=cv()("cds--tag","cds--tag--md","cds--layout--size-md",`cds--tag--${e}`,"-esm-form-engine__diagnosis-tags-module__diagnosisTag___mQ28X"),m=(0,lh.jsxs)(lh.Fragment,{children:[t&&(0,lh.jsxs)(lh.Fragment,{children:[(0,lh.jsx)("span",{"aria-hidden":"true",className:"-esm-form-engine__diagnosis-tags-module__provisionalMark___S+J53",children:"?"}),(0,lh.jsxs)("span",{className:"cds--visually-hidden",children:[aZ("provisional","Provisional")," "]})]}),(0,lh.jsx)("span",{ref:c,className:"cds--tag__label",children:n})]});return u?(0,lh.jsxs)(xv,{delay:0,closeDelay:150,isOpen:r,onOpenChange:a,children:[(0,lh.jsx)(fp,{className:d,"data-testid":"diagnosis-tag",onFocusChange:i,onPress:()=>a(!0),children:m}),(0,lh.jsx)(xb,{className:"-esm-form-engine__diagnosis-tags-module__tagTooltip___50O3+",placement:"bottom",offset:4,containerPadding:8,children:n})]}):(0,lh.jsx)("span",{className:d,"data-testid":"diagnosis-tag",children:m})}let xE={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"},x_=({width:e="64",height:t="64"})=>(0,lh.jsx)("svg",{width:e,height:t,viewBox:"0 0 64 64",children:(0,lh.jsx)("use",{href:"#omrs-empty-data-illustration"})}),xS=e=>{let t="tablet"===uV(),n=e.launchForm;return(0,lh.jsx)(cE.Layer,{className:xE.layer,children:(0,lh.jsxs)(cE.Tile,{className:xE.tile,children:[(0,lh.jsx)("div",{className:t?xE.tabletHeading:xE.desktopHeading,children:(0,lh.jsx)("h4",{children:e.headerTitle})}),(0,lh.jsx)(x_,{}),(0,lh.jsx)("p",{className:xE.content,children:aZ("emptyStateText","There are no {{displayText}} to display",{displayText:e.displayText})}),(0,lh.jsx)("p",{className:xE.action,children:n&&(0,lh.jsx)(cE.Button,{onClick:()=>n(),kind:"ghost",size:t?"lg":"sm",children:aZ("recordNewEntry","Record {{ displayText }}",{displayText:e.displayText})})})]})})},xC=({error:e,headerTitle:t})=>{let n="tablet"===uV();return(0,lh.jsx)(cE.Layer,{children:(0,lh.jsxs)(cE.Tile,{className:"-esm-form-engine__error-state-module__tile___mzWLn",children:[(0,lh.jsx)("div",{className:n?"-esm-form-engine__error-state-module__tabletHeading___l7Cpn":"-esm-form-engine__error-state-module__desktopHeading___p57fl",children:(0,lh.jsx)("h4",{children:t})}),(0,lh.jsxs)("p",{className:"-esm-form-engine__error-state-module__errorMessage___0fU6v",children:[aZ("error","Error")," ",`${e?.response?.status}: `,e?.response?.statusText]}),(0,lh.jsx)("p",{className:"-esm-form-engine__error-state-module__errorCopy___xkVog",children:aZ("errorCopy")})]})})},xk=xC,xP=lp().forwardRef((e,t)=>{let{slotName:n,basePath:r,componentContext:a,state:o}=uH(),i=window.location??{pathname:""},s=lP(n??"");return e.isChildOfHeader&&n&&s.length>0?(0,lh.jsxs)(cE.SideNav,{"aria-label":aZ("leftNavigation","Left navigation"),className:"-esm-form-engine__left-nav-module__leftNav___czP9T",expanded:!0,isFixedNav:!0,ref:t,...e,children:[(0,lh.jsx)(lO,{name:"global-nav-menu-slot"}),n?(0,lh.jsx)(ur,{value:a,fallback:(0,lh.jsx)(lO,{name:n,state:{basePath:r,currentPath:i,...o}}),children:(0,lh.jsx)(lf.Provider,{value:a,children:(0,lh.jsx)(lO,{name:n,state:{basePath:r,currentPath:i,...o}})})}):null]}):null}),xT=({selectedLocationUuid:e,defaultLocationUuid:t,locationTag:n,locationsPerRequest:r=50,onChange:a})=>{let[o,i]=(0,lm.useState)(""),s=(0,lm.useId)(),{location:l}=function(e){let t=e?`/ws/fhir2/R4/Location?_id=${e}`:null,{data:n,error:r,isLoading:a}=uv()(t,oe,{shouldRetryOnError:e=>!!e?.response?.status&&e.response.status>=500});return(0,lm.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=ug(n),{data:a,isLoading:o,isValidating:i,setSize:s,error:l}=u$()(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=`${a9}/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()},oe);return(0,lm.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,lm.useMemo)(()=>l&&!o&&t?[l,...u.filter(({resource:e})=>e.id!==t)]:u??[],[l,u,t,o]),g=(0,lm.useCallback)(e=>{a(),i(e.trim())},[a]),y=uG((0,lm.useCallback)(()=>{!m&&d&&f(e=>e+1)},[m,d,f])),v=d?Math.max(0,Math.floor(h.length-r/2)):-1;return(0,lh.jsxs)(lh.Fragment,{children:[(0,lh.jsx)(cE.Search,{"aria-describedby":p?`${s}-error`:void 0,labelText:aZ("searchForLocation"),id:s,placeholder:aZ("searchForLocation"),onChange:e=>g(e.target.value),size:"lg"}),p&&(0,lh.jsx)("div",{className:"-esm-form-engine__location-picker-module__errorNotification___NfvTe",id:`${s}-error`,children:(0,lh.jsx)(cE.InlineNotification,{kind:"error",subtitle:aZ("errorLoadingLoginLocations","Unable to load login locations. Please try again or contact support if the problem persists."),title:aZ("error","Error")})}),(0,lh.jsx)("div",{className:"-esm-form-engine__location-picker-module__searchResults___agplm",children:c?(0,lh.jsx)("div",{className:"-esm-form-engine__location-picker-module__loadingContainer___EHghS",children:Array.from({length:5}).map((e,t)=>(0,lh.jsx)(cE.RadioButtonSkeleton,{className:"-esm-form-engine__location-picker-module__radioButtonSkeleton___up5rH",role:"progressbar"},t))}):(0,lh.jsxs)(lh.Fragment,{children:[(0,lh.jsx)("div",{className:"-esm-form-engine__location-picker-module__locationResultsContainer___06YOS",children:h.length>0?(0,lh.jsx)(cE.RadioButtonGroup,{name:"loginLocations",onChange:e=>{a(e?.toString())},orientation:"vertical",valueSelected:e,children:h.map((e,t)=>(0,lh.jsx)(cE.RadioButton,{className:"-esm-form-engine__location-picker-module__locationRadioButton___yKif7",id:e.resource.id,labelText:(0,lh.jsx)("span",{ref:t===v?y:null,children:e.resource.name}),name:e.resource.name,value:e.resource.id},e.resource.id))}):(0,lh.jsx)("div",{className:"-esm-form-engine__location-picker-module__emptyState___cPWp8",children:(0,lh.jsx)("p",{className:"-esm-form-engine__location-picker-module__locationNotFound___b14++",children:aZ("noResultsToDisplay")})})}),m&&(0,lh.jsx)("div",{className:"-esm-form-engine__location-picker-module__loadingIcon___GVlrq",children:(0,lh.jsx)(cE.InlineLoading,{description:aZ("loading")})})]})})]})},xR=V("modalState",{modalContainer:null,modalStack:[]}),xO=0;async function xN(e,t,n={}){let r=s5(t),a=null;if(e){if(!r)throw Error(`No modal named '${t}' has been registered.`);let{load:o}=r,i=await o(),s=xO++;a=await ll({...i,name:`${t}-${s}`},{...n,domElement:e})}else P(`Failed to launch modal. Please notify your administrator. Modal name: ${t}`);return a}function x$(e){return"TO_BE_DELETED"===e.state||"DELETED"===e.state}function xM(e,t){t?.unmount&&(t.unmountPromise?.catch(()=>{}),t.unmount().catch(t=>{console.error(`The modal '${e}' failed to unmount`,t)}))}function xA(e){return e.find(e=>!x$(e))}function xj(e,t){e.container&&(e.container.style.visibility=t?"unset":"hidden")}let xI=window.getComputedStyle(document.body).overflow;function xL({modalStack:e,modalContainer:t}){if(t)if(e.length){t.style.visibility||(addEventListener("keydown",xB),document.body.style.overflow="hidden",t.style.visibility="unset");let n=xA(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",xN(n,e.modalName,e.props).then(r=>{x$(e)?xM(e.modalName,r):r?(e.parcel=r,t.prepend(n),xj(e,xA(xR.getState().modalStack)===e),r.mountPromise.then(()=>{x$(e)||(e.state="MOUNTED")},t=>{P(t),e.parcel=null,xF(e)})):xF(e)},t=>{P(t),xF(e)});break}case"MOUNTING":case"MOUNTED":xj(e,e===n);break;case"TO_BE_DELETED":e.state="DELETED",e.onClose(),xM(e.modalName,e.parcel),e.container?.remove(),setTimeout(()=>{let t=xR.getState();xR.setState({...t,modalStack:t.modalStack.filter(t=>t!==e)})},0)}})}else t.style.removeProperty("visibility"),document.body.style.overflow=xI,removeEventListener("keydown",xB)}function xF(e){if(x$(e))return;e.state="TO_BE_DELETED";let t=xR.getState();xR.setState({...t,modalStack:[...t.modalStack]})}function xB(e){"Escape"===e.key&&function(){let[e]=xR.getState().modalStack;e&&xF(e)}()}function xV(e){xR.subscribe(xL),xR.setState({...xR.getState(),modalContainer:e})}function xU(e,t={},n=()=>{}){let r=()=>{let e=xR.getState().modalStack.find(e=>e.onClose===n);e&&xF(e)};if(s5(e)){var a;let o,i;a={state:"NEW",onClose:n,modalName:e,props:{close:r,...t}},i=[a,...(o=xR.getState()).modalStack],xR.setState({...o,modalStack:i})}else P(`Failed to launch modal. Please notify your administrator. Modal name: "${e}"`);return r}var xW=n(5992);let xH=({notification:e})=>{let{description:t,action:n,kind:r,critical:a,title:o,onAction:i}=e;return(0,lh.jsx)(cE.ActionableNotification,{actionButtonLabel:n,kind:r||"info",lowContrast:a,subtitle:t,title:o||"",inline:!0,onActionButtonClick:i})},xz=({subject:e})=>{let[t,n]=(0,lm.useState)([]);return(0,lm.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,lh.jsx)(lh.Fragment,{children:t.map(e=>(0,lh.jsx)(xH,{notification:e},e.id))})},xK=({notification:e})=>{let{actionButtonLabel:t,onActionButtonClick:n=()=>{},subtitle:r,kind:a,title:o,critical:i,progressActionLabel:s,id:l,...u}=e,[c,d]=(0,lm.useState)(t);return(0,lh.jsx)(cE.ActionableNotification,{kind:a||"info",actionButtonLabel:c,"aria-label":aZ("closesActionableNotification","Closes actionable notification"),onActionButtonClick:()=>{n(),s&&d(s)},statusIconDescription:aZ("actionableNotification","Actionable notification"),subtitle:r,title:o,lowContrast:i,inline:!0,...u})},xZ=({subject:e})=>{let[t,n]=(0,lm.useState)([]);return(0,lm.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,lh.jsx)(lh.Fragment,{children:t.map(e=>(0,lh.jsx)(xK,{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,xq=0,xJ=new xG,xX=0;function xQ(e){e&&(0,lN.createRoot)(e).render((0,lh.jsx)(xz,{subject:xY}))}function x0(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&(t instanceof Error||!(0,xW.A)(t)))?(e.description instanceof Error&&(e.description=e.description.toLocaleString()),setTimeout(()=>{xY.next({...e,id:xq++})},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function x1(e){e&&(0,lN.createRoot)(e).render((0,lh.jsx)(xZ,{subject:xJ}))}function x4(e){var t;e&&("string"==typeof(t=e.actionButtonLabel)?t.trim().length>0:"object"==typeof t&&!(0,xW.A)(t))?setTimeout(()=>{xJ.next({...e,id:xX++})},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}let x2=["NORMAL","HIGH","CRITICALLY_HIGH","OFF_SCALE_HIGH","LOW","CRITICALLY_LOW","OFF_SCALE_LOW"],x3=["critically_low","critically_high","high","low","normal","off_scale_low","off_scale_high"],x6={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"},x5=({value:e,unit:t,label:n,interpretation:r,referenceRange:a,conceptUuid:o,variant:i="card",patientUuid:s})=>{let l=(0,lm.useId)(),{referenceRange:u,isLoading:c}=function(e,t){let n=null;e&&(n=t?`${a5}/conceptreferencerange/?patient=${t}&concept=${e}&v=full`:`${a5}/conceptreferencerange/?concept=${e}&v=full`);let{data:r,error:a,isLoading:o}=uv()(n,oe),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,lm.useMemo)(()=>{if(r)return r?"--"===r?"normal":x2.includes(r)?r.toLowerCase():x3.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:aZ("notAvailable","Not available"),w=cv()({[x6["critically-low"]]:"critically_low"===m||"off_scale_low"===m,[x6["critically-high"]]:"critically_high"===m||"off_scale_high"===m,[x6.low]:"low"===m,[x6.high]:"high"===m,[x6["off-scale-low"]]:"off_scale_low"===m,[x6["off-scale-high"]]:"off_scale_high"===m}),x=cv()({[x6.container]:!0,[x6.card]:!0,[x6["critical-value"]]:p,[x6["abnormal-value"]]:f&&!p}),D=cv()({[x6.cell]:!0,[w]:!0});return"cell"===i?(0,lh.jsxs)("div",{className:D,children:[b,v&&t?` ${t}`:""]}):(0,lh.jsxs)("section",{className:x,"data-testid":"numeric-observation-card",children:[n&&(0,lh.jsxs)("div",{className:x6["label-container"],children:[(0,lh.jsx)("span",{id:h,className:x6.label,children:n}),f&&(0,lh.jsx)("span",{className:x6[m.replace("_","-")],title:aZ("abnormalValue","Abnormal value")})]}),(0,lh.jsxs)("div",{className:x6["value-container"],children:[(0,lh.jsx)("span",{id:g,"aria-labelledby":h&&y?`${h} ${y}`:h||y||void 0,className:x6.value,children:b}),v&&t&&(0,lh.jsx)("span",{id:y,className:x6.units,children:t})]})]})},x9="-esm-form-engine__page-header-module__pageHeader___6TOjO",x8=e=>{if("children"in e){let{children:t,className:n,...r}=e;return(0,lh.jsx)("div",{className:cv()(x9,n),...r,children:t})}{let{title:t,illustration:n,className:r,...a}=e;return(0,lh.jsx)("div",{className:cv()(x9,r),...a,children:(0,lh.jsx)(x7,{title:t,illustration:n})})}},x7=({title:e,illustration:t,className:n})=>{let[r,a]=(0,lm.useState)(null);return(0,lm.useEffect)(()=>{t9("@openmrs/esm-styleguide").then(e=>{a(e)})},[]),(0,lh.jsxs)("div",{className:cv()("-esm-form-engine__page-header-module__pageHeaderContent___mCImT",n),children:[t,(0,lh.jsxs)("div",{className:"-esm-form-engine__page-header-module__pageLabels___kqDS+",children:[r?.implementationName&&(0,lh.jsx)("p",{children:aZ(r.implementationName)}),(0,lh.jsx)("h1",{className:"-esm-form-engine__page-header-module__pageName___SbZBC",children:e})]})]})},De=({totalItems:e,pageSize:t,onPageNumberChange:n,pageNumber:r,dashboardLinkUrl:a,currentItems:o,dashboardLinkLabel:i})=>{let{pageSizes:s,pageItemsCount:l}=uJ(t,e,r,o),u="tablet"===uV(),c=aZ("paginationItemsCount","{{pageItemsCount}} / {{totalItems}} items",{totalItems:e,pageItemsCount:l});return(0,lh.jsx)(lh.Fragment,{children:e>0&&(0,lh.jsxs)("div",{className:cv()({"-esm-form-engine__pagination-module__tablet___82gj1":u,"-esm-form-engine__pagination-module__desktop___6yI8e":!u}),children:[(0,lh.jsxs)("div",{children:[c,a&&(0,lh.jsx)(lg,{to:a,className:"-esm-form-engine__pagination-module__configurableLink___oIqma",children:i??aZ("seeAll","See all")})]}),(0,lh.jsx)(cE.Pagination,{className:"-esm-form-engine__pagination-module__pagination___A-Lcg",page:r,pageSize:t,pageSizes:s,totalItems:e,onChange:n,pageRangeText:(e,t)=>aZ("paginationOfPages","of {{count}} pages",{count:t}),size:u?"lg":"sm"})]})})};function Dt(e){return Dr(Do(e,"usual","official"))}function Dn(e){return Dt(e)}function Dr(e){var t;let n;return e?e.text??(n=(t=e).given??[],(t.family?n.concat(t.family):n).join(" ")):""}function Da(e){return Dr(e)}function Do(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 Di(e,t=u5()()){let n=u5()(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 Ds(e,t=u5()()){let n=Di(e,t);if(null==n)return null;let r={style:"short",localeMatcher:"lookup"};return"minutes"in n&&0===n.minutes&&(r.minutesDisplay="always"),w_(n,r)}let Dl={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 Du({showIdentifierLabel:e,type:t,value:n}){return(0,lh.jsx)("span",{className:Dl.primaryIdentifier,children:(0,lh.jsxs)(cE.Tag,{className:Dl.tag,type:"gray",children:[e&&t?.text&&(0,lh.jsxs)("span",{className:Dl.label,children:[t.text,": "]}),(0,lh.jsx)("span",{className:Dl.value,children:n})]})})}function Dc({showIdentifierLabel:e,type:t,value:n}){return(0,lh.jsxs)(cE.FormLabel,{className:Dl.secondaryIdentifier,id:`patient-banner-identifier-${n}`,children:[e&&(0,lh.jsxs)("span",{className:Dl.label,children:[t?.text,": "]}),(0,lh.jsx)("span",{className:Dl.value,children:n})]})}function Dd({identifiers:e,showIdentifierLabel:t}){let{excludePatientIdentifierCodeTypes:n}=uf(),{primaryIdentifierCode:r}=u0(),a=e?.filter(e=>{let t=e.type?.coding?.[0]?.code;return t&&!n?.uuids.includes(t)})??[];return(0,lh.jsx)(lh.Fragment,{children:a?.length?a.map(({value:e,type:n},o)=>(0,lh.jsxs)(lp().Fragment,{children:[(0,lh.jsx)("span",{className:Dl.identifier,children:n?.coding?.[0]?.code===r?(0,lh.jsx)(Du,{showIdentifierLabel:t,type:n,value:e}):(0,lh.jsx)(Dc,{showIdentifierLabel:t,type:n,value:e})}),o<a.length-1&&(0,lh.jsx)("span",{className:Dl.separator,children:"\xb7"})]},e)):""})}let Dm={Female:da,Male:di,Other:ds,Unknown:dl},Dp=({gender:e})=>{let t=Dm[e];return t?(0,lh.jsx)(t,{fill:"#525252"}):null},Df={male:"Male",female:"Female",other:"Other",unknown:"Unknown"};function Dh({patient:e,renderedFrom:t}){var n;let r,a,o=Dt(e),i=e?.gender&&(a=Df[r=(n=e.gender).toLowerCase()]??"Unknown",{displayText:aZ(r,n),iconKey:a}),s=(0,lm.useMemo)(()=>({patientUuid:e.id,patient:e,renderedFrom:t}),[e.id,e,t]);return(0,lh.jsxs)("div",{className:Dl.patientInfo,children:[(0,lh.jsx)("div",{className:cv()(Dl.row,Dl.patientNameRow),children:(0,lh.jsxs)("div",{className:Dl.flexRow,children:[(0,lh.jsx)("span",{className:Dl.patientName,children:o}),i&&(0,lh.jsxs)("div",{className:Dl.gender,children:[(0,lh.jsx)(Dp,{gender:i.iconKey}),(0,lh.jsx)("span",{children:i.displayText})]}),(0,lh.jsx)(lO,{className:Dl.tagsSlot,name:"patient-banner-tags-slot",state:s})]})}),(0,lh.jsxs)("div",{className:Dl.demographics,children:[e.birthDate&&(0,lh.jsxs)(lh.Fragment,{children:[(0,lh.jsx)("span",{children:Ds(e.birthDate)}),(0,lh.jsx)("span",{className:Dl.separator,children:"\xb7"}),(0,lh.jsx)("span",{children:wv(e.birthDate,{time:!1,noToday:!0})}),(0,lh.jsx)("span",{className:Dl.separator,children:"\xb7"})]}),(0,lh.jsx)(Dd,{identifiers:e.identifier,showIdentifierLabel:!0}),(0,lh.jsx)(lO,{className:Dl.extensionSlot,name:"patient-banner-bottom-slot",state:s})]})]})}var Dg=n(8282);function Dy({patient:e,patientUuid:t,actionsSlotName:n,additionalActionsSlotState:r}){let[a,o]=(0,lm.useState)(!1),{extensions:i}=lT(n),s="tablet"===uV(),l=uZ(()=>o(!1),a),u=(0,lm.useRef)(null),c=(0,lm.useRef)(null),d=(0,lm.useId)(),m=`patient-actions-menu-trigger-${d}`,p=`patient-actions-menu-${d}`,f=(0,lm.useCallback)(()=>o(e=>!e),[]),h=(0,lm.useCallback)(()=>{o(!1),u.current?.focus()},[]),g=(0,lm.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,lm.useEffect)(()=>{if(a&&c.current){let e=c.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[a]);let y=(0,lm.useMemo)(()=>({patientUuid:t,patient:e,closeMenu:h,...r}),[t,e,h,r]);return 0===i.length?null:(0,lh.jsx)("div",{className:"-esm-form-engine__patient-banner-actions-menu-module__overflowMenuContainer___FbFcO",children:(0,lh.jsxs)("div",{"data-overflow-menu":!0,className:cv()("cds--overflow-menu",cC),ref:l,children:[(0,lh.jsxs)("button",{className:cv()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":a},cT),"aria-controls":p,"aria-expanded":a,"aria-haspopup":"true",id:m,onClick:f,onKeyDown:g,ref:u,children:[(0,lh.jsx)("span",{className:"-esm-form-engine__patient-banner-actions-menu-module__actionsButtonText___hk4xW",children:aZ("actions","Actions")})," ",(0,lh.jsx)(Dg.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}})]}),(0,lh.jsxs)("div",{className:cv()("cds--overflow-menu-options","cds--overflow-menu--flip",ck,{[cP]:a}),"aria-labelledby":m,"data-floating-menu-direction":"bottom",id:p,onKeyDown:g,ref:c,role:"menu",tabIndex:-1,children:[(0,lh.jsx)("ul",{className:cv()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":s}),children:(0,lh.jsx)(lO,{name:n,state:y},n)}),(0,lh.jsx)("span",{})]})]})})}var Dv=n(5570),Db=n.n(Dv);function Dw(e){let{patientPhotoConceptUuid:t}=uf({externalModuleName:"@openmrs/esm-styleguide"}),n=t?`${a5}/obs?patient=${e}&concept=${t}&v=full`:null,{data:r,error:a,isLoading:o}=lY()(e?n:null,oe),i=r?.data?.results[0];return{data:i?{dateTime:i?.obsDatetime,imageSrc:i?.value?.links?.uri}:null,error:a,isLoading:o}}let Dx=({width:e=56,height:t=56,"aria-label":n})=>{let{t:r}=(0,lZ.useTranslation)();return(0,lh.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,lh.jsx)("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),(0,lh.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"})]})},DD="-esm-form-engine__patient-photo-module__avatar___thboZ";function DE({patientUuid:e,patientName:t,alt:n}){let{data:r,isLoading:a}=Dw(e),[o,i]=(0,lm.useState)(null),[s,l]=(0,lm.useState)(!1),u=(0,lm.useMemo)(()=>Db().generate(e),[e]);(0,lm.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,lm.useMemo)(()=>n||(o?aZ("patientPhotoAlt","Profile photo of {{patientName}}",{patientName:t}):aZ("patientAvatarAlt","Avatar for {{patientName}}",{patientName:t})),[n,o,t]);return a||s?(0,lh.jsx)(cE.SkeletonIcon,{className:"-esm-form-engine__patient-photo-module__skeleton___WWtyX","data-testid":"skeleton-icon"}):r?.imageSrc&&!o?(0,lh.jsx)(Dx,{"aria-label":aZ("patientPhotoPlaceholder","Photo placeholder for {{patientName}}",{patientName:t})}):o?(0,lh.jsx)("div",{"aria-label":c,children:(0,lh.jsx)("img",{className:DD,src:o,alt:c,title:t})}):(0,lh.jsx)("div",{"aria-label":c,children:(0,lh.jsx)("div",{className:DD,title:t,style:{backgroundImage:u.toDataUrl(),backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:(0,lh.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 D_=["omrs-pict-appointments","omrs-pict-assessment-1","omrs-pict-assessment-2","omrs-pict-blood-bank","omrs-pict-cardiology","omrs-pict-cohorts","omrs-pict-concept-dictionary","omrs-pict-ct-scan","omrs-pict-data-entry","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-documents","omrs-pict-patient-search","omrs-pict-patients","omrs-pict-payments-desk","omrs-pict-pharmacy","omrs-pict-pharmacy-2","omrs-pict-registration","omrs-pict-reports","omrs-pict-service-queues","omrs-pict-stock-management","omrs-pict-system-administration","omrs-pict-transfer","omrs-pict-triage","omrs-pict-x-ray"],DS=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-appointments",pictogramProps:e})})),DC=DS,Dk=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-assessment-1",pictogramProps:e})})),DP=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-assessment-2",pictogramProps:e})})),DT=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-blood-bank",pictogramProps:e})})),DR=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-cardiology",pictogramProps:e})})),DO=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-cohorts",pictogramProps:e})})),DN=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-concept-dictionary",pictogramProps:e})})),D$=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-ct-scan",pictogramProps:e})})),DM=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-data-entry",pictogramProps:e})})),DA=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-dentistry",pictogramProps:e})})),Dj=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-digital-trust",pictogramProps:e})})),DI=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-emergency-department",pictogramProps:e})})),DL=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-facility",pictogramProps:e})})),DF=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-geriatrics",pictogramProps:e})})),DB=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-gynaecology",pictogramProps:e})})),DV=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),DU=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),DW=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-labs-2",pictogramProps:e})})),DH=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-metadata-export",pictogramProps:e})})),Dz=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-obstetrics",pictogramProps:e})})),DK=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-patient-documents",pictogramProps:e})})),DZ=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-patient-search",pictogramProps:e})})),DG=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-patients",pictogramProps:e})})),DY=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-payments-desk",pictogramProps:e})})),Dq=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),DJ=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-pharmacy-2",pictogramProps:e})})),DX=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-registration",pictogramProps:e})})),DQ=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-reports",pictogramProps:e})})),D0=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),D1=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),D4=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-system-administration",pictogramProps:e})})),D2=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-transfer",pictogramProps:e})})),D3=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-triage",pictogramProps:e})})),D6=(0,lm.memo)((0,lm.forwardRef)(function(e,t){return(0,lh.jsx)(D7,{ref:t,pictogram:"omrs-pict-x-ray",pictogramProps:e})})),D5=DL,D9=DG,D8=(0,lm.memo)((0,lm.forwardRef)(function({pictogram:e,fallback:t,...n},r){let a=(0,lm.useRef)(document.getElementById(e));return(0,lm.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,lh.jsx)(ur,{value:a.current,fallback:t,children:(0,lh.jsx)(D7,{ref:r,pictogram:e,pictogramProps:n})})})),D7=(0,lm.memo)((0,lm.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,lh.jsx)("svg",{ref:n,className:cv()("-esm-form-engine__pictograms-module__pictogram___ooPKM",r),height:a,width:a,children:(0,lh.jsx)("use",{href:`#${e}`})})})),Ee=({children:e})=>"tablet"===uV()?(0,lh.jsx)(cE.Layer,{children:e}):(0,lh.jsx)(lh.Fragment,{children:e}),Et=({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,lm.useState)(n),[h,g]=(0,lm.useState)(!0),[y,v]=(0,lm.useState)(!1),b=(0,lm.useCallback)(()=>{setTimeout(t,250)},[t]),w=(0,lm.useCallback)(()=>{v(!0),b()},[b]);return(0,lm.useEffect)(()=>{if(u){let e=setTimeout(w,l);return()=>clearTimeout(e)}},[l,u,w]),(0,lm.useEffect)(()=>{g(!1),window.setTimeout(()=>{g(!0)},0)},[]),(0,lh.jsx)(cE.ActionableNotification,{actionButtonLabel:p,"aria-label":aZ("closeSnackbar","Close snackbar"),className:cv()("-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:aZ("snackbarNotification","Snackbar notification"),subtitle:s,title:c,...m})},En=({subject:e})=>{let[t,n]=(0,lm.useState)([]),r=(0,lm.useCallback)(e=>{n(t=>t.filter(t=>t!==e))},[]);return(0,lm.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,lh.jsx)(lh.Fragment,{children:t.map(e=>(0,lh.jsx)(Et,{snackbar:e,closeSnackbar:()=>r(e)},e.id))})},Er=new xG,Ea=0;function Eo(e){e&&(0,lN.createRoot)(e).render((0,lh.jsx)(En,{subject:Er}))}function Ei(e){var t;e&&"string"==typeof(t=e.title)&&t.trim().length>0?setTimeout(()=>{Er.next({...e,id:Ea++})},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}let Es=({toast:e,closeToast:t})=>{let{description:n,kind:r,critical:a,title:o,actionButtonLabel:i,onActionButtonClick:s=()=>{}}=e,l=(0,lm.useCallback)(()=>{s(),t()},[t,s]);return(0,lh.jsx)("div",{children:(0,lh.jsx)(cE.ActionableNotification,{actionButtonLabel:i,kind:r||"info",lowContrast:a,subtitle:n,title:o||"",onActionButtonClick:l,onClose:t})})},El=({subject:e})=>{let[t,n]=(0,lm.useState)([]),r=(0,lm.useCallback)(e=>{n(t=>t.filter(t=>t!==e))},[]);return(0,lm.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,lh.jsx)(lh.Fragment,{children:t.map(e=>(0,lh.jsx)(Es,{toast:e,closeToast:()=>r(e)},e.id))})},Eu=new xG,Ec=0;function Ed(e){e&&(0,lN.createRoot)(e).render((0,lh.jsx)(El,{subject:Eu}))}function Em(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!(0,xW.A)(t))?setTimeout(()=>{Eu.next({...e,id:Ec++})},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}let Ep="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ef=new Uint8Array(16),Eh=[];for(let e=0;e<256;++e)Eh.push((e+256).toString(16).slice(1));let Eg=function(e,t,n){if(Ep&&!t&&!e)return Ep();let r=(e=e||{}).random??e.rng?.()??function(){if(!d){if("u"<typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");d=crypto.getRandomValues.bind(crypto)}return d(Ef)}();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(Eh[e[t+0]]+Eh[e[t+1]]+Eh[e[t+2]]+Eh[e[t+3]]+"-"+Eh[e[t+4]]+Eh[e[t+5]]+"-"+Eh[e[t+6]]+Eh[e[t+7]]+"-"+Eh[e[t+8]]+Eh[e[t+9]]+"-"+Eh[e[t+10]]+Eh[e[t+11]]+Eh[e[t+12]]+Eh[e[t+13]]+Eh[e[t+14]]+Eh[e[t+15]]).toLowerCase()}(r)};async function Ey(e,t){let{openedGroup:n}=s9.getState();if(n){if(n.groupName===e&&Ew(n.props,t))return!0;else if(!await EE({reason:"CLOSE_WORKSPACE_GROUP",explicit:!1}))return!1}return s9.setState(n=>({...n,openedGroup:{groupName:e,props:t},openedWindows:[]})),!0}async function Ev(e){let{openedGroup:t,openedWindows:n}=s9.getState();if(t){if(n.length>0&&!(e||await EE({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})))return!1;s9.setState(e=>({...e,openedGroup:null,openedWindows:[]}))}return!0}async function Eb(e,t=null,n=null,r=null){let a=s9.getState();if(!a.registeredWorkspacesByName[e])throw Error(`Unable to launch workspace ${e}. Workspace is not registered`);let o=s8(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=s7(s);if(!l)throw Error(`Unable to launch workspace ${e}. Workspace window ${o.name} is not registered to a workspace group`);let u=le(e);if(i&&(i.groupName!==l.name||!Ew(i.props,r)))return!!await EE({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})&&(s9.setState({...a,openedGroup:{groupName:l.name,props:r},openedWindows:[{windowName:s,openedWorkspaces:[EM(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(Ew(r.props,n)){let d=c.find(t=>t.workspaceName===e);return d&&Ew(d.props,t)?((i||u!==a.openedWindows.length-1)&&s9.setState(ET.restoreWindow(a,s)),!0):!!await EE({reason:"CLOSE_WORKSPACE",explicit:!1,windowName:s,workspaceName:e})&&(s9.setState({...a,openedGroup:{groupName:l.name,props:a?.openedGroup?.props??o},openedWindows:[...a.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[EM(e,t)],props:r?.props??n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return!!await EE({reason:"CLOSE_WINDOW",explicit:!1,windowName:s})&&(s9.setState({...a,openedGroup:{groupName:l.name,props:o??a?.openedGroup?.props},openedWindows:[...a.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[EM(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return"closable"!=l.persistence?(s9.setState({...a,openedGroup:{groupName:l.name,props:r??a?.openedGroup?.props??null},openedWindows:[...a.openedWindows,{windowName:s,openedWorkspaces:[EM(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0):!!await EE({reason:"CLOSE_OTHER_WINDOWS",explicit:!1,windowNameToSpare:o.name})&&(s9.setState({...a,openedGroup:{groupName:l.name,props:r??a?.openedGroup?.props??null},openedWindows:[{windowName:s,openedWorkspaces:[EM(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}function Ew(e,t){return null==e||null==t||O(e,t)}function Ex(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}function ED(e){return 0===e.length?Promise.resolve(!0):new Promise(t=>{let n=xU("workspace2-close-prompt",{size:"sm",onConfirm:()=>{n(),t(!0)},onCancel:()=>{n(),t(!1)},affectedWorkspaceTitles:e.map(e=>e.title??"")})})}function EE(e){let{openedWindows:t}=s9.getState(),n=[];switch(e.reason){case"CLOSE_WORKSPACE_GROUP":n=t.flatMap(e=>Ex(e));break;case"CLOSE_WINDOW":{let r=t.find(t=>t.windowName===e.windowName);if(!r)throw Error(`Window ${e.windowName} not found in opened windows.`);n=Ex(r);break}case"CLOSE_WORKSPACE":{let r=t.find(t=>t.windowName===e.windowName);if(!r)throw Error(`Window ${e.windowName} not found in opened windows.`);n=Ex(r,e.workspaceName);break}case"CLOSE_OTHER_WINDOWS":n=t.filter(t=>t.windowName!==e.windowNameToSpare).flatMap(e=>Ex(e))}return ED(n)}function E_(e,t){return ED(Ex(e,t))}function ES(e,t){let n=e.openedWorkspaces.findIndex(e=>e.workspaceName===t);return n<0?e:0===n?null:{...e,openedWorkspaces:e.openedWorkspaces.slice(0,n)}}function EC(e,t,n,r){let{registeredWorkspacesByName:a}=s9.getState(),o=a[n];if(!o)throw Error(`No workspace named "${n}" registered`);let i=a[t];if(!i)throw Error(`No workspace named "${t}" registered`);if(i.window!==o.window)throw Error(`Child workspace ${n} does not belong to the same workspace window as parent workspace ${t}`);if(o.window!==e.windowName)throw Error(`Cannot open child workspace ${n} as window ${o.window} is not opened`);let{openedWorkspaces:s}=e,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{...e,openedWorkspaces:[...u,EM(n,r)]}}function Ek(e,t,n){let r=e.openedWorkspaces.findIndex(e=>e.uuid===t);if(r<0)return e;let a=e.openedWorkspaces[r];if(Object.keys(n).every(e=>a[e]===n[e]))return e;let o=[...e.openedWorkspaces];return o[r]={...a,...n},{...e,openedWorkspaces:o}}function EP(e,t,n){let r=e.openedWindows.findIndex(e=>e.openedWorkspaces.some(e=>e.uuid===t));if(r<0)return e;let a=e.openedWindows[r],o=Ek(a,t,n);if(o===a)return e;let i=[...e.openedWindows];return i[r]=o,{...e,openedWindows:i}}let ET={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=e.openedWindows.findIndex(e=>e.openedWorkspaces.some(e=>e.workspaceName===t));if(n<0)return e;let r=ES(e.openedWindows[n],t),a=[...e.openedWindows],o=e.isMostRecentlyOpenedWindowHidden;if(null===r){let t=n===e.openedWindows.length-1;a.splice(n,1),t&&a.length>0&&(o=!1)}else a[n]=r;return{...e,openedWindows:a,isMostRecentlyOpenedWindowHidden:o}},openChildWorkspace(e,t,n,r){let a=e.registeredWorkspacesByName[n];if(!a)throw Error(`No workspace named "${n}" registered`);let o=e.openedWindows.findIndex(e=>e.windowName===a.window);if(-1==o)throw Error(`Cannot open child workspace ${n} as window ${a.window} is not opened`);let i=[...e.openedWindows];return i[o]=EC(e.openedWindows[o],t,n,r),{...e,openedWindows:i}},setHasUnsavedChanges:(e,t,n)=>EP(e,t,{hasUnsavedChanges:n}),setWorkspaceTitle:(e,t,n)=>EP(e,t,{title:n})};function ER(){return lD(s9,ET)}let EO=()=>(0,lm.useContext)(lF),EN=()=>Object.keys(s9.getState().registeredWorkspacesByName);function E$(e,t,n){let r=e.openedWorkspaces[e.openedWorkspaces.length-1];return(r?t[r.workspaceName]?.width:void 0)??n[e.windowName]?.width??"narrow"}function EM(e,t){return{workspaceName:e,props:t??{},hasUnsavedChanges:!1,uuid:Eg()}}function EA(e,t,n){let r=s9.getState().registeredWorkspacesByName[e];return r?{windowName:r.window,openedWorkspaces:[EM(e,t)],props:n??null,maximized:!1}:null}let Ej=({title:e,children:t,hasUnsavedChanges:n=!1})=>{let{setHasUnsavedChanges:r,setWorkspaceTitle:a}=EO();return(0,lm.useEffect)(()=>{r(n??!1)},[n,r]),(0,lm.useEffect)(()=>{a(e)},[e,a]),(0,lh.jsx)(lh.Fragment,{children:t})};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 EL(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){EB(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 EF(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 EB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EV(e){return(EV=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function EU(e,t){return(EU=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function EW(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var EH=function(e){var t=lm.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&&EU(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=EV(i);e=n?Reflect.construct(t,arguments,EV(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 EW(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),EB(EW(t=o.call(this,e)),"handleRef",function(e){t.el=e}),EB(EW(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}))}),EB(EW(t),"getParcelProps",function(){var e=EL(EL({},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,EL({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 lF&&lF.Consumer?lm.createElement(lF.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):null;var t=lF&&lF.Consumer?lm.createElement(lF.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):void 0;return lm.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},t)}}],EF(i.prototype,r),a&&EF(i,a),i}();EB(EH,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});var Ez=n(8742);let EK=lp().forwardRef(function({children:e,size:t=16,...n},r){return 16===t||"16"===t||"16px"===t?lp().createElement(Ez.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},ea||(ea=lp().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):lp().createElement(Ez.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},eo||(eo=lp().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 EZ=n(4240),EG=n(8622);let EY={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"},Eq=e=>e.registeredWorkspacesByName,EJ=({lifeCycle:e,openedWorkspace:t,openedWindow:n,groupProps:r,actions:a,renderChrome:o,isRootWorkspace:i,isLeafWorkspace:s,showActionMenu:l})=>{let u=(0,lm.useMemo)(()=>t&&{closeWorkspace:async(e={})=>{let{closeWindow:r=!1,discardUnsavedChanges:o=!1}=e;return r?!!(o||await a.promptForClosingWorkspaces())&&(a.closeWorkspace(n.openedWorkspaces[0].workspaceName),!0):!!(o||await a.promptForClosingWorkspaces(t.workspaceName))&&(a.closeWorkspace(t.workspaceName),!0)},launchChildWorkspace:async(e,r)=>{let o=t.workspaceName,{openedWorkspaces:i}=n,s=i.findIndex(e=>e.workspaceName===o);-1===s||s!==i.length-1&&i.slice(s+1).some(e=>e.hasUnsavedChanges)&&!await a.promptForClosingWorkspaces(i[s+1].workspaceName)||a.openChildWorkspace(o,e,r||{})},setWorkspaceTitle:e=>a.setWorkspaceTitle(t.uuid,e),setHasUnsavedChanges:e=>a.setHasUnsavedChanges(t.uuid,e),workspaceName:t.workspaceName,workspaceProps:t.props,windowProps:n.props,groupProps:r,workspaceMeta:s9.getState().registeredWorkspacesByName[t.workspaceName]?.meta??{},isRootWorkspace:i,isLeafWorkspace:s,windowName:n.windowName,showActionMenu:l},[t,n,r,a,i,s,l]),c=!o&&!s,d=(0,lm.useMemo)(()=>e?(0,lh.jsx)(EH,{config:e,mountParcel:lc,wrapWith:"div",wrapClassName:cv()(EY.workspaceContent,{[EY.hiddenExtraWorkspace]:c}),...u},t.workspaceName):null===e?(0,lh.jsx)("div",{className:cv()(EY.workspaceContent,{[EY.hiddenExtraWorkspace]:c}),children:(0,lh.jsx)(cE.InlineNotification,{kind:"error",title:aZ("error"),subtitle:aZ("somethingWentWrongTryReloading"),hideCloseButton:!0})}):null,[e,t.workspaceName,u,c]);return o?(0,lh.jsx)("div",{children:(0,lh.jsx)(EX,{openedWorkspace:t,openedWindow:n,isRootWorkspace:i,showActionMenu:l,closeWindow:()=>u.closeWorkspace({closeWindow:!0}),children:d})}):d??(0,lh.jsx)(cE.InlineLoading,{className:cv()(EY.loader,{[EY.hiddenExtraWorkspace]:c}),description:`${aZ("loading")}`})},EX=({openedWorkspace:e,openedWindow:t,isRootWorkspace:n,showActionMenu:r,closeWindow:a,children:o})=>{let i=uV(),{openedGroup:s,openedWindows:l,registeredWindowsByName:u,registeredWorkspacesByName:c,registeredGroupsByName:d,isMostRecentlyOpenedWindowHidden:m,setWindowMaximized:p,hideWindow:f}=ER(),h=t.windowName,{maximized:g}=t,y=e.title??"",v=u[h],b=E$(t,c,u),w=v?.icon,x=v?.canMaximize,D=!!s&&d[s.groupName]?.persistence==="closable",E=!!w&&!D,_=l.findIndex(e=>e.windowName===h)<l.length-1||m,S=Object.values(u).some(e=>e.group===s?.groupName&&void 0!==e.icon);return(0,lh.jsxs)("div",{className:cv()(EY.workspaceOuterContainer,{[EY.narrowWorkspace]:"narrow"===b,[EY.widerWorkspace]:"wider"===b,[EY.extraWideWorkspace]:"extra-wide"===b,[EY.isActionMenuOpened]:S}),children:[(0,lh.jsx)("div",{className:cv()(EY.workspaceSpacer,{[EY.hidden]:_})}),(0,lh.jsx)("div",{className:cv()(EY.workspaceMiddleContainer,{[EY.maximized]:g,[EY.hidden]:_,[EY.isRootWorkspace]:n,[EY.showActionMenu]:r}),children:(0,lh.jsx)("div",{className:cv()(EY.workspaceInnerContainer,{[EY.maximized]:g,[EY.hidden]:_,[EY.isRootWorkspace]:n}),children:o?(0,lh.jsxs)(lh.Fragment,{children:[(0,lh.jsxs)(cE.Header,{"aria-label":aZ("workspaceHeader"),className:EY.header,children:[(0,lh.jsx)(cE.HeaderName,{prefix:"",children:y}),(0,lh.jsx)("div",{className:EY.overlayHeaderSpacer}),(0,lh.jsx)(cE.HeaderGlobalBar,{className:EY.headerButtons,children:uU(i)?(0,lh.jsxs)(lh.Fragment,{children:[(x||g)&&(0,lh.jsx)(cE.HeaderGlobalAction,{"aria-label":g?aZ("minimize"):aZ("maximize"),onClick:()=>p(h,!g),children:g?(0,lh.jsx)(EK,{}):(0,lh.jsx)(EZ.hz,{})}),E&&(0,lh.jsx)(cE.HeaderGlobalAction,{"aria-label":aZ("hide"),onClick:()=>f(),children:(0,lh.jsx)(cB,{})}),!D&&(0,lh.jsx)(cE.HeaderGlobalAction,{"aria-label":aZ("close"),onClick:a,children:(0,lh.jsx)(c3,{})})]}):(0,lh.jsxs)(lh.Fragment,{children:[E&&(0,lh.jsx)(cE.HeaderGlobalAction,{"aria-label":aZ("hide"),onClick:()=>f(),children:(0,lh.jsx)(EG.d3,{})}),(0,lh.jsx)(cE.HeaderGlobalAction,{"aria-label":aZ("close"),onClick:()=>{D?Ev():a()},children:(0,lh.jsx)(c3,{})})]})})]}),o]}):(0,lh.jsx)(cE.InlineLoading,{className:EY.loader,description:`${aZ("loading")} ...`})})})]})},EQ=({openedWindow:e,groupProps:t,actions:n,renderChrome:r,showActionMenu:a})=>{let{openedWorkspaces:o}=e,[i,s]=(0,lm.useState)({}),l=lx(s9,Eq),u=(0,lm.useRef)(new Set);return(0,lm.useEffect)(()=>{let e=!1;return Promise.all(o.map(async t=>{let n=l[t.workspaceName];if(!n)return null;let{moduleName:r,component:a}=n;try{return[t.uuid,await ci(r,a)]}catch(n){return e||u.current.has(t.uuid)||(u.current.add(t.uuid),P(n)),[t.uuid,null]}})).then(t=>{e||s(Object.fromEntries(t.filter(e=>null!=e)))},P),()=>{e=!0}},[o,l]),(0,lh.jsx)(lh.Fragment,{children:o.map((s,l)=>(0,lh.jsx)(EJ,{openedWorkspace:s,openedWindow:e,groupProps:t,actions:n,renderChrome:r,lifeCycle:i[s.uuid],isRootWorkspace:0===l,isLeafWorkspace:l===o.length-1,showActionMenu:a},s.uuid))})},E0=e=>e.registeredWorkspacesByName,E1=({name:e,workspaceProps:t,windowProps:n,groupProps:r,onWindowChanged:a})=>{let o=lx(s9,E0),i=lx(s9,t=>{let n=t.registeredWorkspacesByName[e]?.window;return n?t.registeredWindowsByName[n]:void 0}),s={name:e,workspaceProps:t,windowProps:n,groupProps:r},l=(0,lm.useRef)(null),u=(0,lm.useRef)(null);if(!l.current){let a=EA(e,t,n);l.current=U({openedWindow:a,groupProps:r??null}),a&&(u.current=s)}let c=l.current;(0,lm.useEffect)(()=>{let a=u.current;if(a&&a.name===e&&O(a.workspaceProps,t)&&O(a.windowProps,n)&&O(a.groupProps,r))return;let o=EA(e,t,n);c.setState({openedWindow:o,groupProps:r??null},!0),u.current=o?s:null},[e,t,n,r,o,c]);let d=(0,lm.useMemo)(()=>(function(e){function t(t){e.setState(e=>{if(!e.openedWindow)return e;let n=t(e.openedWindow);return n===e.openedWindow?e:{...e,openedWindow:n}})}return{closeWorkspace(e){t(t=>ES(t,e))},openChildWorkspace(e,n,r){t(t=>EC(t,e,n,r))},setWorkspaceTitle(e,n){t(t=>Ek(t,e,{title:n}))},setHasUnsavedChanges(e,n){t(t=>Ek(t,e,{hasUnsavedChanges:n}))},promptForClosingWorkspaces(t){let{openedWindow:n}=e.getState();return n?E_(n,t):Promise.resolve(!0)}}})(c),[c]),{openedWindow:m,groupProps:p}=lx(c),f=m?.openedWorkspaces[m.openedWorkspaces.length-1],h=f?.workspaceName??null,g=f?.title??"",y=m?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,v=i?.width??"narrow",b=(0,lm.useRef)(a);return(0,lm.useEffect)(()=>{b.current=a}),(0,lm.useEffect)(()=>{b.current?.({workspaceName:h,windowWidth:v,title:g,hasUnsavedChanges:y})},[h,v,g,y]),(0,lh.jsx)("div",{className:"-esm-form-engine__exported-workspace-module__exportedWorkspace___3vwoL",children:m?(0,lh.jsx)(EQ,{openedWindow:m,groupProps:p,actions:d,renderChrome:!1,showActionMenu:!1}):null})},E4="-esm-form-engine__action-menu-button2-module__container___pahg-",E2="-esm-form-engine__action-menu-button2-module__elementContainer___PzOdc",E3="-esm-form-engine__action-menu-button2-module__active___4O4Bs",E6="-esm-form-engine__action-menu-button2-module__focused___+k5kD";function E5({getIcon:e,hasUnsavedChanges:t,tagContent:n}){return(0,lh.jsxs)(lh.Fragment,{children:[e({size:16}),t?(0,lh.jsx)("span",{className:"-esm-form-engine__action-menu-button2-module__interruptedTag___mS2yr",children:"!"}):(0,lh.jsx)("span",{className:"-esm-form-engine__action-menu-button2-module__countTag___rb5CW",children:n})]})}let E9=({icon:e,label:t,tagContent:n,workspaceToLaunch:r,onBeforeWorkspaceLaunch:a,hidden:o,disabled:i})=>{let s=uV(),{openedWindows:l,restoreWindow:u,hideWindow:c,isMostRecentlyOpenedWindowHidden:d}=ER(),{extension:m}=(0,lm.useContext)(lf),p=l.findIndex(e=>e.windowName===m?.extensionId),f=l[p],h=null!=f,g=h&&(p<l.length-1||d),y=h&&!g,v=f?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,b=async()=>{if(h)g?u(f.windowName):c();else if(await (a?.()??!0)){let{workspaceName:e,workspaceProps:t,windowProps:n}=r;Eb(e,t,n)}};return o?.(l)?null:"tablet"===s||"phone"===s?(0,lh.jsxs)(cE.Button,{className:cv()(E4,{[E3]:h&&!y,[E6]:y}),iconDescription:t,kind:"ghost",onClick:b,role:"button",tabIndex:0,size:"md",disabled:i?.(l),children:[(0,lh.jsx)("span",{className:E2,children:(0,lh.jsx)(E5,{hasUnsavedChanges:v,getIcon:e,tagContent:n})}),(0,lh.jsx)("span",{children:t})]}):(0,lh.jsx)(cE.IconButton,{align:"left","aria-label":t,className:cv()(E4,{[E3]:h&&!y,[E6]:y}),enterDelayMs:300,kind:"ghost",label:t,onClick:b,size:"md",disabled:i?.(l),children:(0,lh.jsx)("div",{className:E2,children:(0,lh.jsx)(E5,{hasUnsavedChanges:v,getIcon:e,tagContent:n})})})};function E8({showContactDetails:e,toggleContactDetails:t,className:n}){return(0,lh.jsx)(cE.Button,{className:n,iconDescription:"Toggle contact details",kind:"ghost",onClick:t,renderIcon:e?c2:c0,children:e?aZ("showLess","Show less"):aZ("showMore","Show more")})}let E7={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"},_e=({patientUuid:e})=>{let{cohorts:t=[],isLoading:n}=function(e){let t=e?`${a5}/cohortm/cohortmember?patient=${e}&v=custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))`:null,{data:n,isLoading:r}=lY()(t,oe),a=n?.data?.results.map(e=>({uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}));return(0,lm.useMemo)(()=>({cohorts:a,isLoading:r}),[r,a])}(e);return(0,lh.jsxs)(lh.Fragment,{children:[(0,lh.jsxs)("p",{className:E7.heading,children:[aZ("patientLists","Patient Lists")," (",t?.length??0,")"]}),n?(0,lh.jsx)(cE.InlineLoading,{description:`${aZ("loading","Loading")} ...`,role:"progressbar"}):(0,lh.jsxs)("ul",{children:[(()=>{if(t?.length>0){let e=t.sort((e,t)=>wm(e?.startDate).getTime()-wm(t?.startDate).getTime()).slice(0,3);return e?.map(e=>(0,lh.jsx)("li",{children:(0,lh.jsx)(lg,{to:`${window.spaBase}/home/patient-lists/${e.uuid}`,children:e.name},e.uuid)},e.uuid))}return(0,lh.jsx)("li",{children:"--"})})(),t.length>3&&(0,lh.jsx)("li",{className:E7.link,children:(0,lh.jsx)(lg,{to:`${window.spaBase}/home/patient-lists`,children:aZ("seeMoreLists","See {{count}} more lists",{count:t?.length-3})})})]})]})},_t=({patientId:e})=>{let{patient:t,isLoading:n}=uQ(e),r=t?.address?.find(e=>"home"===e.use),a=e=>e.split("#")[1];return n?(0,lh.jsx)(cE.InlineLoading,{description:`${aZ("loading","Loading")} ...`,role:"progressbar"}):(0,lh.jsxs)(lh.Fragment,{children:[(0,lh.jsx)("p",{className:E7.heading,children:aZ("address","Address")}),(0,lh.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,lh.jsxs)("li",{children:[aZ(a(t.url),a(t.url)),": ",t.valueString]},`address-${e}-${n}`)):(0,lh.jsxs)("li",{children:[aZ(e,e),": ",t]},`address-${e}`)):(0,lh.jsx)("li",{children:"--"})})]})},_n=({patientUuid:e})=>{let{isLoading:t,contactAttributes:n}=(e=>{let{contactAttributeTypes:t=[]}=uf({externalModuleName:"@openmrs/esm-patient-banner-app"}),{attributes:n,error:r,isLoading:a}=(e=>{let{data:t,error:n,isLoading:r}=uv()(`${a5}/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)))`,oe);return{isLoading:r,attributes:t?.data.person.attributes??[],error:n}})(e);return{contactAttributes:(0,lm.useMemo)(()=>n.filter(({attributeType:e})=>t?.some(t=>e.uuid===t)),[n,t]),isLoading:a,error:r}})(e),r=(0,lm.useMemo)(()=>n?[...n?.map(e=>[e.attributeType.display?aZ(e.attributeType.display,e.attributeType.display):"",e.value])]:[],[n]);return(0,lh.jsxs)(lh.Fragment,{children:[(0,lh.jsx)("p",{className:E7.heading,children:aZ("contactDetails","Contact Details")}),t?(0,lh.jsx)(cE.InlineLoading,{description:`${aZ("loading","Loading")} ...`,role:"progressbar"}):(0,lh.jsx)("ul",{children:r.length?r.map(([e,t],n)=>(0,lh.jsxs)("li",{children:[e,": ",t]},`${e}-${t}-${n}`)):(0,lh.jsx)("li",{children:"--"})})]})},_r=({patientId:e})=>{let{data:t,isLoading:n}=function(e){let t=`${a5}/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}=lY()(e?t:null,oe),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,lh.jsxs)(lh.Fragment,{children:[(0,lh.jsx)("p",{className:E7.heading,children:aZ("relationships","Relationships")}),n?(0,lh.jsx)(cE.InlineLoading,{description:`${aZ("loading","Loading")} ...`,role:"progressbar"}):(0,lh.jsx)("ul",{children:t&&t.length>0?(0,lh.jsx)(lh.Fragment,{children:t.map(e=>(0,lh.jsxs)("li",{className:E7.relationship,children:[(0,lh.jsx)("div",{children:(0,lh.jsx)(lg,{to:`${window.spaBase}/patient/${e.relativeUuid}/chart`,children:e.display})}),(0,lh.jsx)("div",{children:e.relationshipType}),(0,lh.jsx)("div",{children:`${e.relativeAge?e.relativeAge:"--"} ${e.relativeAge?1===e.relativeAge?aZ("yearAbbreviation","yr"):aZ("yearsAbbreviation","yrs"):""}`})]},e.uuid))}):(0,lh.jsx)("li",{children:"--"})})]})};function _a({patientId:e,deceased:t}){return(0,lh.jsxs)("div",{className:cv()(E7.contactDetails,{[E7.deceased]:t}),children:[(0,lh.jsxs)("div",{className:E7.row,children:[(0,lh.jsx)("div",{className:E7.col,children:(0,lh.jsx)(_t,{patientId:e})}),(0,lh.jsx)("div",{className:E7.col,children:(0,lh.jsx)(_n,{patientUuid:e})})]}),(0,lh.jsxs)("div",{className:E7.row,children:[(0,lh.jsx)("div",{className:E7.col,children:(0,lh.jsx)(_r,{patientId:e})}),(0,lh.jsx)("div",{className:E7.col,children:(0,lh.jsx)(_e,{patientUuid:e})})]})]})}function _o(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 _i="-esm-form-engine__action-menu2-module__container___5s3CM";function _s({workspaceGroup:e,groupProps:t}){let n=uV(),{persistence:r}=e;return(0,lh.jsx)("aside",{className:"-esm-form-engine__action-menu2-module__sideRail___qwAz4",children:(0,lh.jsxs)("div",{className:_i,children:["closable"==r&&uU(n)&&(0,lh.jsx)(cE.IconButton,{align:"left",onClick:()=>Ev(),label:aZ("close"),kind:"ghost",children:(0,lh.jsx)(c3,{})}),(0,lh.jsx)(lf.Provider,{value:{moduleName:e.moduleName,featureName:e.name},children:(0,lh.jsx)(lO,{className:_i,name:e.name,state:{groupProps:t}})})]})})}function _l(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}}function _u(e){e&&(0,lN.createRoot)(e).render((0,lh.jsx)(_c,{}))}function _c(){let{openedGroup:e,openedWindows:t,registeredGroupsByName:n,registeredWindowsByName:r}=ER();if((0,lm.useEffect)(()=>iv("before-page-changed",t=>{let{newPage:r,cancelNavigation:a,oldUrl:o,newUrl:i}=t;if(!e)return;if(r)return void a(Ev().then(e=>!e));let s=n[e.groupName],l=s?.scopePattern;l&&function(e,t,n){try{let r=new RegExp(e),a=_l(t),o=_l(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(Ev().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,lh.jsxs)("div",{className:cv()("-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,lh.jsx)("div",{className:"-esm-form-engine__workspace-windows-and-menu-module__workspaceWindowsContainer___zpk7G",children:t.map(t=>(0,lh.jsx)(_d,{openedWindow:t,groupProps:e.props,showActionMenu:s},t.windowName))}),s&&(0,lh.jsx)(_s,{workspaceGroup:a,groupProps:e.props})]})}function _d({openedWindow:e,groupProps:t,showActionMenu:n}){let{windowName:r}=e,a=(0,lm.useMemo)(()=>({closeWorkspace(e){s9.setState(t=>ET.closeWorkspace(t,e))},openChildWorkspace(e,t,n){s9.setState(r=>ET.openChildWorkspace(r,e,t,n))},setWorkspaceTitle(e,t){s9.setState(n=>ET.setWorkspaceTitle(n,e,t))},setHasUnsavedChanges(e,t){s9.setState(n=>ET.setHasUnsavedChanges(n,e,t))},promptForClosingWorkspaces(e){let t=s9.getState().openedWindows.find(e=>e.windowName===r);return t?E_(t,e):Promise.resolve(!0)}}),[r]);return(0,lh.jsx)(EQ,{openedWindow:e,groupProps:t,actions:a,renderChrome:!0,showActionMenu:n})}function _m(e,t,n){if(null==e)return n;let r=bA(e);if(!r)return console.warn(`matchLocale: invalid requested locale tag: ${JSON.stringify(e)}`),n;let a=[];for(let e of t){let t=bA(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 _p(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}function _f(e){return!!e&&e.constructor===Object}var _h=n(7229);function _g(e){let[t,n,r]=e.split(".");return`${t}.${n}.${r}`}function _y(e,t){return _h(function(e){let t=e.indexOf("-");if(t>=0){let n=_g(e.slice(0,t)),r=e.slice(t+1);return`${n}-${r}`}return _g(e)}(t),e,{includePrerelease:!0})}async function _v(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 _b(a(i)),await e()}catch(e){o?.(e,i),n=e}while(r(i++));throw n}async function _b(e){if(!(e<=0))return new Promise(t=>setTimeout(t,e))}function _w(e,t,n,r){}function _x(e){}function _D(e){return Promise.resolve([])}function _E(e){return Promise.resolve([])}function __(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 _S(e){return()=>{}}function _C(){return!0}}}]);
|