@openmrs/esm-cohort-builder-app 4.0.7-pre.1530 → 4.0.7-pre.1533
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/199.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(globalThis.webpackChunk_openmrs_esm_cohort_builder_app=globalThis.webpackChunk_openmrs_esm_cohort_builder_app||[]).push([["199"],{7581(e){e.exports=function(e,t,r){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=r();return this.format(e)===t.format(e)}}},5238(e){e.exports=function(e,t,r){var n=t.prototype,o=function(e){var t=e.date,o=e.utc,a={};if(!(null===t||t instanceof Date||t instanceof Array||n.$utils().u(t)||"Object"!==t.constructor.name)){if(!Object.keys(t).length)return new Date;var i=o?r.utc():r();Object.keys(t).forEach(function(e){var r;a["date"===(r=n.$utils().p(e))?"day":r]=t[e]});var s=a.day||(a.year||a.month>=0?1:i.date()),l=a.year||i.year(),u=a.month>=0?a.month:a.year||a.day?0:i.month(),c=a.hour||0,d=a.minute||0,f=a.second||0,p=a.millisecond||0;return o?new Date(Date.UTC(l,u,s,c,d,f,p)):new Date(l,u,s,c,d,f,p)}return t},a=n.parse;n.parse=function(e){e.date=o.bind(this)(e),a.bind(this)(e)};var i=n.set,s=n.add,l=n.subtract,u=function(e,t,r,n){void 0===n&&(n=1);var o=Object.keys(t),a=this;return o.forEach(function(r){a=e.bind(a)(t[r]*n,r)}),a};n.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)},n.add=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t):s.bind(this)(e,t)},n.subtract=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t,-1):l.bind(this)(e,t)}}},3826(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,o,a){var i=o.prototype;a.utc=function(e){var t={date:e,utc:!0,args:arguments};return new o(t)},i.utc=function(t){var r=a(this.toDate(),{locale:this.$L,utc:!0});return t?r.add(this.utcOffset(),e):r},i.local=function(){return a(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(n,o){var a=this.$utils().u;if(a(n))return this.$u?0:a(this.$offset)?u.call(this):this.$offset;if("string"==typeof n&&null===(n=function(e){void 0===e&&(e="");var n=e.match(t);if(!n)return null;var o=(""+n[0]).match(r)||["-",0,0],a=o[0],i=60*o[1]+ +o[2];return 0===i?0:"+"===a?i:-i}(n)))return this;var i=16>=Math.abs(n)?60*n:n,s=this;if(o)return s.$offset=i,s.$u=0===n,s;if(0!==n){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?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var f=i.diff;i.diff=function(e,t,r){if(e&&this.$u===e.$u)return f.call(this,e,t,r);var n=this.local(),o=a(e).local();return f.call(n,o,t,r)}}}()},2849(e){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function n(e){if(!e||"[object Object]"!==r.call(e)||e.nodeType||e.setInterval)return!1;var n,o=t.call(e,"constructor"),a=t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!a)return!1;for(n in e);return void 0===n||t.call(e,n)}e.exports=function e(){var t,r,o,a,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(r in t)o=l[r],l!==(a=t[r])&&(d&&a&&(n(a)||(i=Array.isArray(a)))?(i?(i=!1,s=o&&Array.isArray(o)?o:[]):s=o&&n(o)?o:{},l[r]=e(d,s,a)):void 0!==a&&(l[r]=a));return l}},6767(e,t,r){!function(t){"use strict";var n=r(6974);function o(e){return function(t,r){return"object"==typeof t&&(r=t,t=null),null==t&&(t=new Date().toString()),r||(r={}),e.call(this,t,r)}}var a=e.exports={generate:o(function(e,t){return new n(e,t)})};t&&(t.fn.geopattern=o(function(e,r){return this.each(function(){var n=t(this).attr("data-title-sha");n&&(r=t.extend({hash:n},r));var o=a.generate(e,r);t(this).css("background-image",o.toDataUrl())})}))}("u">typeof jQuery?jQuery:null)},2467(e){"use strict";e.exports={hex2rgb:function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,t,r,n){return t+t+r+r+n+n});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,r,n=e.r,o=e.g,a=e.b,i=Math.max(n/=255,o/=255,a/=255),s=Math.min(n,o,a),l=(i+s)/2;if(i===s)t=r=0;else{var u=i-s;switch(r=l>.5?u/(2-i-s):u/(i+s),i){case n:t=(o-a)/u+6*(o<a);break;case o:t=(a-n)/u+2;break;case a:t=(n-o)/u+4}t/=6}return{h:t,s:r,l:l}},hsl2rgb:function(e){function t(e,t,r){return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?e+(t-e)*6*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}var r,n,o,a=e.h,i=e.s,s=e.l;if(0===i)r=n=o=s;else{var l=s<.5?s*(1+i):s+i-s*i,u=2*s-l;r=t(u,l,a+1/3),n=t(u,l,a),o=t(u,l,a-1/3)}return{r:Math.round(255*r),g:Math.round(255*n),b:Math.round(255*o)}},rgb2rgbString:function(e){return"rgb("+[e.r,e.g,e.b].join(",")+")"}}},6974(e,t,r){"use strict";var n=r(2849),o=r(2467),a=r(6743),i=r(8502),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,r){return parseInt(e.substr(t,r||1),16)}function d(e,t,r,n,o){return(parseFloat(e)-t)*(o-n)/(r-t)+n}function f(e){return e%2==0?"#ddd":"#222"}function p(e){return d(e,0,15,.02,.15)}var m=e.exports=function(e,t){return this.opts=n({},s,t),this.hash=t.hash||a(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,r,n,o){var a=g(n),i=p(o[0]),s=f(o[0]),l={stroke:u,"stroke-opacity":.02,"fill-opacity":i,fill:s};e.polyline(a,l).transform({translate:[t+n,r],scale:[-1,1]}),e.polyline(a,l).transform({translate:[t+n,r+2*n],scale:[1,-1]}),l={stroke:u,"stroke-opacity":.02,"fill-opacity":i=p(o[1]),fill:s=f(o[1])},e.polyline(a,l).transform({translate:[t+n,r+2*n],scale:[-1,-1]}),e.polyline(a,l).transform({translate:[t+n,r],scale:[1,1]})}function v(e,t,r,n,o){var a=p(o),i=f(o),s=g(n),l={stroke:u,"stroke-opacity":.02,"fill-opacity":a,fill:i};e.polyline(s,l).transform({translate:[t,r+n],scale:[1,-1]}),e.polyline(s,l).transform({translate:[t+2*n,r+n],scale:[-1,-1]}),e.polyline(s,l).transform({translate:[t,r+n],scale:[1,1]}),e.polyline(s,l).transform({translate:[t+2*n,r+n],scale:[-1,1]})}m.prototype.toSvg=function(){return this.svg.toString()},m.prototype.toString=function(){return this.toSvg()},m.prototype.toBase64=function(){var e=this.toSvg();return"u">typeof window&&"function"==typeof window.btoa?window.btoa(e):new Buffer(e).toString("base64")},m.prototype.toDataUri=function(){return"data:image/svg+xml;base64,"+this.toBase64()},m.prototype.toDataUrl=function(){return'url("'+this.toDataUri()+'")'},m.prototype.generateBackground=function(){var e,t,r,n;this.opts.color?r=o.hex2rgb(this.opts.color):(t=d(c(this.hash,14,3),0,4095,0,359),n=c(this.hash,17),(e=o.rgb2hsl(o.hex2rgb(this.opts.baseColor))).h=(360*e.h-t+360)%360/360,n%2==0?e.s=Math.min(1,(100*e.s+n)/100):e.s=Math.max(0,(100*e.s-n)/100),r=o.hsl2rgb(e)),this.color=o.rgb2hex(r),this.svg.rect(0,0,"100%","100%",{fill:o.rgb2rgbString(r)})},m.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)]()},m.prototype.geoHexagons=function(){var e,t,r,n,o,a,i,s,l,m=d(c(this.hash,0),0,15,8,60),h=m*Math.sqrt(3),g=2*m,y=(s=m/2,[0,l=Math.sin(60*Math.PI/180)*m,s,0,s+m,0,2*m,l,s+m,2*l,s,2*l,0,l].join(","));for(this.svg.setWidth(3*g+3*m),this.svg.setHeight(6*h),t=0,i=0;i<6;i++)for(a=0;a<6;a++)o=c(this.hash,t),e=a%2==0?i*h:i*h+h/2,r=p(o),n={fill:f(o),"fill-opacity":r,stroke:u,"stroke-opacity":.02},this.svg.polyline(y,n).transform({translate:[a*m*1.5-g/2,e-h/2]}),0===a&&this.svg.polyline(y,n).transform({translate:[6*m*1.5-g/2,e-h/2]}),0===i&&(e=a%2==0?6*h:6*h+h/2,this.svg.polyline(y,n).transform({translate:[a*m*1.5-g/2,e-h/2]})),0===a&&0===i&&this.svg.polyline(y,n).transform({translate:[6*m*1.5-g/2,5*h+h/2]}),t++},m.prototype.geoSineWaves=function(){var e,t,r,n,o,a,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++)r=p(a=c(this.hash,t)),e=f(a),i=s/4*.7,o={fill:"none",stroke:e,opacity:r,"stroke-width":""+u+"px"},n="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(n,o).transform({translate:[-s/4,u*t-1.5*l]}),this.svg.path(n,o).transform({translate:[-s/4,u*t-1.5*l+36*u]})},m.prototype.geoChevrons=function(){var e,t,r,n,o,a,i,s=d(c(this.hash,0),0,15,30,80),l=d(c(this.hash,0),0,15,30,80),m=(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(a=0;a<6;a++)r=p(o=c(this.hash,t)),n={stroke:u,"stroke-opacity":.02,fill:f(o),"fill-opacity":r,"stroke-width":1},this.svg.group(n).transform({translate:[a*s,i*l*.66-l/2]}).polyline(m).end(),0===i&&this.svg.group(n).transform({translate:[a*s,6*l*.66-l/2]}).polyline(m).end(),t+=1},m.prototype.geoPlusSigns=function(){var e,t,r,n,o,a,i,s,l=d(c(this.hash,0),0,15,10,25),m=3*l,g=h(l);for(this.svg.setWidth(12*l),this.svg.setHeight(12*l),r=0,s=0;s<6;s++)for(i=0;i<6;i++)n=p(a=c(this.hash,r)),t=f(a),e=+(s%2!=0),o={fill:t,stroke:u,"stroke-opacity":.02,"fill-opacity":n},this.svg.group(o).transform({translate:[i*m-i*l+e*l-l,s*m-s*l-m/2]}).rect(g).end(),0===i&&this.svg.group(o).transform({translate:[4*m-i*l+e*l-l,s*m-s*l-m/2]}).rect(g).end(),0===s&&this.svg.group(o).transform({translate:[i*m-i*l+e*l-l,4*m-s*l-m/2]}).rect(g).end(),0===i&&0===s&&this.svg.group(o).transform({translate:[4*m-i*l+e*l-l,4*m-s*l-m/2]}).rect(g).end(),r++},m.prototype.geoXes=function(){var e,t,r,n,o,a,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(a=0;a<6;a++)r=p(o=c(this.hash,t)),e=a%2==0?i*u-.5*u:i*u-.5*u+u/4,n={fill:f(o),opacity:r},this.svg.group(n).transform({translate:[a*u/2-u/2,e-i*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===a&&this.svg.group(n).transform({translate:[6*u/2-u/2,e-i*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===i&&(e=a%2==0?6*u-u/2:6*u-u/2+u/4,this.svg.group(n).transform({translate:[a*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end()),5===i&&this.svg.group(n).transform({translate:[a*u/2-u/2,e-11*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===a&&0===i&&this.svg.group(n).transform({translate:[6*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),t++},m.prototype.geoOverlappingCircles=function(){var e,t,r,n,o,a,i=d(c(this.hash,0),0,15,25,200)/2;for(this.svg.setWidth(6*i),this.svg.setHeight(6*i),e=0,a=0;a<6;a++)for(o=0;o<6;o++)t=p(n=c(this.hash,e)),r={fill:f(n),opacity:t},this.svg.circle(o*i,a*i,i,r),0===o&&this.svg.circle(6*i,a*i,i,r),0===a&&this.svg.circle(o*i,6*i,i,r),0===o&&0===a&&this.svg.circle(6*i,6*i,i,r),e++},m.prototype.geoOctogons=function(){var e,t,r,n,o,a,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),r=0,i=0;i<6;i++)for(a=0;a<6;a++)n=p(o=c(this.hash,r)),t=f(o),this.svg.polyline(l,{fill:t,"fill-opacity":n,stroke:u,"stroke-opacity":.02}).transform({translate:[a*s,i*s]}),r+=1},m.prototype.geoSquares=function(){var e,t,r,n,o,a,i=d(c(this.hash,0),0,15,10,60);for(this.svg.setWidth(6*i),this.svg.setHeight(6*i),t=0,a=0;a<6;a++)for(o=0;o<6;o++)r=p(n=c(this.hash,t)),e=f(n),this.svg.rect(o*i,a*i,i,i,{fill:e,"fill-opacity":r,stroke:u,"stroke-opacity":.02}),t+=1},m.prototype.geoConcentricCircles=function(){var e,t,r,n,o,a,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,a=0;a<6;a++)for(o=0;o<6;o++)r=p(n=c(this.hash,t)),e=f(n),this.svg.circle(o*i+o*s+(i+s)/2,a*i+a*s+(i+s)/2,i/2,{fill:"none",stroke:e,opacity:r,"stroke-width":s+"px"}),r=p(n=c(this.hash,39-t)),e=f(n),this.svg.circle(o*i+o*s+(i+s)/2,a*i+a*s+(i+s)/2,i/4,{fill:e,"fill-opacity":r}),t+=1},m.prototype.geoOverlappingRings=function(){var e,t,r,n,o,a,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,a=0;a<6;a++)for(o=0;o<6;o++)t=p(n=c(this.hash,e)),r={fill:"none",stroke:f(n),opacity:t,"stroke-width":s+"px"},this.svg.circle(o*i,a*i,i-s/2,r),0===o&&this.svg.circle(6*i,a*i,i-s/2,r),0===a&&this.svg.circle(o*i,6*i,i-s/2,r),0===o&&0===a&&this.svg.circle(6*i,6*i,i-s/2,r),e+=1},m.prototype.geoTriangles=function(){var e,t,r,n,o,a,i,s,l=d(c(this.hash,0),0,15,15,80),m=l/2*Math.sqrt(3),h=[s=l/2,0,l,m,0,m,s,0].join(",");for(this.svg.setWidth(3*l),this.svg.setHeight(6*m),e=0,i=0;i<6;i++)for(a=0;a<6;a++)t=p(o=c(this.hash,e)),n={fill:f(o),"fill-opacity":t,stroke:u,"stroke-opacity":.02},r=i%2==0?180*(a%2==0):180*(a%2!=0),this.svg.polyline(h,n).transform({translate:[a*l*.5-l/2,m*i],rotate:[r,l/2,m/2]}),0===a&&this.svg.polyline(h,n).transform({translate:[6*l*.5-l/2,m*i],rotate:[r,l/2,m/2]}),e+=1},m.prototype.geoDiamonds=function(){var e,t,r,n,o,a,i,s=d(c(this.hash,0),0,15,10,50),l=d(c(this.hash,1),0,15,10,50),m=[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(a=0;a<6;a++)r=p(o=c(this.hash,t)),n={fill:f(o),"fill-opacity":r,stroke:u,"stroke-opacity":.02},e=i%2==0?0:s/2,this.svg.polyline(m,n).transform({translate:[a*s-s/2+e,l/2*i-l/2]}),0===a&&this.svg.polyline(m,n).transform({translate:[6*s-s/2+e,l/2*i-l/2]}),0===i&&this.svg.polyline(m,n).transform({translate:[a*s-s/2+e,l/2*6-l/2]}),0===a&&0===i&&this.svg.polyline(m,n).transform({translate:[6*s-s/2+e,l/2*6-l/2]}),t+=1},m.prototype.geoNestedSquares=function(){var e,t,r,n,o,a,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,a=0;a<6;a++)for(o=0;o<6;o++)t=p(n=c(this.hash,e)),r={fill:"none",stroke:f(n),opacity:t,"stroke-width":i+"px"},this.svg.rect(o*s+o*i*2+i/2,a*s+a*i*2+i/2,s,s,r),t=p(n=c(this.hash,39-e)),r={fill:"none",stroke:f(n),opacity:t,"stroke-width":i+"px"},this.svg.rect(o*s+o*i*2+i/2+2*i,a*s+a*i*2+i/2+2*i,3*i,3*i,r),e+=1},m.prototype.geoMosaicSquares=function(){var e,t,r,n=d(c(this.hash,0),0,15,15,50);for(this.svg.setWidth(8*n),this.svg.setHeight(8*n),e=0,r=0;r<4;r++)for(t=0;t<4;t++)t%2==0?r%2==0?v(this.svg,t*n*2,r*n*2,n,c(this.hash,e)):y(this.svg,t*n*2,r*n*2,n,[c(this.hash,e),c(this.hash,e+1)]):r%2==0?y(this.svg,t*n*2,r*n*2,n,[c(this.hash,e),c(this.hash,e+1)]):v(this.svg,t*n*2,r*n*2,n,c(this.hash,e)),e+=1},m.prototype.geoPlaid=function(){var e,t,r,n,o,a,i=0,s=0;for(t=0;t<36;)i+=c(this.hash,t)+5,r=p(a=c(this.hash,t+1)),e=f(a),n=a+5,this.svg.rect(0,i,"100%",n,{opacity:r,fill:e}),i+=n,t+=2;for(t=0;t<36;)s+=c(this.hash,t)+5,r=p(a=c(this.hash,t+1)),e=f(a),o=a+5,this.svg.rect(s,0,o,"100%",{opacity:r,fill:e}),s+=o,t+=2;this.svg.setWidth(s),this.svg.setHeight(i)},m.prototype.geoTessellation=function(){var e,t,r,n,o=d(c(this.hash,0),0,15,5,40),a=o*Math.sqrt(3),i=2*o,s=o/2*Math.sqrt(3),l=[0,0,s,o/2,0,o,0,0].join(","),m=3*o+2*s,h=2*a+2*o;for(this.svg.setWidth(m),this.svg.setHeight(h),e=0;e<20;e++)switch(t=p(n=c(this.hash,e)),r={stroke:u,"stroke-opacity":.02,fill:f(n),"fill-opacity":t,"stroke-width":1},e){case 0:this.svg.rect(-o/2,-o/2,o,o,r),this.svg.rect(m-o/2,-o/2,o,o,r),this.svg.rect(-o/2,h-o/2,o,o,r),this.svg.rect(m-o/2,h-o/2,o,o,r);break;case 1:this.svg.rect(i/2+s,a/2,o,o,r);break;case 2:this.svg.rect(-o/2,h/2-o/2,o,o,r),this.svg.rect(m-o/2,h/2-o/2,o,o,r);break;case 3:this.svg.rect(i/2+s,1.5*a+o,o,o,r);break;case 4:this.svg.polyline(l,r).transform({translate:[o/2,-o/2],rotate:[0,o/2,s/2]}),this.svg.polyline(l,r).transform({translate:[o/2,h- -o/2],rotate:[0,o/2,s/2],scale:[1,-1]});break;case 5:this.svg.polyline(l,r).transform({translate:[m-o/2,-o/2],rotate:[0,o/2,s/2],scale:[-1,1]}),this.svg.polyline(l,r).transform({translate:[m-o/2,h+o/2],rotate:[0,o/2,s/2],scale:[-1,-1]});break;case 6:this.svg.polyline(l,r).transform({translate:[m/2+o/2,a/2]});break;case 7:this.svg.polyline(l,r).transform({translate:[m-m/2-o/2,a/2],scale:[-1,1]});break;case 8:this.svg.polyline(l,r).transform({translate:[m/2+o/2,h-a/2],scale:[1,-1]});break;case 9:this.svg.polyline(l,r).transform({translate:[m-m/2-o/2,h-a/2],scale:[-1,-1]});break;case 10:this.svg.polyline(l,r).transform({translate:[o/2,h/2-o/2]});break;case 11:this.svg.polyline(l,r).transform({translate:[m-o/2,h/2-o/2],scale:[-1,1]});break;case 12:this.svg.rect(0,0,o,o,r).transform({translate:[o/2,o/2],rotate:[-30,0,0]});break;case 13:this.svg.rect(0,0,o,o,r).transform({scale:[-1,1],translate:[-m+o/2,o/2],rotate:[-30,0,0]});break;case 14:this.svg.rect(0,0,o,o,r).transform({translate:[o/2,h/2-o/2-o],rotate:[30,0,o]});break;case 15:this.svg.rect(0,0,o,o,r).transform({scale:[-1,1],translate:[-m+o/2,h/2-o/2-o],rotate:[30,0,o]});break;case 16:this.svg.rect(0,0,o,o,r).transform({scale:[1,-1],translate:[o/2,-h+h/2-o/2-o],rotate:[30,0,o]});break;case 17:this.svg.rect(0,0,o,o,r).transform({scale:[-1,-1],translate:[-m+o/2,-h+h/2-o/2-o],rotate:[30,0,o]});break;case 18:this.svg.rect(0,0,o,o,r).transform({scale:[1,-1],translate:[o/2,-h+o/2],rotate:[-30,0,0]});break;case 19:this.svg.rect(0,0,o,o,r).transform({scale:[-1,-1],translate:[-m+o/2,-h+o/2],rotate:[-30,0,0]})}}},6743(e){"use strict";function t(){var e=0x67452301,t=0xefcdab89,r=0x98badcfe,n=0x10325476,o=0xc3d2e1f0,a=new Uint32Array(80),i=0,s=24,l=0;function u(){for(var s,l,u=16;u<80;u++){var c=a[u-3]^a[u-8]^a[u-14]^a[u-16];a[u]=c<<1|c>>>31}var d=e,f=t,p=r,m=n,h=o;for(u=0;u<80;u++){u<20?(s=m^f&(p^m),l=0x5a827999):u<40?(s=f^p^m,l=0x6ed9eba1):u<60?(s=f&p|m&(f|p),l=0x8f1bbcdc):(s=f^p^m,l=0xca62c1d6);var g=(d<<5|d>>>27)+s+h+l+(0|a[u]);h=m,m=p,p=f<<30|f>>>2,f=d,d=g}for(u=0,e=e+d|0,t=t+f|0,r=r+p|0,n=n+m|0,o=o+h|0,i=0;u<16;u++)a[u]=0}function c(e){a[i]|=(255&e)<<s,s?s-=8:(i++,s=24),16===i&&u()}function d(e){for(var t="",r=28;r>=0;r-=4)t+=(e>>r&15).toString(16);return t}return{update:function(e){if("string"==typeof e){var t=e.length;l+=8*t;for(var r=0;r<t;r++)c(e.charCodeAt(r));return}var n=e.length;l+=8*n;for(var o=0;o<n;o++)c(e[o])},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 a=24;a>=0;a-=8)c(l>>a);return d(e)+d(t)+d(r)+d(n)+d(o)}}}e.exports=function(e){if(void 0===e)return t();var r=t();return r.update(e),r.digest()}},8502(e,t,r){"use strict";var n=r(2849),o=r(6541);function a(){return this.width=100,this.height=100,this.svg=o("svg"),this.context=[],this.setAttributes(this.svg,{xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height}),this}e.exports=a,a.prototype.currentContext=function(){return this.context[this.context.length-1]||this.svg},a.prototype.end=function(){return this.context.pop(),this},a.prototype.currentNode=function(){var e=this.currentContext();return e.lastChild||e},a.prototype.transform=function(e){return this.currentNode().setAttribute("transform",Object.keys(e).map(function(t){return t+"("+e[t].join(",")+")"}).join(" ")),this},a.prototype.setAttributes=function(e,t){Object.keys(t).forEach(function(r){e.setAttribute(r,t[r])})},a.prototype.setWidth=function(e){this.svg.setAttribute("width",Math.floor(e))},a.prototype.setHeight=function(e){this.svg.setAttribute("height",Math.floor(e))},a.prototype.toString=function(){return this.svg.toString()},a.prototype.rect=function(e,t,r,a,i){var s=this;if(Array.isArray(e))return e.forEach(function(e){s.rect.apply(s,e.concat(i))}),this;var l=o("rect");return this.currentContext().appendChild(l),this.setAttributes(l,n({x:e,y:t,width:r,height:a},i)),this},a.prototype.circle=function(e,t,r,a){var i=o("circle");return this.currentContext().appendChild(i),this.setAttributes(i,n({cx:e,cy:t,r:r},a)),this},a.prototype.path=function(e,t){var r=o("path");return this.currentContext().appendChild(r),this.setAttributes(r,n({d:e},t)),this},a.prototype.polyline=function(e,t){var r=this;if(Array.isArray(e))return e.forEach(function(e){r.polyline(e,t)}),this;var a=o("polyline");return this.currentContext().appendChild(a),this.setAttributes(a,n({points:e},t)),this},a.prototype.group=function(e){var t=o("g");return this.currentContext().appendChild(t),this.context.push(t),this.setAttributes(t,n({},e)),this}},6541(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("")}},8067(e,t){"use strict";t.pathToRegexp=function(e,t={}){let{delimiter:u="/",end:c=!0,sensitive:d=!1,trailing:f=!0}=t,p=[],m=[];for(let c of function e(t,r){if(Array.isArray(t))for(let n of t)e(n,r);else r.push(t);return r}(e,[])){let e="object"==typeof c?c:function(e,t={}){let{encodePath:i=r}=t,u=[...e],c=[],d=0,f=0;function p(){let t="";if(n.test(u[d]))do t+=u[d++];while(o.test(u[d]));else if('"'===u[d]){let r=d;for(;d++<u.length;){if('"'===u[d]){d++,r=0;break}"\\"===u[d]&&d++,t+=u[d]}if(r)throw new l(`Unterminated quote at index ${r}`,e)}if(!t)throw new l(`Missing parameter name at index ${d}`,e);return t}for(;d<u.length;){let e=u[d],t=a[e];t?c.push({type:t,index:d++,value:e}):"\\"===e?c.push({type:"escape",index:d++,value:u[d++]}):":"===e?c.push({type:"param",index:d++,value:p()}):"*"===e?c.push({type:"wildcard",index:d++,value:p()}):c.push({type:"char",index:d++,value:e})}return c.push({type:"end",index:d,value:""}),new s(function t(r){let n=[];for(;;){let o=c[f++];if(o.type===r)break;if("char"===o.type||"escape"===o.type){let e=o.value,t=c[f];for(;"char"===t.type||"escape"===t.type;)e+=t.value,t=c[++f];n.push({type:"text",value:i(e)});continue}if("param"===o.type||"wildcard"===o.type){n.push({type:o.type,name:o.value});continue}if("{"===o.type){n.push({type:"group",tokens:t("}")});continue}throw new l(`Unexpected ${o.type} at index ${o.index}, expected ${r}`,e)}return n}("end"),e)}(c,t);for(let t of function* e(t,r,n){if(r===t.length)return yield n;let o=t[r];if("group"===o.type)for(let a of e(o.tokens,0,n.slice()))yield*e(t,r+1,a);else n.push(o);yield*e(t,r+1,n)}(e.tokens,0,[]))m.push(function(e,t,r,n){let o="",a="",s=!0;for(let d of e){if("text"===d.type){o+=i(d.value),a+=d.value,s||(s=d.value.includes(t));continue}if("param"===d.type||"wildcard"===d.type){var u,c;if(!s&&!a)throw new l(`Missing text before "${d.name}" ${d.type}`,n);"param"===d.type?o+=`(${u=t,(c=s?"":a).length<2?u.length<2?`[^${i(u+c)}]`:`(?:(?!${i(u)})[^${i(c)}])`:u.length<2?`(?:(?!${i(c)})[^${i(u)}])`:`(?:(?!${i(c)}|${i(u)})[\\s\\S])`}+)`:o+="([\\s\\S]+)",r.push(d),a="",s=!1;continue}}return o}(t,u,p,e.originalPath))}let h=`^(?:${m.join("|")})`;return f&&(h+=`(?:${i(u)}$)?`),{regexp:new RegExp(h+=c?"$":`(?=${i(u)}|$)`,d?"":"i"),keys:p}};let r=e=>e,n=/^[$_\p{ID_Start}]$/u,o=/^[$\u200c\u200d\p{ID_Continue}]$/u,a={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function i(e){return e.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}class s{constructor(e,t){this.tokens=e,this.originalPath=t}}class l extends TypeError{constructor(e,t){let r=e;t&&(r+=`: ${t}`),super(r+="; visit https://git.new/pathToRegexpError for info"),this.originalPath=t}}},5338(e,t,r){"use strict";var n=r(1779);t.createRoot=n.createRoot,t.hydrateRoot=n.hydrateRoot},3904(e,t,r){"use strict";let n=Symbol("SemVer ANY");class o{static get ANY(){return n}constructor(e,t){if(t=a(t),e instanceof o)if(!!t.loose===e.loose)return e;else e=e.value;u("comparator",e=e.trim().split(/\s+/).join(" "),t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){let t=this.options.loose?i[s.COMPARATORLOOSE]:i[s.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))throw TypeError("a Comparator is required");return""===this.operator?""===this.value||new d(e.value,t).test(this.value):""===e.operator?""===e.value||new d(this.value,t).test(e.semver):!((t=a(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||l(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||l(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">"))}}e.exports=o;let a=r(968),{safeRe:i,t:s}=r(9718),l=r(2111),u=r(7272),c=r(3908),d=r(8311)},8311(e,t,r){"use strict";let n=/\s+/g;class o{constructor(e,t){if(t=i(t),e instanceof o)if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;else return new o(e.raw,t);if(e instanceof s)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(n," "),this.set=this.raw.split("||").map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter(e=>!y(e[0])),0===this.set.length)this.set=[e];else if(this.set.length>1){for(const e of this.set)if(1===e.length&&v(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&h)|(this.options.loose&&g))+":"+e,r=a.get(t);if(r)return r;let n=this.options.loose,o=n?c[d.HYPHENRANGELOOSE]:c[d.HYPHENRANGE];l("hyphen replace",e=e.replace(o,R(this.options.includePrerelease))),l("comparator trim",e=e.replace(c[d.COMPARATORTRIM],f)),l("tilde trim",e=e.replace(c[d.TILDETRIM],p)),l("caret trim",e=e.replace(c[d.CARETTRIM],m));let i=e.split(" ").map(e=>w(e,this.options)).join(" ").split(/\s+/).map(e=>O(e,this.options));n&&(i=i.filter(e=>(l("loose invalid filter",e,this.options),!!e.match(c[d.COMPARATORLOOSE])))),l("range list",i);let u=new Map;for(let e of i.map(e=>new s(e,this.options))){if(y(e))return[e];u.set(e.value,e)}u.size>1&&u.has("")&&u.delete("");let v=[...u.values()];return a.set(t,v),v}intersects(e,t){if(!(e instanceof o))throw TypeError("a Range is required");return this.set.some(r=>b(r,t)&&e.set.some(e=>b(e,t)&&r.every(r=>e.every(e=>r.intersects(e,t)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(T(this.set[t],e,this.options))return!0;return!1}}e.exports=o;let a=new(r(8794)),i=r(968),s=r(3904),l=r(7272),u=r(3908),{safeRe:c,t:d,comparatorTrimReplace:f,tildeTrimReplace:p,caretTrimReplace:m}=r(9718),{FLAG_INCLUDE_PRERELEASE:h,FLAG_LOOSE:g}=r(6874),y=e=>"<0.0.0-0"===e.value,v=e=>""===e.value,b=(e,t)=>{let r=!0,n=e.slice(),o=n.pop();for(;r&&n.length;)r=n.every(e=>o.intersects(e,t)),o=n.pop();return r},w=(e,t)=>(l("comp",e=e.replace(c[d.BUILD],""),t),l("caret",e=_(e,t)),l("tildes",e=x(e,t)),l("xrange",e=C(e,t)),l("stars",e=P(e,t)),e),E=e=>!e||"x"===e.toLowerCase()||"*"===e,x=(e,t)=>e.trim().split(/\s+/).map(e=>D(e,t)).join(" "),D=(e,t)=>{let r=t.loose?c[d.TILDELOOSE]:c[d.TILDE];return e.replace(r,(t,r,n,o,a)=>{let i;return l("tilde",e,t,r,n,o,a),E(r)?i="":E(n)?i=`>=${r}.0.0 <${+r+1}.0.0-0`:E(o)?i=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:a?(l("replaceTilde pr",a),i=`>=${r}.${n}.${o}-${a} <${r}.${+n+1}.0-0`):i=`>=${r}.${n}.${o} <${r}.${+n+1}.0-0`,l("tilde return",i),i})},_=(e,t)=>e.trim().split(/\s+/).map(e=>S(e,t)).join(" "),S=(e,t)=>{l("caret",e,t);let r=t.loose?c[d.CARETLOOSE]:c[d.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(t,r,o,a,i)=>{let s;return l("caret",e,t,r,o,a,i),E(r)?s="":E(o)?s=`>=${r}.0.0${n} <${+r+1}.0.0-0`:E(a)?s="0"===r?`>=${r}.${o}.0${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.0${n} <${+r+1}.0.0-0`:i?(l("replaceCaret pr",i),s="0"===r?"0"===o?`>=${r}.${o}.${a}-${i} <${r}.${o}.${+a+1}-0`:`>=${r}.${o}.${a}-${i} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${a}-${i} <${+r+1}.0.0-0`):(l("no pr"),s="0"===r?"0"===o?`>=${r}.${o}.${a}${n} <${r}.${o}.${+a+1}-0`:`>=${r}.${o}.${a}${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${a} <${+r+1}.0.0-0`),l("caret return",s),s})},C=(e,t)=>(l("replaceXRanges",e,t),e.split(/\s+/).map(e=>k(e,t)).join(" ")),k=(e,t)=>{e=e.trim();let r=t.loose?c[d.XRANGELOOSE]:c[d.XRANGE];return e.replace(r,(r,n,o,a,i,s)=>{l("xRange",e,r,n,o,a,i,s);let u=E(o),c=u||E(a),d=c||E(i);return"="===n&&d&&(n=""),s=t.includePrerelease?"-0":"",u?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&d?(c&&(a=0),i=0,">"===n?(n=">=",c?(o=+o+1,a=0):a=+a+1,i=0):"<="===n&&(n="<",c?o=+o+1:a=+a+1),"<"===n&&(s="-0"),r=`${n+o}.${a}.${i}${s}`):c?r=`>=${o}.0.0${s} <${+o+1}.0.0-0`:d&&(r=`>=${o}.${a}.0${s} <${o}.${+a+1}.0-0`),l("xRange return",r),r})},P=(e,t)=>(l("replaceStars",e,t),e.trim().replace(c[d.STAR],"")),O=(e,t)=>(l("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?d.GTE0PRE:d.GTE0],"")),R=e=>(t,r,n,o,a,i,s,l,u,c,d,f)=>(r=E(n)?"":E(o)?`>=${n}.0.0${e?"-0":""}`:E(a)?`>=${n}.${o}.0${e?"-0":""}`:i?`>=${r}`:`>=${r}${e?"-0":""}`,l=E(u)?"":E(c)?`<${+u+1}.0.0-0`:E(d)?`<${u}.${+c+1}.0-0`:f?`<=${u}.${c}.${d}-${f}`:e?`<${u}.${c}.${+d+1}-0`:`<=${l}`,`${r} ${l}`.trim()),T=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(l(e[r].semver),e[r].semver!==s.ANY&&e[r].semver.prerelease.length>0){let n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},3908(e,t,r){"use strict";let n=r(7272),{MAX_LENGTH:o,MAX_SAFE_INTEGER:a}=r(6874),{safeRe:i,t:s}=r(9718),l=r(968),{compareIdentifiers:u}=r(1123);class c{constructor(e,t){if(t=l(t),e instanceof c)if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;else e=e.version;else if("string"!=typeof e)throw TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>o)throw TypeError(`version is longer than ${o} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?i[s.LOOSE]:i[s.FULL]);if(!r)throw TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>a||this.major<0)throw TypeError("Invalid major version");if(this.minor>a||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>a||this.patch<0)throw TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<a)return t}return e}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(n("SemVer.compare",this.version,this.options,e),!(e instanceof c)){if("string"==typeof e&&e===this.version)return 0;e=new c(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return(e instanceof c||(e=new c(e,this.options)),this.major<e.major)?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:+(this.patch>e.patch)}comparePre(e){if(e instanceof c||(e=new c(e,this.options)),this.prerelease.length&&!e.prerelease.length)return -1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],o=e.prerelease[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return -1;else if(r===o)continue;else return u(r,o)}while(++t)}compareBuild(e){e instanceof c||(e=new c(e,this.options));let t=0;do{let r=this.build[t],o=e.build[t];if(n("build compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return -1;else if(r===o)continue;else return u(r,o)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&!1===r)throw Error("invalid increment argument: identifier is empty");if(t){let e=`-${t}`.match(this.options.loose?i[s.PRERELEASELOOSE]:i[s.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"release":if(0===this.prerelease.length)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(0!==this.minor||0!==this.patch||0===this.prerelease.length)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(0!==this.patch||0===this.prerelease.length)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{let e=+!!Number(r);if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===u(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=c},2111(e,t,r){"use strict";let n=r(4641),o=r(3999),a=r(5580),i=r(4089),s=r(7059),l=r(5200);e.exports=(e,t,r,u)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,u);case"!=":return o(e,r,u);case">":return a(e,r,u);case">=":return i(e,r,u);case"<":return s(e,r,u);case"<=":return l(e,r,u);default:throw TypeError(`Invalid operator: ${t}`)}}},560(e,t,r){"use strict";let n=r(3908);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},4641(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>0===n(e,t,r)},5580(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>n(e,t,r)>0},4089(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>n(e,t,r)>=0},7059(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>0>n(e,t,r)},5200(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>0>=n(e,t,r)},3999(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>0!==n(e,t,r)},7638(e,t,r){"use strict";let n=r(8311);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},6874(e){"use strict";e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||0x1fffffffffffff,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},7272(e){"use strict";e.exports="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{}},1123(e){"use strict";let t=/^[0-9]+$/,r=(e,r)=>{if("number"==typeof e&&"number"==typeof r)return e===r?0:e<r?-1:1;let n=t.test(e),o=t.test(r);return n&&o&&(e*=1,r*=1),e===r?0:n&&!o?-1:o&&!n?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},8794(e){"use strict";e.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(void 0!==t)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}},968(e){"use strict";let t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},9718(e,t,r){"use strict";let{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:a}=r(6874),i=r(7272),s=(t=e.exports={}).re=[],l=t.safeRe=[],u=t.src=[],c=t.safeSrc=[],d=t.t={},f=0,p="[a-zA-Z0-9-]",m=[["\\s",1],["\\d",a],[p,o]],h=(e,t,r)=>{let n=(e=>{for(let[t,r]of m)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),o=f++;i(e,o,t),d[e]=o,u[o]=t,c[o]=n,s[o]=new RegExp(t,r?"g":void 0),l[o]=new RegExp(n,r?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),h("MAINVERSION",`(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASE",`(?:-(${u[d.PRERELEASEIDENTIFIER]}(?:\\.${u[d.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${u[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[d.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${p}+`),h("BUILD",`(?:\\+(${u[d.BUILDIDENTIFIER]}(?:\\.${u[d.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${u[d.MAINVERSION]}${u[d.PRERELEASE]}?${u[d.BUILD]}?`),h("FULL",`^${u[d.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${u[d.MAINVERSIONLOOSE]}${u[d.PRERELEASELOOSE]}?${u[d.BUILD]}?`),h("LOOSE",`^${u[d.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${u[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${u[d.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:${u[d.PRERELEASE]})?${u[d.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:${u[d.PRERELEASELOOSE]})?${u[d.BUILD]}?)?)?`),h("XRANGE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h("COERCE",`${u[d.COERCEPLAIN]}(?:$|[^\\d])`),h("COERCEFULL",u[d.COERCEPLAIN]+`(?:${u[d.PRERELEASE]})?`+`(?:${u[d.BUILD]})?`+"(?:$|[^\\d])"),h("COERCERTL",u[d.COERCE],!0),h("COERCERTLFULL",u[d.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${u[d.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",h("TILDE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${u[d.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",h("CARET",`^${u[d.LONECARET]}${u[d.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${u[d.LONECARET]}${u[d.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${u[d.GTLT]}\\s*(${u[d.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]}|${u[d.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${u[d.XRANGEPLAIN]})\\s+-\\s+(${u[d.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${u[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[d.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},6369(e,t,r){"use strict";function n(e){if(Array.isArray(e))return e}r.d(t,{A:()=>n})},3029(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}r.d(t,{A:()=>n})},2901(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(6192);function o(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(0,n.A)(o.key),o)}}function a(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}},4467(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(6192);function o(e,t,r){return(t=(0,n.A)(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},6562(e,t,r){"use strict";function n(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}r.d(t,{A:()=>n})},6192(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(2284);function o(e){var t=function(e,t){if("object"!=(0,n.A)(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=(0,n.A)(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==(0,n.A)(t)?t:t+""}},2284(e,t,r){"use strict";function n(e){return(n="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)}r.d(t,{A:()=>n})},3612(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function o(e,t){if(e){if("string"==typeof e)return n(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}r.d(t,{A:()=>o})},2602(e,t,r){"use strict";let n,o,a,i,s,l,u,c,d,f,p;r.r(t),r.d(t,{GenderUnknownIcon:()=>pm,evaluateAsNumber:()=>lU,getImportMapOverrideMap:()=>sL,StockManagementPictogram:()=>__,ChemistryIcon:()=>f5,BabyIcon:()=>fY,DashboardExtension:()=>mm,openmrsComponentDecorator:()=>cq,tryRegisterExtension:()=>fo,pictogramIds:()=>D4,ActivityIcon:()=>fW,compile:()=>lz,removeRouteMapOverride:()=>lo,TableBatchActions:()=>fE,getAsyncLifecycle:()=>cX,subscribeOpenmrsEvent:()=>lg,PasswordIcon:()=>pL,Assessment2Pictogram:()=>D9,CloseIcon:()=>pt,setupRouteMapOverrides:()=>ls,useFeatureFlag:()=>dE,reset:()=>uX,ConceptDictionaryPictogram:()=>_t,LabOrderIcon:()=>p_,VisitMode:()=>lx,useLocations:()=>dV,getLifecycle:()=>cJ,formatDatetime:()=>E4,getVisitsForPatient:()=>lR,formatPartialDate:()=>EQ,CustomOverflowMenu:()=>fP,LocationIcon:()=>pC,GroupIcon:()=>pg,createUseStore:()=>cw,VisitStatus:()=>lD,getSessionLocation:()=>sp,getCurrentImportMap:()=>sq,usePatient:()=>dY,useRenderableExtensions:()=>dJ,getOpenedWindowIndexByWorkspace:()=>u8,setLeftNav:()=>u0,clearHistory:()=>i2,clearConfigErrors:()=>oa,formatTime:()=>E2,isDevEnabled:()=>sx,CohortsPictogram:()=>_e,closeWorkspaceGroup2:()=>_J,getCurrentRouteMap:()=>s7,ConfigurableLink:()=>cp,sessionStore:()=>sr,setSessionLocale:()=>sh,subscribeSnackbarShown:()=>S,getLoggedInUser:()=>sf,GenderMaleIcon:()=>pf,getExtensionSlotConfigFromStore:()=>nv,evaluateAsNumberAsync:()=>lV,getImportMapDefaultMap:()=>sI,unregisterExtensionRendering:()=>uv,implementerToolsConfigStore:()=>nN,Type:()=>no,InPatientPictogram:()=>_c,cleanupObsoleteFeatureFlags:()=>un,getAttachmentsUrl:()=>ld,showSnackbar:()=>_F,PatientBannerActionsMenu:()=>Dq,PatientSearchPictogram:()=>_g,DocumentAttachmentIcon:()=>pa,Snackbar:()=>_A,CardiologyPictogram:()=>D7,ImageMedicalIcon:()=>pb,ActionableNotificationComponent:()=>Dh,DiagnosisTags:()=>xQ,openChildWorkspaceInWindow:()=>_6,iconIds:()=>fV,PatientsPictogram:()=>_y,interpolateUrl:()=>iZ,setupHistory:()=>iQ,subscribeToastShown:()=>_,detachAll:()=>uG,convertToLocaleCalendar:()=>E3,DocumentIcon:()=>po,configInternalStore:()=>nf,ActionMenuButton2:()=>SP,setupDynamicOfflineDataHandler:()=>SX,makeUrl:()=>i7,oneOf:()=>of,selectPreferredName:()=>DL,MobileCheckIcon:()=>pN,createErrorHandler:()=>P,parseDate:()=>EG,getAttachmentByUuid:()=>lu,LeftNavMenu:()=>x5,getExtensionRegistration:()=>uW,ShoppingCartAddItemIcon:()=>md,ReferralOrderIcon:()=>pH,ReportIcon:()=>pK,dispatchToastShown:()=>E,getImportMapNextPageMap:()=>sM,registerExtension:()=>uH,setupOfflineSync:()=>SJ,DownloadIcon:()=>pi,useConnectivity:()=>S4,provide:()=>nZ,ShoppingCartArrowDownIcon:()=>pQ,featureFlagsStore:()=>ut,jsep:()=>lN,GeriatricsPictogram:()=>_l,SearchIcon:()=>pY,reportError:()=>k,slugify:()=>sG,isOmrsDateToday:()=>EH,getExtensionStore:()=>ub,BloodBankPictogram:()=>D8,TriagePictogram:()=>_k,Workspace2:()=>Sa,refetchCurrentUser:()=>su,CheckmarkOutlineIcon:()=>f6,registerExtensionSlot:()=>uJ,AllergiesIcon:()=>ms,ArrowDownIcon:()=>fz,useOpenmrsInfinite:()=>dR,getExtensionConfigFromExtensionSlotStore:()=>nx,OpenmrsDatePicker:()=>x$,getExtensionConfigFromStore:()=>nE,getDynamicOfflineDataEntries:()=>SQ,getLocaleDisplayName:()=>Eu,messageOmrsServiceWorker:()=>S1,navigate:()=>iq,launchWorkspace2:()=>_X,getGroupByWindowName:()=>u9,CustomOverflowMenuItem:()=>fO,isUrl:()=>od,CaretDownIcon:()=>fX,ArrowLeftIcon:()=>fK,FacilityPictogram:()=>_s,ViewOffIcon:()=>mo,updateInternalExtensionStore:()=>uf,dispatchActionableNotificationShown:()=>b,resetRouteMapOverrides:()=>la,formatDurationBetween:()=>xr,defaultVisitCustomRepresentation:()=>l_,getBreadcrumbsFor:()=>oE,useOpenmrsPagination:()=>dD,Pagination:()=>Dj,CheckmarkFilledIcon:()=>f3,clearCurrentUser:()=>sc,showModal:()=>Dc,ChevronUpIcon:()=>pe,saveVisit:()=>lP,useAttachments:()=>di,Pictogram:()=>_N,useExtensionSlot:()=>cC,ChevronDownIcon:()=>f9,OpenmrsDateRangePicker:()=>xI,deleteAttachmentPermanently:()=>lp,getVisitTypes:()=>lE,OverflowMenuHorizontalIcon:()=>pI,EventScheduleIcon:()=>pu,getSessionStore:()=>ss,ProcedureOrderIcon:()=>pV,preloadImport:()=>sY,registerWorkspaceWindows2:()=>ce,useOnVisible:()=>dH,setSessionLocation:()=>sm,userHasAccess:()=>sd,ChartAverageIcon:()=>f2,getFeatureFlag:()=>uo,UserAvatarIcon:()=>me,renderExtension:()=>cu,useFhirInfinite:()=>d$,toVisitTypeObject:()=>lb,useSession:()=>dX,EmergencyDepartmentPictogram:()=>_i,Notification:()=>Dp,dispatchSnackbarShown:()=>w,formatDate:()=>E0,workspace2StoreActions:()=>_8,SwitcherIcon:()=>pJ,esmStyleGuideSchema:()=>fv,getImportMapDisabledOverrides:()=>sF,useAssignedExtensionIds:()=>dn,CaretRightIcon:()=>f0,evaluateAsType:()=>lW,PageHeader:()=>DT,TranslateIcon:()=>p5,setUserProperties:()=>sg,MovementIcon:()=>p$,renderInlineNotifications:()=>Dx,subscribePrecacheStaticDependencies:()=>S2,PaymentsDeskPictogram:()=>_v,usePrimaryIdentifierCode:()=>dq,useLayoutType:()=>dM,getCurrentUser:()=>si,closeWorkspaceInWindow:()=>_3,XrayPictogram:()=>_P,CaretUpIcon:()=>f1,renderActionableNotifications:()=>D_,OpenmrsAppContext:()=>c8,setupModals:()=>Du,getDefaultsFromConfigSchema:()=>function e(t){let r={};for(let n of Object.keys(t))if(Sz(t[n])&&t[n].hasOwnProperty("_default"))r[n]=t[n]._default;else{if(n.startsWith("_"))continue;Sz(t[n])?r[n]=e(t[n]):r[n]=t[n]}return r},subscribeTo:()=>H,recordConfigDerivationError:()=>nR,useAbortController:()=>de,Extension:()=>cm,getFhirServerPaginationHandlers:()=>dk,useConnectedExtensions:()=>dd,registerApp:()=>fi,HospitalBedIcon:()=>pv,useExtensionInternalStore:()=>dv,configExtensionStore:()=>nm,getSynchronizationItems:()=>S0,getExtensionSlotsConfigStore:()=>ng,registerExtensionRendering:()=>uy,RenderIfValueIsTruthy:()=>c7,registerFeatureFlag:()=>ur,useFhirFetchAll:()=>dA,restBaseUrl:()=>i5,CalendarHeatMapIcon:()=>fq,isImportMapOverrideDisabled:()=>sB,resetConfigSystem:()=>oi,getExtensionInternalStore:()=>uc,registerGlobalStore:()=>V,evaluateAsBoolean:()=>lF,PatientBannerPatientInfo:()=>DZ,addRouteMapOverride:()=>ln,getDefaultCalendar:()=>EJ,SettingsIcon:()=>pq,DrugOrderIcon:()=>ps,ProgramsIcon:()=>pW,useAssignedExtensions:()=>cS,CloseFilledIcon:()=>pr,canAccessStorage:()=>SH,registerDefaultCalendar:()=>Eq,TreeViewAltIcon:()=>p8,OverflowMenuVerticalIcon:()=>pM,clearConfigDerivationError:()=>nT,getConfigStore:()=>nh,InformationSquareIcon:()=>px,EmptyCard:()=>x4,ChevronLeftIcon:()=>f8,RadiologyIcon:()=>mc,useCandidateExtensions:()=>da,renderToasts:()=>_H,isDesktop:()=>dL,integrateBreakpoints:()=>fd,RegistrationPictogram:()=>_E,CardHeader:()=>fh,getExtensionRegistrationFrom:()=>uV,InformationIcon:()=>pw,SystemAdministrationPictogram:()=>_S,TrashCanIcon:()=>p9,useShallowStableValue:()=>ch,PatientDocumentsPictogram:()=>_h,useOpenmrsSWR:()=>dz,Assessment1Pictogram:()=>D5,finishRegisteringAllApps:()=>fs,importDynamic:()=>sZ,useFhirPagination:()=>dC,useVisitContextStore:()=>d5,ArrowUpIcon:()=>fZ,showActionableNotification:()=>DS,useForceUpdate:()=>dx,useVisit:()=>d9,PatientBannerPatientIdentifiers:()=>DH,TransferPictogram:()=>_C,usePagination:()=>dK,Breakpoint:()=>fl,PatientBannerToggleContactDetailsButton:()=>SO,CloseOutlineIcon:()=>pn,ObstetricsPictogram:()=>_m,parseDateInput:()=>E5,ReportsPictogram:()=>_x,getConfig:()=>nq,attach:()=>uz,getLocale:()=>Ec,isUrlWithTemplateParameters:()=>oc,useEmrConfiguration:()=>dg,useLeftNav:()=>dF,ToolsIcon:()=>p6,ErrorState:()=>x3,detach:()=>uK,setCurrentVisit:()=>lk,ConditionsIcon:()=>mu,SaveIcon:()=>pZ,useConfig:()=>dc,validator:()=>na,CalendarIcon:()=>fJ,getHistory:()=>i0,StickyNoteAddIcon:()=>p0,useWorkspace2Store:()=>_7,getPatientName:()=>DA,getVisitStore:()=>lC,getCoreTranslation:()=>iG,registerModuleWithConfigSystem:()=>nH,updateOpenedWorkspaceInWindow:()=>_5,registerModuleLoad:()=>nz,getBreadcrumbs:()=>ov,extractVariableNames:()=>l8,translateFrom:()=>iK,useStoreWithActions:()=>cb,EditIcon:()=>pl,getCandidateExtensions:()=>uq,shallowEqual:()=>R,subscribeNotificationShown:()=>x,MaximizeIcon:()=>pP,promptForClosingWorkspaces:()=>_2,WarningIcon:()=>mi,fhirBaseUrl:()=>i9,matchLocale:()=>SW,usePatientPhoto:()=>DQ,registerBreadcrumb:()=>og,EventsIcon:()=>pc,createGlobalStore:()=>B,subscribeToFeatureFlag:()=>ua,useExtensionStore:()=>dw,createAttachment:()=>lf,useLeftNavStore:()=>dB,TableIcon:()=>p4,Icon:()=>mp,InformationFilledIcon:()=>pE,getCurrentPageMap:()=>s$,LaboratoryPictogram:()=>_d,temporaryConfigStore:()=>np,toDateObjectStrict:()=>Ez,defineConfigSchema:()=>nW,filterBreadcrumbs:()=>ow,invalidateImplementerToolsConfig:()=>nP,PatientBannerContactDetails:()=>S$,getAssignedExtensions:()=>uY,promptForClosingWorkspacesInWindow:()=>_4,PatientPhoto:()=>D2,MaterialOrderIcon:()=>pk,MicroscopeIcon:()=>pT,visitTypesUrl:()=>lw,getOpenedWindowWidth:()=>Sr,scheduleRecomputation:()=>u_,PharmacyPictogram:()=>_b,AttachmentIcon:()=>ml,MoneyIcon:()=>pj,getAttachments:()=>lc,PageHeaderContent:()=>DN,MedicationIcon:()=>pO,PrinterIcon:()=>pU,PatientListsPictogram:()=>_R,useAppContext:()=>dt,isOpenmrsRoutes:()=>sQ,AppointmentsAltPictogram:()=>D6,GenericOrderTypeIcon:()=>ph,batchExtensionUpdates:()=>ux,useExtensionSlotStore:()=>cD,ViewIcon:()=>ma,formattedName:()=>DM,sessionEndpoint:()=>i8,duration:()=>xe,resetImportMapOverrides:()=>sW,TableOfContentsIcon:()=>p2,CaretLeftIcon:()=>fQ,getTranslationOverrides:()=>nJ,isVersionSatisfied:()=>SZ,EmptyCardIllustration:()=>x2,PenIcon:()=>pB,verifyTotpCode:()=>sy,validators:()=>op,setupImportMapOverrides:()=>sK,showToast:()=>_z,useDefineAppContext:()=>c9,getGlobalStore:()=>W,useOnClickOutside:()=>dW,getWindowByWorkspaceName:()=>u5,ArrowRightIcon:()=>fG,loadLifeCycles:()=>ft,registerBreadcrumbs:()=>oy,MotherIcon:()=>pA,fetchCurrentPatient:()=>lm,Toast:()=>_B,MessageQueueIcon:()=>pR,TwoFactorAuthenticationIcon:()=>p7,Pharmacy2Pictogram:()=>_w,goBackInHistory:()=>i1,GroupAccessIcon:()=>py,getExtensionRenderingsStore:()=>ud,setImplementerToolsConfigRecomputer:()=>nk,getAsyncExtensionLifecycle:()=>c0,setupApiModule:()=>s_,renderLoadingSpinner:()=>SI,showNotification:()=>DD,getModalRegistration:()=>u3,ListCheckedIcon:()=>pS,ResponsiveWrapper:()=>_j,GynaecologyPictogram:()=>_u,ShoppingCartIcon:()=>pX,getRouteMapNextPageMap:()=>lt,MetadataExportPictogram:()=>_p,updateVisit:()=>lO,backendDependencies:()=>sD,MaybePictogram:()=>_T,createParcelMounter:()=>cs,openmrsFetch:()=>se,useStore:()=>cv,isOpenmrsAppRoutes:()=>sX,ExportedWorkspace:()=>Sx,DentistryPictogram:()=>_o,HomePictogram:()=>_O,ServiceQueuesPictogram:()=>_D,createExportedWorkspaceWindow:()=>So,setFeatureFlag:()=>ui,toLanguageTag:()=>El,DigitalTrustPictogram:()=>_a,NumericObservation:()=>DO,attachmentUrl:()=>ll,interpolateString:()=>iY,inRange:()=>ou,useExtensionSlotMeta:()=>db,AppointmentsPictogram:()=>D3,renderSnackbars:()=>_L,getRegisteredWorkspace2Names:()=>St,logout:()=>sv,toLocationObject:()=>ly,ChartLineIcon:()=>f4,UserHasAccess:()=>dQ,evaluateAsBooleanAsync:()=>lB,createDashboard:()=>mh,getLocations:()=>lv,useExtensionContext:()=>dy,getExtensionsConfigStore:()=>nb,getRouteMapDefaultMap:()=>le,age:()=>DB,isOmrsDateStrict:()=>EW,registerWorkspaceGroups2:()=>u7,usePaginationInfo:()=>dG,evaluateAsync:()=>lL,useOpenmrsFetchAll:()=>dN,removeImportMapOverride:()=>sV,useVisitTypes:()=>d7,ageAsDuration:()=>DF,getExtensionNameFromId:()=>uU,DataEntryPictogram:()=>_n,renderParcel:()=>ci,ResetIcon:()=>pG,RenewIcon:()=>pz,useWorkspace2Context:()=>Se,subscribeActionableNotificationShown:()=>D,ErrorCard:()=>x6,GenderFemaleIcon:()=>pd,enableImportMapOverride:()=>sH,retry:()=>SY,ComponentContext:()=>cf,ExtensionSlot:()=>cP,unsetLeftNav:()=>u1,addImportMapOverride:()=>sU,MaybeIcon:()=>mf,useCustomOverflowMenu:()=>fk,PedestrianFamilyIcon:()=>pF,CtScanPictogram:()=>_r,dispatchNotificationShown:()=>v,leftNavStore:()=>uQ,OpenmrsFetchError:()=>st,UserFollowIcon:()=>mt,launchWorkspaceGroup2:()=>_q,ChevronRightIcon:()=>f7,UserXrayIcon:()=>mr,GenderOtherIcon:()=>pp,formatDuration:()=>E6,toOmrsIsoString:()=>EK,Labs2Pictogram:()=>_f,workspace2Store:()=>u6,setUserLanguage:()=>sl,useBodyScrollLock:()=>ds,getExtensionConfig:()=>nw,SyringeIcon:()=>p1,LocationPicker:()=>x9,useDebounce:()=>df,TimeIcon:()=>p3,getExtensionSlotConfig:()=>ny,AddIcon:()=>fH,getRouteMapOverrideMap:()=>lr,processConfig:()=>nX,InventoryManagementIcon:()=>pD,registerWorkspaces2:()=>ct,UserIcon:()=>mn,formatPatientName:()=>DI,fireOpenmrsEvent:()=>lh,registerModal:()=>u4,registerTranslationNamespace:()=>nK,displayName:()=>D$,createLocalStore:()=>U,evaluate:()=>lM,defineExtensionConfigSchema:()=>nG,getSyncLifecycle:()=>cQ,renderWorkspaceWindowsAndMenu:()=>SB,evaluateAsTypeAsync:()=>lH});let m="openmrs:notification-shown",h="openmrs:actionable-notification-shown",g="openmrs:toast-shown",y="openmrs:snack-bar-shown";function v(e){window.dispatchEvent(new CustomEvent(m,{detail:e}))}function b(e){window.dispatchEvent(new CustomEvent(h,{detail:e}))}function w(e){window.dispatchEvent(new CustomEvent(y,{detail:e}))}function E(e){window.dispatchEvent(new CustomEvent(g,{detail:e}))}function x(e){let t=t=>e(t.detail);return window.addEventListener(m,t),()=>window.removeEventListener(m,t)}function D(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,t){let{message:r}=O(e);return"string"==typeof r&&r?r:t}function k(e){let t=O(e);setTimeout(()=>{throw t})}function P(){let e=Error();return t=>{let r=O(t);r.stack+=`
|
|
1
|
+
(globalThis.webpackChunk_openmrs_esm_cohort_builder_app=globalThis.webpackChunk_openmrs_esm_cohort_builder_app||[]).push([["199"],{7581(e){e.exports=function(e,t,r){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=r();return this.format(e)===t.format(e)}}},5238(e){e.exports=function(e,t,r){var n=t.prototype,o=function(e){var t=e.date,o=e.utc,a={};if(!(null===t||t instanceof Date||t instanceof Array||n.$utils().u(t)||"Object"!==t.constructor.name)){if(!Object.keys(t).length)return new Date;var i=o?r.utc():r();Object.keys(t).forEach(function(e){var r;a["date"===(r=n.$utils().p(e))?"day":r]=t[e]});var s=a.day||(a.year||a.month>=0?1:i.date()),l=a.year||i.year(),u=a.month>=0?a.month:a.year||a.day?0:i.month(),c=a.hour||0,d=a.minute||0,f=a.second||0,p=a.millisecond||0;return o?new Date(Date.UTC(l,u,s,c,d,f,p)):new Date(l,u,s,c,d,f,p)}return t},a=n.parse;n.parse=function(e){e.date=o.bind(this)(e),a.bind(this)(e)};var i=n.set,s=n.add,l=n.subtract,u=function(e,t,r,n){void 0===n&&(n=1);var o=Object.keys(t),a=this;return o.forEach(function(r){a=e.bind(a)(t[r]*n,r)}),a};n.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)},n.add=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t):s.bind(this)(e,t)},n.subtract=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t,-1):l.bind(this)(e,t)}}},3826(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,o,a){var i=o.prototype;a.utc=function(e){var t={date:e,utc:!0,args:arguments};return new o(t)},i.utc=function(t){var r=a(this.toDate(),{locale:this.$L,utc:!0});return t?r.add(this.utcOffset(),e):r},i.local=function(){return a(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(n,o){var a=this.$utils().u;if(a(n))return this.$u?0:a(this.$offset)?u.call(this):this.$offset;if("string"==typeof n&&null===(n=function(e){void 0===e&&(e="");var n=e.match(t);if(!n)return null;var o=(""+n[0]).match(r)||["-",0,0],a=o[0],i=60*o[1]+ +o[2];return 0===i?0:"+"===a?i:-i}(n)))return this;var i=16>=Math.abs(n)?60*n:n,s=this;if(o)return s.$offset=i,s.$u=0===n,s;if(0!==n){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?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var f=i.diff;i.diff=function(e,t,r){if(e&&this.$u===e.$u)return f.call(this,e,t,r);var n=this.local(),o=a(e).local();return f.call(n,o,t,r)}}}()},2849(e){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function n(e){if(!e||"[object Object]"!==r.call(e)||e.nodeType||e.setInterval)return!1;var n,o=t.call(e,"constructor"),a=t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!a)return!1;for(n in e);return void 0===n||t.call(e,n)}e.exports=function e(){var t,r,o,a,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(r in t)o=l[r],l!==(a=t[r])&&(d&&a&&(n(a)||(i=Array.isArray(a)))?(i?(i=!1,s=o&&Array.isArray(o)?o:[]):s=o&&n(o)?o:{},l[r]=e(d,s,a)):void 0!==a&&(l[r]=a));return l}},6767(e,t,r){!function(t){"use strict";var n=r(6974);function o(e){return function(t,r){return"object"==typeof t&&(r=t,t=null),null==t&&(t=new Date().toString()),r||(r={}),e.call(this,t,r)}}var a=e.exports={generate:o(function(e,t){return new n(e,t)})};t&&(t.fn.geopattern=o(function(e,r){return this.each(function(){var n=t(this).attr("data-title-sha");n&&(r=t.extend({hash:n},r));var o=a.generate(e,r);t(this).css("background-image",o.toDataUrl())})}))}("u">typeof jQuery?jQuery:null)},2467(e){"use strict";e.exports={hex2rgb:function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,t,r,n){return t+t+r+r+n+n});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,r,n=e.r,o=e.g,a=e.b,i=Math.max(n/=255,o/=255,a/=255),s=Math.min(n,o,a),l=(i+s)/2;if(i===s)t=r=0;else{var u=i-s;switch(r=l>.5?u/(2-i-s):u/(i+s),i){case n:t=(o-a)/u+6*(o<a);break;case o:t=(a-n)/u+2;break;case a:t=(n-o)/u+4}t/=6}return{h:t,s:r,l:l}},hsl2rgb:function(e){function t(e,t,r){return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?e+(t-e)*6*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}var r,n,o,a=e.h,i=e.s,s=e.l;if(0===i)r=n=o=s;else{var l=s<.5?s*(1+i):s+i-s*i,u=2*s-l;r=t(u,l,a+1/3),n=t(u,l,a),o=t(u,l,a-1/3)}return{r:Math.round(255*r),g:Math.round(255*n),b:Math.round(255*o)}},rgb2rgbString:function(e){return"rgb("+[e.r,e.g,e.b].join(",")+")"}}},6974(e,t,r){"use strict";var n=r(2849),o=r(2467),a=r(6743),i=r(8502),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,r){return parseInt(e.substr(t,r||1),16)}function d(e,t,r,n,o){return(parseFloat(e)-t)*(o-n)/(r-t)+n}function f(e){return e%2==0?"#ddd":"#222"}function p(e){return d(e,0,15,.02,.15)}var m=e.exports=function(e,t){return this.opts=n({},s,t),this.hash=t.hash||a(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,r,n,o){var a=g(n),i=p(o[0]),s=f(o[0]),l={stroke:u,"stroke-opacity":.02,"fill-opacity":i,fill:s};e.polyline(a,l).transform({translate:[t+n,r],scale:[-1,1]}),e.polyline(a,l).transform({translate:[t+n,r+2*n],scale:[1,-1]}),l={stroke:u,"stroke-opacity":.02,"fill-opacity":i=p(o[1]),fill:s=f(o[1])},e.polyline(a,l).transform({translate:[t+n,r+2*n],scale:[-1,-1]}),e.polyline(a,l).transform({translate:[t+n,r],scale:[1,1]})}function v(e,t,r,n,o){var a=p(o),i=f(o),s=g(n),l={stroke:u,"stroke-opacity":.02,"fill-opacity":a,fill:i};e.polyline(s,l).transform({translate:[t,r+n],scale:[1,-1]}),e.polyline(s,l).transform({translate:[t+2*n,r+n],scale:[-1,-1]}),e.polyline(s,l).transform({translate:[t,r+n],scale:[1,1]}),e.polyline(s,l).transform({translate:[t+2*n,r+n],scale:[-1,1]})}m.prototype.toSvg=function(){return this.svg.toString()},m.prototype.toString=function(){return this.toSvg()},m.prototype.toBase64=function(){var e=this.toSvg();return"u">typeof window&&"function"==typeof window.btoa?window.btoa(e):new Buffer(e).toString("base64")},m.prototype.toDataUri=function(){return"data:image/svg+xml;base64,"+this.toBase64()},m.prototype.toDataUrl=function(){return'url("'+this.toDataUri()+'")'},m.prototype.generateBackground=function(){var e,t,r,n;this.opts.color?r=o.hex2rgb(this.opts.color):(t=d(c(this.hash,14,3),0,4095,0,359),n=c(this.hash,17),(e=o.rgb2hsl(o.hex2rgb(this.opts.baseColor))).h=(360*e.h-t+360)%360/360,n%2==0?e.s=Math.min(1,(100*e.s+n)/100):e.s=Math.max(0,(100*e.s-n)/100),r=o.hsl2rgb(e)),this.color=o.rgb2hex(r),this.svg.rect(0,0,"100%","100%",{fill:o.rgb2rgbString(r)})},m.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)]()},m.prototype.geoHexagons=function(){var e,t,r,n,o,a,i,s,l,m=d(c(this.hash,0),0,15,8,60),h=m*Math.sqrt(3),g=2*m,y=(s=m/2,[0,l=Math.sin(60*Math.PI/180)*m,s,0,s+m,0,2*m,l,s+m,2*l,s,2*l,0,l].join(","));for(this.svg.setWidth(3*g+3*m),this.svg.setHeight(6*h),t=0,i=0;i<6;i++)for(a=0;a<6;a++)o=c(this.hash,t),e=a%2==0?i*h:i*h+h/2,r=p(o),n={fill:f(o),"fill-opacity":r,stroke:u,"stroke-opacity":.02},this.svg.polyline(y,n).transform({translate:[a*m*1.5-g/2,e-h/2]}),0===a&&this.svg.polyline(y,n).transform({translate:[6*m*1.5-g/2,e-h/2]}),0===i&&(e=a%2==0?6*h:6*h+h/2,this.svg.polyline(y,n).transform({translate:[a*m*1.5-g/2,e-h/2]})),0===a&&0===i&&this.svg.polyline(y,n).transform({translate:[6*m*1.5-g/2,5*h+h/2]}),t++},m.prototype.geoSineWaves=function(){var e,t,r,n,o,a,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++)r=p(a=c(this.hash,t)),e=f(a),i=s/4*.7,o={fill:"none",stroke:e,opacity:r,"stroke-width":""+u+"px"},n="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(n,o).transform({translate:[-s/4,u*t-1.5*l]}),this.svg.path(n,o).transform({translate:[-s/4,u*t-1.5*l+36*u]})},m.prototype.geoChevrons=function(){var e,t,r,n,o,a,i,s=d(c(this.hash,0),0,15,30,80),l=d(c(this.hash,0),0,15,30,80),m=(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(a=0;a<6;a++)r=p(o=c(this.hash,t)),n={stroke:u,"stroke-opacity":.02,fill:f(o),"fill-opacity":r,"stroke-width":1},this.svg.group(n).transform({translate:[a*s,i*l*.66-l/2]}).polyline(m).end(),0===i&&this.svg.group(n).transform({translate:[a*s,6*l*.66-l/2]}).polyline(m).end(),t+=1},m.prototype.geoPlusSigns=function(){var e,t,r,n,o,a,i,s,l=d(c(this.hash,0),0,15,10,25),m=3*l,g=h(l);for(this.svg.setWidth(12*l),this.svg.setHeight(12*l),r=0,s=0;s<6;s++)for(i=0;i<6;i++)n=p(a=c(this.hash,r)),t=f(a),e=+(s%2!=0),o={fill:t,stroke:u,"stroke-opacity":.02,"fill-opacity":n},this.svg.group(o).transform({translate:[i*m-i*l+e*l-l,s*m-s*l-m/2]}).rect(g).end(),0===i&&this.svg.group(o).transform({translate:[4*m-i*l+e*l-l,s*m-s*l-m/2]}).rect(g).end(),0===s&&this.svg.group(o).transform({translate:[i*m-i*l+e*l-l,4*m-s*l-m/2]}).rect(g).end(),0===i&&0===s&&this.svg.group(o).transform({translate:[4*m-i*l+e*l-l,4*m-s*l-m/2]}).rect(g).end(),r++},m.prototype.geoXes=function(){var e,t,r,n,o,a,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(a=0;a<6;a++)r=p(o=c(this.hash,t)),e=a%2==0?i*u-.5*u:i*u-.5*u+u/4,n={fill:f(o),opacity:r},this.svg.group(n).transform({translate:[a*u/2-u/2,e-i*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===a&&this.svg.group(n).transform({translate:[6*u/2-u/2,e-i*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===i&&(e=a%2==0?6*u-u/2:6*u-u/2+u/4,this.svg.group(n).transform({translate:[a*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end()),5===i&&this.svg.group(n).transform({translate:[a*u/2-u/2,e-11*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===a&&0===i&&this.svg.group(n).transform({translate:[6*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),t++},m.prototype.geoOverlappingCircles=function(){var e,t,r,n,o,a,i=d(c(this.hash,0),0,15,25,200)/2;for(this.svg.setWidth(6*i),this.svg.setHeight(6*i),e=0,a=0;a<6;a++)for(o=0;o<6;o++)t=p(n=c(this.hash,e)),r={fill:f(n),opacity:t},this.svg.circle(o*i,a*i,i,r),0===o&&this.svg.circle(6*i,a*i,i,r),0===a&&this.svg.circle(o*i,6*i,i,r),0===o&&0===a&&this.svg.circle(6*i,6*i,i,r),e++},m.prototype.geoOctogons=function(){var e,t,r,n,o,a,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),r=0,i=0;i<6;i++)for(a=0;a<6;a++)n=p(o=c(this.hash,r)),t=f(o),this.svg.polyline(l,{fill:t,"fill-opacity":n,stroke:u,"stroke-opacity":.02}).transform({translate:[a*s,i*s]}),r+=1},m.prototype.geoSquares=function(){var e,t,r,n,o,a,i=d(c(this.hash,0),0,15,10,60);for(this.svg.setWidth(6*i),this.svg.setHeight(6*i),t=0,a=0;a<6;a++)for(o=0;o<6;o++)r=p(n=c(this.hash,t)),e=f(n),this.svg.rect(o*i,a*i,i,i,{fill:e,"fill-opacity":r,stroke:u,"stroke-opacity":.02}),t+=1},m.prototype.geoConcentricCircles=function(){var e,t,r,n,o,a,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,a=0;a<6;a++)for(o=0;o<6;o++)r=p(n=c(this.hash,t)),e=f(n),this.svg.circle(o*i+o*s+(i+s)/2,a*i+a*s+(i+s)/2,i/2,{fill:"none",stroke:e,opacity:r,"stroke-width":s+"px"}),r=p(n=c(this.hash,39-t)),e=f(n),this.svg.circle(o*i+o*s+(i+s)/2,a*i+a*s+(i+s)/2,i/4,{fill:e,"fill-opacity":r}),t+=1},m.prototype.geoOverlappingRings=function(){var e,t,r,n,o,a,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,a=0;a<6;a++)for(o=0;o<6;o++)t=p(n=c(this.hash,e)),r={fill:"none",stroke:f(n),opacity:t,"stroke-width":s+"px"},this.svg.circle(o*i,a*i,i-s/2,r),0===o&&this.svg.circle(6*i,a*i,i-s/2,r),0===a&&this.svg.circle(o*i,6*i,i-s/2,r),0===o&&0===a&&this.svg.circle(6*i,6*i,i-s/2,r),e+=1},m.prototype.geoTriangles=function(){var e,t,r,n,o,a,i,s,l=d(c(this.hash,0),0,15,15,80),m=l/2*Math.sqrt(3),h=[s=l/2,0,l,m,0,m,s,0].join(",");for(this.svg.setWidth(3*l),this.svg.setHeight(6*m),e=0,i=0;i<6;i++)for(a=0;a<6;a++)t=p(o=c(this.hash,e)),n={fill:f(o),"fill-opacity":t,stroke:u,"stroke-opacity":.02},r=i%2==0?180*(a%2==0):180*(a%2!=0),this.svg.polyline(h,n).transform({translate:[a*l*.5-l/2,m*i],rotate:[r,l/2,m/2]}),0===a&&this.svg.polyline(h,n).transform({translate:[6*l*.5-l/2,m*i],rotate:[r,l/2,m/2]}),e+=1},m.prototype.geoDiamonds=function(){var e,t,r,n,o,a,i,s=d(c(this.hash,0),0,15,10,50),l=d(c(this.hash,1),0,15,10,50),m=[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(a=0;a<6;a++)r=p(o=c(this.hash,t)),n={fill:f(o),"fill-opacity":r,stroke:u,"stroke-opacity":.02},e=i%2==0?0:s/2,this.svg.polyline(m,n).transform({translate:[a*s-s/2+e,l/2*i-l/2]}),0===a&&this.svg.polyline(m,n).transform({translate:[6*s-s/2+e,l/2*i-l/2]}),0===i&&this.svg.polyline(m,n).transform({translate:[a*s-s/2+e,l/2*6-l/2]}),0===a&&0===i&&this.svg.polyline(m,n).transform({translate:[6*s-s/2+e,l/2*6-l/2]}),t+=1},m.prototype.geoNestedSquares=function(){var e,t,r,n,o,a,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,a=0;a<6;a++)for(o=0;o<6;o++)t=p(n=c(this.hash,e)),r={fill:"none",stroke:f(n),opacity:t,"stroke-width":i+"px"},this.svg.rect(o*s+o*i*2+i/2,a*s+a*i*2+i/2,s,s,r),t=p(n=c(this.hash,39-e)),r={fill:"none",stroke:f(n),opacity:t,"stroke-width":i+"px"},this.svg.rect(o*s+o*i*2+i/2+2*i,a*s+a*i*2+i/2+2*i,3*i,3*i,r),e+=1},m.prototype.geoMosaicSquares=function(){var e,t,r,n=d(c(this.hash,0),0,15,15,50);for(this.svg.setWidth(8*n),this.svg.setHeight(8*n),e=0,r=0;r<4;r++)for(t=0;t<4;t++)t%2==0?r%2==0?v(this.svg,t*n*2,r*n*2,n,c(this.hash,e)):y(this.svg,t*n*2,r*n*2,n,[c(this.hash,e),c(this.hash,e+1)]):r%2==0?y(this.svg,t*n*2,r*n*2,n,[c(this.hash,e),c(this.hash,e+1)]):v(this.svg,t*n*2,r*n*2,n,c(this.hash,e)),e+=1},m.prototype.geoPlaid=function(){var e,t,r,n,o,a,i=0,s=0;for(t=0;t<36;)i+=c(this.hash,t)+5,r=p(a=c(this.hash,t+1)),e=f(a),n=a+5,this.svg.rect(0,i,"100%",n,{opacity:r,fill:e}),i+=n,t+=2;for(t=0;t<36;)s+=c(this.hash,t)+5,r=p(a=c(this.hash,t+1)),e=f(a),o=a+5,this.svg.rect(s,0,o,"100%",{opacity:r,fill:e}),s+=o,t+=2;this.svg.setWidth(s),this.svg.setHeight(i)},m.prototype.geoTessellation=function(){var e,t,r,n,o=d(c(this.hash,0),0,15,5,40),a=o*Math.sqrt(3),i=2*o,s=o/2*Math.sqrt(3),l=[0,0,s,o/2,0,o,0,0].join(","),m=3*o+2*s,h=2*a+2*o;for(this.svg.setWidth(m),this.svg.setHeight(h),e=0;e<20;e++)switch(t=p(n=c(this.hash,e)),r={stroke:u,"stroke-opacity":.02,fill:f(n),"fill-opacity":t,"stroke-width":1},e){case 0:this.svg.rect(-o/2,-o/2,o,o,r),this.svg.rect(m-o/2,-o/2,o,o,r),this.svg.rect(-o/2,h-o/2,o,o,r),this.svg.rect(m-o/2,h-o/2,o,o,r);break;case 1:this.svg.rect(i/2+s,a/2,o,o,r);break;case 2:this.svg.rect(-o/2,h/2-o/2,o,o,r),this.svg.rect(m-o/2,h/2-o/2,o,o,r);break;case 3:this.svg.rect(i/2+s,1.5*a+o,o,o,r);break;case 4:this.svg.polyline(l,r).transform({translate:[o/2,-o/2],rotate:[0,o/2,s/2]}),this.svg.polyline(l,r).transform({translate:[o/2,h- -o/2],rotate:[0,o/2,s/2],scale:[1,-1]});break;case 5:this.svg.polyline(l,r).transform({translate:[m-o/2,-o/2],rotate:[0,o/2,s/2],scale:[-1,1]}),this.svg.polyline(l,r).transform({translate:[m-o/2,h+o/2],rotate:[0,o/2,s/2],scale:[-1,-1]});break;case 6:this.svg.polyline(l,r).transform({translate:[m/2+o/2,a/2]});break;case 7:this.svg.polyline(l,r).transform({translate:[m-m/2-o/2,a/2],scale:[-1,1]});break;case 8:this.svg.polyline(l,r).transform({translate:[m/2+o/2,h-a/2],scale:[1,-1]});break;case 9:this.svg.polyline(l,r).transform({translate:[m-m/2-o/2,h-a/2],scale:[-1,-1]});break;case 10:this.svg.polyline(l,r).transform({translate:[o/2,h/2-o/2]});break;case 11:this.svg.polyline(l,r).transform({translate:[m-o/2,h/2-o/2],scale:[-1,1]});break;case 12:this.svg.rect(0,0,o,o,r).transform({translate:[o/2,o/2],rotate:[-30,0,0]});break;case 13:this.svg.rect(0,0,o,o,r).transform({scale:[-1,1],translate:[-m+o/2,o/2],rotate:[-30,0,0]});break;case 14:this.svg.rect(0,0,o,o,r).transform({translate:[o/2,h/2-o/2-o],rotate:[30,0,o]});break;case 15:this.svg.rect(0,0,o,o,r).transform({scale:[-1,1],translate:[-m+o/2,h/2-o/2-o],rotate:[30,0,o]});break;case 16:this.svg.rect(0,0,o,o,r).transform({scale:[1,-1],translate:[o/2,-h+h/2-o/2-o],rotate:[30,0,o]});break;case 17:this.svg.rect(0,0,o,o,r).transform({scale:[-1,-1],translate:[-m+o/2,-h+h/2-o/2-o],rotate:[30,0,o]});break;case 18:this.svg.rect(0,0,o,o,r).transform({scale:[1,-1],translate:[o/2,-h+o/2],rotate:[-30,0,0]});break;case 19:this.svg.rect(0,0,o,o,r).transform({scale:[-1,-1],translate:[-m+o/2,-h+o/2],rotate:[-30,0,0]})}}},6743(e){"use strict";function t(){var e=0x67452301,t=0xefcdab89,r=0x98badcfe,n=0x10325476,o=0xc3d2e1f0,a=new Uint32Array(80),i=0,s=24,l=0;function u(){for(var s,l,u=16;u<80;u++){var c=a[u-3]^a[u-8]^a[u-14]^a[u-16];a[u]=c<<1|c>>>31}var d=e,f=t,p=r,m=n,h=o;for(u=0;u<80;u++){u<20?(s=m^f&(p^m),l=0x5a827999):u<40?(s=f^p^m,l=0x6ed9eba1):u<60?(s=f&p|m&(f|p),l=0x8f1bbcdc):(s=f^p^m,l=0xca62c1d6);var g=(d<<5|d>>>27)+s+h+l+(0|a[u]);h=m,m=p,p=f<<30|f>>>2,f=d,d=g}for(u=0,e=e+d|0,t=t+f|0,r=r+p|0,n=n+m|0,o=o+h|0,i=0;u<16;u++)a[u]=0}function c(e){a[i]|=(255&e)<<s,s?s-=8:(i++,s=24),16===i&&u()}function d(e){for(var t="",r=28;r>=0;r-=4)t+=(e>>r&15).toString(16);return t}return{update:function(e){if("string"==typeof e){var t=e.length;l+=8*t;for(var r=0;r<t;r++)c(e.charCodeAt(r));return}var n=e.length;l+=8*n;for(var o=0;o<n;o++)c(e[o])},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 a=24;a>=0;a-=8)c(l>>a);return d(e)+d(t)+d(r)+d(n)+d(o)}}}e.exports=function(e){if(void 0===e)return t();var r=t();return r.update(e),r.digest()}},8502(e,t,r){"use strict";var n=r(2849),o=r(6541);function a(){return this.width=100,this.height=100,this.svg=o("svg"),this.context=[],this.setAttributes(this.svg,{xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height}),this}e.exports=a,a.prototype.currentContext=function(){return this.context[this.context.length-1]||this.svg},a.prototype.end=function(){return this.context.pop(),this},a.prototype.currentNode=function(){var e=this.currentContext();return e.lastChild||e},a.prototype.transform=function(e){return this.currentNode().setAttribute("transform",Object.keys(e).map(function(t){return t+"("+e[t].join(",")+")"}).join(" ")),this},a.prototype.setAttributes=function(e,t){Object.keys(t).forEach(function(r){e.setAttribute(r,t[r])})},a.prototype.setWidth=function(e){this.svg.setAttribute("width",Math.floor(e))},a.prototype.setHeight=function(e){this.svg.setAttribute("height",Math.floor(e))},a.prototype.toString=function(){return this.svg.toString()},a.prototype.rect=function(e,t,r,a,i){var s=this;if(Array.isArray(e))return e.forEach(function(e){s.rect.apply(s,e.concat(i))}),this;var l=o("rect");return this.currentContext().appendChild(l),this.setAttributes(l,n({x:e,y:t,width:r,height:a},i)),this},a.prototype.circle=function(e,t,r,a){var i=o("circle");return this.currentContext().appendChild(i),this.setAttributes(i,n({cx:e,cy:t,r:r},a)),this},a.prototype.path=function(e,t){var r=o("path");return this.currentContext().appendChild(r),this.setAttributes(r,n({d:e},t)),this},a.prototype.polyline=function(e,t){var r=this;if(Array.isArray(e))return e.forEach(function(e){r.polyline(e,t)}),this;var a=o("polyline");return this.currentContext().appendChild(a),this.setAttributes(a,n({points:e},t)),this},a.prototype.group=function(e){var t=o("g");return this.currentContext().appendChild(t),this.context.push(t),this.setAttributes(t,n({},e)),this}},6541(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("")}},8067(e,t){"use strict";t.pathToRegexp=function(e,t={}){let{delimiter:u="/",end:c=!0,sensitive:d=!1,trailing:f=!0}=t,p=[],m=[];for(let c of function e(t,r){if(Array.isArray(t))for(let n of t)e(n,r);else r.push(t);return r}(e,[])){let e="object"==typeof c?c:function(e,t={}){let{encodePath:i=r}=t,u=[...e],c=[],d=0,f=0;function p(){let t="";if(n.test(u[d]))do t+=u[d++];while(o.test(u[d]));else if('"'===u[d]){let r=d;for(;d++<u.length;){if('"'===u[d]){d++,r=0;break}"\\"===u[d]&&d++,t+=u[d]}if(r)throw new l(`Unterminated quote at index ${r}`,e)}if(!t)throw new l(`Missing parameter name at index ${d}`,e);return t}for(;d<u.length;){let e=u[d],t=a[e];t?c.push({type:t,index:d++,value:e}):"\\"===e?c.push({type:"escape",index:d++,value:u[d++]}):":"===e?c.push({type:"param",index:d++,value:p()}):"*"===e?c.push({type:"wildcard",index:d++,value:p()}):c.push({type:"char",index:d++,value:e})}return c.push({type:"end",index:d,value:""}),new s(function t(r){let n=[];for(;;){let o=c[f++];if(o.type===r)break;if("char"===o.type||"escape"===o.type){let e=o.value,t=c[f];for(;"char"===t.type||"escape"===t.type;)e+=t.value,t=c[++f];n.push({type:"text",value:i(e)});continue}if("param"===o.type||"wildcard"===o.type){n.push({type:o.type,name:o.value});continue}if("{"===o.type){n.push({type:"group",tokens:t("}")});continue}throw new l(`Unexpected ${o.type} at index ${o.index}, expected ${r}`,e)}return n}("end"),e)}(c,t);for(let t of function* e(t,r,n){if(r===t.length)return yield n;let o=t[r];if("group"===o.type)for(let a of e(o.tokens,0,n.slice()))yield*e(t,r+1,a);else n.push(o);yield*e(t,r+1,n)}(e.tokens,0,[]))m.push(function(e,t,r,n){let o="",a="",s=!0;for(let d of e){if("text"===d.type){o+=i(d.value),a+=d.value,s||(s=d.value.includes(t));continue}if("param"===d.type||"wildcard"===d.type){var u,c;if(!s&&!a)throw new l(`Missing text before "${d.name}" ${d.type}`,n);"param"===d.type?o+=`(${u=t,(c=s?"":a).length<2?u.length<2?`[^${i(u+c)}]`:`(?:(?!${i(u)})[^${i(c)}])`:u.length<2?`(?:(?!${i(c)})[^${i(u)}])`:`(?:(?!${i(c)}|${i(u)})[\\s\\S])`}+)`:o+="([\\s\\S]+)",r.push(d),a="",s=!1;continue}}return o}(t,u,p,e.originalPath))}let h=`^(?:${m.join("|")})`;return f&&(h+=`(?:${i(u)}$)?`),{regexp:new RegExp(h+=c?"$":`(?=${i(u)}|$)`,d?"":"i"),keys:p}};let r=e=>e,n=/^[$_\p{ID_Start}]$/u,o=/^[$\u200c\u200d\p{ID_Continue}]$/u,a={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function i(e){return e.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}class s{constructor(e,t){this.tokens=e,this.originalPath=t}}class l extends TypeError{constructor(e,t){let r=e;t&&(r+=`: ${t}`),super(r+="; visit https://git.new/pathToRegexpError for info"),this.originalPath=t}}},5338(e,t,r){"use strict";var n=r(1779);t.createRoot=n.createRoot,t.hydrateRoot=n.hydrateRoot},3904(e,t,r){"use strict";let n=Symbol("SemVer ANY");class o{static get ANY(){return n}constructor(e,t){if(t=a(t),e instanceof o)if(!!t.loose===e.loose)return e;else e=e.value;u("comparator",e=e.trim().split(/\s+/).join(" "),t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){let t=this.options.loose?i[s.COMPARATORLOOSE]:i[s.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))throw TypeError("a Comparator is required");return""===this.operator?""===this.value||new d(e.value,t).test(this.value):""===e.operator?""===e.value||new d(this.value,t).test(e.semver):!((t=a(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||l(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||l(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">"))}}e.exports=o;let a=r(968),{safeRe:i,t:s}=r(9718),l=r(2111),u=r(7272),c=r(3908),d=r(8311)},8311(e,t,r){"use strict";let n=/\s+/g;class o{constructor(e,t){if(t=i(t),e instanceof o)if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;else return new o(e.raw,t);if(e instanceof s)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(n," "),this.set=this.raw.split("||").map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter(e=>!y(e[0])),0===this.set.length)this.set=[e];else if(this.set.length>1){for(const e of this.set)if(1===e.length&&v(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&h)|(this.options.loose&&g))+":"+e,r=a.get(t);if(r)return r;let n=this.options.loose,o=n?c[d.HYPHENRANGELOOSE]:c[d.HYPHENRANGE];l("hyphen replace",e=e.replace(o,R(this.options.includePrerelease))),l("comparator trim",e=e.replace(c[d.COMPARATORTRIM],f)),l("tilde trim",e=e.replace(c[d.TILDETRIM],p)),l("caret trim",e=e.replace(c[d.CARETTRIM],m));let i=e.split(" ").map(e=>w(e,this.options)).join(" ").split(/\s+/).map(e=>O(e,this.options));n&&(i=i.filter(e=>(l("loose invalid filter",e,this.options),!!e.match(c[d.COMPARATORLOOSE])))),l("range list",i);let u=new Map;for(let e of i.map(e=>new s(e,this.options))){if(y(e))return[e];u.set(e.value,e)}u.size>1&&u.has("")&&u.delete("");let v=[...u.values()];return a.set(t,v),v}intersects(e,t){if(!(e instanceof o))throw TypeError("a Range is required");return this.set.some(r=>b(r,t)&&e.set.some(e=>b(e,t)&&r.every(r=>e.every(e=>r.intersects(e,t)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(T(this.set[t],e,this.options))return!0;return!1}}e.exports=o;let a=new(r(8794)),i=r(968),s=r(3904),l=r(7272),u=r(3908),{safeRe:c,t:d,comparatorTrimReplace:f,tildeTrimReplace:p,caretTrimReplace:m}=r(9718),{FLAG_INCLUDE_PRERELEASE:h,FLAG_LOOSE:g}=r(6874),y=e=>"<0.0.0-0"===e.value,v=e=>""===e.value,b=(e,t)=>{let r=!0,n=e.slice(),o=n.pop();for(;r&&n.length;)r=n.every(e=>o.intersects(e,t)),o=n.pop();return r},w=(e,t)=>(l("comp",e=e.replace(c[d.BUILD],""),t),l("caret",e=_(e,t)),l("tildes",e=x(e,t)),l("xrange",e=C(e,t)),l("stars",e=P(e,t)),e),E=e=>!e||"x"===e.toLowerCase()||"*"===e,x=(e,t)=>e.trim().split(/\s+/).map(e=>D(e,t)).join(" "),D=(e,t)=>{let r=t.loose?c[d.TILDELOOSE]:c[d.TILDE];return e.replace(r,(t,r,n,o,a)=>{let i;return l("tilde",e,t,r,n,o,a),E(r)?i="":E(n)?i=`>=${r}.0.0 <${+r+1}.0.0-0`:E(o)?i=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:a?(l("replaceTilde pr",a),i=`>=${r}.${n}.${o}-${a} <${r}.${+n+1}.0-0`):i=`>=${r}.${n}.${o} <${r}.${+n+1}.0-0`,l("tilde return",i),i})},_=(e,t)=>e.trim().split(/\s+/).map(e=>S(e,t)).join(" "),S=(e,t)=>{l("caret",e,t);let r=t.loose?c[d.CARETLOOSE]:c[d.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(t,r,o,a,i)=>{let s;return l("caret",e,t,r,o,a,i),E(r)?s="":E(o)?s=`>=${r}.0.0${n} <${+r+1}.0.0-0`:E(a)?s="0"===r?`>=${r}.${o}.0${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.0${n} <${+r+1}.0.0-0`:i?(l("replaceCaret pr",i),s="0"===r?"0"===o?`>=${r}.${o}.${a}-${i} <${r}.${o}.${+a+1}-0`:`>=${r}.${o}.${a}-${i} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${a}-${i} <${+r+1}.0.0-0`):(l("no pr"),s="0"===r?"0"===o?`>=${r}.${o}.${a}${n} <${r}.${o}.${+a+1}-0`:`>=${r}.${o}.${a}${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${a} <${+r+1}.0.0-0`),l("caret return",s),s})},C=(e,t)=>(l("replaceXRanges",e,t),e.split(/\s+/).map(e=>k(e,t)).join(" ")),k=(e,t)=>{e=e.trim();let r=t.loose?c[d.XRANGELOOSE]:c[d.XRANGE];return e.replace(r,(r,n,o,a,i,s)=>{l("xRange",e,r,n,o,a,i,s);let u=E(o),c=u||E(a),d=c||E(i);return"="===n&&d&&(n=""),s=t.includePrerelease?"-0":"",u?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&d?(c&&(a=0),i=0,">"===n?(n=">=",c?(o=+o+1,a=0):a=+a+1,i=0):"<="===n&&(n="<",c?o=+o+1:a=+a+1),"<"===n&&(s="-0"),r=`${n+o}.${a}.${i}${s}`):c?r=`>=${o}.0.0${s} <${+o+1}.0.0-0`:d&&(r=`>=${o}.${a}.0${s} <${o}.${+a+1}.0-0`),l("xRange return",r),r})},P=(e,t)=>(l("replaceStars",e,t),e.trim().replace(c[d.STAR],"")),O=(e,t)=>(l("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?d.GTE0PRE:d.GTE0],"")),R=e=>(t,r,n,o,a,i,s,l,u,c,d,f)=>(r=E(n)?"":E(o)?`>=${n}.0.0${e?"-0":""}`:E(a)?`>=${n}.${o}.0${e?"-0":""}`:i?`>=${r}`:`>=${r}${e?"-0":""}`,l=E(u)?"":E(c)?`<${+u+1}.0.0-0`:E(d)?`<${u}.${+c+1}.0-0`:f?`<=${u}.${c}.${d}-${f}`:e?`<${u}.${c}.${+d+1}-0`:`<=${l}`,`${r} ${l}`.trim()),T=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(l(e[r].semver),e[r].semver!==s.ANY&&e[r].semver.prerelease.length>0){let n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},3908(e,t,r){"use strict";let n=r(7272),{MAX_LENGTH:o,MAX_SAFE_INTEGER:a}=r(6874),{safeRe:i,t:s}=r(9718),l=r(968),{compareIdentifiers:u}=r(1123);class c{constructor(e,t){if(t=l(t),e instanceof c)if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;else e=e.version;else if("string"!=typeof e)throw TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>o)throw TypeError(`version is longer than ${o} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?i[s.LOOSE]:i[s.FULL]);if(!r)throw TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>a||this.major<0)throw TypeError("Invalid major version");if(this.minor>a||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>a||this.patch<0)throw TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<a)return t}return e}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(n("SemVer.compare",this.version,this.options,e),!(e instanceof c)){if("string"==typeof e&&e===this.version)return 0;e=new c(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return(e instanceof c||(e=new c(e,this.options)),this.major<e.major)?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:+(this.patch>e.patch)}comparePre(e){if(e instanceof c||(e=new c(e,this.options)),this.prerelease.length&&!e.prerelease.length)return -1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],o=e.prerelease[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return -1;else if(r===o)continue;else return u(r,o)}while(++t)}compareBuild(e){e instanceof c||(e=new c(e,this.options));let t=0;do{let r=this.build[t],o=e.build[t];if(n("build compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return -1;else if(r===o)continue;else return u(r,o)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&!1===r)throw Error("invalid increment argument: identifier is empty");if(t){let e=`-${t}`.match(this.options.loose?i[s.PRERELEASELOOSE]:i[s.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"release":if(0===this.prerelease.length)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(0!==this.minor||0!==this.patch||0===this.prerelease.length)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(0!==this.patch||0===this.prerelease.length)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{let e=+!!Number(r);if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===u(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=c},2111(e,t,r){"use strict";let n=r(4641),o=r(3999),a=r(5580),i=r(4089),s=r(7059),l=r(5200);e.exports=(e,t,r,u)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,u);case"!=":return o(e,r,u);case">":return a(e,r,u);case">=":return i(e,r,u);case"<":return s(e,r,u);case"<=":return l(e,r,u);default:throw TypeError(`Invalid operator: ${t}`)}}},560(e,t,r){"use strict";let n=r(3908);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},4641(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>0===n(e,t,r)},5580(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>n(e,t,r)>0},4089(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>n(e,t,r)>=0},7059(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>0>n(e,t,r)},5200(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>0>=n(e,t,r)},3999(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>0!==n(e,t,r)},7638(e,t,r){"use strict";let n=r(8311);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},6874(e){"use strict";e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||0x1fffffffffffff,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},7272(e){"use strict";e.exports="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{}},1123(e){"use strict";let t=/^[0-9]+$/,r=(e,r)=>{if("number"==typeof e&&"number"==typeof r)return e===r?0:e<r?-1:1;let n=t.test(e),o=t.test(r);return n&&o&&(e*=1,r*=1),e===r?0:n&&!o?-1:o&&!n?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},8794(e){"use strict";e.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(void 0!==t)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}},968(e){"use strict";let t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},9718(e,t,r){"use strict";let{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:a}=r(6874),i=r(7272),s=(t=e.exports={}).re=[],l=t.safeRe=[],u=t.src=[],c=t.safeSrc=[],d=t.t={},f=0,p="[a-zA-Z0-9-]",m=[["\\s",1],["\\d",a],[p,o]],h=(e,t,r)=>{let n=(e=>{for(let[t,r]of m)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),o=f++;i(e,o,t),d[e]=o,u[o]=t,c[o]=n,s[o]=new RegExp(t,r?"g":void 0),l[o]=new RegExp(n,r?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),h("MAINVERSION",`(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASE",`(?:-(${u[d.PRERELEASEIDENTIFIER]}(?:\\.${u[d.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${u[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[d.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${p}+`),h("BUILD",`(?:\\+(${u[d.BUILDIDENTIFIER]}(?:\\.${u[d.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${u[d.MAINVERSION]}${u[d.PRERELEASE]}?${u[d.BUILD]}?`),h("FULL",`^${u[d.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${u[d.MAINVERSIONLOOSE]}${u[d.PRERELEASELOOSE]}?${u[d.BUILD]}?`),h("LOOSE",`^${u[d.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${u[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${u[d.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:${u[d.PRERELEASE]})?${u[d.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:${u[d.PRERELEASELOOSE]})?${u[d.BUILD]}?)?)?`),h("XRANGE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h("COERCE",`${u[d.COERCEPLAIN]}(?:$|[^\\d])`),h("COERCEFULL",u[d.COERCEPLAIN]+`(?:${u[d.PRERELEASE]})?`+`(?:${u[d.BUILD]})?`+"(?:$|[^\\d])"),h("COERCERTL",u[d.COERCE],!0),h("COERCERTLFULL",u[d.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${u[d.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",h("TILDE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${u[d.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",h("CARET",`^${u[d.LONECARET]}${u[d.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${u[d.LONECARET]}${u[d.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${u[d.GTLT]}\\s*(${u[d.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]}|${u[d.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${u[d.XRANGEPLAIN]})\\s+-\\s+(${u[d.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${u[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[d.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},6369(e,t,r){"use strict";function n(e){if(Array.isArray(e))return e}r.d(t,{A:()=>n})},3029(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}r.d(t,{A:()=>n})},2901(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(6192);function o(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(0,n.A)(o.key),o)}}function a(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}},4467(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(6192);function o(e,t,r){return(t=(0,n.A)(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},6562(e,t,r){"use strict";function n(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}r.d(t,{A:()=>n})},6192(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(2284);function o(e){var t=function(e,t){if("object"!=(0,n.A)(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=(0,n.A)(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==(0,n.A)(t)?t:t+""}},2284(e,t,r){"use strict";function n(e){return(n="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)}r.d(t,{A:()=>n})},3612(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function o(e,t){if(e){if("string"==typeof e)return n(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}r.d(t,{A:()=>o})},2602(e,t,r){"use strict";let n,o,a,i,s,l,u,c,d,f,p;r.r(t),r.d(t,{GenderUnknownIcon:()=>pp,evaluateAsNumber:()=>lF,getImportMapOverrideMap:()=>sI,StockManagementPictogram:()=>_D,ChemistryIcon:()=>f6,BabyIcon:()=>fZ,DashboardExtension:()=>mp,openmrsComponentDecorator:()=>cZ,tryRegisterExtension:()=>fn,pictogramIds:()=>D2,ActivityIcon:()=>fV,compile:()=>lW,removeRouteMapOverride:()=>lr,TableBatchActions:()=>fw,getAsyncLifecycle:()=>cq,subscribeOpenmrsEvent:()=>lm,PasswordIcon:()=>pM,Assessment2Pictogram:()=>D5,CloseIcon:()=>pe,setupRouteMapOverrides:()=>la,useFeatureFlag:()=>dw,reset:()=>uq,ConceptDictionaryPictogram:()=>_e,LabOrderIcon:()=>pD,VisitMode:()=>lw,useLocations:()=>dU,getLifecycle:()=>cY,formatDatetime:()=>E2,getVisitsForPatient:()=>lP,formatPartialDate:()=>EX,CustomOverflowMenu:()=>fk,LocationIcon:()=>pS,GroupIcon:()=>ph,createUseStore:()=>cv,VisitStatus:()=>lE,getSessionLocation:()=>sd,getCurrentImportMap:()=>sZ,usePatient:()=>dZ,useRenderableExtensions:()=>dq,getOpenedWindowIndexByWorkspace:()=>u5,setLeftNav:()=>uX,clearHistory:()=>i0,clearConfigErrors:()=>on,formatTime:()=>E1,isDevEnabled:()=>sw,CohortsPictogram:()=>D7,closeWorkspaceGroup2:()=>_q,getCurrentRouteMap:()=>s9,ConfigurableLink:()=>cd,sessionStore:()=>se,setSessionLocale:()=>sp,subscribeSnackbarShown:()=>S,getLoggedInUser:()=>sc,GenderMaleIcon:()=>pd,getExtensionSlotConfigFromStore:()=>nv,evaluateAsNumberAsync:()=>lB,getImportMapDefaultMap:()=>sA,unregisterExtensionRendering:()=>ug,implementerToolsConfigStore:()=>nT,Type:()=>no,InPatientPictogram:()=>_u,cleanupObsoleteFeatureFlags:()=>ut,getAttachmentsUrl:()=>lu,showSnackbar:()=>_L,PatientBannerActionsMenu:()=>DY,PatientSearchPictogram:()=>_h,DocumentAttachmentIcon:()=>po,Snackbar:()=>_j,CardiologyPictogram:()=>D8,ImageMedicalIcon:()=>pv,ActionableNotificationComponent:()=>Dm,DiagnosisTags:()=>xX,openChildWorkspaceInWindow:()=>_3,iconIds:()=>fU,PatientsPictogram:()=>_g,interpolateUrl:()=>iK,setupHistory:()=>iJ,subscribeToastShown:()=>_,detachAll:()=>uz,convertToLocaleCalendar:()=>E4,DocumentIcon:()=>pn,configInternalStore:()=>nf,ActionMenuButton2:()=>Sk,setupDynamicOfflineDataHandler:()=>SJ,makeUrl:()=>i9,oneOf:()=>oc,selectPreferredName:()=>DM,MobileCheckIcon:()=>pT,createErrorHandler:()=>P,parseDate:()=>EK,getAttachmentByUuid:()=>ls,LeftNavMenu:()=>x6,getExtensionRegistration:()=>uU,ShoppingCartAddItemIcon:()=>mc,ReferralOrderIcon:()=>pW,ReportIcon:()=>pz,dispatchToastShown:()=>E,getImportMapNextPageMap:()=>s$,registerExtension:()=>uV,setupOfflineSync:()=>Sq,DownloadIcon:()=>pa,useConnectivity:()=>S2,provide:()=>nG,ShoppingCartArrowDownIcon:()=>pX,featureFlagsStore:()=>l7,jsep:()=>lR,GeriatricsPictogram:()=>_s,SearchIcon:()=>pZ,reportError:()=>k,slugify:()=>sz,isOmrsDateToday:()=>EW,getExtensionStore:()=>uy,BloodBankPictogram:()=>D9,TriagePictogram:()=>_C,Workspace2:()=>So,refetchCurrentUser:()=>ss,CheckmarkOutlineIcon:()=>f3,registerExtensionSlot:()=>uY,AllergiesIcon:()=>mi,ArrowDownIcon:()=>fH,useOpenmrsInfinite:()=>dO,getExtensionConfigFromExtensionSlotStore:()=>nE,OpenmrsDatePicker:()=>xA,getExtensionConfigFromStore:()=>nw,getDynamicOfflineDataEntries:()=>SX,getLocaleDisplayName:()=>El,messageOmrsServiceWorker:()=>S0,navigate:()=>iZ,launchWorkspace2:()=>_J,getGroupByWindowName:()=>u6,CustomOverflowMenuItem:()=>fP,isUrl:()=>ou,CaretDownIcon:()=>fJ,ArrowLeftIcon:()=>fz,FacilityPictogram:()=>_i,ViewOffIcon:()=>mn,updateInternalExtensionStore:()=>uc,dispatchActionableNotificationShown:()=>b,resetRouteMapOverrides:()=>ln,formatDurationBetween:()=>xt,defaultVisitCustomRepresentation:()=>lx,getBreadcrumbsFor:()=>ob,useOpenmrsPagination:()=>dx,Pagination:()=>DN,CheckmarkFilledIcon:()=>f4,clearCurrentUser:()=>sl,showModal:()=>Du,ChevronUpIcon:()=>f7,saveVisit:()=>lC,useAttachments:()=>dn,Pictogram:()=>_T,useExtensionSlot:()=>c_,ChevronDownIcon:()=>f5,OpenmrsDateRangePicker:()=>x$,deleteAttachmentPermanently:()=>ld,getVisitTypes:()=>lb,OverflowMenuHorizontalIcon:()=>p$,EventScheduleIcon:()=>pl,getSessionStore:()=>sa,ProcedureOrderIcon:()=>pU,preloadImport:()=>sG,registerWorkspaceWindows2:()=>u8,useOnVisible:()=>dW,setSessionLocation:()=>sf,userHasAccess:()=>su,ChartAverageIcon:()=>f1,getFeatureFlag:()=>ur,UserAvatarIcon:()=>p7,renderExtension:()=>cs,useFhirInfinite:()=>dA,toVisitTypeObject:()=>ly,useSession:()=>dJ,EmergencyDepartmentPictogram:()=>_a,Notification:()=>Df,dispatchSnackbarShown:()=>w,formatDate:()=>EQ,workspace2StoreActions:()=>_9,SwitcherIcon:()=>pq,esmStyleGuideSchema:()=>fy,getImportMapDisabledOverrides:()=>sM,useAssignedExtensionIds:()=>dt,CaretRightIcon:()=>fQ,evaluateAsType:()=>lU,PageHeader:()=>DR,TranslateIcon:()=>p6,setUserProperties:()=>sm,MovementIcon:()=>pA,renderInlineNotifications:()=>DE,subscribePrecacheStaticDependencies:()=>S1,PaymentsDeskPictogram:()=>_y,usePrimaryIdentifierCode:()=>dY,useLayoutType:()=>dI,getCurrentUser:()=>so,closeWorkspaceInWindow:()=>_4,XrayPictogram:()=>_k,CaretUpIcon:()=>f0,renderActionableNotifications:()=>DD,OpenmrsAppContext:()=>c5,setupModals:()=>Dl,getDefaultsFromConfigSchema:()=>function e(t){let r={};for(let n of Object.keys(t))if(SH(t[n])&&t[n].hasOwnProperty("_default"))r[n]=t[n]._default;else{if(n.startsWith("_"))continue;SH(t[n])?r[n]=e(t[n]):r[n]=t[n]}return r},subscribeTo:()=>H,recordConfigDerivationError:()=>nO,useAbortController:()=>c8,Extension:()=>cf,getFhirServerPaginationHandlers:()=>dC,useConnectedExtensions:()=>dc,registerApp:()=>fa,HospitalBedIcon:()=>py,useExtensionInternalStore:()=>dy,configExtensionStore:()=>nm,getSynchronizationItems:()=>SQ,getExtensionSlotsConfigStore:()=>ng,registerExtensionRendering:()=>uh,RenderIfValueIsTruthy:()=>c9,registerFeatureFlag:()=>ue,useFhirFetchAll:()=>dj,restBaseUrl:()=>i3,CalendarHeatMapIcon:()=>fY,isImportMapOverrideDisabled:()=>sL,resetConfigSystem:()=>oo,getExtensionInternalStore:()=>ul,registerGlobalStore:()=>V,evaluateAsBoolean:()=>lM,PatientBannerPatientInfo:()=>DG,addRouteMapOverride:()=>lt,getDefaultCalendar:()=>Eq,SettingsIcon:()=>pY,DrugOrderIcon:()=>pi,ProgramsIcon:()=>pV,useAssignedExtensions:()=>cD,CloseFilledIcon:()=>pt,canAccessStorage:()=>SW,registerDefaultCalendar:()=>EY,TreeViewAltIcon:()=>p9,OverflowMenuVerticalIcon:()=>pI,clearConfigDerivationError:()=>nR,getConfigStore:()=>nh,InformationSquareIcon:()=>pE,EmptyCard:()=>x2,ChevronLeftIcon:()=>f9,RadiologyIcon:()=>mu,useCandidateExtensions:()=>dr,renderToasts:()=>_W,isDesktop:()=>dM,integrateBreakpoints:()=>fc,RegistrationPictogram:()=>_w,CardHeader:()=>fm,getExtensionRegistrationFrom:()=>uB,InformationIcon:()=>pb,SystemAdministrationPictogram:()=>__,TrashCanIcon:()=>p5,useShallowStableValue:()=>cp,PatientDocumentsPictogram:()=>_m,useOpenmrsSWR:()=>dH,Assessment1Pictogram:()=>D6,finishRegisteringAllApps:()=>fi,importDynamic:()=>sK,useFhirPagination:()=>dS,useVisitContextStore:()=>d6,ArrowUpIcon:()=>fG,showActionableNotification:()=>D_,useForceUpdate:()=>dE,useVisit:()=>d5,PatientBannerPatientIdentifiers:()=>DW,TransferPictogram:()=>_S,usePagination:()=>dz,Breakpoint:()=>fs,PatientBannerToggleContactDetailsButton:()=>SP,CloseOutlineIcon:()=>pr,ObstetricsPictogram:()=>_p,parseDateInput:()=>E6,ReportsPictogram:()=>_E,getConfig:()=>nY,attach:()=>uW,getLocale:()=>Eu,isUrlWithTemplateParameters:()=>ol,useEmrConfiguration:()=>dh,useLeftNav:()=>dL,ToolsIcon:()=>p3,ErrorState:()=>x4,detach:()=>uH,setCurrentVisit:()=>lS,ConditionsIcon:()=>ml,SaveIcon:()=>pG,useConfig:()=>du,validator:()=>na,CalendarIcon:()=>fq,getHistory:()=>iX,StickyNoteAddIcon:()=>pQ,useWorkspace2Store:()=>_8,getPatientName:()=>Dj,getVisitStore:()=>l_,getCoreTranslation:()=>iz,registerModuleWithConfigSystem:()=>nW,updateOpenedWorkspaceInWindow:()=>_6,registerModuleLoad:()=>nH,getBreadcrumbs:()=>og,extractVariableNames:()=>l5,translateFrom:()=>iH,useStoreWithActions:()=>cy,EditIcon:()=>ps,getCandidateExtensions:()=>uZ,shallowEqual:()=>R,subscribeNotificationShown:()=>x,MaximizeIcon:()=>pk,promptForClosingWorkspaces:()=>_1,WarningIcon:()=>ma,fhirBaseUrl:()=>i6,matchLocale:()=>SV,usePatientPhoto:()=>DX,registerBreadcrumb:()=>om,EventsIcon:()=>pu,createGlobalStore:()=>B,subscribeToFeatureFlag:()=>un,useExtensionStore:()=>db,createAttachment:()=>lc,useLeftNavStore:()=>dF,TableIcon:()=>p2,Icon:()=>mf,InformationFilledIcon:()=>pw,getCurrentPageMap:()=>sj,LaboratoryPictogram:()=>_c,temporaryConfigStore:()=>np,toDateObjectStrict:()=>EH,defineConfigSchema:()=>nV,filterBreadcrumbs:()=>ov,invalidateImplementerToolsConfig:()=>nk,PatientBannerContactDetails:()=>SA,getAssignedExtensions:()=>uG,promptForClosingWorkspacesInWindow:()=>_2,PatientPhoto:()=>D1,MaterialOrderIcon:()=>pC,MicroscopeIcon:()=>pR,visitTypesUrl:()=>lv,getOpenedWindowWidth:()=>St,scheduleRecomputation:()=>ux,PharmacyPictogram:()=>_v,AttachmentIcon:()=>ms,MoneyIcon:()=>pN,getAttachments:()=>ll,PageHeaderContent:()=>DT,MedicationIcon:()=>pP,PrinterIcon:()=>pB,PatientListsPictogram:()=>_O,useAppContext:()=>c7,isOpenmrsRoutes:()=>sJ,AppointmentsAltPictogram:()=>D3,GenericOrderTypeIcon:()=>pm,batchExtensionUpdates:()=>uw,useExtensionSlotStore:()=>cE,ViewIcon:()=>mo,formattedName:()=>DI,sessionEndpoint:()=>i5,duration:()=>E7,resetImportMapOverrides:()=>sU,TableOfContentsIcon:()=>p1,CaretLeftIcon:()=>fX,getTranslationOverrides:()=>nq,isVersionSatisfied:()=>SG,EmptyCardIllustration:()=>x1,PenIcon:()=>pF,verifyTotpCode:()=>sh,validators:()=>od,setupImportMapOverrides:()=>sH,showToast:()=>_H,useDefineAppContext:()=>c6,getGlobalStore:()=>W,useOnClickOutside:()=>dV,getWindowByWorkspaceName:()=>u3,ArrowRightIcon:()=>fK,loadLifeCycles:()=>fe,registerBreadcrumbs:()=>oh,MotherIcon:()=>pj,fetchCurrentPatient:()=>lf,Toast:()=>_F,MessageQueueIcon:()=>pO,TwoFactorAuthenticationIcon:()=>p8,Pharmacy2Pictogram:()=>_b,goBackInHistory:()=>iQ,GroupAccessIcon:()=>pg,getExtensionRenderingsStore:()=>uu,setImplementerToolsConfigRecomputer:()=>nC,getAsyncExtensionLifecycle:()=>cX,setupApiModule:()=>sx,renderLoadingSpinner:()=>S$,showNotification:()=>Dx,getModalRegistration:()=>u2,ListCheckedIcon:()=>p_,ResponsiveWrapper:()=>_N,GynaecologyPictogram:()=>_l,ShoppingCartIcon:()=>pJ,getRouteMapNextPageMap:()=>s7,MetadataExportPictogram:()=>_f,updateVisit:()=>lk,backendDependencies:()=>sE,MaybePictogram:()=>_R,createParcelMounter:()=>ca,openmrsFetch:()=>i8,useStore:()=>cg,isOpenmrsAppRoutes:()=>sq,ExportedWorkspace:()=>SE,DentistryPictogram:()=>_n,HomePictogram:()=>_P,ServiceQueuesPictogram:()=>_x,createExportedWorkspaceWindow:()=>Sn,setFeatureFlag:()=>uo,toLanguageTag:()=>Es,DigitalTrustPictogram:()=>_o,NumericObservation:()=>DP,attachmentUrl:()=>li,interpolateString:()=>iG,inRange:()=>os,useExtensionSlotMeta:()=>dv,AppointmentsPictogram:()=>D4,renderSnackbars:()=>_M,getRegisteredWorkspace2Names:()=>Se,logout:()=>sg,toLocationObject:()=>lh,ChartLineIcon:()=>f2,UserHasAccess:()=>dX,evaluateAsBooleanAsync:()=>lL,createDashboard:()=>mm,getLocations:()=>lg,useExtensionContext:()=>dg,getExtensionsConfigStore:()=>nb,getRouteMapDefaultMap:()=>s8,age:()=>DF,isOmrsDateStrict:()=>EV,registerWorkspaceGroups2:()=>u9,usePaginationInfo:()=>dK,evaluateAsync:()=>lI,useOpenmrsFetchAll:()=>dT,removeImportMapOverride:()=>sB,useVisitTypes:()=>d8,ageAsDuration:()=>DL,getExtensionNameFromId:()=>uF,DataEntryPictogram:()=>_r,renderParcel:()=>co,ResetIcon:()=>pK,RenewIcon:()=>pH,useWorkspace2Context:()=>_7,subscribeActionableNotificationShown:()=>D,ErrorCard:()=>x3,GenderFemaleIcon:()=>pc,enableImportMapOverride:()=>sV,retry:()=>SZ,ComponentContext:()=>cc,ExtensionSlot:()=>cC,unsetLeftNav:()=>uQ,addImportMapOverride:()=>sF,MaybeIcon:()=>md,useCustomOverflowMenu:()=>fC,PedestrianFamilyIcon:()=>pL,CtScanPictogram:()=>_t,dispatchNotificationShown:()=>v,leftNavStore:()=>uJ,OpenmrsFetchError:()=>i7,UserFollowIcon:()=>me,launchWorkspaceGroup2:()=>_Y,ChevronRightIcon:()=>f8,UserXrayIcon:()=>mt,GenderOtherIcon:()=>pf,formatDuration:()=>E3,toOmrsIsoString:()=>Ez,Labs2Pictogram:()=>_d,workspace2Store:()=>u4,setUserLanguage:()=>si,useBodyScrollLock:()=>da,SyringeIcon:()=>p0,LocationPicker:()=>x5,useDebounce:()=>dd,TimeIcon:()=>p4,getExtensionSlotConfig:()=>ny,AddIcon:()=>fW,getRouteMapOverrideMap:()=>le,processConfig:()=>nJ,InventoryManagementIcon:()=>px,registerWorkspaces2:()=>u7,UserIcon:()=>mr,formatPatientName:()=>D$,fireOpenmrsEvent:()=>lp,registerModal:()=>u1,registerTranslationNamespace:()=>nz,displayName:()=>DA,createLocalStore:()=>U,evaluate:()=>l$,defineExtensionConfigSchema:()=>nK,getSyncLifecycle:()=>cJ,renderWorkspaceWindowsAndMenu:()=>SF,evaluateAsTypeAsync:()=>lV});let m="openmrs:notification-shown",h="openmrs:actionable-notification-shown",g="openmrs:toast-shown",y="openmrs:snack-bar-shown";function v(e){window.dispatchEvent(new CustomEvent(m,{detail:e}))}function b(e){window.dispatchEvent(new CustomEvent(h,{detail:e}))}function w(e){window.dispatchEvent(new CustomEvent(y,{detail:e}))}function E(e){window.dispatchEvent(new CustomEvent(g,{detail:e}))}function x(e){let t=t=>e(t.detail);return window.addEventListener(m,t),()=>window.removeEventListener(m,t)}function D(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,t){let{message:r}=O(e);return"string"==typeof r&&r?r:t}function k(e){let t=O(e);setTimeout(()=>{throw t})}function P(){let e=Error();return t=>{let r=O(t);r.stack+=`
|
|
2
2
|
Async stacktrace:
|
|
3
|
-
${e.stack}`,k(t)}}function O(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(r){t=`Object thrown as error with the following properties: ${Object.keys(e)}`}return Error(t)}if(void 0===e)return Error("'undefined' was thrown as an error");return Error(e.toString())}function R(e,t){if(e===t||Object.is(e,t))return!0;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}if(Array.isArray(t)||"object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;let r=Object.getOwnPropertyNames(e),n=Object.getOwnPropertyNames(t);return r.length===n.length&&r.every(r=>e[r]===t[r])}function T(e,t){let r;try{r=e()}catch(e){return}return{getItem:e=>{var n;let o=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),a=null!=(n=r.getItem(e))?n:null;return a instanceof Promise?a.then(o):o(a)},setItem:(e,n)=>r.setItem(e,JSON.stringify(n,null==t?void 0:t.replacer)),removeItem:e=>r.removeItem(e)}}window.onerror=function(e,t,r,n,o){return console.error("Unexpected error: ",o??e),E({description:C(o,"Oops! An unexpected error occurred."),kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(e){console.error("Unhandled rejection: ",e.reason),E({description:C(e.reason,"Oops! An unhandled promise rejection occurred."),kind:"error",title:"Error"})};let N=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>N(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>N(t)(e)}}},j=e=>{let t,r=new Set,n=(e,n)=>{let o="function"==typeof e?e(t):e;if(!Object.is(o,t)){let e=t;t=(null!=n?n:"object"!=typeof o||null===o)?o:Object.assign({},t,o),r.forEach(r=>r(t,e))}},o=()=>t,a={setState:n,getState:o,getInitialState:()=>i,subscribe:e=>(r.add(e),()=>r.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."),r.clear()}},i=t=e(n,o,a);return a},A=e=>e?j(e):j;function $(){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={},M=Symbol.for("openmrs.esm-state.instanceCount"),L=globalThis,F=(L[M]??0)+1;function B(e,t,r="none"){let n=I[e];if(n)return n.active?$()||console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):n.value.setState(t,!0),n.active=!0,n.value;{let n=z(e,t,r);return I[e]={value:n,active:!0},n}}function U(e){return A()(()=>e)}function V(e,t){let r=I[e];return r?(r.active?$()||console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):r.value=t,r.active=!0,r.value):(I[e]={value:t,active:!0},t)}function W(e,t,r="none"){let n=I[e];if(!n){let n=z(e,t??{},r);return I[e]={value:n,active:!1},n}return n.value}function H(...e){let[t,r,n]=e,o=void 0===n?r:n,a=void 0===n?e=>e:r,i=a(t.getState());return o(i),t.subscribe(e=>{let t=a(e);R(i,t)||(i=t,o(t))})}function z(e,t,r){return"sessionStorage"===r?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."),(r,n,o)=>{let a,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{a=s.getStorage()}catch(e){}if(!a)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...e)},n,o);let d=N(s.serialize),f=()=>{let e,t=d({state:s.partialize({...n()}),version:s.version}).then(e=>a.setItem(s.name,e)).catch(t=>{e=t});if(e)throw e;return t},p=o.setState;o.setState=(e,t)=>{p(e,t),f()};let m=e((...e)=>{r(...e),f()},n,o),h=()=>{var e;if(!a)return;l=!1,u.forEach(e=>e(n()));let t=(null==(e=s.onRehydrateStorage)?void 0:e.call(s,n()))||void 0;return N(a.getItem.bind(a))(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 r(i=s.merge(e,null!=(t=n())?t:m),!0),f()}).then(()=>{null==t||t(i,void 0),l=!0,c.forEach(e=>e(i))}).catch(e=>{null==t||t(void 0,e)})};return o.persist={setOptions:e=>{s={...s,...e},e.getStorage&&(a=e.getStorage())},clearStorage:()=>{null==a||a.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||m};return(r,n,o)=>{let a,i={storage:T(()=>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.`),r(...e)},n,o);let d=()=>{let e=i.partialize({...n()});return c.setItem(i.name,{state:e,version:i.version})},f=o.setState;o.setState=(e,t)=>{f(e,t),d()};let p=e((...e)=>{r(...e),d()},n,o);o.getInitialState=()=>p;let m=()=>{var e,t;if(!c)return;s=!1,l.forEach(e=>{var t;return e(null!=(t=n())?t:p)});let o=(null==(t=i.onRehydrateStorage)?void 0:t.call(i,null!=(e=n())?e:p))||void 0;return N(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[o,s]=e;if(r(a=i.merge(s,null!=(t=n())?t:p),!0),o)return d()}).then(()=>{null==o||o(a,void 0),a=n(),s=!0,u.forEach(e=>e(a))}).catch(e=>{null==o||o(void 0,e)})};return o.persist={setOptions:e=>{i={...i,...e},e.storage&&(c=e.storage)},clearStorage:()=>{null==c||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>m(),hasHydrated:()=>s,onHydrate:e=>(l.add(e),()=>{l.delete(e)}),onFinishHydration:e=>(u.add(e),()=>{u.delete(e)})},i.skipHydration||m(),a||p}})(()=>t,{name:e,storage:T(()=>sessionStorage)})):A()(()=>t)}L[M]=F,F>1&&!$()&&console.error(`Detected ${F} copies of @openmrs/esm-framework running on this page. Each copy keeps its own store registry, so stores, configuration and extension state are not shared between them. This usually means a frontend module loaded its own bundled framework instead of the one the app shell provides.`),globalThis.setTimeout?.(()=>{"u">typeof window&&"development"===window.spaEnv&&(window.stores=I)},1e3);let K=function(e){return void 0===e};var G,Z,Y,q,J,X,Q,ee,et,er,en,eo,ea,ei,es=r(8348);let el=function(e,t){return function(r){return e(t(r))}};var eu=el(Object.getPrototypeOf,Object),ec=r(3098),ed=Object.prototype,ef=Function.prototype.toString,ep=ed.hasOwnProperty,em=ef.call(Object);let eh=function(e){if(!(0,ec.A)(e)||"[object Object]"!=(0,es.A)(e))return!1;var t=eu(e);if(null===t)return!0;var r=ep.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&ef.call(r)==em},eg=function(e,t){return e===t||e!=e&&t!=t},ey=function(e,t){for(var r=e.length;r--;)if(eg(e[r][0],t))return r;return -1};var ev=Array.prototype.splice;function eb(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}eb.prototype.clear=function(){this.__data__=[],this.size=0},eb.prototype.delete=function(e){var t=this.__data__,r=ey(t,e);return!(r<0)&&(r==t.length-1?t.pop():ev.call(t,r,1),--this.size,!0)},eb.prototype.get=function(e){var t=this.__data__,r=ey(t,e);return r<0?void 0:t[r][1]},eb.prototype.has=function(e){return ey(this.__data__,e)>-1},eb.prototype.set=function(e,t){var r=this.__data__,n=ey(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};var ew=r(3149);let eE=function(e){if(!(0,ew.A)(e))return!1;var t=(0,es.A)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};var ex=r(1917),eD=ex.A["__core-js_shared__"],e_=(G=/[^.]+$/.exec(eD&&eD.keys&&eD.keys.IE_PROTO||""))?"Symbol(src)_1."+G:"",eS=Function.prototype.toString;let eC=function(e){if(null!=e){try{return eS.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var ek=/^\[object .+?Constructor\]$/,eP=Object.prototype,eO=Function.prototype.toString,eR=eP.hasOwnProperty,eT=RegExp("^"+eO.call(eR).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");let eN=function(e){return!!(0,ew.A)(e)&&(!e_||!(e_ in e))&&(eE(e)?eT:ek).test(eC(e))},ej=function(e,t){var r=null==e?void 0:e[t];return eN(r)?r:void 0};var eA=ej(ex.A,"Map"),e$=ej(Object,"create"),eI=Object.prototype.hasOwnProperty,eM=Object.prototype.hasOwnProperty;function eL(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}eL.prototype.clear=function(){this.__data__=e$?e$(null):{},this.size=0},eL.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t},eL.prototype.get=function(e){var t=this.__data__;if(e$){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return eI.call(t,e)?t[e]:void 0},eL.prototype.has=function(e){var t=this.__data__;return e$?void 0!==t[e]:eM.call(t,e)},eL.prototype.set=function(e,t){var r=this.__data__;return this.size+=+!this.has(e),r[e]=e$&&void 0===t?"__lodash_hash_undefined__":t,this};let eF=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},eB=function(e,t){var r=e.__data__;return eF(t)?r["string"==typeof t?"string":"hash"]:r.map};function eU(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function eV(e){var t=this.__data__=new eb(e);this.size=t.size}eU.prototype.clear=function(){this.size=0,this.__data__={hash:new eL,map:new(eA||eb),string:new eL}},eU.prototype.delete=function(e){var t=eB(this,e).delete(e);return this.size-=!!t,t},eU.prototype.get=function(e){return eB(this,e).get(e)},eU.prototype.has=function(e){return eB(this,e).has(e)},eU.prototype.set=function(e,t){var r=eB(this,e),n=r.size;return r.set(e,t),this.size+=+(r.size!=n),this},eV.prototype.clear=function(){this.__data__=new eb,this.size=0},eV.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},eV.prototype.get=function(e){return this.__data__.get(e)},eV.prototype.has=function(e){return this.__data__.has(e)},eV.prototype.set=function(e,t){var r=this.__data__;if(r instanceof eb){var n=r.__data__;if(!eA||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new eU(n)}return r.set(e,t),this.size=r.size,this};var eW=function(){try{var e=ej(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();let eH=function(e,t,r){"__proto__"==t&&eW?eW(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r},ez=function(e,t,r){(void 0===r||eg(e[t],r))&&(void 0!==r||t in e)||eH(e,t,r)},eK=function(e,t,r){for(var n=-1,o=Object(e),a=r(e),i=a.length;i--;){var s=a[++n];if(!1===t(o[s],s,o))break}return e};var eG="object"==typeof exports&&exports&&!exports.nodeType&&exports,eZ=eG&&"object"==typeof module&&module&&!module.nodeType&&module,eY=eZ&&eZ.exports===eG?ex.A.Buffer:void 0,eq=eY?eY.allocUnsafe:void 0;let eJ=function(e,t){if(t)return e.slice();var r=e.length,n=eq?eq(r):new e.constructor(r);return e.copy(n),n};var eX=ex.A.Uint8Array;let eQ=function(e){var t=new e.constructor(e.byteLength);return new eX(t).set(new eX(e)),t},e0=function(e,t){var r=t?eQ(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)},e1=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t};var e2=Object.create,e4=function(){function e(){}return function(t){if(!(0,ew.A)(t))return{};if(e2)return e2(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),e3=Object.prototype;let e6=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||e3)},e5=function(e){return"function"!=typeof e.constructor||e6(e)?{}:e4(eu(e))},e9=function(e){return(0,ec.A)(e)&&"[object Arguments]"==(0,es.A)(e)};var e8=Object.prototype,e7=e8.hasOwnProperty,te=e8.propertyIsEnumerable,tt=e9(function(){return arguments}())?e9:function(e){return(0,ec.A)(e)&&e7.call(e,"callee")&&!te.call(e,"callee")},tr=Array.isArray;let tn=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff},to=function(e){return null!=e&&tn(e.length)&&!eE(e)};var ta="object"==typeof exports&&exports&&!exports.nodeType&&exports,ti=ta&&"object"==typeof module&&module&&!module.nodeType&&module,ts=ti&&ti.exports===ta?ex.A.Buffer:void 0;let tl=(ts?ts.isBuffer:void 0)||function(){return!1};var tu={};tu["[object Float32Array]"]=tu["[object Float64Array]"]=tu["[object Int8Array]"]=tu["[object Int16Array]"]=tu["[object Int32Array]"]=tu["[object Uint8Array]"]=tu["[object Uint8ClampedArray]"]=tu["[object Uint16Array]"]=tu["[object Uint32Array]"]=!0,tu["[object Arguments]"]=tu["[object Array]"]=tu["[object ArrayBuffer]"]=tu["[object Boolean]"]=tu["[object DataView]"]=tu["[object Date]"]=tu["[object Error]"]=tu["[object Function]"]=tu["[object Map]"]=tu["[object Number]"]=tu["[object Object]"]=tu["[object RegExp]"]=tu["[object Set]"]=tu["[object String]"]=tu["[object WeakMap]"]=!1;let tc=function(e){return function(t){return e(t)}};var td=r(2136),tf="object"==typeof exports&&exports&&!exports.nodeType&&exports,tp=tf&&"object"==typeof module&&module&&!module.nodeType&&module,tm=tp&&tp.exports===tf&&td.A.process,th=function(){try{var e=tp&&tp.require&&tp.require("util").types;if(e)return e;return tm&&tm.binding&&tm.binding("util")}catch(e){}}(),tg=th&&th.isTypedArray,ty=tg?tc(tg):function(e){return(0,ec.A)(e)&&tn(e.length)&&!!tu[(0,es.A)(e)]};let tv=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};var tb=Object.prototype.hasOwnProperty;let tw=function(e,t,r){var n=e[t];tb.call(e,t)&&eg(n,r)&&(void 0!==r||t in e)||eH(e,t,r)},tE=function(e,t,r,n){var o=!r;r||(r={});for(var a=-1,i=t.length;++a<i;){var s=t[a],l=n?n(r[s],e[s],s,r,e):void 0;void 0===l&&(l=e[s]),o?eH(r,s,l):tw(r,s,l)}return r},tx=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n};var tD=/^(?:0|[1-9]\d*)$/;let t_=function(e,t){var r=typeof e;return!!(t=null==t?0x1fffffffffffff:t)&&("number"==r||"symbol"!=r&&tD.test(e))&&e>-1&&e%1==0&&e<t};var tS=Object.prototype.hasOwnProperty;let tC=function(e,t){var r=tr(e),n=!r&&tt(e),o=!r&&!n&&tl(e),a=!r&&!n&&!o&&ty(e),i=r||n||o||a,s=i?tx(e.length,String):[],l=s.length;for(var u in e)(t||tS.call(e,u))&&!(i&&("length"==u||o&&("offset"==u||"parent"==u)||a&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||t_(u,l)))&&s.push(u);return s},tk=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t};var tP=Object.prototype.hasOwnProperty;let tO=function(e){if(!(0,ew.A)(e))return tk(e);var t=e6(e),r=[];for(var n in e)"constructor"==n&&(t||!tP.call(e,n))||r.push(n);return r},tR=function(e){return to(e)?tC(e,!0):tO(e)},tT=function(e,t,r,n,o,a,i){var s=tv(e,r),l=tv(t,r),u=i.get(l);if(u)return void ez(e,r,u);var c=a?a(s,l,r+"",e,t,i):void 0,d=void 0===c;if(d){var f=tr(l),p=!f&&tl(l),m=!f&&!p&&ty(l);(c=l,f||p||m)?tr(s)?c=s:(0,ec.A)(s)&&to(s)?c=e1(s):p?(d=!1,c=eJ(l,!0)):m?(d=!1,c=e0(l,!0)):c=[]:eh(l)||tt(l)?(c=s,tt(s))?c=tE(s,tR(s)):(!(0,ew.A)(s)||eE(s))&&(c=e5(l)):d=!1}d&&(i.set(l,c),o(c,l,n,a,i),i.delete(l)),ez(e,r,c)},tN=function e(t,r,n,o,a){t!==r&&eK(r,function(i,s){if(a||(a=new eV),(0,ew.A)(i))tT(t,r,s,n,e,o,a);else{var l=o?o(tv(t,s),i,s+"",t,r,a):void 0;void 0===l&&(l=i),ez(t,s,l)}},tR)},tj=function(e){return e},tA=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)};var t$=Math.max;let tI=function(e,t,r){return t=t$(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,a=t$(n.length-t,0),i=Array(a);++o<a;)i[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(i),tA(e,this,s)}};var tM=Date.now,tL=(Z=eW?function(e,t){return eW(e,"toString",{configurable:!0,enumerable:!1,value:function(){return t},writable:!0})}:tj,Y=0,q=0,function(){var e=tM(),t=16-(e-q);if(q=e,t>0){if(++Y>=800)return arguments[0]}else Y=0;return Z.apply(void 0,arguments)});let tF=function(e,t,r){if(!(0,ew.A)(r))return!1;var n=typeof t;return("number"==n?!!(to(r)&&t_(t,r.length)):"string"==n&&t in r)&&eg(r[t],e)},tB=function(e){var t;return tL(tI(t=function(t,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,i=o>2?r[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,i&&tF(r[0],r[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++n<o;){var s=r[n];s&&e(t,s,n,a)}return t},void 0,tj),t+"")};var tU=tB(function(e,t,r,n){tN(e,t,r,n)});function tV(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new eU;++t<r;)this.add(e[t])}tV.prototype.add=tV.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},tV.prototype.has=function(e){return this.__data__.has(e)};let tW=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1},tH=function(e,t,r,n,o,a){var i=1&r,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var u=a.get(e),c=a.get(t);if(u&&c)return u==t&&c==e;var d=-1,f=!0,p=2&r?new tV:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(n)var g=i?n(h,m,d,t,e,a):n(m,h,d,e,t,a);if(void 0!==g){if(g)continue;f=!1;break}if(p){if(!tW(t,function(e,t){if(!p.has(t)&&(m===e||o(m,e,r,n,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||o(m,h,r,n,a))){f=!1;break}}return a.delete(e),a.delete(t),f};var tz=r(241);let tK=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r},tG=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r};var tZ=tz.A?tz.A.prototype:void 0,tY=tZ?tZ.valueOf:void 0;let tq=function(e,t,r,n,o,a,i){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!a(new eX(e),new eX(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return eg(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=tK;case"[object Set]":var l=1&n;if(s||(s=tG),e.size!=t.size&&!l)break;var u=i.get(e);if(u)return u==t;n|=2,i.set(e,t);var c=tH(s(e),s(t),n,o,a,i);return i.delete(e),c;case"[object Symbol]":if(tY)return tY.call(e)==tY.call(t)}return!1},tJ=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e},tX=function(e,t,r){var n=t(e);return tr(e)?n:tJ(n,r(e))},tQ=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,a=[];++r<n;){var i=e[r];t(i,r,e)&&(a[o++]=i)}return a},t0=function(){return[]};var t1=Object.prototype.propertyIsEnumerable,t2=Object.getOwnPropertySymbols,t4=t2?function(e){return null==e?[]:tQ(t2(e=Object(e)),function(t){return t1.call(e,t)})}:t0,t3=el(Object.keys,Object),t6=Object.prototype.hasOwnProperty;let t5=function(e){if(!e6(e))return t3(e);var t=[];for(var r in Object(e))t6.call(e,r)&&"constructor"!=r&&t.push(r);return t},t9=function(e){return to(e)?tC(e):t5(e)},t8=function(e){return tX(e,t9,t4)};var t7=Object.prototype.hasOwnProperty;let re=function(e,t,r,n,o,a){var i=1&r,s=t8(e),l=s.length;if(l!=t8(t).length&&!i)return!1;for(var u=l;u--;){var c=s[u];if(!(i?c in t:t7.call(t,c)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=i;++u<l;){var h=e[c=s[u]],g=t[c];if(n)var y=i?n(g,h,c,t,e,a):n(h,g,c,e,t,a);if(!(void 0===y?h===g||o(h,g,r,n,a):y)){p=!1;break}m||(m="constructor"==c)}if(p&&!m){var v=e.constructor,b=t.constructor;v!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b)&&(p=!1)}return a.delete(e),a.delete(t),p};var rt=ej(ex.A,"DataView"),rr=ej(ex.A,"Promise"),rn=ej(ex.A,"Set"),ro=ej(ex.A,"WeakMap"),ra="[object Map]",ri="[object Promise]",rs="[object Set]",rl="[object WeakMap]",ru="[object DataView]",rc=eC(rt),rd=eC(eA),rf=eC(rr),rp=eC(rn),rm=eC(ro),rh=es.A;(rt&&rh(new rt(new ArrayBuffer(1)))!=ru||eA&&rh(new eA)!=ra||rr&&rh(rr.resolve())!=ri||rn&&rh(new rn)!=rs||ro&&rh(new ro)!=rl)&&(rh=function(e){var t=(0,es.A)(e),r="[object Object]"==t?e.constructor:void 0,n=r?eC(r):"";if(n)switch(n){case rc:return ru;case rd:return ra;case rf:return ri;case rp:return rs;case rm:return rl}return t});let rg=rh;var ry="[object Arguments]",rv="[object Array]",rb="[object Object]",rw=Object.prototype.hasOwnProperty;let rE=function(e,t,r,n,o,a){var i=tr(e),s=tr(t),l=i?rv:rg(e),u=s?rv:rg(t);l=l==ry?rb:l,u=u==ry?rb:u;var c=l==rb,d=u==rb,f=l==u;if(f&&tl(e)){if(!tl(t))return!1;i=!0,c=!1}if(f&&!c)return a||(a=new eV),i||ty(e)?tH(e,t,r,n,o,a):tq(e,t,l,r,n,o,a);if(!(1&r)){var p=c&&rw.call(e,"__wrapped__"),m=d&&rw.call(t,"__wrapped__");if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||(a=new eV),o(h,g,r,n,a)}}return!!f&&(a||(a=new eV),re(e,t,r,n,o,a))},rx=function(e,t){return function e(t,r,n,o,a){return t===r||(null!=t&&null!=r&&((0,ec.A)(t)||(0,ec.A)(r))?rE(t,r,n,o,e,a):t!=t&&r!=r)}(e,t)},rD=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o},r_=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e};var rS=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)tJ(t,t4(e)),e=eu(e);return t}:t0;let rC=function(e){return tX(e,tR,rS)};var rk=Object.prototype.hasOwnProperty;let rP=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&rk.call(e,"index")&&(r.index=e.index,r.input=e.input),r},rO=function(e,t){var r=t?eQ(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)};var rR=/\w*$/;let rT=function(e){var t=new e.constructor(e.source,rR.exec(e));return t.lastIndex=e.lastIndex,t};var rN=tz.A?tz.A.prototype:void 0,rj=rN?rN.valueOf:void 0;let rA=function(e,t,r){var n=e.constructor;switch(t){case"[object ArrayBuffer]":return eQ(e);case"[object Boolean]":case"[object Date]":return new n(+e);case"[object DataView]":return rO(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return e0(e,r);case"[object Map]":case"[object Set]":return new n;case"[object Number]":case"[object String]":return new n(e);case"[object RegExp]":return rT(e);case"[object Symbol]":return rj?Object(rj.call(e)):{}}};var r$=th&&th.isMap,rI=r$?tc(r$):function(e){return(0,ec.A)(e)&&"[object Map]"==rg(e)},rM=th&&th.isSet,rL=rM?tc(rM):function(e){return(0,ec.A)(e)&&"[object Set]"==rg(e)},rF="[object Arguments]",rB="[object Function]",rU="[object Object]",rV={};rV[rF]=rV["[object Array]"]=rV["[object ArrayBuffer]"]=rV["[object DataView]"]=rV["[object Boolean]"]=rV["[object Date]"]=rV["[object Float32Array]"]=rV["[object Float64Array]"]=rV["[object Int8Array]"]=rV["[object Int16Array]"]=rV["[object Int32Array]"]=rV["[object Map]"]=rV["[object Number]"]=rV[rU]=rV["[object RegExp]"]=rV["[object Set]"]=rV["[object String]"]=rV["[object Symbol]"]=rV["[object Uint8Array]"]=rV["[object Uint8ClampedArray]"]=rV["[object Uint16Array]"]=rV["[object Uint32Array]"]=!0,rV["[object Error]"]=rV[rB]=rV["[object WeakMap]"]=!1;let rW=function e(t,r,n,o,a,i){var s,l=1&r,u=2&r,c=4&r;if(n&&(s=a?n(t,o,a,i):n(t)),void 0!==s)return s;if(!(0,ew.A)(t))return t;var d=tr(t);if(d){if(s=rP(t),!l)return e1(t,s)}else{var f,p,m,h,g=rg(t),y=g==rB||"[object GeneratorFunction]"==g;if(tl(t))return eJ(t,l);if(g==rU||g==rF||y&&!a){if(s=u||y?{}:e5(t),!l)return u?(p=(f=s)&&tE(t,tR(t),f),tE(t,rS(t),p)):(h=(m=s)&&tE(t,t9(t),m),tE(t,t4(t),h))}else{if(!rV[g])return a?t:{};s=rA(t,g,l)}}i||(i=new eV);var v=i.get(t);if(v)return v;i.set(t,s),rL(t)?t.forEach(function(o){s.add(e(o,r,n,o,t,i))}):rI(t)&&t.forEach(function(o,a){s.set(a,e(o,r,n,a,t,i))});var b=c?u?rC:t8:u?tR:t9,w=d?void 0:b(t);return r_(w||t,function(o,a){w&&(o=t[a=o]),tw(s,a,e(o,r,n,a,t,i))}),s};var rH=r(1882),rz=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rK=/^\w*$/;let rG=function(e,t){if(tr(e))return!1;var r=typeof e;return!!("number"==r||"symbol"==r||"boolean"==r||null==e||(0,rH.A)(e))||rK.test(e)||!rz.test(e)||null!=t&&e in Object(t)};function rZ(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=e.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(rZ.Cache||eU),r}rZ.Cache=eU;var rY=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rq=/\\(\\)?/g,rJ=(X=(J=rZ(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(rY,function(e,r,n,o){t.push(n?o.replace(rq,"$1"):r||e)}),t},function(e){return 500===X.size&&X.clear(),e})).cache,J),rX=1/0,rQ=tz.A?tz.A.prototype:void 0,r0=rQ?rQ.toString:void 0;let r1=function e(t){if("string"==typeof t)return t;if(tr(t))return rD(t,e)+"";if((0,rH.A)(t))return r0?r0.call(t):"";var r=t+"";return"0"==r&&1/t==-rX?"-0":r},r2=function(e,t){return tr(e)?e:rG(e,t)?[e]:rJ(null==e?"":r1(e))},r4=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};var r3=1/0;let r6=function(e){if("string"==typeof e||(0,rH.A)(e))return e;var t=e+"";return"0"==t&&1/e==-r3?"-0":t},r5=function(e,t){t=r2(t,e);for(var r=0,n=t.length;null!=e&&r<n;)e=e[r6(t[r++])];return r&&r==n?e:void 0},r9=function(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(o);++n<o;)a[n]=e[n+t];return a},r8=function(e,t){var r,n;return t=r2(t,e),r=e,null==(e=(n=t).length<2?r:r5(r,r9(n,0,-1)))||delete e[r6(r4(t))]},r7=function(e){return eh(e)?void 0:e};var ne=tz.A?tz.A.isConcatSpreadable:void 0;let nt=function(e){return tr(e)||tt(e)||!!(ne&&e&&e[ne])},nr=function e(t,r,n,o,a){var i=-1,s=t.length;for(n||(n=nt),a||(a=[]);++i<s;){var l=t[i];r>0&&n(l)?r>1?e(l,r-1,n,o,a):tJ(a,l):o||(a[a.length]=l)}return a};var nn=tL(tI(Q=function(e,t){var r={};if(null==e)return r;var n=!1;t=rD(t,function(t){return t=r2(t,e),n||(n=t.length>1),t}),tE(e,rC(e),r),n&&(r=rW(r,7,r7));for(var o=t.length;o--;)r8(r,t[o]);return r},void 0,function(e){return(null==e?0:e.length)?nr(e,1):[]}),Q+""),no=((ee={}).Array="Array",ee.Boolean="Boolean",ee.ConceptUuid="ConceptUuid",ee.Number="Number",ee.Object="Object",ee.String="String",ee.UUID="UUID",ee.PersonAttributeTypeUuid="PersonAttributeTypeUuid",ee.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid",ee);function na(e,t){return r=>{if(!e(r))if("function"==typeof t)return t(r);else return t}}let ni=na(e=>Array.isArray(e),"must be an array"),ns=na(e=>"boolean"==typeof e,"must be a boolean"),nl=na(e=>"number"==typeof e,"must be a number"),nu=na(e=>"string"==typeof e,"must be a string"),nc=na(e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,"must be an object (not an array or null)"),nd=na(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"),nf=B("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),np=B("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});np.subscribe(e=>{var t=e.config;try{localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}catch(e){}});let nm=B("config-store-of-extension-state",{mountedExtensions:[]});function nh(e){return W(`config-module-${e}`,{config:null,loaded:!1,translationOverridesLoaded:!1})}function ng(){return W("config-extension-slots",{slots:{}})}function ny(e){return nv(ng().getState(),e)}function nv(e,t){return e.slots[t]??{loaded:!1,config:{}}}function nb(){return W("config-extensions",{configs:{}})}function nw(e,t){if("string"!=typeof e||"string"!=typeof t||"__proto__"===e||"__proto__"===t||"constructor"===e||"constructor"===t||"prototype"===e||"prototype"===t)throw Error("Attempted to call `getExtensionConfig()` with invalid argument");let r=nb(),n=r=>r.configs[e]?.[t];return{getInitialState:()=>n(r.getInitialState()),getState:()=>n(r.getState())??{loaded:!1,config:null},subscribe:e=>r.subscribe((t,r)=>{let o=n(t),a=n(r);R(o,a)||e(o,a)})}}function nE(e,t,r){return e.configs[t]?.[r]??{loaded:!1,config:null}}function nx(e,t,r){return e.configure?.[r]??null}let nD=A()(()=>({config:{}})),n_=0,nS=!0,nC=!1;function nk(e){n=e}function nP(){nS=!0,n_>0&&nO()}function nO(){if(nS&&n&&!nC){nC=!0,nS=!1;try{n()}catch(e){nS=!0,nR(e),console.error("Failed to derive the implementer tools config",e)}finally{nC=!1}}}function nR(e){nD.setState({derivationError:e instanceof Error?e.message:String(e)})}function nT(){nD.getState().derivationError&&nD.setState({derivationError:void 0})}let nN=V("config-implementer-tools",{...nD,getState:()=>(0===n_&&nO(),nD.getState()),setState:(...e)=>(nS=!1,nD.setState(...e)),subscribe(e){n_++,nO();let t=nD.subscribe(e),r=!1;return()=>{!r&&(r=!0,n_--),t()}}});function nj(e,t){if(Array.isArray(t))return t}function nA(e,t){return tU({},e,t,nj)}let n$=[];function nI(){let e=nf.getState(),t=np.getState(),r=nm.getState();if(nM?.configState===e&&nM.tempConfigState===t)return void nV(e,r,t,nM.slotConfigs,!0);!function(e,t){for(let r of Object.keys(e.schemas)){let n,o=nh(r),a=e.schemas[r],i=!!e.moduleLoaded[r],s=nU.get(r);if(s&&s.schema===a&&s.moduleLoaded===i&&s.providedConfigs===e.providedConfigs&&s.temporaryConfig===t.config)n=s.state;else{let o=i?function(e,t,r){let n=t.schemas[e],o=n3(e,n2(t,r));n5(n,o,e);let a=oe(n,o);return n9(n,a,e),delete a.extensionSlots,a}(r,e,t):function(e,t,r){let n=oe(ol,n3(e,n2(t,r)));return n9(ol,n,e),delete n.extensionSlots,n}(r,e,t);n={translationOverridesLoaded:!0,loaded:i,config:o},nU.set(r,{schema:a,moduleLoaded:i,providedConfigs:e.providedConfigs,temporaryConfig:t.config,state:n})}let l=o.getState();l.loaded===n.loaded&&l.translationOverridesLoaded===n.translationOverridesLoaded&&rx(l.config,n.config)||o.setState(n)}}(e,t);let n=function(e,t){let r=n6(n2(e,t)),n=Object.keys(r).reduce((e,t)=>(r[t]?.extensionSlots&&(e[t]=r[t]?.extensionSlots),e),{});var o=n;for(let[e,t]of Object.entries(o))for(let[r,n]of Object.entries(t))!function(e,t,r){let n=`${t}.extensionSlots.${r}`,o=`Extension slot config '${n}'`,a=Object.keys(e).filter(e=>!["add","remove","order","configure"].includes(e));a.length&&oo(n,o+`' contains invalid keys '${a.join("', '")}'`),!e.add||Array.isArray(e.add)&&e.add.every(e=>"string"==typeof e)||oo(n,o+".add' is invalid. Must be an array of strings (extension IDs)"),!e.remove||Array.isArray(e.remove)&&e.remove.every(e=>"string"==typeof e)||oo(n,o+".remove' is invalid. Must be an array of strings (extension IDs)"),!e.order||Array.isArray(e.order)&&e.order.every(e=>"string"==typeof e)||oo(n,o+".order' is invalid. Must be an array of strings (extension IDs)"),e.configure&&!or(e.configure)&&oo(n,o+".configure' is invalid. Must be an object with extension IDs for keys")}(n,e,r);let a={},i={};for(let e of Object.values(n))for(let[t,r]of Object.entries(e))a[t]=r,r.configure&&(i[t]??(i[t]=[])).push(r.configure);for(let[e,t]of Object.entries(i)){let r=1===t.length?t[0]:n6(t);a[e].configure!==r&&(a[e]={...a[e],configure:r})}return a}(e,t);(function(e){let t=ng(),r=t.getState().slots,n={},o=!1;for(let[t,a]of Object.entries(e)){let e=r[t];e?.loaded&&rx(e.config,a)?n[t]=e:(n[t]={loaded:!0,config:a},o=!0)}(o||Object.keys(r).length!==Object.keys(n).length)&&t.setState({slots:n})})(n),nV(e,r,t,n,!1),nM={configState:e,tempConfigState:t,slotConfigs:n},nP()}let nM=null,nL=new WeakMap;function nF(){n=()=>{var e,t;let r,n;return e=nf.getState(),t=np.getState(),r=nN.getState(),n={config:function(e,t){let r=function(e){let t={};for(let[r,n]of Object.entries(e)){let e=n1.get(r);if(e&&e.schema===n)t[r]=e.annotated;else{let e=function e(t){return t.hasOwnProperty("_default")?{...t,_value:t._default,_source:"default"}:or(t)?Object.keys(t).reduce((r,n)=>(r[n]=e(t[n]),r),{}):{}}(rW(n,5));n1.set(r,{schema:n,annotated:e}),t[r]=e}}return t}(e.schemas),n=[...e.providedConfigs.map(e=>[e.config,e.source]),[t.config,"temporary config"]],o=new Set(Object.keys(r));for(let[e]of n)for(let t of Object.keys(e))o.add(t);let a={};for(let e of o){let t=r[e],o=n.map(([t])=>t[e]),i=n.map(([,e])=>e),s=n0.get(e);if(s&&s.annotatedSchema===t&&s.configSlices.length===o.length&&s.configSlices.every((e,t)=>e===o[t])&&s.sources.every((e,t)=>e===i[t])){a[e]=s.result;continue}let l=t??{};n.forEach(([,e],t)=>{let r=o[t];void 0!==r&&(l=nA(l,function e(t,r){return or(t)?Object.keys(t).reduce((n,o)=>(n[o]=e(t[o],r),n),{}):{_value:t,_source:r}}(r,e)))}),n0.set(e,{annotatedSchema:t,configSlices:o,sources:i,result:l}),a[e]=l}return a}(e,t)},void(rx(r.config,n.config)||nN.setState(n))},nI(),n$.push(nf.subscribe(nB),np.subscribe(nB),nm.subscribe(nB))}function nB(){nT();try{nI()}catch(e){nR(e),console.error("Failed to recompute the configuration",e)}}nF();let nU=new Map;function nV(e,t,r,n,o){let a=nb(),i=a.getState().configs,s={},l=!1,u=0;for(let a of t.mountedExtensions){let t,c=i[a.slotName]?.[a.extensionId],d=c&&nL.get(c);if(o&&c?.loaded&&d?.slotModuleName===a.slotModuleName&&d.extensionModuleName===a.extensionModuleName)t=c;else{let o=function(e,t,r,n,o,a,i){let s=function(e){let[t]=e.split("#");return t}(n),l=o.schemas[s],u=JSON.stringify([r,n,e,t]),c=nQ.get(u);if(c&&c.extensionSchema===l&&c.extensionModuleSchema===o.schemas[t]&&c.providedConfigs===o.providedConfigs&&c.temporaryConfig===a.config)return c.config;let d=l?s:t,f=n2(o,a),p=i?.configure?.[n]??{},m=n3(e,f),h=m?.extensionSlots?.[r]?.configure?.[n]??{},g=n6([n3(d,f),p,h]),y=l??o.schemas[t];n5(y,g,d);let v=oe(y,g);return n9(y,v,d),delete v.extensionSlots,nQ.set(u,{extensionSchema:l,extensionModuleSchema:o.schemas[t],providedConfigs:o.providedConfigs,temporaryConfig:a.config,config:v}),v}(a.slotModuleName,a.extensionModuleName,a.slotName,a.extensionId,e,r,n[a.slotName]);t=c?.loaded&&rx(c.config,o)?c:{config:o,loaded:!0}}nL.set(t,a),t!==c&&(l=!0),s[a.slotName]||(s[a.slotName]={}),s[a.slotName][a.extensionId]=t,u++}for(let[e,t]of Object.entries(s)){let r=i[e];r&&Object.keys(r).length===Object.keys(t).length&&Object.entries(t).every(([e,t])=>r[e]===t)&&(s[e]=r)}l||(l=Object.keys(i).length!==Object.keys(s).length||Object.values(i).reduce((e,t)=>e+Object.keys(t).length,0)!==u),l&&a.setState({configs:s})}function nW(e,t){n4(e,t);let r=nA(t,ol);nf.setState(t=>({...t,schemas:{...t.schemas,[e]:r},moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function nH(e){nf.setState(t=>({...t,schemas:{...t.schemas,[e]:ol}}))}function nz(e){nf.setState(t=>({...t,moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function nK(e){nf.setState(t=>({...t,schemas:{...t.schemas,[e]:os}}))}function nG(e,t){n4(e,t);let r=nA(t,ol);nf.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.`),nf.setState(t=>({...t,schemas:{...t.schemas,[e]:r}}))}function nZ(e,t="provided"){nf.setState(r=>({...r,providedConfigs:[...r.providedConfigs,{source:t,config:e}]}))}function nY(e,t,r){return new Promise(n=>{let o,a=!1;function i(e){!a&&t(e)&&(a=!0,n(r(e)),o?.())}i(e.getState()),a||(o=e.subscribe(i))})}function nq(e){return nY(nh(e),e=>!!(e.loaded&&e.config),e=>nn(e.config,["Display conditions","Translation overrides"]))}function nJ(e,t,r){let n=[nY(nh(e),e=>!!(e.translationOverridesLoaded&&e.config),e=>e.config["Translation overrides"]??{})];return t&&r&&n.push(nY(nw(t,r),e=>!!(e.loaded&&e.config),e=>e.config["Translation overrides"]??{})),Promise.all(n)}function nX(e,t,r){n5(e,t,r);let n=oe(e,t);return n9(e,n,r),n}let nQ=new Map,n0=new Map,n1=new Map;function n2(e,t){return[...e.providedConfigs.map(e=>e.config),t.config]}function n4(e,t,r=""){let n="Please verify that you are running the latest version and, if so, alert the maintainer.";for(let o of Object.keys(t).filter(e=>!e.startsWith("_"))){let a=r+(r&&".")+o,i=t[o];if("Display conditions"===a&&console.error(`${e} declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ${n}`),"Translation overrides"===a&&console.error(`${e} declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ${n}`),!or(i)){console.error(`${e} has bad config schema definition for key '${a}'. ${n}`);continue}i.hasOwnProperty("_default")||n4(e,i,a);let s=i._elements;if(ot(s)&&n4(e,s,a+"._elements"),i._validators)for(let t of i._validators)"function"!=typeof t&&console.error(`${e} has invalid validator for key '${a}' ${n}.
|
|
3
|
+
${e.stack}`,k(t)}}function O(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(r){t=`Object thrown as error with the following properties: ${Object.keys(e)}`}return Error(t)}if(void 0===e)return Error("'undefined' was thrown as an error");return Error(e.toString())}function R(e,t){if(e===t||Object.is(e,t))return!0;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}if(Array.isArray(t)||"object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;let r=Object.getOwnPropertyNames(e),n=Object.getOwnPropertyNames(t);return r.length===n.length&&r.every(r=>e[r]===t[r])}function T(e,t){let r;try{r=e()}catch(e){return}return{getItem:e=>{var n;let o=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),a=null!=(n=r.getItem(e))?n:null;return a instanceof Promise?a.then(o):o(a)},setItem:(e,n)=>r.setItem(e,JSON.stringify(n,null==t?void 0:t.replacer)),removeItem:e=>r.removeItem(e)}}window.onerror=function(e,t,r,n,o){return console.error("Unexpected error: ",o??e),E({description:C(o,"Oops! An unexpected error occurred."),kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(e){console.error("Unhandled rejection: ",e.reason),E({description:C(e.reason,"Oops! An unhandled promise rejection occurred."),kind:"error",title:"Error"})};let N=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>N(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>N(t)(e)}}},j=e=>{let t,r=new Set,n=(e,n)=>{let o="function"==typeof e?e(t):e;if(!Object.is(o,t)){let e=t;t=(null!=n?n:"object"!=typeof o||null===o)?o:Object.assign({},t,o),r.forEach(r=>r(t,e))}},o=()=>t,a={setState:n,getState:o,getInitialState:()=>i,subscribe:e=>(r.add(e),()=>r.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."),r.clear()}},i=t=e(n,o,a);return a},A=e=>e?j(e):j;function $(){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={},M=Symbol.for("openmrs.esm-state.instanceCount"),L=globalThis,F=(L[M]??0)+1;function B(e,t,r="none"){let n=I[e];if(n)return n.active?$()||console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):n.value.setState(t,!0),n.active=!0,n.value;{let n=z(e,t,r);return I[e]={value:n,active:!0},n}}function U(e){return A()(()=>e)}function V(e,t){let r=I[e];return r?(r.active?$()||console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):r.value=t,r.active=!0,r.value):(I[e]={value:t,active:!0},t)}function W(e,t,r="none"){let n=I[e];if(!n){let n=z(e,t??{},r);return I[e]={value:n,active:!1},n}return n.value}function H(...e){let[t,r,n]=e,o=void 0===n?r:n,a=void 0===n?e=>e:r,i=a(t.getState());return o(i),t.subscribe(e=>{let t=a(e);R(i,t)||(i=t,o(t))})}function z(e,t,r){return"sessionStorage"===r?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."),(r,n,o)=>{let a,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{a=s.getStorage()}catch(e){}if(!a)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...e)},n,o);let d=N(s.serialize),f=()=>{let e,t=d({state:s.partialize({...n()}),version:s.version}).then(e=>a.setItem(s.name,e)).catch(t=>{e=t});if(e)throw e;return t},p=o.setState;o.setState=(e,t)=>{p(e,t),f()};let m=e((...e)=>{r(...e),f()},n,o),h=()=>{var e;if(!a)return;l=!1,u.forEach(e=>e(n()));let t=(null==(e=s.onRehydrateStorage)?void 0:e.call(s,n()))||void 0;return N(a.getItem.bind(a))(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 r(i=s.merge(e,null!=(t=n())?t:m),!0),f()}).then(()=>{null==t||t(i,void 0),l=!0,c.forEach(e=>e(i))}).catch(e=>{null==t||t(void 0,e)})};return o.persist={setOptions:e=>{s={...s,...e},e.getStorage&&(a=e.getStorage())},clearStorage:()=>{null==a||a.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||m};return(r,n,o)=>{let a,i={storage:T(()=>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.`),r(...e)},n,o);let d=()=>{let e=i.partialize({...n()});return c.setItem(i.name,{state:e,version:i.version})},f=o.setState;o.setState=(e,t)=>{f(e,t),d()};let p=e((...e)=>{r(...e),d()},n,o);o.getInitialState=()=>p;let m=()=>{var e,t;if(!c)return;s=!1,l.forEach(e=>{var t;return e(null!=(t=n())?t:p)});let o=(null==(t=i.onRehydrateStorage)?void 0:t.call(i,null!=(e=n())?e:p))||void 0;return N(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[o,s]=e;if(r(a=i.merge(s,null!=(t=n())?t:p),!0),o)return d()}).then(()=>{null==o||o(a,void 0),a=n(),s=!0,u.forEach(e=>e(a))}).catch(e=>{null==o||o(void 0,e)})};return o.persist={setOptions:e=>{i={...i,...e},e.storage&&(c=e.storage)},clearStorage:()=>{null==c||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>m(),hasHydrated:()=>s,onHydrate:e=>(l.add(e),()=>{l.delete(e)}),onFinishHydration:e=>(u.add(e),()=>{u.delete(e)})},i.skipHydration||m(),a||p}})(()=>t,{name:e,storage:T(()=>sessionStorage)})):A()(()=>t)}L[M]=F,F>1&&!$()&&console.error(`Detected ${F} copies of @openmrs/esm-framework running on this page. Each copy keeps its own store registry, so stores, configuration and extension state are not shared between them. This usually means a frontend module loaded its own bundled framework instead of the one the app shell provides.`),globalThis.setTimeout?.(()=>{"u">typeof window&&"development"===window.spaEnv&&(window.stores=I)},1e3);let K=function(e){return void 0===e};var G,Z,Y,q,J,X,Q,ee,et,er,en,eo,ea,ei,es=r(8348);let el=function(e,t){return function(r){return e(t(r))}};var eu=el(Object.getPrototypeOf,Object),ec=r(3098),ed=Object.prototype,ef=Function.prototype.toString,ep=ed.hasOwnProperty,em=ef.call(Object);let eh=function(e){if(!(0,ec.A)(e)||"[object Object]"!=(0,es.A)(e))return!1;var t=eu(e);if(null===t)return!0;var r=ep.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&ef.call(r)==em},eg=function(e,t){return e===t||e!=e&&t!=t},ey=function(e,t){for(var r=e.length;r--;)if(eg(e[r][0],t))return r;return -1};var ev=Array.prototype.splice;function eb(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}eb.prototype.clear=function(){this.__data__=[],this.size=0},eb.prototype.delete=function(e){var t=this.__data__,r=ey(t,e);return!(r<0)&&(r==t.length-1?t.pop():ev.call(t,r,1),--this.size,!0)},eb.prototype.get=function(e){var t=this.__data__,r=ey(t,e);return r<0?void 0:t[r][1]},eb.prototype.has=function(e){return ey(this.__data__,e)>-1},eb.prototype.set=function(e,t){var r=this.__data__,n=ey(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};var ew=r(3149);let eE=function(e){if(!(0,ew.A)(e))return!1;var t=(0,es.A)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};var ex=r(1917),eD=ex.A["__core-js_shared__"],e_=(G=/[^.]+$/.exec(eD&&eD.keys&&eD.keys.IE_PROTO||""))?"Symbol(src)_1."+G:"",eS=Function.prototype.toString;let eC=function(e){if(null!=e){try{return eS.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var ek=/^\[object .+?Constructor\]$/,eP=Object.prototype,eO=Function.prototype.toString,eR=eP.hasOwnProperty,eT=RegExp("^"+eO.call(eR).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");let eN=function(e){return!!(0,ew.A)(e)&&(!e_||!(e_ in e))&&(eE(e)?eT:ek).test(eC(e))},ej=function(e,t){var r=null==e?void 0:e[t];return eN(r)?r:void 0};var eA=ej(ex.A,"Map"),e$=ej(Object,"create"),eI=Object.prototype.hasOwnProperty,eM=Object.prototype.hasOwnProperty;function eL(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}eL.prototype.clear=function(){this.__data__=e$?e$(null):{},this.size=0},eL.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t},eL.prototype.get=function(e){var t=this.__data__;if(e$){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return eI.call(t,e)?t[e]:void 0},eL.prototype.has=function(e){var t=this.__data__;return e$?void 0!==t[e]:eM.call(t,e)},eL.prototype.set=function(e,t){var r=this.__data__;return this.size+=+!this.has(e),r[e]=e$&&void 0===t?"__lodash_hash_undefined__":t,this};let eF=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},eB=function(e,t){var r=e.__data__;return eF(t)?r["string"==typeof t?"string":"hash"]:r.map};function eU(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function eV(e){var t=this.__data__=new eb(e);this.size=t.size}eU.prototype.clear=function(){this.size=0,this.__data__={hash:new eL,map:new(eA||eb),string:new eL}},eU.prototype.delete=function(e){var t=eB(this,e).delete(e);return this.size-=!!t,t},eU.prototype.get=function(e){return eB(this,e).get(e)},eU.prototype.has=function(e){return eB(this,e).has(e)},eU.prototype.set=function(e,t){var r=eB(this,e),n=r.size;return r.set(e,t),this.size+=+(r.size!=n),this},eV.prototype.clear=function(){this.__data__=new eb,this.size=0},eV.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},eV.prototype.get=function(e){return this.__data__.get(e)},eV.prototype.has=function(e){return this.__data__.has(e)},eV.prototype.set=function(e,t){var r=this.__data__;if(r instanceof eb){var n=r.__data__;if(!eA||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new eU(n)}return r.set(e,t),this.size=r.size,this};var eW=function(){try{var e=ej(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();let eH=function(e,t,r){"__proto__"==t&&eW?eW(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r},ez=function(e,t,r){(void 0===r||eg(e[t],r))&&(void 0!==r||t in e)||eH(e,t,r)},eK=function(e,t,r){for(var n=-1,o=Object(e),a=r(e),i=a.length;i--;){var s=a[++n];if(!1===t(o[s],s,o))break}return e};var eG="object"==typeof exports&&exports&&!exports.nodeType&&exports,eZ=eG&&"object"==typeof module&&module&&!module.nodeType&&module,eY=eZ&&eZ.exports===eG?ex.A.Buffer:void 0,eq=eY?eY.allocUnsafe:void 0;let eJ=function(e,t){if(t)return e.slice();var r=e.length,n=eq?eq(r):new e.constructor(r);return e.copy(n),n};var eX=ex.A.Uint8Array;let eQ=function(e){var t=new e.constructor(e.byteLength);return new eX(t).set(new eX(e)),t},e0=function(e,t){var r=t?eQ(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)},e1=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t};var e2=Object.create,e4=function(){function e(){}return function(t){if(!(0,ew.A)(t))return{};if(e2)return e2(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),e3=Object.prototype;let e6=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||e3)},e5=function(e){return"function"!=typeof e.constructor||e6(e)?{}:e4(eu(e))},e9=function(e){return(0,ec.A)(e)&&"[object Arguments]"==(0,es.A)(e)};var e8=Object.prototype,e7=e8.hasOwnProperty,te=e8.propertyIsEnumerable,tt=e9(function(){return arguments}())?e9:function(e){return(0,ec.A)(e)&&e7.call(e,"callee")&&!te.call(e,"callee")},tr=Array.isArray;let tn=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff},to=function(e){return null!=e&&tn(e.length)&&!eE(e)};var ta="object"==typeof exports&&exports&&!exports.nodeType&&exports,ti=ta&&"object"==typeof module&&module&&!module.nodeType&&module,ts=ti&&ti.exports===ta?ex.A.Buffer:void 0;let tl=(ts?ts.isBuffer:void 0)||function(){return!1};var tu={};tu["[object Float32Array]"]=tu["[object Float64Array]"]=tu["[object Int8Array]"]=tu["[object Int16Array]"]=tu["[object Int32Array]"]=tu["[object Uint8Array]"]=tu["[object Uint8ClampedArray]"]=tu["[object Uint16Array]"]=tu["[object Uint32Array]"]=!0,tu["[object Arguments]"]=tu["[object Array]"]=tu["[object ArrayBuffer]"]=tu["[object Boolean]"]=tu["[object DataView]"]=tu["[object Date]"]=tu["[object Error]"]=tu["[object Function]"]=tu["[object Map]"]=tu["[object Number]"]=tu["[object Object]"]=tu["[object RegExp]"]=tu["[object Set]"]=tu["[object String]"]=tu["[object WeakMap]"]=!1;let tc=function(e){return function(t){return e(t)}};var td=r(2136),tf="object"==typeof exports&&exports&&!exports.nodeType&&exports,tp=tf&&"object"==typeof module&&module&&!module.nodeType&&module,tm=tp&&tp.exports===tf&&td.A.process,th=function(){try{var e=tp&&tp.require&&tp.require("util").types;if(e)return e;return tm&&tm.binding&&tm.binding("util")}catch(e){}}(),tg=th&&th.isTypedArray,ty=tg?tc(tg):function(e){return(0,ec.A)(e)&&tn(e.length)&&!!tu[(0,es.A)(e)]};let tv=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};var tb=Object.prototype.hasOwnProperty;let tw=function(e,t,r){var n=e[t];tb.call(e,t)&&eg(n,r)&&(void 0!==r||t in e)||eH(e,t,r)},tE=function(e,t,r,n){var o=!r;r||(r={});for(var a=-1,i=t.length;++a<i;){var s=t[a],l=n?n(r[s],e[s],s,r,e):void 0;void 0===l&&(l=e[s]),o?eH(r,s,l):tw(r,s,l)}return r},tx=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n};var tD=/^(?:0|[1-9]\d*)$/;let t_=function(e,t){var r=typeof e;return!!(t=null==t?0x1fffffffffffff:t)&&("number"==r||"symbol"!=r&&tD.test(e))&&e>-1&&e%1==0&&e<t};var tS=Object.prototype.hasOwnProperty;let tC=function(e,t){var r=tr(e),n=!r&&tt(e),o=!r&&!n&&tl(e),a=!r&&!n&&!o&&ty(e),i=r||n||o||a,s=i?tx(e.length,String):[],l=s.length;for(var u in e)(t||tS.call(e,u))&&!(i&&("length"==u||o&&("offset"==u||"parent"==u)||a&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||t_(u,l)))&&s.push(u);return s},tk=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t};var tP=Object.prototype.hasOwnProperty;let tO=function(e){if(!(0,ew.A)(e))return tk(e);var t=e6(e),r=[];for(var n in e)"constructor"==n&&(t||!tP.call(e,n))||r.push(n);return r},tR=function(e){return to(e)?tC(e,!0):tO(e)},tT=function(e,t,r,n,o,a,i){var s=tv(e,r),l=tv(t,r),u=i.get(l);if(u)return void ez(e,r,u);var c=a?a(s,l,r+"",e,t,i):void 0,d=void 0===c;if(d){var f=tr(l),p=!f&&tl(l),m=!f&&!p&&ty(l);(c=l,f||p||m)?tr(s)?c=s:(0,ec.A)(s)&&to(s)?c=e1(s):p?(d=!1,c=eJ(l,!0)):m?(d=!1,c=e0(l,!0)):c=[]:eh(l)||tt(l)?(c=s,tt(s))?c=tE(s,tR(s)):(!(0,ew.A)(s)||eE(s))&&(c=e5(l)):d=!1}d&&(i.set(l,c),o(c,l,n,a,i),i.delete(l)),ez(e,r,c)},tN=function e(t,r,n,o,a){t!==r&&eK(r,function(i,s){if(a||(a=new eV),(0,ew.A)(i))tT(t,r,s,n,e,o,a);else{var l=o?o(tv(t,s),i,s+"",t,r,a):void 0;void 0===l&&(l=i),ez(t,s,l)}},tR)},tj=function(e){return e},tA=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)};var t$=Math.max;let tI=function(e,t,r){return t=t$(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,a=t$(n.length-t,0),i=Array(a);++o<a;)i[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(i),tA(e,this,s)}};var tM=Date.now,tL=(Z=eW?function(e,t){return eW(e,"toString",{configurable:!0,enumerable:!1,value:function(){return t},writable:!0})}:tj,Y=0,q=0,function(){var e=tM(),t=16-(e-q);if(q=e,t>0){if(++Y>=800)return arguments[0]}else Y=0;return Z.apply(void 0,arguments)});let tF=function(e,t,r){if(!(0,ew.A)(r))return!1;var n=typeof t;return("number"==n?!!(to(r)&&t_(t,r.length)):"string"==n&&t in r)&&eg(r[t],e)},tB=function(e){var t;return tL(tI(t=function(t,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,i=o>2?r[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,i&&tF(r[0],r[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++n<o;){var s=r[n];s&&e(t,s,n,a)}return t},void 0,tj),t+"")};var tU=tB(function(e,t,r,n){tN(e,t,r,n)});function tV(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new eU;++t<r;)this.add(e[t])}tV.prototype.add=tV.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},tV.prototype.has=function(e){return this.__data__.has(e)};let tW=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1},tH=function(e,t,r,n,o,a){var i=1&r,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var u=a.get(e),c=a.get(t);if(u&&c)return u==t&&c==e;var d=-1,f=!0,p=2&r?new tV:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(n)var g=i?n(h,m,d,t,e,a):n(m,h,d,e,t,a);if(void 0!==g){if(g)continue;f=!1;break}if(p){if(!tW(t,function(e,t){if(!p.has(t)&&(m===e||o(m,e,r,n,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||o(m,h,r,n,a))){f=!1;break}}return a.delete(e),a.delete(t),f};var tz=r(241);let tK=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r},tG=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r};var tZ=tz.A?tz.A.prototype:void 0,tY=tZ?tZ.valueOf:void 0;let tq=function(e,t,r,n,o,a,i){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!a(new eX(e),new eX(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return eg(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=tK;case"[object Set]":var l=1&n;if(s||(s=tG),e.size!=t.size&&!l)break;var u=i.get(e);if(u)return u==t;n|=2,i.set(e,t);var c=tH(s(e),s(t),n,o,a,i);return i.delete(e),c;case"[object Symbol]":if(tY)return tY.call(e)==tY.call(t)}return!1},tJ=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e},tX=function(e,t,r){var n=t(e);return tr(e)?n:tJ(n,r(e))},tQ=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,a=[];++r<n;){var i=e[r];t(i,r,e)&&(a[o++]=i)}return a},t0=function(){return[]};var t1=Object.prototype.propertyIsEnumerable,t2=Object.getOwnPropertySymbols,t4=t2?function(e){return null==e?[]:tQ(t2(e=Object(e)),function(t){return t1.call(e,t)})}:t0,t3=el(Object.keys,Object),t6=Object.prototype.hasOwnProperty;let t5=function(e){if(!e6(e))return t3(e);var t=[];for(var r in Object(e))t6.call(e,r)&&"constructor"!=r&&t.push(r);return t},t9=function(e){return to(e)?tC(e):t5(e)},t8=function(e){return tX(e,t9,t4)};var t7=Object.prototype.hasOwnProperty;let re=function(e,t,r,n,o,a){var i=1&r,s=t8(e),l=s.length;if(l!=t8(t).length&&!i)return!1;for(var u=l;u--;){var c=s[u];if(!(i?c in t:t7.call(t,c)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=i;++u<l;){var h=e[c=s[u]],g=t[c];if(n)var y=i?n(g,h,c,t,e,a):n(h,g,c,e,t,a);if(!(void 0===y?h===g||o(h,g,r,n,a):y)){p=!1;break}m||(m="constructor"==c)}if(p&&!m){var v=e.constructor,b=t.constructor;v!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b)&&(p=!1)}return a.delete(e),a.delete(t),p};var rt=ej(ex.A,"DataView"),rr=ej(ex.A,"Promise"),rn=ej(ex.A,"Set"),ro=ej(ex.A,"WeakMap"),ra="[object Map]",ri="[object Promise]",rs="[object Set]",rl="[object WeakMap]",ru="[object DataView]",rc=eC(rt),rd=eC(eA),rf=eC(rr),rp=eC(rn),rm=eC(ro),rh=es.A;(rt&&rh(new rt(new ArrayBuffer(1)))!=ru||eA&&rh(new eA)!=ra||rr&&rh(rr.resolve())!=ri||rn&&rh(new rn)!=rs||ro&&rh(new ro)!=rl)&&(rh=function(e){var t=(0,es.A)(e),r="[object Object]"==t?e.constructor:void 0,n=r?eC(r):"";if(n)switch(n){case rc:return ru;case rd:return ra;case rf:return ri;case rp:return rs;case rm:return rl}return t});let rg=rh;var ry="[object Arguments]",rv="[object Array]",rb="[object Object]",rw=Object.prototype.hasOwnProperty;let rE=function(e,t,r,n,o,a){var i=tr(e),s=tr(t),l=i?rv:rg(e),u=s?rv:rg(t);l=l==ry?rb:l,u=u==ry?rb:u;var c=l==rb,d=u==rb,f=l==u;if(f&&tl(e)){if(!tl(t))return!1;i=!0,c=!1}if(f&&!c)return a||(a=new eV),i||ty(e)?tH(e,t,r,n,o,a):tq(e,t,l,r,n,o,a);if(!(1&r)){var p=c&&rw.call(e,"__wrapped__"),m=d&&rw.call(t,"__wrapped__");if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||(a=new eV),o(h,g,r,n,a)}}return!!f&&(a||(a=new eV),re(e,t,r,n,o,a))},rx=function(e,t){return function e(t,r,n,o,a){return t===r||(null!=t&&null!=r&&((0,ec.A)(t)||(0,ec.A)(r))?rE(t,r,n,o,e,a):t!=t&&r!=r)}(e,t)},rD=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o},r_=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e};var rS=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)tJ(t,t4(e)),e=eu(e);return t}:t0;let rC=function(e){return tX(e,tR,rS)};var rk=Object.prototype.hasOwnProperty;let rP=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&rk.call(e,"index")&&(r.index=e.index,r.input=e.input),r},rO=function(e,t){var r=t?eQ(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)};var rR=/\w*$/;let rT=function(e){var t=new e.constructor(e.source,rR.exec(e));return t.lastIndex=e.lastIndex,t};var rN=tz.A?tz.A.prototype:void 0,rj=rN?rN.valueOf:void 0;let rA=function(e,t,r){var n=e.constructor;switch(t){case"[object ArrayBuffer]":return eQ(e);case"[object Boolean]":case"[object Date]":return new n(+e);case"[object DataView]":return rO(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return e0(e,r);case"[object Map]":case"[object Set]":return new n;case"[object Number]":case"[object String]":return new n(e);case"[object RegExp]":return rT(e);case"[object Symbol]":return rj?Object(rj.call(e)):{}}};var r$=th&&th.isMap,rI=r$?tc(r$):function(e){return(0,ec.A)(e)&&"[object Map]"==rg(e)},rM=th&&th.isSet,rL=rM?tc(rM):function(e){return(0,ec.A)(e)&&"[object Set]"==rg(e)},rF="[object Arguments]",rB="[object Function]",rU="[object Object]",rV={};rV[rF]=rV["[object Array]"]=rV["[object ArrayBuffer]"]=rV["[object DataView]"]=rV["[object Boolean]"]=rV["[object Date]"]=rV["[object Float32Array]"]=rV["[object Float64Array]"]=rV["[object Int8Array]"]=rV["[object Int16Array]"]=rV["[object Int32Array]"]=rV["[object Map]"]=rV["[object Number]"]=rV[rU]=rV["[object RegExp]"]=rV["[object Set]"]=rV["[object String]"]=rV["[object Symbol]"]=rV["[object Uint8Array]"]=rV["[object Uint8ClampedArray]"]=rV["[object Uint16Array]"]=rV["[object Uint32Array]"]=!0,rV["[object Error]"]=rV[rB]=rV["[object WeakMap]"]=!1;let rW=function e(t,r,n,o,a,i){var s,l=1&r,u=2&r,c=4&r;if(n&&(s=a?n(t,o,a,i):n(t)),void 0!==s)return s;if(!(0,ew.A)(t))return t;var d=tr(t);if(d){if(s=rP(t),!l)return e1(t,s)}else{var f,p,m,h,g=rg(t),y=g==rB||"[object GeneratorFunction]"==g;if(tl(t))return eJ(t,l);if(g==rU||g==rF||y&&!a){if(s=u||y?{}:e5(t),!l)return u?(p=(f=s)&&tE(t,tR(t),f),tE(t,rS(t),p)):(h=(m=s)&&tE(t,t9(t),m),tE(t,t4(t),h))}else{if(!rV[g])return a?t:{};s=rA(t,g,l)}}i||(i=new eV);var v=i.get(t);if(v)return v;i.set(t,s),rL(t)?t.forEach(function(o){s.add(e(o,r,n,o,t,i))}):rI(t)&&t.forEach(function(o,a){s.set(a,e(o,r,n,a,t,i))});var b=c?u?rC:t8:u?tR:t9,w=d?void 0:b(t);return r_(w||t,function(o,a){w&&(o=t[a=o]),tw(s,a,e(o,r,n,a,t,i))}),s};var rH=r(1882),rz=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rK=/^\w*$/;let rG=function(e,t){if(tr(e))return!1;var r=typeof e;return!!("number"==r||"symbol"==r||"boolean"==r||null==e||(0,rH.A)(e))||rK.test(e)||!rz.test(e)||null!=t&&e in Object(t)};function rZ(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=e.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(rZ.Cache||eU),r}rZ.Cache=eU;var rY=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rq=/\\(\\)?/g,rJ=(X=(J=rZ(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(rY,function(e,r,n,o){t.push(n?o.replace(rq,"$1"):r||e)}),t},function(e){return 500===X.size&&X.clear(),e})).cache,J),rX=1/0,rQ=tz.A?tz.A.prototype:void 0,r0=rQ?rQ.toString:void 0;let r1=function e(t){if("string"==typeof t)return t;if(tr(t))return rD(t,e)+"";if((0,rH.A)(t))return r0?r0.call(t):"";var r=t+"";return"0"==r&&1/t==-rX?"-0":r},r2=function(e,t){return tr(e)?e:rG(e,t)?[e]:rJ(null==e?"":r1(e))},r4=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};var r3=1/0;let r6=function(e){if("string"==typeof e||(0,rH.A)(e))return e;var t=e+"";return"0"==t&&1/e==-r3?"-0":t},r5=function(e,t){t=r2(t,e);for(var r=0,n=t.length;null!=e&&r<n;)e=e[r6(t[r++])];return r&&r==n?e:void 0},r9=function(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(o);++n<o;)a[n]=e[n+t];return a},r8=function(e,t){var r,n;return t=r2(t,e),r=e,null==(e=(n=t).length<2?r:r5(r,r9(n,0,-1)))||delete e[r6(r4(t))]},r7=function(e){return eh(e)?void 0:e};var ne=tz.A?tz.A.isConcatSpreadable:void 0;let nt=function(e){return tr(e)||tt(e)||!!(ne&&e&&e[ne])},nr=function e(t,r,n,o,a){var i=-1,s=t.length;for(n||(n=nt),a||(a=[]);++i<s;){var l=t[i];r>0&&n(l)?r>1?e(l,r-1,n,o,a):tJ(a,l):o||(a[a.length]=l)}return a};var nn=tL(tI(Q=function(e,t){var r={};if(null==e)return r;var n=!1;t=rD(t,function(t){return t=r2(t,e),n||(n=t.length>1),t}),tE(e,rC(e),r),n&&(r=rW(r,7,r7));for(var o=t.length;o--;)r8(r,t[o]);return r},void 0,function(e){return(null==e?0:e.length)?nr(e,1):[]}),Q+""),no=((ee={}).Array="Array",ee.Boolean="Boolean",ee.ConceptUuid="ConceptUuid",ee.Number="Number",ee.Object="Object",ee.String="String",ee.UUID="UUID",ee.PersonAttributeTypeUuid="PersonAttributeTypeUuid",ee.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid",ee);function na(e,t){return r=>{if(!e(r))if("function"==typeof t)return t(r);else return t}}let ni=na(e=>Array.isArray(e),"must be an array"),ns=na(e=>"boolean"==typeof e,"must be a boolean"),nl=na(e=>"number"==typeof e,"must be a number"),nu=na(e=>"string"==typeof e,"must be a string"),nc=na(e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,"must be an object (not an array or null)"),nd=na(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"),nf=B("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),np=B("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});np.subscribe(e=>{var t=e.config;try{localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}catch(e){}});let nm=B("config-store-of-extension-state",{mountedExtensions:[]});function nh(e){return W(`config-module-${e}`,{config:null,loaded:!1,translationOverridesLoaded:!1})}function ng(){return W("config-extension-slots",{slots:{}})}function ny(e){return nv(ng().getState(),e)}function nv(e,t){return e.slots[t]??{loaded:!1,config:{}}}function nb(){return W("config-extensions",{configs:{}})}function nw(e,t,r){return e.configs[t]?.[r]??{loaded:!1,config:null}}function nE(e,t,r){return e.configure?.[r]??null}let nx=A()(()=>({config:{}})),nD=0,n_=!0,nS=!1;function nC(e){n=e}function nk(){n_=!0,nD>0&&nP()}function nP(){if(n_&&n&&!nS){nS=!0,n_=!1;try{n()}catch(e){n_=!0,nO(e),console.error("Failed to derive the implementer tools config",e)}finally{nS=!1}}}function nO(e){nx.setState({derivationError:e instanceof Error?e.message:String(e)})}function nR(){nx.getState().derivationError&&nx.setState({derivationError:void 0})}let nT=V("config-implementer-tools",{...nx,getState:()=>(0===nD&&nP(),nx.getState()),setState:(...e)=>(n_=!1,nx.setState(...e)),subscribe(e){nD++,nP();let t=nx.subscribe(e),r=!1;return()=>{!r&&(r=!0,nD--),t()}}});function nN(e,t){if(Array.isArray(t))return t}function nj(e,t){return tU({},e,t,nN)}let nA=[],n$=new Set,nI=null,nM=new WeakMap;function nL(){n=()=>{var e,t;let r,n;return e=nf.getState(),t=np.getState(),r=nT.getState(),n={config:function(e,t){let r=function(e){let t={};for(let[r,n]of Object.entries(e)){let e=n0.get(r);if(e&&e.schema===n)t[r]=e.annotated;else{let e=function e(t){return t.hasOwnProperty("_default")?{...t,_value:t._default,_source:"default"}:ot(t)?Object.keys(t).reduce((r,n)=>(r[n]=e(t[n]),r),{}):{}}(rW(n,5));n0.set(r,{schema:n,annotated:e}),t[r]=e}}return t}(e.schemas),n=[...e.providedConfigs.map(e=>[e.config,e.source]),[t.config,"temporary config"]],o=new Set(Object.keys(r));for(let[e]of n)for(let t of Object.keys(e))o.add(t);let a={};for(let e of o){let t=r[e],o=n.map(([t])=>t[e]),i=n.map(([,e])=>e),s=nQ.get(e);if(s&&s.annotatedSchema===t&&s.configSlices.length===o.length&&s.configSlices.every((e,t)=>e===o[t])&&s.sources.every((e,t)=>e===i[t])){a[e]=s.result;continue}let l=t??{};n.forEach(([,e],t)=>{let r=o[t];void 0!==r&&(l=nj(l,function e(t,r){return ot(t)?Object.keys(t).reduce((n,o)=>(n[o]=e(t[o],r),n),{}):{_value:t,_source:r}}(r,e)))}),nQ.set(e,{annotatedSchema:t,configSlices:o,sources:i,result:l}),a[e]=l}return a}(e,t)},void(rx(r.config,n.config)||nT.setState(n))},nF(),nA.push(nf.subscribe(nF),np.subscribe(nF),nm.subscribe(nF))}function nF(){nR();try{!function(){let e=nf.getState(),t=np.getState(),r=nm.getState();if(nI?.configState===e&&nI.tempConfigState===t)return nU(e,r,t,nI.slotConfigs,!0);!function(e,t){for(let r of Object.keys(e.schemas)){let n,o=nh(r),a=e.schemas[r],i=!!e.moduleLoaded[r],s=nB.get(r);if(s&&s.schema===a&&s.moduleLoaded===i&&s.providedConfigs===e.providedConfigs&&s.temporaryConfig===t.config)n=s.state;else{let o=i?function(e,t,r){let n=t.schemas[e],o=n4(e,n1(t,r));n6(n,o,e);let a=n7(n,o);return n5(n,a,e),delete a.extensionSlots,a}(r,e,t):function(e,t,r){let n=n7(oi,n4(e,n1(t,r)));return n5(oi,n,e),delete n.extensionSlots,n}(r,e,t);n={translationOverridesLoaded:!0,loaded:i,config:o},nB.set(r,{schema:a,moduleLoaded:i,providedConfigs:e.providedConfigs,temporaryConfig:t.config,state:n})}let l=o.getState();l.loaded===n.loaded&&l.translationOverridesLoaded===n.translationOverridesLoaded&&rx(l.config,n.config)||o.setState(n)}}(e,t);let n=function(e,t){let r=n3(n1(e,t)),n=Object.keys(r).reduce((e,t)=>(r[t]?.extensionSlots&&(e[t]=r[t]?.extensionSlots),e),{});var o=n;for(let[e,t]of Object.entries(o))for(let[r,n]of Object.entries(t))!function(e,t,r){let n=`${t}.extensionSlots.${r}`,o=`Extension slot config '${n}'`,a=Object.keys(e).filter(e=>!["add","remove","order","configure"].includes(e));a.length&&or(n,o+`' contains invalid keys '${a.join("', '")}'`),!e.add||Array.isArray(e.add)&&e.add.every(e=>"string"==typeof e)||or(n,o+".add' is invalid. Must be an array of strings (extension IDs)"),!e.remove||Array.isArray(e.remove)&&e.remove.every(e=>"string"==typeof e)||or(n,o+".remove' is invalid. Must be an array of strings (extension IDs)"),!e.order||Array.isArray(e.order)&&e.order.every(e=>"string"==typeof e)||or(n,o+".order' is invalid. Must be an array of strings (extension IDs)"),e.configure&&!ot(e.configure)&&or(n,o+".configure' is invalid. Must be an object with extension IDs for keys")}(n,e,r);let a={},i={};for(let e of Object.values(n))for(let[t,r]of Object.entries(e))a[t]=r,r.configure&&(i[t]??(i[t]=[])).push(r.configure);for(let[e,t]of Object.entries(i)){let r=1===t.length?t[0]:n3(t);a[e].configure!==r&&(a[e]={...a[e],configure:r})}return a}(e,t);(function(e){let t=ng(),r=t.getState().slots,n={},o=!1;for(let[t,a]of Object.entries(e)){let e=r[t];e?.loaded&&rx(e.config,a)?n[t]=e:(n[t]={loaded:!0,config:a},o=!0)}(o||Object.keys(r).length!==Object.keys(n).length)&&t.setState({slots:n})})(n),nU(e,r,t,n,!1),nI={configState:e,tempConfigState:t,slotConfigs:n},nk()}()}catch(e){nO(e),console.error("Failed to recompute the configuration",e)}}nL();let nB=new Map;function nU(e,t,r,n,o){let a=nb(),i=a.getState().configs,s={},l=!1,u=0;for(let a of t.mountedExtensions){let t,c=i[a.slotName]?.[a.extensionId],d=c&&nM.get(c);if(o&&c?.loaded&&d?.slotModuleName===a.slotModuleName&&d.extensionModuleName===a.extensionModuleName)t=c;else{let o=function(e,t,r,n,o,a,i){let s=function(e){let[t]=e.split("#");return t}(n),l=o.schemas[s],u=JSON.stringify([r,n,e,t]),c=nX.get(u);if(c&&c.extensionSchema===l&&c.extensionModuleSchema===o.schemas[t]&&c.providedConfigs===o.providedConfigs&&c.temporaryConfig===a.config)return c.config;let d=l?s:t,f=n1(o,a),p=i?.configure?.[n]??{},m=n4(e,f),h=m?.extensionSlots?.[r]?.configure?.[n]??{},g=n3([n4(d,f),p,h]),y=l??o.schemas[t];n6(y,g,d);let v=n7(y,g);return n5(y,v,d),delete v.extensionSlots,nX.set(u,{extensionSchema:l,extensionModuleSchema:o.schemas[t],providedConfigs:o.providedConfigs,temporaryConfig:a.config,config:v}),v}(a.slotModuleName,a.extensionModuleName,a.slotName,a.extensionId,e,r,n[a.slotName]);t=c?.loaded&&rx(c.config,o)?c:{config:o,loaded:!0}}nM.set(t,a),t!==c&&(l=!0),s[a.slotName]||(s[a.slotName]={}),s[a.slotName][a.extensionId]=t,u++}for(let[e,t]of Object.entries(s)){let r=i[e];r&&Object.keys(r).length===Object.keys(t).length&&Object.entries(t).every(([e,t])=>r[e]===t)&&(s[e]=r)}l||(l=Object.keys(i).length!==Object.keys(s).length||Object.values(i).reduce((e,t)=>e+Object.keys(t).length,0)!==u),l&&a.setState({configs:s})}function nV(e,t){n2(e,t);let r=nj(t,oi);nf.setState(t=>({...t,schemas:{...t.schemas,[e]:r},moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function nW(e){nf.setState(t=>({...t,schemas:{...t.schemas,[e]:oi}}))}function nH(e){nf.setState(t=>({...t,moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function nz(e){nf.setState(t=>({...t,schemas:{...t.schemas,[e]:oa}}))}function nK(e,t){n2(e,t);let r=nj(t,oi);nf.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.`),nf.setState(t=>({...t,schemas:{...t.schemas,[e]:r}}))}function nG(e,t="provided"){nf.setState(r=>({...r,providedConfigs:[...r.providedConfigs,{source:t,config:e}]}))}function nZ(e,t,r){return new Promise(n=>{let o,a=!1;function i(e){!a&&t(e)&&(a=!0,n(r(e)),o?.())}i(e.getState()),a||(o=e.subscribe(i))})}function nY(e){return nZ(nh(e),e=>!!(e.loaded&&e.config),e=>nn(e.config,["Display conditions","Translation overrides"]))}function nq(e,t,r){let n=[e in nf.getState().schemas?nZ(nh(e),e=>!!(e.translationOverridesLoaded&&e.config),e=>e.config["Translation overrides"]??{}):Promise.resolve({})];if(t&&r){let e=nw(nb().getState(),t,r),o=e.loaded&&e.config?e.config["Translation overrides"]??{}:{};n.push(Promise.resolve(o))}return Promise.all(n)}function nJ(e,t,r){n6(e,t,r);let n=n7(e,t);return n5(e,n,r),n}let nX=new Map,nQ=new Map,n0=new Map;function n1(e,t){return[...e.providedConfigs.map(e=>e.config),t.config]}function n2(e,t,r=""){let n="Please verify that you are running the latest version and, if so, alert the maintainer.";for(let o of Object.keys(t).filter(e=>!e.startsWith("_"))){let a=r+(r&&".")+o,i=t[o];if("Display conditions"===a&&console.error(`${e} declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ${n}`),"Translation overrides"===a&&console.error(`${e} declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ${n}`),!ot(i)){console.error(`${e} has bad config schema definition for key '${a}'. ${n}`);continue}i.hasOwnProperty("_default")||n2(e,i,a);let s=i._elements;if(oe(s)&&n2(e,s,a+"._elements"),i._validators)for(let t of i._validators)"function"!=typeof t&&console.error(`${e} has invalid validator for key '${a}' ${n}.
|
|
4
4
|
|
|
5
5
|
If you're the maintainer: validators must be functions that return either undefined or an error string. Received ${t}.`);let l=i._type;l&&!Object.values(no).includes(l)&&console.error(`${e} has invalid type for key '${a}' ${n}.
|
|
6
6
|
|
|
@@ -8,21 +8,21 @@ If you're the maintainer: the allowed types are ${Object.values(no).join(", ")}.
|
|
|
8
8
|
|
|
9
9
|
If you're the maintainer: all config elements must have a default. Received ${JSON.stringify(i)}`),s&&l&&![no.Array,no.Object].includes(l)&&console.error(`${e} has bad config schema definition for key '${a}'. ${n}.
|
|
10
10
|
|
|
11
|
-
If you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. Received ${JSON.stringify(l)}`)}}function
|
|
12
|
-
${t}`)}return n}let oe=(e,t)=>{let r=structuredClone(t);if(!e)return r;for(let t of Object.keys(e)){let n=r[t],o=e[t];if(o&&(o.hasOwnProperty("_type")||o.hasOwnProperty("_default"))){r.hasOwnProperty(t)||(r[t]=o._default);let e=o._elements;if(n&&ot(e)){if(o._type===no.Array&&Array.isArray(n)){let o=n.map(t=>oe(e,t));r[t]=o}else if(o._type===no.Object)for(let t of Object.keys(n))n[t]=oe(e,n[t])}}else if(or(o)){let e=n??{};or(e)&&(r[t]=oe(o,e))}}return r};function ot(e){return!!e&&Object.keys(e).filter(e=>!["_default","_validators"].includes(e)).length>0}function or(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}let on=new Set;function oo(e,t){let r=`${e}:::${t}`;on||(on=new Set),on.has(r)||(console.error(t),on.add(r))}function oa(e){e?on.forEach(t=>{t.startsWith(e)&&on.delete(t)}):on.clear()}function oi(){n$.forEach(e=>e()),n$.length=0,nU.clear(),nQ.clear(),n1.clear(),n0.clear(),nM=null,nL=new WeakMap,nF()}let os={"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:no.Object,_default:{},_validators:[na(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(", ")}.`})]}},ol={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:no.Array,_default:[]},expression:{_description:"The expression that determines whether the extension is displayed",_type:no.String,_default:void 0}},...os},ou=(e,t)=>na(r=>e<=r&&r<=t,`must be between ${e} and ${t}`),oc=e=>{let t=e.concat(["openmrsBase","openmrsSpaBase"]);return na(e=>{if(!e||"string"!=typeof e)return!1;let r=/\${(.*?)}/g,n=r.exec(e);for(;n;){if(!t.includes(n[1]))return!1;n=r.exec(e)}return!0},"Should be a URL or path. The allowed template parameters are "+t.map(e=>"${"+e+"}").join(", "))},od=oc([]),of=e=>na(t=>e.includes(t),`Must be one of the following: '${e.join("', '")}'.`),op={inRange:ou,isUrl:od,isUrlWithTemplateParameters:oc,oneOf:of};var om=r(8067);let oh=B("breadcrumbs",[]);function og(e){return oy([e])}function oy(e){let t=[...ov(),...e.map(e=>({matcher:e.matcher instanceof RegExp?e.matcher:"string"==typeof e.matcher?(0,om.pathToRegexp)(e.matcher).regexp:(0,om.pathToRegexp)(e.path).regexp,settings:e}))];oh.setState(t,!0)}function ov(){return oh.getState()}function ob(e,t){if(t)return function(e,t){let[r]=e.filter(e=>e.matcher.test(t));return r}(e,t)||function(e,t){let r=t.split("/");for(;r.length>1;){r.pop();let t=ob(e,r.join("/"));if(t)return t}}(e,t)}function ow(e,t){if(e.length>0){let r=ob(e,t);if(r){let t=[r],n=ob(e,r.settings.parent);for(;void 0!==n;)t.push(n),n=ob(e,n.settings.parent);return t.reverse()}}return[]}function oE(e){return ow(ov(),e)}var ox=Object.freeze({__proto__:null,get start(){return aK},get ensureJQuerySupport(){return aE},get setBootstrapMaxTime(){return ar},get setMountMaxTime(){return an},get setUnmountMaxTime(){return ao},get setUnloadMaxTime(){return aa},get registerApplication(){return aN},get unregisterApplication(){return aA},get getMountedApps(){return aP},get getAppStatus(){return aR},get unloadApplication(){return a$},get checkActivityFunctions(){return aj},get getAppNames(){return aO},get pathToActiveWhen(){return aL},get navigateToUrl(){return af},get patchHistoryApi(){return av},get triggerAppChange(){return aV},get addErrorHandler(){return ok},get removeErrorHandler(){return oP},get mountRootParcel(){return o9},get NOT_LOADED(){return oT},get LOADING_SOURCE_CODE(){return oN},get NOT_BOOTSTRAPPED(){return oj},get BOOTSTRAPPING(){return oA},get NOT_MOUNTED(){return o$},get MOUNTING(){return oI},get UPDATING(){return oL},get LOAD_ERROR(){return oU},get MOUNTED(){return oM},get UNLOADING(){return oB},get UNMOUNTING(){return oF},get SKIP_BECAUSE_BROKEN(){return oV}}),oD=("u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{}).CustomEvent,o_=!function(){try{var e=new oD("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 r=document.createEvent("CustomEvent");return t?r.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):r.initCustomEvent(e,!1,!1,void 0),r}:function(e,t){var r=document.createEventObject();return r.type=e,t?(r.bubbles=!!t.bubbles,r.cancelable=!!t.cancelable,r.detail=t.detail):(r.bubbles=!1,r.cancelable=!1,r.detail=void 0),r}:oD;let oS=[];function oC(e,t,r){let n=oR(e,t,r);oS.length?oS.forEach(e=>e(n)):setTimeout(()=>{throw n})}function ok(e){if("function"!=typeof e)throw Error(oO(28,!1));oS.push(e)}function oP(e){if("function"!=typeof e)throw Error(oO(29,!1));let t=!1;return oS=oS.filter(r=>{let n=r===e;return t=t||n,!n}),t}function oO(e,t,...r){return`single-spa minified message #${e}: ${t?t+" ":""}See https://single-spa.js.org/error/?code=${e}${r.length?`&arg=${r.join("&arg=")}`:""}`}function oR(e,t,r){let n,o=`${oG(t)} '${oz(t)}' died in status ${t.status}: `;if(e instanceof Error){try{e.message=o+e.message}catch(e){}n=e}else{console.warn(oO(30,!1,t.status,oz(t)));try{n=Error(o+JSON.stringify(e))}catch(t){n=e}}return n.appOrParcelName=oz(t),t.status=r,n}let oT="NOT_LOADED",oN="LOADING_SOURCE_CODE",oj="NOT_BOOTSTRAPPED",oA="BOOTSTRAPPING",o$="NOT_MOUNTED",oI="MOUNTING",oM="MOUNTED",oL="UPDATING",oF="UNMOUNTING",oB="UNLOADING",oU="LOAD_ERROR",oV="SKIP_BECAUSE_BROKEN";function oW(e){return e.status===oM}function oH(e){try{return e.activeWhen(window.location)}catch(t){return oC(t,e,oV),!1}}function oz(e){return e.name}function oK(e){return!!e.unmountThisParcel}function oG(e){return oK(e)?"parcel":"application"}function oZ(){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 oY(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return e[r];return null}function oq(e){return e&&("function"==typeof e||Array.isArray(e)&&!oY(e,e=>"function"!=typeof e))}function oJ(e,t){let r=e[t]||[];0===(r=Array.isArray(r)?r:[r]).length&&(r=[()=>Promise.resolve()]);let n=oG(e),o=oz(e);return function(e){return r.reduce((r,a,i)=>r.then(()=>{let r=a(e);return oX(r)?r:Promise.reject(oO(15,!1,n,o,t,i))}),Promise.resolve())}}function oX(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}let oQ=[];function o0(e,t){return Promise.resolve().then(()=>e.status!==oj?e:(e.status=oA,e.bootstrap?ai(e,"bootstrap").then(r).catch(r=>{if(t)throw oR(r,e,oV);return oC(r,e,oV),e}):Promise.resolve().then(r)));function r(){return e.status=o$,e}}function o1(e,t){return Promise.resolve().then(()=>{if(e.status!==oM)return e;return e.status=oF,Promise.all(Object.keys(e.parcels).map(t=>e.parcels[t].unmountThisParcel())).then(r,n=>r().then(()=>{let r=Error(n.message);if(t)throw oR(r,e,oV);oC(r,e,oV)})).then(()=>e);function r(){return ai(e,"unmount").then(()=>{e.status=o$},r=>{if(t)throw oR(r,e,oV);oC(r,e,oV)})}})}let o2=!1,o4=!1;function o3(e,t){return Promise.resolve().then(()=>e.status!==o$?e:(o2||(window.dispatchEvent(new o_("single-spa:before-first-mount")),o2=!0),e.status=oI,ai(e,"mount").then(()=>(e.status=oM,o4||(window.dispatchEvent(new o_("single-spa:first-mount")),o4=!0),e)).catch(r=>{return e.status=oM,o1(e,!0).then(n,n);function n(){if(t)throw oR(r,e,oV);return oC(r,e,oV),e}})))}let o6=0,o5={parcels:{}};function o9(){return o8.apply(o5,arguments)}function o8(e,t){let r,n,o,a=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(oO(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(oO(3,!1,typeof e.name));let i=o6++,s=e.name||`parcel-${i}`;if("object"!=typeof t)throw Error(oO(4,!1,s,typeof t));if(!t.domElement)throw Error(oO(5,!1,s));let l="function"==typeof e,u=l?e:()=>Promise.resolve(e),c={id:i,parcels:{},status:l?oN:oj,customProps:t,parentName:oz(a),unmountThisParcel:()=>p.then(()=>{if(c.status!==oM)throw Error(oO(6,!1,s,c.status));return o1(c,!0)}).then(e=>(c.parentName&&delete a.parcels[c.id],e)).then(e=>(n(e),e)).catch(e=>{throw c.status=oV,o(e),e})};a.parcels[i]=c;let d=u();if(!d||"function"!=typeof d.then)throw Error(oO(7,!1));let f=(d=d.then(e=>{if(!e)throw Error(oO(8,!1));if(s=e.name||`parcel-${i}`,Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!oq(e.bootstrap))throw Error(oO(9,!1,s));if(!oq(e.mount))throw Error(oO(10,!1,s));if(!oq(e.unmount))throw Error(oO(11,!1,s));if(e.update&&!oq(e.update))throw Error(oO(12,!1,s));let t=oJ(e,"bootstrap"),n=oJ(e,"mount"),o=oJ(e,"unmount");c.status=oj,c.name=s,c.bootstrap=t,c.mount=n,c.unmount=o,c.timeouts=as(e.timeouts),e.update&&(c.update=oJ(e,"update"),r.update=function(e){return c.customProps=e,o7(Promise.resolve().then(()=>{if(c.status!==oM)throw Error(oO(32,!1,oz(c)));return c.status=oL,ai(c,"update").then(()=>(c.status=oM,c)).catch(e=>{throw oR(e,c,oV)})}))})})).then(()=>o0(c,!0)),p=f.then(()=>o3(c,!0)),m=new Promise((e,t)=>{n=e,o=t});return r={mount:()=>o7(Promise.resolve().then(()=>{if(c.status!==o$)throw Error(oO(13,!1,s,c.status));return a.parcels[i]=c,o3(c)})),unmount:()=>o7(c.unmountThisParcel()),getStatus:()=>c.status,loadPromise:o7(d),bootstrapPromise:o7(f),mountPromise:o7(p),unmountPromise:o7(m)}}function o7(e){return e.then(()=>null)}function ae(e){let t=oz(e),r="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof r||null===r||Array.isArray(r))&&(r={},console.warn(oO(40,!1),t,r));let n=oZ({},r,{name:t,mountParcel:o8.bind(e),singleSpa:ox});return oK(e)&&(n.unmountSelf=e.unmountThisParcel),n}let at={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 ar(e,t,r){if("number"!=typeof e||e<=0)throw Error(oO(16,!1));at.bootstrap={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function an(e,t,r){if("number"!=typeof e||e<=0)throw Error(oO(17,!1));at.mount={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function ao(e,t,r){if("number"!=typeof e||e<=0)throw Error(oO(18,!1));at.unmount={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function aa(e,t,r){if("number"!=typeof e||e<=0)throw Error(oO(19,!1));at.unload={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function ai(e,t){let r=e.timeouts[t],n=r.warningMillis,o=oG(e);return new Promise((a,i)=>{let s=!1,l=!1;e[t](ae(e)).then(e=>{s=!0,a(e)}).catch(e=>{s=!0,i(e)}),setTimeout(()=>c(1),n),setTimeout(()=>c(!0),r.millis);let u=oO(31,!1,t,o,oz(e),r.millis);function c(e){s||(!0===e?(l=!0,r.dieOnTimeout?i(Error(u)):console.error(u)):!l&&(console.warn(u),e*n+n<r.millis&&setTimeout(()=>c(e+1),n)))}})}function as(e){let t={};for(let r in at)t[r]=oZ({},at[r],e&&e[r]||{});return t}function al(e){return Promise.resolve().then(()=>{let t,r;return e.loadPromise?e.loadPromise:e.status!==oT&&e.status!==oU?e:(e.status=oN,e.loadPromise=Promise.resolve().then(()=>{let n=e.loadApp(ae(e));if(!oX(n))throw r=!0,Error(oO(33,!1,oz(e)));return n.then(r=>{let n;e.loadErrorTime=null,"object"!=typeof(t=r)&&(n=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!oq(t.bootstrap)&&(n=35),oq(t.mount)||(n=36),oq(t.unmount)||(n=37);let o=oG(t);if(n){let r;try{r=JSON.stringify(t)}catch(e){}return console.error(oO(n,!1,o,oz(e),r),t),oC(void 0,e,oV),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=oZ({},e.devtools.overlays,t.devtools.overlays)),e.status=oj,e.bootstrap=oJ(t,"bootstrap"),e.mount=oJ(t,"mount"),e.unmount=oJ(t,"unmount"),e.unload=oJ(t,"unload"),e.timeouts=as(t.timeouts),delete e.loadPromise,e})}).catch(t=>{let n;return delete e.loadPromise,r?n=oV:(n=oU,e.loadErrorTime=(new Date).getTime()),oC(t,e,n),e}))})}let au="u">typeof window,ac={hashchange:[],popstate:[]},ad=["hashchange","popstate"];function af(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(oO(14,!1));t=e.currentTarget.href,e.preventDefault()}let r=ab(window.location.href),n=ab(t);0===t.indexOf("#")?window.location.hash=n.hash:r.host!==n.host&&n.host?window.location.href=t:n.pathname===r.pathname&&n.search===r.search?window.location.hash=n.hash:window.history.pushState(null,null,t)}function ap(e){if(e){let t=e[0].type;ad.indexOf(t)>=0&&ac[t].forEach(t=>{try{t.apply(this,e)}catch(e){setTimeout(()=>{throw e})}})}}function am(){aW([],arguments)}function ah(e,t){return function(){let r=window.location.href,n=e.apply(this,arguments),a=window.location.href;return o&&r===a||window.dispatchEvent(function(e,t){let r;try{r=new PopStateEvent("popstate",{state:e})}catch(t){(r=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return r.singleSpa=!0,r.singleSpaTrigger=t,r}(window.history.state,t)),n}}let ag=null,ay=!1;function av(e){if(ay)throw Error(oO(43,!1));o=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,ay=!0,ag=window.history.replaceState,window.addEventListener("hashchange",am),window.addEventListener("popstate",am);let t=window.addEventListener,r=window.removeEventListener;window.addEventListener=function(e,r){if(!("function"==typeof r&&ad.indexOf(e)>=0)||oY(ac[e],e=>e===r))return t.apply(this,arguments);ac[e].push(r)},window.removeEventListener=function(e,t){return"function"==typeof t&&ad.indexOf(e)>=0&&(ac[e]=ac[e].filter(e=>e!==t)),r.apply(this,arguments)},window.history.pushState=ah(window.history.pushState,"pushState"),window.history.replaceState=ah(ag,"replaceState")}function ab(e){let t=document.createElement("a");return t.href=e,t}au&&(window.singleSpaNavigate?console.warn(oO(41,!1)):window.singleSpaNavigate=af);let aw=!1;function aE(e=window.jQuery){if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!aw){let t=e.fn.on,r=e.fn.off;e.fn.on=function(e,r){return ax.call(this,t,window.addEventListener,e,r,arguments)},e.fn.off=function(e,t){return ax.call(this,r,window.removeEventListener,e,t,arguments)},aw=!0}}function ax(e,t,r,n,o){return"string"!=typeof r?e.apply(this,o):(r.split(/\s+/).forEach(e=>{ad.indexOf(e)>=0&&(t(e,n),r=r.replace(e,""))}),""===r.trim()?this:e.apply(this,o))}let aD={};function a_(e){return Promise.resolve().then(()=>{let t=aD[oz(e)];if(!t)return e;if(e.status===oT)return aS(e,t),e;if(e.status===oB)return t.promise.then(()=>e);if(e.status!==o$&&e.status!==oU)return e;let r=e.status===oU?Promise.resolve():ai(e,"unload");return e.status=oB,r.then(()=>(aS(e,t),e)).catch(r=>(delete aD[oz(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,oC(r,e,oV),t.reject(r),e))})}function aS(e,t){delete aD[oz(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=oT,t.resolve()}function aC(e,t,r,n){aD[oz(e)]={app:e,resolve:r,reject:n},Object.defineProperty(aD[oz(e)],"promise",{get:t})}let ak=[];function aP(){return ak.filter(oW).map(oz)}function aO(){return ak.map(oz)}function aR(e){let t=oY(ak,t=>oz(t)===e);return t?t.status:null}let aT=!1;function aN(e,t,r,n){var o,a;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(oO(39,!1));let t=["name","app","activeWhen","customProps"],r=Object.keys(e).reduce((e,r)=>t.indexOf(r)>=0?e:e.concat(r),[]);if(0!==r.length)throw Error(oO(38,!1,t.join(", "),r.join(", ")));if("string"!=typeof e.name||0===e.name.length||"object"!=typeof e.app&&"function"!=typeof e.app)throw Error(oO(20,!1));let n=e=>"string"==typeof e||"function"==typeof e;if(!(n(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(n)))throw Error(oO(24,!1));if(!aM(e.customProps))throw Error(oO(22,!1))}(e),i.name=e.name,i.loadApp=e.app,i.activeWhen=e.activeWhen,i.customProps=e.customProps):(function(e,t,r,n){if("string"!=typeof e||0===e.length)throw Error(oO(20,!1));if(!t)throw Error(oO(23,!1));if("function"!=typeof r)throw Error(oO(24,!1));if(!aM(n))throw Error(oO(22,!1))}(e,t,r,n),i.name=e,i.loadApp=t,i.activeWhen=r,i.customProps=n),i.loadApp="function"!=typeof(o=i.loadApp)?()=>Promise.resolve(o):o,i.customProps=i.customProps||{},s=(s=Array.isArray(a=i.activeWhen)?a:[a]).map(e=>"function"==typeof e?e:aL(e)),i.activeWhen=e=>s.some(t=>t(e)),i);if(az||aT||(aT=!0,setTimeout(()=>{az||console.warn(oO(1,!1))},5e3)),-1!==aO().indexOf(l.name))throw Error(oO(21,!1,l.name));ak.push(oZ({loadErrorTime:null,status:oT,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},l)),au&&(aE(),aW())}function aj(e=window.location){return ak.filter(t=>t.activeWhen(e)).map(oz)}function aA(e){if(0===ak.filter(t=>oz(t)===e).length)throw Error(oO(25,!1,e));return(au?a$(e,{waitForUnmount:!1}):Promise.resolve()).then(()=>{let t=ak.map(oz).indexOf(e);ak.splice(t,1)})}function a$(e,t={waitForUnmount:!1}){if("string"!=typeof e)throw Error(oO(26,!1));let r=oY(ak,t=>oz(t)===e);if(!r)throw Error(oO(27,!1,e));let n=aD[oz(r)];if(t&&t.waitForUnmount){if(n)return n.promise;{let e=new Promise((t,n)=>{aC(r,()=>e,t,n)});return e}}{let e;return n?(e=n.promise,aI(r,n.resolve,n.reject)):e=new Promise((t,n)=>{aC(r,()=>e,t,n),aI(r,t,n)}),e}}function aI(e,t,r){Promise.resolve().then(()=>{if(oY(aj(),t=>t===oz(e)))return aV()}).then(()=>o1(e).then(a_).then(()=>{t(),setTimeout(()=>{aW()})})).catch(r)}function aM(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)}function aL(e,t){let r=function(e,t){let r=0,n=!1,o="^";"/"!==e[0]&&(e="/"+e);for(let t=0;t<e.length;t++){let r=e[t],o=n&&"/"===r;(!n&&":"===r||o)&&a(t)}return a(e.length),RegExp(o,"i");function a(a){let i=e.slice(r,a).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=n?"[^/]+/?":i,a===e.length)if(n)t&&(o+="$");else{let e=t?"":".*";o="/"===o.charAt(o.length-1)?`${o}${e}$`:`${o}(/${e})?(#.*)?$`}n=!n,r=a}}(e,t);return e=>{let t=e.origin;t||(t=`${e.protocol}//${e.host}`);let n=e.href.replace(t,"").replace(e.search,"").split("?")[0];return r.test(n)}}let aF=!1,aB=[],aU=au&&window.location.href;function aV(){return aW()}function aW(e=[],t,r=!1){let n,o,a,i,s;if(aF)return new Promise((e,r)=>{aB.push({resolve:e,reject:r,eventArguments:t})});let{appsToUnload:l,appsToUnmount:u,appsToLoad:c,appsToMount:d}=(n=[],o=[],a=[],i=[],s=(new Date).getTime(),ak.forEach(e=>{let t=e.status!==oV&&oH(e);switch(e.status){case oU:t&&s-e.loadErrorTime>=200&&a.push(e);break;case oT:case oN:t&&a.push(e);break;case oj:case o$:!t&&aD[oz(e)]?n.push(e):t&&i.push(e);break;case oM:t||o.push(e)}}),{appsToUnload:n,appsToUnmount:o,appsToLoad:a,appsToMount:i}),f,p=[],m=aU,h=aU=window.location.href;return az?(aF=!0,f=l.concat(c,u,d),Promise.resolve().then(()=>(w(0===f.length?"before-no-app-change":"before-app-change",b(!0)),w("before-routing-event",b(!0,{cancelNavigation:g})),Promise.all(p).then(r=>{if(r.some(e=>e))return ag.call(window.history,history.state,"",m.substring(location.origin.length)),aU=location.href,aF=!1,aW(e,t,!0);let n=l.map(a_),o=Promise.all(u.map(o1).map(e=>e.then(a_)).concat(n));o.then(()=>{w("before-mount-routing-event",b(!0))},e=>{throw e});let a=c.map(e=>al(e).then(e=>aH(e,o))),i=d.filter(e=>0>c.indexOf(e)).map(e=>aH(e,o));return o.catch(e=>{throw v(),e}).then(()=>(v(),Promise.all(a.concat(i)).catch(t=>{throw e.forEach(e=>e.reject(t)),t}).then(y).then(()=>{},e=>{throw e})))})))):(f=c,Promise.resolve().then(()=>Promise.all(c.map(al)).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(oO(42,!1))),console.warn(e),!1)))}function y(){let t=aP();e.forEach(e=>e.resolve(t));try{w(0===f.length?"no-app-change":"app-change",b()),w("routing-event",b())}catch(e){setTimeout(()=>{throw e})}if(aF=!1,aB.length>0){let e=aB;aB=[],aW(e)}return t}function v(){r||(e.forEach(e=>{ap(e.eventArguments)}),ap(t))}function b(e=!1,r){let n={},o={[oM]:[],[o$]:[],[oT]:[],[oV]:[]};e?(c.concat(d).forEach((e,t)=>{i(e,oM)}),l.forEach(e=>{i(e,oT)}),u.forEach(e=>{i(e,o$)})):f.forEach(e=>{i(e)});let a={detail:{newAppStatuses:n,appsByNewStatus:o,totalAppChanges:f.length,originalEvent:null==t?void 0:t[0],oldUrl:m,newUrl:h}};return r&&oZ(a.detail,r),a;function i(e,t){let r=oz(e);t=t||aR(r),n[r]=t,(o[t]=o[t]||[]).push(r)}}function w(e,t){r||window.dispatchEvent(new o_(`single-spa:${e}`,t))}}function aH(e,t){return oH(e)?o0(e).then(e=>t.then(()=>oH(e)?o3(e):e)):t.then(()=>e)}let az=!1;function aK(e){az=!0,au&&(av(e),aW())}au&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods={getRawAppData:function(){return[...ak]},reroute:aW,NOT_LOADED:oT,toLoadPromise:al,toBootstrapPromise:o0,unregisterApplication:aA,getProfilerData:function(){return oQ}});let aG={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"};var aZ=r(2284),aY=r(3029),aq=r(2901);function aJ(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var aX=r(3662);function aQ(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,aX.A)(e,t)}function a0(e,t){if(t&&("object"==(0,aZ.A)(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return aJ(e)}function a1(e){return(a1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a2=r(4467),a4=r(6369),a3=r(3612),a6=r(6562);function a5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function a9(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a5(Object(r),!0).forEach(function(t){(0,a2.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a5(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var a8={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},a7=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,aY.A)(this,e),this.init(t,r)}return(0,aq.A)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||a8,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,r,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(r).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,a9(a9({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}}]),e}()),ie=function(){function e(){(0,aY.A)(this,e),this.observers={}}return(0,aq.A)(e,[{key:"on",value:function(e,t){var r=this;return e.split(" ").forEach(function(e){r.observers[e]=r.observers[e]||[],r.observers[e].push(t)}),this}},{key:"off",value:function(e,t){if(this.observers[e]){if(!t)return void delete this.observers[e];this.observers[e]=this.observers[e].filter(function(e){return e!==t})}}},{key:"emit",value:function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];this.observers[e]&&[].concat(this.observers[e]).forEach(function(e){e.apply(void 0,r)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(function(t){t.apply(t,[e].concat(r))})}}]),e}();function it(){var e,t,r=new Promise(function(r,n){e=r,t=n});return r.resolve=e,r.reject=t,r}function ir(e){return null==e?"":""+e}function io(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var a="string"!=typeof t?[].concat(t):t.split(".");a.length>1;){if(o())return{};var i=n(a.shift());!e[i]&&r&&(e[i]=new r),e=Object.prototype.hasOwnProperty.call(e,i)?e[i]:{}}return o()?{}:{obj:e,k:n(a.shift())}}function ia(e,t,r){var n=io(e,t,Object);n.obj[n.k]=r}function ii(e,t){var r=io(e,t),n=r.obj,o=r.k;if(n)return n[o]}function is(e,t,r){var n=ii(e,r);return void 0!==n?n:ii(t,r)}function il(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var iu={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function ic(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,function(e){return iu[e]}):e}var id="u">typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,ip=[" ",",","?","!",";"];function im(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ih(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?im(Object(r),!0).forEach(function(t){(0,a2.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):im(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var ig=function(e){aQ(n,e);var t,r=(t=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,r=a1(n);return e=t?Reflect.construct(r,arguments,a1(this).constructor):r.apply(this,arguments),a0(this,e)});function n(e){var t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return(0,aY.A)(this,n),t=r.call(this),id&&ie.call(aJ(t)),t.data=e||{},t.options=o,void 0===t.options.keySeparator&&(t.options.keySeparator="."),void 0===t.options.ignoreJSONStructure&&(t.options.ignoreJSONStructure=!0),t}return(0,aq.A)(n,[{key:"addNamespaces",value:function(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,a=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure,i=[e,t];r&&"string"!=typeof r&&(i=i.concat(r)),r&&"string"==typeof r&&(i=i.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(i=e.split("."));var s=ii(this.data,i);return s||!a||"string"!=typeof r?s:function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(t){if(t[r])return t[r];for(var o=r.split(n),a=t,i=0;i<o.length;++i){if(!a||"string"==typeof a[o[i]]&&i+1<o.length)return;if(void 0===a[o[i]]){for(var s=2,l=o.slice(i,i+s).join(n),u=a[l];void 0===u&&o.length>i+s;)s++,u=a[l=o.slice(i,i+s).join(n)];if(void 0===u)return;if(null===u)return null;if(r.endsWith(l)){if("string"==typeof u)return u;if(l&&"string"==typeof u[l])return u[l]}var c=o.slice(i+s).join(n);if(c)return e(u,c,n);return}a=a[o[i]]}return a}}(this.data&&this.data[e]&&this.data[e][t],r,o)}},{key:"addResource",value:function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},a=this.options.keySeparator;void 0===a&&(a=".");var i=[e,t];r&&(i=i.concat(a?r.split(a):r)),e.indexOf(".")>-1&&(i=e.split("."),n=t,t=i[1]),this.addNamespaces(t),ia(this.data,i,n),o.silent||this.emit("added",e,t,r,n)}},{key:"addResources",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in r)("string"==typeof r[o]||"[object Array]"===Object.prototype.toString.apply(r[o]))&&this.addResource(e,t,o,r[o],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},i=[e,t];e.indexOf(".")>-1&&(i=e.split("."),n=r,r=t,t=i[1]),this.addNamespaces(t);var s=ii(this.data,i)||{};n?function e(t,r,n){for(var o in r)"__proto__"!==o&&"constructor"!==o&&(o in t?"string"==typeof t[o]||t[o]instanceof String||"string"==typeof r[o]||r[o]instanceof String?n&&(t[o]=r[o]):e(t[o],r[o],n):t[o]=r[o]);return t}(s,r,o):s=ih(ih({},s),r),ia(this.data,i,s),a.silent||this.emit("added",e,t,r)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return(t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI)?ih(ih({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(function(e){return t[e]&&Object.keys(t[e]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(ie),iy={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,o){var a=this;return e.forEach(function(e){a.processors[e]&&(t=a.processors[e].process(t,r,n,o))}),t}};function iv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ib(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?iv(Object(r),!0).forEach(function(t){(0,a2.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iv(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var iw={},iE=function(e){aQ(n,e);var t,r=(t=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,r=a1(n);return e=t?Reflect.construct(r,arguments,a1(this).constructor):r.apply(this,arguments),a0(this,e)});function n(e){var t,o,a,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,aY.A)(this,n),a=r.call(this),id&&ie.call(aJ(a)),t=["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],o=aJ(a),t.forEach(function(t){e[t]&&(o[t]=e[t])}),a.options=i,void 0===a.options.keySeparator&&(a.options.keySeparator="."),a.logger=a7.create("translator"),a}return(0,aq.A)(n,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var r=this.resolve(e,t);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(e,t){var r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],a=r&&e.indexOf(r)>-1,i=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!function(e,t,r){t=t||"",r=r||"";var n=ip.filter(function(e){return 0>t.indexOf(e)&&0>r.indexOf(e)});if(0===n.length)return!0;var o=new RegExp("(".concat(n.map(function(e){return"?"===e?"\\?":e}).join("|"),")")),a=!o.test(e);if(!a){var i=e.indexOf(r);i>0&&!o.test(e.substring(0,i))&&(a=!0)}return a}(e,r,n);if(a&&!i){var s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:o};var l=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(l[0])>-1)&&(o=l.shift()),e=l.join(n)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,t,r){var o=this;if("object"!==(0,aZ.A)(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var a=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,s=this.extractFromKey(e[e.length-1],t),l=s.key,u=s.namespaces,c=u[u.length-1],d=t.lng||this.language,f=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(f){var p=t.nsSeparator||this.options.nsSeparator;return a?(m.res="".concat(c).concat(p).concat(l),m):"".concat(c).concat(p).concat(l)}return a?(m.res=l,m):l}var m=this.resolve(e,t),h=m&&m.res,g=m&&m.usedKey||l,y=m&&m.exactUsedKey||l,v=Object.prototype.toString.apply(h),b=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,E="string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h;if(w&&h&&E&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(v)&&("string"!=typeof b||"[object Array]"!==v)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var x=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,h,ib(ib({},t),{},{ns:u})):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.");return a?(m.res=x,m):x}if(i){var D="[object Array]"===v,_=D?[]:{},S=D?y:g;for(var C in h)if(Object.prototype.hasOwnProperty.call(h,C)){var k="".concat(S).concat(i).concat(C);_[C]=this.translate(k,ib(ib({},t),{joinArrays:!1,ns:u})),_[C]===k&&(_[C]=h[C])}h=_}}else if(w&&"string"==typeof b&&"[object Array]"===v)(h=h.join(b))&&(h=this.extendTranslation(h,e,t,r));else{var P=!1,O=!1,R=void 0!==t.count&&"string"!=typeof t.count,T=n.hasDefaultValue(t),N=R?this.pluralResolver.getSuffix(d,t.count,t):"",j=t["defaultValue".concat(N)]||t.defaultValue;!this.isValidLookup(h)&&T&&(P=!0,h=j),this.isValidLookup(h)||(O=!0,h=l);var A=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&O?void 0:h,$=T&&j!==h&&this.options.updateMissing;if(O||P||$){if(this.logger.log($?"updateKey":"missingKey",d,c,l,$?j:h),i){var I=this.resolve(l,ib(ib({},t),{},{keySeparator:!1}));I&&I.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.")}var M=[],L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&L&&L[0])for(var F=0;F<L.length;F++)M.push(L[F]);else"all"===this.options.saveMissingTo?M=this.languageUtils.toResolveHierarchy(t.lng||this.language):M.push(t.lng||this.language);var B=function(e,r,n){var a=T&&n!==h?n:A;o.options.missingKeyHandler?o.options.missingKeyHandler(e,c,r,a,$,t):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(e,c,r,a,$,t),o.emit("missingKey",e,c,r,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&R?M.forEach(function(e){o.pluralResolver.getSuffixes(e,t).forEach(function(r){B([e],l+r,t["defaultValue".concat(r)]||j)})}):B(M,l,j))}h=this.extendTranslation(h,e,t,m,r),O&&h===l&&this.options.appendNamespaceToMissingKey&&(h="".concat(c,":").concat(l)),(O||P)&&this.options.parseMissingKeyHandler&&(h="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(c,":").concat(l):l,P?h:void 0):this.options.parseMissingKeyHandler(h))}return a?(m.res=h,m):h}},{key:"extendTranslation",value:function(e,t,r,n,o){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,ib(ib({},this.options.interpolation.defaultVariables),r),n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(ib(ib({},r),{interpolation:ib(ib({},this.options.interpolation),r.interpolation)}));var i,s="string"==typeof e&&(r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(s){var l=e.match(this.interpolator.nestingRegexp);i=l&&l.length}var u=r.replace&&"string"!=typeof r.replace?r.replace:r;if(this.options.interpolation.defaultVariables&&(u=ib(ib({},this.options.interpolation.defaultVariables),u)),e=this.interpolator.interpolate(e,u,r.lng||this.language,r),s){var c=e.match(this.interpolator.nestingRegexp);i<(c&&c.length)&&(r.nest=!1)}!1!==r.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i];return o&&o[0]===n[0]&&!r.context?(a.logger.warn("It seems you are nesting recursively key: ".concat(n[0]," in key: ").concat(t[0])),null):a.translate.apply(a,n.concat([t]))},r)),r.interpolation&&this.interpolator.reset()}var d=r.postProcess||this.options.postProcess,f="string"==typeof d?[d]:d;return null!=e&&f&&f.length&&!1!==r.applyPostProcessor&&(e=iy.handle(f,e,t,this.options&&this.options.postProcessPassResolved?ib({i18nResolved:n},r):r,this)),e}},{key:"resolve",value:function(e){var t,r,n,o,a,i=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach(function(e){if(!i.isValidLookup(t)){var l=i.extractFromKey(e,s),u=l.key;r=u;var c=l.namespaces;i.options.fallbackNS&&(c=c.concat(i.options.fallbackNS));var d=void 0!==s.count&&"string"!=typeof s.count,f=d&&!s.ordinal&&0===s.count&&i.pluralResolver.shouldUseIntlApi(),p=void 0!==s.context&&("string"==typeof s.context||"number"==typeof s.context)&&""!==s.context,m=s.lngs?s.lngs:i.languageUtils.toResolveHierarchy(s.lng||i.language,s.fallbackLng);c.forEach(function(e){i.isValidLookup(t)||(a=e,!iw["".concat(m[0],"-").concat(e)]&&i.utils&&i.utils.hasLoadedNamespace&&!i.utils.hasLoadedNamespace(a)&&(iw["".concat(m[0],"-").concat(e)]=!0,i.logger.warn('key "'.concat(r,'" for languages "').concat(m.join(", "),'" won\'t get resolved as namespace "').concat(a,'" 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!!!")),m.forEach(function(r){if(!i.isValidLookup(t)){o=r;var a,l=[u];if(i.i18nFormat&&i.i18nFormat.addLookupKeys)i.i18nFormat.addLookupKeys(l,u,r,e,s);else{d&&(c=i.pluralResolver.getSuffix(r,s.count,s));var c,m="".concat(i.options.pluralSeparator,"zero");if(d&&(l.push(u+c),f&&l.push(u+m)),p){var h="".concat(u).concat(i.options.contextSeparator).concat(s.context);l.push(h),d&&(l.push(h+c),f&&l.push(h+m))}}for(;a=l.pop();)i.isValidLookup(t)||(n=a,t=i.getResource(r,e,a,s))}}))})}}),{res:t,usedKey:r,exactUsedKey:n,usedLng:o,usedNS:a}}},{key:"isValidLookup",value:function(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,t.length)&&void 0!==e[r])return!0;return!1}}]),n}(ie);function ix(e){return e.charAt(0).toUpperCase()+e.slice(1)}var iD=function(){function e(t){(0,aY.A)(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=a7.create("languageUtils")}return(0,aq.A)(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||0>e.indexOf("-"))return null;var t=e.split("-");return 2===t.length||(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||0>e.indexOf("-"))return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],r=e.split("-");return this.options.lowerCaseLng?r=r.map(function(e){return e.toLowerCase()}):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=ix(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=ix(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=ix(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,r=this;return e?(e.forEach(function(e){if(!t){var n=r.formatLanguageCode(e);(!r.options.supportedLngs||r.isSupportedCode(n))&&(t=n)}}),!t&&this.options.supportedLngs&&e.forEach(function(e){if(!t){var n=r.getLanguagePartFromCode(e);if(r.isSupportedCode(n))return t=n;t=r.options.supportedLngs.find(function(e){if(0===e.indexOf(n))return e})}}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}},{key:"toResolveHierarchy",value:function(e,t){var r=this,n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],a=function(e){e&&(r.isSupportedCode(e)?o.push(e):r.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&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))):"string"==typeof e&&a(this.formatLanguageCode(e)),n.forEach(function(e){0>o.indexOf(e)&&a(r.formatLanguageCode(e))}),o}}]),e}(),i_=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],iS={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(+(1!=e&&(e%10!=1||e%100==11)))},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:3*(e%100==3||e%100==4))},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},iC=["v1","v2","v3"],ik={zero:0,one:1,two:2,few:3,many:4,other:5},iP=function(){function e(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,aY.A)(this,e),this.languageUtils=t,this.options=n,this.logger=a7.create("pluralResolver"),(!this.options.compatibilityJSON||"v4"===this.options.compatibilityJSON)&&("u"<typeof Intl||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(r={},i_.forEach(function(e){e.lngs.forEach(function(t){r[t]={numbers:e.nr,plurals:iS[e.fc]}})}),r)}return(0,aq.A)(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,t);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,r).map(function(e){return"".concat(t).concat(e)})}},{key:"getSuffixes",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort(function(e,t){return ik[e]-ik[t]}).map(function(e){return"".concat(t.options.prepend).concat(e)}):n.numbers.map(function(n){return t.getSuffix(e,n,r)}):[]}},{key:"getSuffix",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(n.select(t)):this.getSuffixRetroCompatible(n,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var r=this,n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),o=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var a=function(){return r.options.prepend&&o.toString()?r.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?a():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}},{key:"shouldUseIntlApi",value:function(){return!iC.includes(this.options.compatibilityJSON)}}]),e}();function iO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function iR(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?iO(Object(r),!0).forEach(function(t){(0,a2.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iO(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var iT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,aY.A)(this,e),this.logger=a7.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return(0,aq.A)(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:ic,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?il(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?il(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?il(t.nestingPrefix):t.nestingPrefixEscaped||il("$t("),this.nestingSuffix=t.nestingSuffix?il(t.nestingSuffix):t.nestingSuffixEscaped||il(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=RegExp(t,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=RegExp(r,"g")}},{key:"interpolate",value:function(e,t,r,n){var o,a,i,s=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(e){return e.replace(/\$/g,"$$$$")}var c=function(e){if(0>e.indexOf(s.formatSeparator)){var o=is(t,l,e);return s.alwaysFormat?s.format(o,void 0,r,iR(iR(iR({},n),t),{},{interpolationkey:e})):o}var a=e.split(s.formatSeparator),i=a.shift().trim(),u=a.join(s.formatSeparator).trim();return s.format(is(t,l,i),u,r,iR(iR(iR({},n),t),{},{interpolationkey:i}))};this.resetRegExp();var d=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler,f=n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return u(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?u(s.escape(e)):u(e)}}].forEach(function(t){for(i=0;o=t.regex.exec(e);){var r=o[1].trim();if(void 0===(a=c(r)))if("function"==typeof d){var l=d(e,o,n);a="string"==typeof l?l:""}else if(n&&n.hasOwnProperty(r))a="";else if(f){a=o[0];continue}else s.logger.warn("missed to pass in variable ".concat(r," for interpolating ").concat(e)),a="";else"string"==typeof a||s.useRawValueToEscape||(a=ir(a));var u=t.safeValue(a);if(e=e.replace(o[0],u),f?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++i>=s.maxReplaces)break}}),e}},{key:"nest",value:function(e,t){var r,n,o=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=iR({},a);function s(e,t){var r=this.nestingOptionsSeparator;if(0>e.indexOf(r))return e;var n=e.split(new RegExp("".concat(r,"[ ]*{"))),o="{".concat(n[1]);e=n[0];var a=(o=this.interpolate(o,i)).match(/'/g),s=o.match(/"/g);(a&&a.length%2==0&&!s||s.length%2!=0)&&(o=o.replace(/'/g,'"'));try{i=JSON.parse(o),t&&(i=iR(iR({},t),i))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(r).concat(o)}return delete i.defaultValue,e}for(i.applyPostProcessor=!1,delete i.defaultValue;r=this.nestingRegexp.exec(e);){var l=[],u=!1;if(-1!==r[0].indexOf(this.formatSeparator)&&!/{.*}/.test(r[1])){var c=r[1].split(this.formatSeparator).map(function(e){return e.trim()});r[1]=c.shift(),l=c,u=!0}if((n=t(s.call(this,r[1].trim(),i),i))&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=ir(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(e)),n=""),u&&(n=l.reduce(function(e,t){return o.format(e,t,a.lng,iR(iR({},a),{},{interpolationkey:r[1].trim()}))},n.trim())),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}]),e}();function iN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ij(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?iN(Object(r),!0).forEach(function(t){(0,a2.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iN(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function iA(e){var t={};return function(r,n,o){var a=n+JSON.stringify(o),i=t[a];return i||(i=e(n,o),t[a]=i),i(r)}}var i$=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,aY.A)(this,e),this.logger=a7.create("formatter"),this.options=t,this.formats={number:iA(function(e,t){var r=new Intl.NumberFormat(e,t);return function(e){return r.format(e)}}),currency:iA(function(e,t){var r=new Intl.NumberFormat(e,ij(ij({},t),{},{style:"currency"}));return function(e){return r.format(e)}}),datetime:iA(function(e,t){var r=new Intl.DateTimeFormat(e,ij({},t));return function(e){return r.format(e)}}),relativetime:iA(function(e,t){var r=new Intl.RelativeTimeFormat(e,ij({},t));return function(e){return r.format(e,t.range||"day")}}),list:iA(function(e,t){var r=new Intl.ListFormat(e,ij({},t));return function(e){return r.format(e)}})},this.init(t)}return(0,aq.A)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=t.interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=iA(t)}},{key:"format",value:function(e,t,r,n){var o=this;return t.split(this.formatSeparator).reduce(function(e,t){var a=function(e){var t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){var n=e.split("(");t=n[0].toLowerCase().trim();var o=n[1].substring(0,n[1].length-1);"currency"===t&&0>o.indexOf(":")?r.currency||(r.currency=o.trim()):"relativetime"===t&&0>o.indexOf(":")?r.range||(r.range=o.trim()):o.split(";").forEach(function(e){if(e){var t,n=(t=e.split(":"),(0,a4.A)(t)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||(0,a3.A)(t)||(0,a6.A)()),o=n[0],a=n.slice(1).join(":").trim().replace(/^'+|'+$/g,"");r[o.trim()]||(r[o.trim()]=a),"false"===a&&(r[o.trim()]=!1),"true"===a&&(r[o.trim()]=!0),isNaN(a)||(r[o.trim()]=parseInt(a,10))}})}return{formatName:t,formatOptions:r}}(t),i=a.formatName,s=a.formatOptions;if(o.formats[i]){var l=e;try{var u=n&&n.formatParams&&n.formatParams[n.interpolationkey]||{},c=u.locale||u.lng||n.locale||n.lng||r;l=o.formats[i](e,c,ij(ij(ij({},s),n),u))}catch(e){o.logger.warn(e)}return l}return o.logger.warn("there was no format function for ".concat(i)),e},e)}}]),e}();function iI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function iM(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?iI(Object(r),!0).forEach(function(t){(0,a2.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iI(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var iL=function(e){aQ(n,e);var t,r=(t=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,r=a1(n);return e=t?Reflect.construct(r,arguments,a1(this).constructor):r.apply(this,arguments),a0(this,e)});function n(e,t,o){var a,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,aY.A)(this,n),a=r.call(this),id&&ie.call(aJ(a)),a.backend=e,a.store=t,a.services=o,a.languageUtils=o.languageUtils,a.options=i,a.logger=a7.create("backendConnector"),a.waitingReads=[],a.maxParallelReads=i.maxParallelReads||10,a.readingCalls=0,a.maxRetries=i.maxRetries>=0?i.maxRetries:5,a.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,a.state={},a.queue=[],a.backend&&a.backend.init&&a.backend.init(o,i.backend,i),a}return(0,aq.A)(n,[{key:"queueLoad",value:function(e,t,r,n){var o=this,a={},i={},s={},l={};return e.forEach(function(e){var n=!0;t.forEach(function(t){var s="".concat(e,"|").concat(t);!r.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?void 0===i[s]&&(i[s]=!0):(o.state[s]=1,n=!1,void 0===i[s]&&(i[s]=!0),void 0===a[s]&&(a[s]=!0),void 0===l[t]&&(l[t]=!0)))}),n||(s[e]=!0)}),(Object.keys(a).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(a),pending:Object.keys(i),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),o=n[0],a=n[1];t&&this.emit("failedLoading",o,a,t),r&&this.store.addResourceBundle(o,a,r),this.state[e]=t?-1:2;var i={};this.queue.forEach(function(r){var n,s,l,u;n=r.loaded,(l=(s=io(n,[o],Object)).obj)[u=s.k]=l[u]||[],l[u].push(a),void 0!==r.pending[e]&&(delete r.pending[e],r.pendingCount--),t&&r.errors.push(t),0!==r.pendingCount||r.done||(Object.keys(r.loaded).forEach(function(e){i[e]||(i[e]={});var t=r.loaded[e];t.length&&t.forEach(function(t){void 0===i[e][t]&&(i[e][t]=!0)})}),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())}),this.emit("loaded",i),this.queue=this.queue.filter(function(e){return!e.done})}},{key:"read",value:function(e,t,r){var n=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;return e.length?this.readingCalls>=this.maxParallelReads?void this.waitingReads.push({lng:e,ns:t,fcName:r,tried:o,wait:a,callback:i}):(this.readingCalls++,this.backend[r](e,t,function(s,l){if(n.readingCalls--,n.waitingReads.length>0){var u=n.waitingReads.shift();n.read(u.lng,u.ns,u.fcName,u.tried,u.wait,u.callback)}s&&l&&o<n.maxRetries?setTimeout(function(){n.read.call(n,e,t,r,o+1,2*a,i)},a):i(s,l)})):i(null,{})}},{key:"prepareLoading",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var a=this.queueLoad(e,t,n,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach(function(e){r.loadOne(e)})}},{key:"load",value:function(e,t,r){this.prepareLoading(e,t,{},r)}},{key:"reload",value:function(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}},{key:"loadOne",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),o=n[0],a=n[1];this.read(o,a,"read",void 0,void 0,function(n,i){n&&t.logger.warn("".concat(r,"loading namespace ").concat(a," for language ").concat(o," failed"),n),!n&&i&&t.logger.log("".concat(r,"loaded namespace ").concat(a," for language ").concat(o),i),t.loaded(e,n,i)})}},{key:"saveMissing",value:function(e,t,r,n,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(r,'" as the namespace "').concat(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!!!"):null==r||""===r||(this.backend&&this.backend.create&&this.backend.create(e,t,r,n,null,iM(iM({},a),{},{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,r,n))}}]),n}(ie);function iF(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&0>e.supportedLngs.indexOf("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function iB(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function iU(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?iB(Object(r),!0).forEach(function(t){(0,a2.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iB(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function iV(){}var iW=function(e){aQ(n,e);var t,r=(t=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,r=a1(n);return e=t?Reflect.construct(r,arguments,a1(this).constructor):r.apply(this,arguments),a0(this,e)});function n(){var e,t,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;if((0,aY.A)(this,n),t=r.call(this),id&&ie.call(aJ(t)),t.options=iF(o),t.services={},t.logger=a7,t.modules={external:[]},Object.getOwnPropertyNames(Object.getPrototypeOf(e=aJ(t))).forEach(function(t){"function"==typeof e[t]&&(e[t]=e[t].bind(e))}),a&&!t.isInitialized&&!o.isClone){if(!t.options.initImmediate)return t.init(o,a),a0(t,aJ(t));setTimeout(function(){t.init(o,a)},0)}return t}return(0,aq.A)(n,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(r=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:0>t.ns.indexOf("translation")&&(t.defaultNS=t.ns[0]));var n={debug:!1,initImmediate:!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:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===(0,aZ.A)(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===(0,aZ.A)(e[2])||"object"===(0,aZ.A)(e[3])){var r=e[3]||e[2];Object.keys(r).forEach(function(e){t[e]=r[e]})}return t},interpolation:{escapeValue:!0,format:function(e,t,r,n){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}};function o(e){return e?"function"==typeof e?new e:e:null}if(this.options=iU(iU(iU({},n),this.options),iF(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=iU(iU({},n.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){this.modules.logger?a7.init(o(this.modules.logger),this.options):a7.init(null,this.options),this.modules.formatter?a=this.modules.formatter:"u">typeof Intl&&(a=i$);var a,i=new iD(this.options);this.store=new ig(this.options.resources,this.options);var s=this.services;s.logger=a7,s.resourceStore=this.store,s.languageUtils=i,s.pluralResolver=new iP(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),a&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(s.formatter=o(a),s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new iT(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new iL(o(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit.apply(e,[t].concat(n))}),this.modules.languageDetector&&(s.languageDetector=o(this.modules.languageDetector),s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=o(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new iE(this.services,this.options),this.translator.on("*",function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit.apply(e,[t].concat(n))}),this.modules.external.forEach(function(t){t.init&&t.init(e)})}if(this.format=this.options.interpolation.format,r||(r=iV),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&"dev"!==l[0]&&(this.options.lng=l[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(function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments),e}});var u=it(),c=function(){var t=function(t,n){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),u.resolve(n),r(t,n)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),u}},{key:"loadResources",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:iV,n=r,o="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return n();var a=[],i=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach(function(e){0>a.indexOf(e)&&a.push(e)})};o?i(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(e){return i(e)}),this.options.preload&&this.options.preload.forEach(function(e){return i(e)}),this.services.backendConnector.load(a,this.options.ns,function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),n(e)})}else n(null)}},{key:"reloadResources",value:function(e,t,r){var n=it();return e||(e=this.languages),t||(t=this.options.ns),r||(r=iV),this.services.backendConnector.reload(e,t,function(e){n.resolve(),r(e)}),n}},{key:"use",value:function(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&&iy.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var r=this.languages[t];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}},{key:"changeLanguage",value:function(e,t){var r=this;this.isLanguageChangingTo=e;var n=it();this.emit("languageChanging",e);var o=function(e){r.language=e,r.languages=r.services.languageUtils.toResolveHierarchy(e),r.resolvedLanguage=void 0,r.setResolvedLanguage(e)},a=function(e,a){a?(o(a),r.translator.changeLanguage(a),r.isLanguageChangingTo=void 0,r.emit("languageChanged",a),r.logger.log("languageChanged",a)):r.isLanguageChangingTo=void 0,n.resolve(function(){return r.t.apply(r,arguments)}),t&&t(e,function(){return r.t.apply(r,arguments)})},i=function(t){e||t||!r.services.languageDetector||(t=[]);var n="string"==typeof t?t:r.services.languageUtils.getBestMatchFromCodes(t);n&&(r.language||o(n),r.translator.language||r.translator.changeLanguage(n),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(n)),r.loadResources(n,function(e){a(e,n)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t,r){var n=this,o=function e(t,o){if("object"!==(0,aZ.A)(o)){for(var a,i=arguments.length,s=Array(i>2?i-2:0),l=2;l<i;l++)s[l-2]=arguments[l];a=n.options.overloadTranslationOptionHandler([t,o].concat(s))}else a=iU({},o);a.lng=a.lng||e.lng,a.lngs=a.lngs||e.lngs,a.ns=a.ns||e.ns,a.keyPrefix=a.keyPrefix||r||e.keyPrefix;var u=n.options.keySeparator||".",c=a.keyPrefix?"".concat(a.keyPrefix).concat(u).concat(t):t;return n.t(c,a)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=r,o}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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;var n=this.resolvedLanguage||this.languages[0],o=!!this.options&&this.options.fallbackLng,a=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;var i=function(e,r){var n=t.services.backendConnector.state["".concat(e,"|").concat(r)];return -1===n||2===n};if(r.precheck){var s=r.precheck(this,i);if(void 0!==s)return s}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(n,e)&&(!o||i(a,e)))}},{key:"loadNamespaces",value:function(e,t){var r=this,n=it();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach(function(e){0>r.options.ns.indexOf(e)&&r.options.ns.push(e)}),this.loadResources(function(e){n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var r=it();"string"==typeof e&&(e=[e]);var n=this.options.preload||[],o=e.filter(function(e){return 0>n.indexOf(e)});return o.length?(this.options.preload=n.concat(o),this.loadResources(function(e){r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),e)?["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(this.services.languageUtils.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr":"rtl"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:iV,o=iU(iU(iU({},this.options),t),{isClone:!0}),a=new n(o);return(void 0!==t.debug||void 0!==t.prefix)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(function(t){a[t]=e[t]}),a.services=iU({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new iE(a.services,a.options),a.translator.on("*",function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];a.emit.apply(a,[e].concat(r))}),a.init(o,r),a.translator.options=a.options,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(ie);(0,a2.A)(iW,"createInstance",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new iW(e,t)});var iH=iW.createInstance();iH.createInstance=iW.createInstance,iH.createInstance,iH.init,iH.loadResources,iH.reloadResources,iH.use,iH.changeLanguage,iH.getFixedT,iH.t,iH.exists,iH.setDefaultNamespace,iH.hasLoadedNamespace,iH.loadNamespaces,iH.loadLanguages;let iz=iH.default||iH;function iK(e,t,r,n){return iz.t(t,{ns:e,defaultValue:r,...n})}function iG(e,t,r){return aG[e]?iK("core",e,t??aG[e],r):(console.error(`O3 Core Translations does not provide key '${e}'. The key itself is being rendered as text.`),e)}function iZ(e,t){let r=window.getOpenmrsSpaBase().replace(/\/$/,""),n=iY(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:r,...t});return e.startsWith("//")?n:n.replace(/^\/\//,"/")}function iY(e,t){return Object.keys(t).reduce((e,r)=>e.split("${"+r+"}").join(t[r]),e)}function iq({to:e,templateParams:t}){let r=window.getOpenmrsSpaBase().replace(/\/$/,""),n=iZ(e,t).replace(window.location.origin,""),o=new URL(n,window.location.origin);if("http:"!=o.protocol&&"https:"!=o.protocol)throw console.error(`Received request to navigate to non-http URL: ${o.toString()}`),Error(iG("navigateNonHttp"));n.startsWith(r)?af(n):window.location.assign(n)}iz.on("initialized",function(){window.i18next.loadNamespaces(["core"])});let iJ="openmrs:history";function iX(e){let t=JSON.parse(sessionStorage.getItem(iJ)??"[]")||[];t.push(e),t.length>50&&(t=t.slice(-50)),sessionStorage.setItem(iJ,JSON.stringify(t))}function iQ(){0===JSON.parse(sessionStorage.getItem(iJ)??"[]").length&&document.referrer&&iX(document.referrer),window.addEventListener("single-spa:routing-event",e=>{let t=i0();e.detail.originalEvent?.singleSpaTrigger=="replaceState"?(t[t.length-1]=window.location.href,sessionStorage.setItem(iJ,JSON.stringify(t))):!e.detail.originalEvent?.singleSpa&&t.includes(window.location.href)?i1({toUrl:window.location.href}):t[t.length-1]!==window.location.href&&iX(window.location.href)})}function i0(){return JSON.parse(sessionStorage.getItem(iJ)??"[]")}function i1({toUrl:e}){let t=i0(),r=t.lastIndexOf(e);if(-1!=r){let e=t.slice(0,r+1);iq({to:t[r]}),sessionStorage.setItem(iJ,JSON.stringify(e))}else throw Error(`URL ${e} not found in history; cannot go back to it.`)}function i2(){sessionStorage.removeItem(iJ)}let i4="${openmrsSpaBase}/login",i3={redirectAuthFailure:{enabled:{_type:no.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:no.String,_default:i4,_validators:[op.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:no.Array,_default:[401],_elements:{_type:no.Number,_validators:[op.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:no.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:no.Boolean,_default:!0,_description:"Whether openmrsFetch should support redirects returned from the backend"}};function i6(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}let i5="/ws/rest/v1",i9="/ws/fhir2/R4",i8=`${i5}/session`;function i7(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)}function se(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 r=i7(e);t.headers||(t.headers={}),eh(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 n=!1;try{let e=new URL(r,window.location.href),t=new URL(i7(i5),window.location.href),o=e.pathname.replace(/\/{2,}/g,"/"),a=t.pathname.replace(/\/{2,}/g,"/");n=e.origin===t.origin&&(o===a||o.startsWith(`${a}/`))}catch{}if(n){let e=!1;for(let[r,n]of Object.entries(t.headers))"disable-www-authenticate"===r.toLowerCase()&&(void 0===n?delete t.headers[r]:e=!0);e||(t.headers["Disable-WWW-Authenticate"]="true")}if(e.startsWith(i9)){let e=new URL(r,window.location.toString());e.searchParams.has("_summary")||(e.searchParams.set("_summary","data"),r=e.toString())}let o=Error();return window.fetch(r,t).then(async e=>{let{redirectAuthFailure:n,followRedirects:a}=await nq("@openmrs/esm-api");if(e.ok){let t=e.headers.get("location");return(a&&t&&(r===i7(i8)||204===e.status)&&iq({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(r===i7(i8)&&403===e.status||n.enabled&&n.errors.includes(e.status))&&(i2(),iq({to:n.url||e.headers.get("location")||i4}),!0!==t.rejectAuthFailure)?n.resolvePromise?Promise.resolve():new Promise(()=>{}):e.clone().text().then(t=>{let n=t;try{n=JSON.parse(t)}catch(e){}throw new st(r,e,n,o)},()=>{throw new st(r,e,null,o)})})}class st extends Error{constructor(e,t,r,n){super(),i6(this,"response",void 0),i6(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`,n.message=this.message,this.responseBody=r,this.response=t,this.stack=`Stacktrace for outgoing request:
|
|
11
|
+
If you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. Received ${JSON.stringify(l)}`)}}function n4(e,t){return n3(t.map(({[e]:t})=>t).filter(e=>!!e))}function n3(e){return e.reduce((e,t)=>tU(e,t,nN),{})}function n6(e,t,r=""){for(let n of Object.keys(t)){let o=t[n],a=r+"."+n,i=e[n];if(!e.hasOwnProperty(n)){("extensionSlots"!==n||""===r)&&or(a,`Unknown config key '${a}' provided. Ignoring.`);continue}(function e(t,r,n){n9(n,t._type,r),ot(r)?t._type===no.Object?function(t,r,n){if(t._elements)for(let o of Object.keys(r)){let a=r[o];e(t._elements,a,`${n}.${o}`)}}(t,r,n):t.hasOwnProperty("_default")||t.hasOwnProperty("_type")||n6(t,r,n):t._type===no.Array&&function(t,r,n){if(n9(n,no.Array,r)){if(oe(t._elements))for(let o=0;o<r.length;o++)e(t._elements,r[o],`${n}[${o}]`);for(let e=0;e<r.length;e++)n9(`${n}[${e}]`,t._elements?._type,r[e])}}(t,r,n)})(i,o,a)}}function n5(e,t,r=""){if(e){if(t!==e._default&&n8(r,e._validators,t),ot(t))for(let n of Object.keys(t)){let o=t[n],a=r+"."+n,i=e[n];e._type===no.Object&&e._elements?n5(e._elements,o,a):n5(i,o,a)}else if(Array.isArray(t)&&e._elements)for(let n=0;n<t.length;n++)n5(e._elements,t[n],`${r}[${n}]`)}}function n9(e,t,r){return!t||n8(e,[{Array:ni,Boolean:ns,ConceptUuid:nd,Number:nl,Object:nc,String:nu,UUID:nd,PersonAttributeTypeUuid:nd,PatientIdentifierTypeUuid:nd}[t]],r)}function n8(e,t,r){let n=!0;if(t)try{for(let o of t){let t=o(r);if("string"==typeof t){let o="object"==typeof r?`Invalid configuration for ${e}: ${t}`:`Invalid configuration value ${r} for ${e}: ${t}`;or(e,o),n=!1}}}catch(t){console.error(`Skipping invalid validator at "${e}". Encountered error
|
|
12
|
+
${t}`)}return n}let n7=(e,t)=>{let r=structuredClone(t);if(!e)return r;for(let t of Object.keys(e)){let n=r[t],o=e[t];if(o&&(o.hasOwnProperty("_type")||o.hasOwnProperty("_default"))){r.hasOwnProperty(t)||(r[t]=o._default);let e=o._elements;if(n&&oe(e)){if(o._type===no.Array&&Array.isArray(n)){let o=n.map(t=>n7(e,t));r[t]=o}else if(o._type===no.Object)for(let t of Object.keys(n))n[t]=n7(e,n[t])}}else if(ot(o)){let e=n??{};ot(e)&&(r[t]=n7(o,e))}}return r};function oe(e){return!!e&&Object.keys(e).filter(e=>!["_default","_validators"].includes(e)).length>0}function ot(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}function or(e,t){let r=`${e}:::${t}`;n$.has(r)||(console.error(t),n$.add(r))}function on(e){e?n$.forEach(t=>{t.startsWith(e)&&n$.delete(t)}):n$.clear()}function oo(){nA.forEach(e=>e()),nA.length=0,nB.clear(),nX.clear(),n0.clear(),nQ.clear(),nI=null,nM=new WeakMap,nL()}let oa={"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:no.Object,_default:{},_validators:[na(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(", ")}.`})]}},oi={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:no.Array,_default:[]},expression:{_description:"The expression that determines whether the extension is displayed",_type:no.String,_default:void 0}},...oa},os=(e,t)=>na(r=>e<=r&&r<=t,`must be between ${e} and ${t}`),ol=e=>{let t=e.concat(["openmrsBase","openmrsSpaBase"]);return na(e=>{if(!e||"string"!=typeof e)return!1;let r=/\${(.*?)}/g,n=r.exec(e);for(;n;){if(!t.includes(n[1]))return!1;n=r.exec(e)}return!0},"Should be a URL or path. The allowed template parameters are "+t.map(e=>"${"+e+"}").join(", "))},ou=ol([]),oc=e=>na(t=>e.includes(t),`Must be one of the following: '${e.join("', '")}'.`),od={inRange:os,isUrl:ou,isUrlWithTemplateParameters:ol,oneOf:oc};var of=r(8067);let op=B("breadcrumbs",[]);function om(e){return oh([e])}function oh(e){let t=[...og(),...e.map(e=>({matcher:e.matcher instanceof RegExp?e.matcher:"string"==typeof e.matcher?(0,of.pathToRegexp)(e.matcher).regexp:(0,of.pathToRegexp)(e.path).regexp,settings:e}))];op.setState(t,!0)}function og(){return op.getState()}function oy(e,t){if(t)return function(e,t){let[r]=e.filter(e=>e.matcher.test(t));return r}(e,t)||function(e,t){let r=t.split("/");for(;r.length>1;){r.pop();let t=oy(e,r.join("/"));if(t)return t}}(e,t)}function ov(e,t){if(e.length>0){let r=oy(e,t);if(r){let t=[r],n=oy(e,r.settings.parent);for(;void 0!==n;)t.push(n),n=oy(e,n.settings.parent);return t.reverse()}}return[]}function ob(e){return ov(og(),e)}var ow=Object.freeze({__proto__:null,get start(){return aH},get ensureJQuerySupport(){return ab},get setBootstrapMaxTime(){return ae},get setMountMaxTime(){return at},get setUnmountMaxTime(){return ar},get setUnloadMaxTime(){return an},get registerApplication(){return aR},get unregisterApplication(){return aN},get getMountedApps(){return aC},get getAppStatus(){return aP},get unloadApplication(){return aj},get checkActivityFunctions(){return aT},get getAppNames(){return ak},get pathToActiveWhen(){return aI},get navigateToUrl(){return ac},get patchHistoryApi(){return ag},get triggerAppChange(){return aB},get addErrorHandler(){return oS},get removeErrorHandler(){return oC},get mountRootParcel(){return o6},get NOT_LOADED(){return oO},get LOADING_SOURCE_CODE(){return oR},get NOT_BOOTSTRAPPED(){return oT},get BOOTSTRAPPING(){return oN},get NOT_MOUNTED(){return oj},get MOUNTING(){return oA},get UPDATING(){return oI},get LOAD_ERROR(){return oF},get MOUNTED(){return o$},get UNLOADING(){return oL},get UNMOUNTING(){return oM},get SKIP_BECAUSE_BROKEN(){return oB}}),oE=("u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{}).CustomEvent,ox=!function(){try{var e=new oE("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 r=document.createEvent("CustomEvent");return t?r.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):r.initCustomEvent(e,!1,!1,void 0),r}:function(e,t){var r=document.createEventObject();return r.type=e,t?(r.bubbles=!!t.bubbles,r.cancelable=!!t.cancelable,r.detail=t.detail):(r.bubbles=!1,r.cancelable=!1,r.detail=void 0),r}:oE;let oD=[];function o_(e,t,r){let n=oP(e,t,r);oD.length?oD.forEach(e=>e(n)):setTimeout(()=>{throw n})}function oS(e){if("function"!=typeof e)throw Error(ok(28,!1));oD.push(e)}function oC(e){if("function"!=typeof e)throw Error(ok(29,!1));let t=!1;return oD=oD.filter(r=>{let n=r===e;return t=t||n,!n}),t}function ok(e,t,...r){return`single-spa minified message #${e}: ${t?t+" ":""}See https://single-spa.js.org/error/?code=${e}${r.length?`&arg=${r.join("&arg=")}`:""}`}function oP(e,t,r){let n,o=`${oz(t)} '${oW(t)}' died in status ${t.status}: `;if(e instanceof Error){try{e.message=o+e.message}catch(e){}n=e}else{console.warn(ok(30,!1,t.status,oW(t)));try{n=Error(o+JSON.stringify(e))}catch(t){n=e}}return n.appOrParcelName=oW(t),t.status=r,n}let oO="NOT_LOADED",oR="LOADING_SOURCE_CODE",oT="NOT_BOOTSTRAPPED",oN="BOOTSTRAPPING",oj="NOT_MOUNTED",oA="MOUNTING",o$="MOUNTED",oI="UPDATING",oM="UNMOUNTING",oL="UNLOADING",oF="LOAD_ERROR",oB="SKIP_BECAUSE_BROKEN";function oU(e){return e.status===o$}function oV(e){try{return e.activeWhen(window.location)}catch(t){return o_(t,e,oB),!1}}function oW(e){return e.name}function oH(e){return!!e.unmountThisParcel}function oz(e){return oH(e)?"parcel":"application"}function oK(){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 oG(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return e[r];return null}function oZ(e){return e&&("function"==typeof e||Array.isArray(e)&&!oG(e,e=>"function"!=typeof e))}function oY(e,t){let r=e[t]||[];0===(r=Array.isArray(r)?r:[r]).length&&(r=[()=>Promise.resolve()]);let n=oz(e),o=oW(e);return function(e){return r.reduce((r,a,i)=>r.then(()=>{let r=a(e);return oq(r)?r:Promise.reject(ok(15,!1,n,o,t,i))}),Promise.resolve())}}function oq(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}let oJ=[];function oX(e,t){return Promise.resolve().then(()=>e.status!==oT?e:(e.status=oN,e.bootstrap?ao(e,"bootstrap").then(r).catch(r=>{if(t)throw oP(r,e,oB);return o_(r,e,oB),e}):Promise.resolve().then(r)));function r(){return e.status=oj,e}}function oQ(e,t){return Promise.resolve().then(()=>{if(e.status!==o$)return e;return e.status=oM,Promise.all(Object.keys(e.parcels).map(t=>e.parcels[t].unmountThisParcel())).then(r,n=>r().then(()=>{let r=Error(n.message);if(t)throw oP(r,e,oB);o_(r,e,oB)})).then(()=>e);function r(){return ao(e,"unmount").then(()=>{e.status=oj},r=>{if(t)throw oP(r,e,oB);o_(r,e,oB)})}})}let o0=!1,o1=!1;function o2(e,t){return Promise.resolve().then(()=>e.status!==oj?e:(o0||(window.dispatchEvent(new ox("single-spa:before-first-mount")),o0=!0),e.status=oA,ao(e,"mount").then(()=>(e.status=o$,o1||(window.dispatchEvent(new ox("single-spa:first-mount")),o1=!0),e)).catch(r=>{return e.status=o$,oQ(e,!0).then(n,n);function n(){if(t)throw oP(r,e,oB);return o_(r,e,oB),e}})))}let o4=0,o3={parcels:{}};function o6(){return o5.apply(o3,arguments)}function o5(e,t){let r,n,o,a=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(ok(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(ok(3,!1,typeof e.name));let i=o4++,s=e.name||`parcel-${i}`;if("object"!=typeof t)throw Error(ok(4,!1,s,typeof t));if(!t.domElement)throw Error(ok(5,!1,s));let l="function"==typeof e,u=l?e:()=>Promise.resolve(e),c={id:i,parcels:{},status:l?oR:oT,customProps:t,parentName:oW(a),unmountThisParcel:()=>p.then(()=>{if(c.status!==o$)throw Error(ok(6,!1,s,c.status));return oQ(c,!0)}).then(e=>(c.parentName&&delete a.parcels[c.id],e)).then(e=>(n(e),e)).catch(e=>{throw c.status=oB,o(e),e})};a.parcels[i]=c;let d=u();if(!d||"function"!=typeof d.then)throw Error(ok(7,!1));let f=(d=d.then(e=>{if(!e)throw Error(ok(8,!1));if(s=e.name||`parcel-${i}`,Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!oZ(e.bootstrap))throw Error(ok(9,!1,s));if(!oZ(e.mount))throw Error(ok(10,!1,s));if(!oZ(e.unmount))throw Error(ok(11,!1,s));if(e.update&&!oZ(e.update))throw Error(ok(12,!1,s));let t=oY(e,"bootstrap"),n=oY(e,"mount"),o=oY(e,"unmount");c.status=oT,c.name=s,c.bootstrap=t,c.mount=n,c.unmount=o,c.timeouts=aa(e.timeouts),e.update&&(c.update=oY(e,"update"),r.update=function(e){return c.customProps=e,o9(Promise.resolve().then(()=>{if(c.status!==o$)throw Error(ok(32,!1,oW(c)));return c.status=oI,ao(c,"update").then(()=>(c.status=o$,c)).catch(e=>{throw oP(e,c,oB)})}))})})).then(()=>oX(c,!0)),p=f.then(()=>o2(c,!0)),m=new Promise((e,t)=>{n=e,o=t});return r={mount:()=>o9(Promise.resolve().then(()=>{if(c.status!==oj)throw Error(ok(13,!1,s,c.status));return a.parcels[i]=c,o2(c)})),unmount:()=>o9(c.unmountThisParcel()),getStatus:()=>c.status,loadPromise:o9(d),bootstrapPromise:o9(f),mountPromise:o9(p),unmountPromise:o9(m)}}function o9(e){return e.then(()=>null)}function o8(e){let t=oW(e),r="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof r||null===r||Array.isArray(r))&&(r={},console.warn(ok(40,!1),t,r));let n=oK({},r,{name:t,mountParcel:o5.bind(e),singleSpa:ow});return oH(e)&&(n.unmountSelf=e.unmountThisParcel),n}let o7={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 ae(e,t,r){if("number"!=typeof e||e<=0)throw Error(ok(16,!1));o7.bootstrap={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function at(e,t,r){if("number"!=typeof e||e<=0)throw Error(ok(17,!1));o7.mount={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function ar(e,t,r){if("number"!=typeof e||e<=0)throw Error(ok(18,!1));o7.unmount={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function an(e,t,r){if("number"!=typeof e||e<=0)throw Error(ok(19,!1));o7.unload={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function ao(e,t){let r=e.timeouts[t],n=r.warningMillis,o=oz(e);return new Promise((a,i)=>{let s=!1,l=!1;e[t](o8(e)).then(e=>{s=!0,a(e)}).catch(e=>{s=!0,i(e)}),setTimeout(()=>c(1),n),setTimeout(()=>c(!0),r.millis);let u=ok(31,!1,t,o,oW(e),r.millis);function c(e){s||(!0===e?(l=!0,r.dieOnTimeout?i(Error(u)):console.error(u)):!l&&(console.warn(u),e*n+n<r.millis&&setTimeout(()=>c(e+1),n)))}})}function aa(e){let t={};for(let r in o7)t[r]=oK({},o7[r],e&&e[r]||{});return t}function ai(e){return Promise.resolve().then(()=>{let t,r;return e.loadPromise?e.loadPromise:e.status!==oO&&e.status!==oF?e:(e.status=oR,e.loadPromise=Promise.resolve().then(()=>{let n=e.loadApp(o8(e));if(!oq(n))throw r=!0,Error(ok(33,!1,oW(e)));return n.then(r=>{let n;e.loadErrorTime=null,"object"!=typeof(t=r)&&(n=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!oZ(t.bootstrap)&&(n=35),oZ(t.mount)||(n=36),oZ(t.unmount)||(n=37);let o=oz(t);if(n){let r;try{r=JSON.stringify(t)}catch(e){}return console.error(ok(n,!1,o,oW(e),r),t),o_(void 0,e,oB),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=oK({},e.devtools.overlays,t.devtools.overlays)),e.status=oT,e.bootstrap=oY(t,"bootstrap"),e.mount=oY(t,"mount"),e.unmount=oY(t,"unmount"),e.unload=oY(t,"unload"),e.timeouts=aa(t.timeouts),delete e.loadPromise,e})}).catch(t=>{let n;return delete e.loadPromise,r?n=oB:(n=oF,e.loadErrorTime=(new Date).getTime()),o_(t,e,n),e}))})}let as="u">typeof window,al={hashchange:[],popstate:[]},au=["hashchange","popstate"];function ac(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(ok(14,!1));t=e.currentTarget.href,e.preventDefault()}let r=ay(window.location.href),n=ay(t);0===t.indexOf("#")?window.location.hash=n.hash:r.host!==n.host&&n.host?window.location.href=t:n.pathname===r.pathname&&n.search===r.search?window.location.hash=n.hash:window.history.pushState(null,null,t)}function ad(e){if(e){let t=e[0].type;au.indexOf(t)>=0&&al[t].forEach(t=>{try{t.apply(this,e)}catch(e){setTimeout(()=>{throw e})}})}}function af(){aU([],arguments)}function ap(e,t){return function(){let r=window.location.href,n=e.apply(this,arguments),a=window.location.href;return o&&r===a||window.dispatchEvent(function(e,t){let r;try{r=new PopStateEvent("popstate",{state:e})}catch(t){(r=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return r.singleSpa=!0,r.singleSpaTrigger=t,r}(window.history.state,t)),n}}let am=null,ah=!1;function ag(e){if(ah)throw Error(ok(43,!1));o=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,ah=!0,am=window.history.replaceState,window.addEventListener("hashchange",af),window.addEventListener("popstate",af);let t=window.addEventListener,r=window.removeEventListener;window.addEventListener=function(e,r){if(!("function"==typeof r&&au.indexOf(e)>=0)||oG(al[e],e=>e===r))return t.apply(this,arguments);al[e].push(r)},window.removeEventListener=function(e,t){return"function"==typeof t&&au.indexOf(e)>=0&&(al[e]=al[e].filter(e=>e!==t)),r.apply(this,arguments)},window.history.pushState=ap(window.history.pushState,"pushState"),window.history.replaceState=ap(am,"replaceState")}function ay(e){let t=document.createElement("a");return t.href=e,t}as&&(window.singleSpaNavigate?console.warn(ok(41,!1)):window.singleSpaNavigate=ac);let av=!1;function ab(e=window.jQuery){if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!av){let t=e.fn.on,r=e.fn.off;e.fn.on=function(e,r){return aw.call(this,t,window.addEventListener,e,r,arguments)},e.fn.off=function(e,t){return aw.call(this,r,window.removeEventListener,e,t,arguments)},av=!0}}function aw(e,t,r,n,o){return"string"!=typeof r?e.apply(this,o):(r.split(/\s+/).forEach(e=>{au.indexOf(e)>=0&&(t(e,n),r=r.replace(e,""))}),""===r.trim()?this:e.apply(this,o))}let aE={};function ax(e){return Promise.resolve().then(()=>{let t=aE[oW(e)];if(!t)return e;if(e.status===oO)return aD(e,t),e;if(e.status===oL)return t.promise.then(()=>e);if(e.status!==oj&&e.status!==oF)return e;let r=e.status===oF?Promise.resolve():ao(e,"unload");return e.status=oL,r.then(()=>(aD(e,t),e)).catch(r=>(delete aE[oW(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,o_(r,e,oB),t.reject(r),e))})}function aD(e,t){delete aE[oW(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=oO,t.resolve()}function a_(e,t,r,n){aE[oW(e)]={app:e,resolve:r,reject:n},Object.defineProperty(aE[oW(e)],"promise",{get:t})}let aS=[];function aC(){return aS.filter(oU).map(oW)}function ak(){return aS.map(oW)}function aP(e){let t=oG(aS,t=>oW(t)===e);return t?t.status:null}let aO=!1;function aR(e,t,r,n){var o,a;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(ok(39,!1));let t=["name","app","activeWhen","customProps"],r=Object.keys(e).reduce((e,r)=>t.indexOf(r)>=0?e:e.concat(r),[]);if(0!==r.length)throw Error(ok(38,!1,t.join(", "),r.join(", ")));if("string"!=typeof e.name||0===e.name.length||"object"!=typeof e.app&&"function"!=typeof e.app)throw Error(ok(20,!1));let n=e=>"string"==typeof e||"function"==typeof e;if(!(n(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(n)))throw Error(ok(24,!1));if(!a$(e.customProps))throw Error(ok(22,!1))}(e),i.name=e.name,i.loadApp=e.app,i.activeWhen=e.activeWhen,i.customProps=e.customProps):(function(e,t,r,n){if("string"!=typeof e||0===e.length)throw Error(ok(20,!1));if(!t)throw Error(ok(23,!1));if("function"!=typeof r)throw Error(ok(24,!1));if(!a$(n))throw Error(ok(22,!1))}(e,t,r,n),i.name=e,i.loadApp=t,i.activeWhen=r,i.customProps=n),i.loadApp="function"!=typeof(o=i.loadApp)?()=>Promise.resolve(o):o,i.customProps=i.customProps||{},s=(s=Array.isArray(a=i.activeWhen)?a:[a]).map(e=>"function"==typeof e?e:aI(e)),i.activeWhen=e=>s.some(t=>t(e)),i);if(aW||aO||(aO=!0,setTimeout(()=>{aW||console.warn(ok(1,!1))},5e3)),-1!==ak().indexOf(l.name))throw Error(ok(21,!1,l.name));aS.push(oK({loadErrorTime:null,status:oO,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},l)),as&&(ab(),aU())}function aT(e=window.location){return aS.filter(t=>t.activeWhen(e)).map(oW)}function aN(e){if(0===aS.filter(t=>oW(t)===e).length)throw Error(ok(25,!1,e));return(as?aj(e,{waitForUnmount:!1}):Promise.resolve()).then(()=>{let t=aS.map(oW).indexOf(e);aS.splice(t,1)})}function aj(e,t={waitForUnmount:!1}){if("string"!=typeof e)throw Error(ok(26,!1));let r=oG(aS,t=>oW(t)===e);if(!r)throw Error(ok(27,!1,e));let n=aE[oW(r)];if(t&&t.waitForUnmount){if(n)return n.promise;{let e=new Promise((t,n)=>{a_(r,()=>e,t,n)});return e}}{let e;return n?(e=n.promise,aA(r,n.resolve,n.reject)):e=new Promise((t,n)=>{a_(r,()=>e,t,n),aA(r,t,n)}),e}}function aA(e,t,r){Promise.resolve().then(()=>{if(oG(aT(),t=>t===oW(e)))return aB()}).then(()=>oQ(e).then(ax).then(()=>{t(),setTimeout(()=>{aU()})})).catch(r)}function a$(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)}function aI(e,t){let r=function(e,t){let r=0,n=!1,o="^";"/"!==e[0]&&(e="/"+e);for(let t=0;t<e.length;t++){let r=e[t],o=n&&"/"===r;(!n&&":"===r||o)&&a(t)}return a(e.length),RegExp(o,"i");function a(a){let i=e.slice(r,a).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=n?"[^/]+/?":i,a===e.length)if(n)t&&(o+="$");else{let e=t?"":".*";o="/"===o.charAt(o.length-1)?`${o}${e}$`:`${o}(/${e})?(#.*)?$`}n=!n,r=a}}(e,t);return e=>{let t=e.origin;t||(t=`${e.protocol}//${e.host}`);let n=e.href.replace(t,"").replace(e.search,"").split("?")[0];return r.test(n)}}let aM=!1,aL=[],aF=as&&window.location.href;function aB(){return aU()}function aU(e=[],t,r=!1){let n,o,a,i,s;if(aM)return new Promise((e,r)=>{aL.push({resolve:e,reject:r,eventArguments:t})});let{appsToUnload:l,appsToUnmount:u,appsToLoad:c,appsToMount:d}=(n=[],o=[],a=[],i=[],s=(new Date).getTime(),aS.forEach(e=>{let t=e.status!==oB&&oV(e);switch(e.status){case oF:t&&s-e.loadErrorTime>=200&&a.push(e);break;case oO:case oR:t&&a.push(e);break;case oT:case oj:!t&&aE[oW(e)]?n.push(e):t&&i.push(e);break;case o$:t||o.push(e)}}),{appsToUnload:n,appsToUnmount:o,appsToLoad:a,appsToMount:i}),f,p=[],m=aF,h=aF=window.location.href;return aW?(aM=!0,f=l.concat(c,u,d),Promise.resolve().then(()=>(w(0===f.length?"before-no-app-change":"before-app-change",b(!0)),w("before-routing-event",b(!0,{cancelNavigation:g})),Promise.all(p).then(r=>{if(r.some(e=>e))return am.call(window.history,history.state,"",m.substring(location.origin.length)),aF=location.href,aM=!1,aU(e,t,!0);let n=l.map(ax),o=Promise.all(u.map(oQ).map(e=>e.then(ax)).concat(n));o.then(()=>{w("before-mount-routing-event",b(!0))},e=>{throw e});let a=c.map(e=>ai(e).then(e=>aV(e,o))),i=d.filter(e=>0>c.indexOf(e)).map(e=>aV(e,o));return o.catch(e=>{throw v(),e}).then(()=>(v(),Promise.all(a.concat(i)).catch(t=>{throw e.forEach(e=>e.reject(t)),t}).then(y).then(()=>{},e=>{throw e})))})))):(f=c,Promise.resolve().then(()=>Promise.all(c.map(ai)).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(ok(42,!1))),console.warn(e),!1)))}function y(){let t=aC();e.forEach(e=>e.resolve(t));try{w(0===f.length?"no-app-change":"app-change",b()),w("routing-event",b())}catch(e){setTimeout(()=>{throw e})}if(aM=!1,aL.length>0){let e=aL;aL=[],aU(e)}return t}function v(){r||(e.forEach(e=>{ad(e.eventArguments)}),ad(t))}function b(e=!1,r){let n={},o={[o$]:[],[oj]:[],[oO]:[],[oB]:[]};e?(c.concat(d).forEach((e,t)=>{i(e,o$)}),l.forEach(e=>{i(e,oO)}),u.forEach(e=>{i(e,oj)})):f.forEach(e=>{i(e)});let a={detail:{newAppStatuses:n,appsByNewStatus:o,totalAppChanges:f.length,originalEvent:null==t?void 0:t[0],oldUrl:m,newUrl:h}};return r&&oK(a.detail,r),a;function i(e,t){let r=oW(e);t=t||aP(r),n[r]=t,(o[t]=o[t]||[]).push(r)}}function w(e,t){r||window.dispatchEvent(new ox(`single-spa:${e}`,t))}}function aV(e,t){return oV(e)?oX(e).then(e=>t.then(()=>oV(e)?o2(e):e)):t.then(()=>e)}let aW=!1;function aH(e){aW=!0,as&&(ag(e),aU())}as&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods={getRawAppData:function(){return[...aS]},reroute:aU,NOT_LOADED:oO,toLoadPromise:ai,toBootstrapPromise:oX,unregisterApplication:aN,getProfilerData:function(){return oJ}});let az={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"};var aK=r(2284),aG=r(3029),aZ=r(2901);function aY(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var aq=r(3662);function aJ(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,aq.A)(e,t)}function aX(e,t){if(t&&("object"==(0,aK.A)(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return aY(e)}function aQ(e){return(aQ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a0=r(4467),a1=r(6369),a2=r(3612),a4=r(6562);function a3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function a6(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a3(Object(r),!0).forEach(function(t){(0,a0.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a3(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var a5={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},a9=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,aG.A)(this,e),this.init(t,r)}return(0,aZ.A)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||a5,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,r,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(r).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,a6(a6({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}}]),e}()),a8=function(){function e(){(0,aG.A)(this,e),this.observers={}}return(0,aZ.A)(e,[{key:"on",value:function(e,t){var r=this;return e.split(" ").forEach(function(e){r.observers[e]=r.observers[e]||[],r.observers[e].push(t)}),this}},{key:"off",value:function(e,t){if(this.observers[e]){if(!t)return void delete this.observers[e];this.observers[e]=this.observers[e].filter(function(e){return e!==t})}}},{key:"emit",value:function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];this.observers[e]&&[].concat(this.observers[e]).forEach(function(e){e.apply(void 0,r)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(function(t){t.apply(t,[e].concat(r))})}}]),e}();function a7(){var e,t,r=new Promise(function(r,n){e=r,t=n});return r.resolve=e,r.reject=t,r}function ie(e){return null==e?"":""+e}function it(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var a="string"!=typeof t?[].concat(t):t.split(".");a.length>1;){if(o())return{};var i=n(a.shift());!e[i]&&r&&(e[i]=new r),e=Object.prototype.hasOwnProperty.call(e,i)?e[i]:{}}return o()?{}:{obj:e,k:n(a.shift())}}function ir(e,t,r){var n=it(e,t,Object);n.obj[n.k]=r}function io(e,t){var r=it(e,t),n=r.obj,o=r.k;if(n)return n[o]}function ia(e,t,r){var n=io(e,r);return void 0!==n?n:io(t,r)}function ii(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var is={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function il(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,function(e){return is[e]}):e}var iu="u">typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,ic=[" ",",","?","!",";"];function id(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ip(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?id(Object(r),!0).forEach(function(t){(0,a0.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):id(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var im=function(e){aJ(n,e);var t,r=(t=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,r=aQ(n);return e=t?Reflect.construct(r,arguments,aQ(this).constructor):r.apply(this,arguments),aX(this,e)});function n(e){var t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return(0,aG.A)(this,n),t=r.call(this),iu&&a8.call(aY(t)),t.data=e||{},t.options=o,void 0===t.options.keySeparator&&(t.options.keySeparator="."),void 0===t.options.ignoreJSONStructure&&(t.options.ignoreJSONStructure=!0),t}return(0,aZ.A)(n,[{key:"addNamespaces",value:function(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,a=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure,i=[e,t];r&&"string"!=typeof r&&(i=i.concat(r)),r&&"string"==typeof r&&(i=i.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(i=e.split("."));var s=io(this.data,i);return s||!a||"string"!=typeof r?s:function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(t){if(t[r])return t[r];for(var o=r.split(n),a=t,i=0;i<o.length;++i){if(!a||"string"==typeof a[o[i]]&&i+1<o.length)return;if(void 0===a[o[i]]){for(var s=2,l=o.slice(i,i+s).join(n),u=a[l];void 0===u&&o.length>i+s;)s++,u=a[l=o.slice(i,i+s).join(n)];if(void 0===u)return;if(null===u)return null;if(r.endsWith(l)){if("string"==typeof u)return u;if(l&&"string"==typeof u[l])return u[l]}var c=o.slice(i+s).join(n);if(c)return e(u,c,n);return}a=a[o[i]]}return a}}(this.data&&this.data[e]&&this.data[e][t],r,o)}},{key:"addResource",value:function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},a=this.options.keySeparator;void 0===a&&(a=".");var i=[e,t];r&&(i=i.concat(a?r.split(a):r)),e.indexOf(".")>-1&&(i=e.split("."),n=t,t=i[1]),this.addNamespaces(t),ir(this.data,i,n),o.silent||this.emit("added",e,t,r,n)}},{key:"addResources",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in r)("string"==typeof r[o]||"[object Array]"===Object.prototype.toString.apply(r[o]))&&this.addResource(e,t,o,r[o],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},i=[e,t];e.indexOf(".")>-1&&(i=e.split("."),n=r,r=t,t=i[1]),this.addNamespaces(t);var s=io(this.data,i)||{};n?function e(t,r,n){for(var o in r)"__proto__"!==o&&"constructor"!==o&&(o in t?"string"==typeof t[o]||t[o]instanceof String||"string"==typeof r[o]||r[o]instanceof String?n&&(t[o]=r[o]):e(t[o],r[o],n):t[o]=r[o]);return t}(s,r,o):s=ip(ip({},s),r),ir(this.data,i,s),a.silent||this.emit("added",e,t,r)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return(t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI)?ip(ip({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(function(e){return t[e]&&Object.keys(t[e]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(a8),ih={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,o){var a=this;return e.forEach(function(e){a.processors[e]&&(t=a.processors[e].process(t,r,n,o))}),t}};function ig(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function iy(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ig(Object(r),!0).forEach(function(t){(0,a0.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ig(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var iv={},ib=function(e){aJ(n,e);var t,r=(t=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,r=aQ(n);return e=t?Reflect.construct(r,arguments,aQ(this).constructor):r.apply(this,arguments),aX(this,e)});function n(e){var t,o,a,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,aG.A)(this,n),a=r.call(this),iu&&a8.call(aY(a)),t=["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],o=aY(a),t.forEach(function(t){e[t]&&(o[t]=e[t])}),a.options=i,void 0===a.options.keySeparator&&(a.options.keySeparator="."),a.logger=a9.create("translator"),a}return(0,aZ.A)(n,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var r=this.resolve(e,t);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(e,t){var r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],a=r&&e.indexOf(r)>-1,i=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!function(e,t,r){t=t||"",r=r||"";var n=ic.filter(function(e){return 0>t.indexOf(e)&&0>r.indexOf(e)});if(0===n.length)return!0;var o=new RegExp("(".concat(n.map(function(e){return"?"===e?"\\?":e}).join("|"),")")),a=!o.test(e);if(!a){var i=e.indexOf(r);i>0&&!o.test(e.substring(0,i))&&(a=!0)}return a}(e,r,n);if(a&&!i){var s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:o};var l=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(l[0])>-1)&&(o=l.shift()),e=l.join(n)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,t,r){var o=this;if("object"!==(0,aK.A)(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var a=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,s=this.extractFromKey(e[e.length-1],t),l=s.key,u=s.namespaces,c=u[u.length-1],d=t.lng||this.language,f=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(f){var p=t.nsSeparator||this.options.nsSeparator;return a?(m.res="".concat(c).concat(p).concat(l),m):"".concat(c).concat(p).concat(l)}return a?(m.res=l,m):l}var m=this.resolve(e,t),h=m&&m.res,g=m&&m.usedKey||l,y=m&&m.exactUsedKey||l,v=Object.prototype.toString.apply(h),b=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,E="string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h;if(w&&h&&E&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(v)&&("string"!=typeof b||"[object Array]"!==v)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var x=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,h,iy(iy({},t),{},{ns:u})):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.");return a?(m.res=x,m):x}if(i){var D="[object Array]"===v,_=D?[]:{},S=D?y:g;for(var C in h)if(Object.prototype.hasOwnProperty.call(h,C)){var k="".concat(S).concat(i).concat(C);_[C]=this.translate(k,iy(iy({},t),{joinArrays:!1,ns:u})),_[C]===k&&(_[C]=h[C])}h=_}}else if(w&&"string"==typeof b&&"[object Array]"===v)(h=h.join(b))&&(h=this.extendTranslation(h,e,t,r));else{var P=!1,O=!1,R=void 0!==t.count&&"string"!=typeof t.count,T=n.hasDefaultValue(t),N=R?this.pluralResolver.getSuffix(d,t.count,t):"",j=t["defaultValue".concat(N)]||t.defaultValue;!this.isValidLookup(h)&&T&&(P=!0,h=j),this.isValidLookup(h)||(O=!0,h=l);var A=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&O?void 0:h,$=T&&j!==h&&this.options.updateMissing;if(O||P||$){if(this.logger.log($?"updateKey":"missingKey",d,c,l,$?j:h),i){var I=this.resolve(l,iy(iy({},t),{},{keySeparator:!1}));I&&I.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.")}var M=[],L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&L&&L[0])for(var F=0;F<L.length;F++)M.push(L[F]);else"all"===this.options.saveMissingTo?M=this.languageUtils.toResolveHierarchy(t.lng||this.language):M.push(t.lng||this.language);var B=function(e,r,n){var a=T&&n!==h?n:A;o.options.missingKeyHandler?o.options.missingKeyHandler(e,c,r,a,$,t):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(e,c,r,a,$,t),o.emit("missingKey",e,c,r,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&R?M.forEach(function(e){o.pluralResolver.getSuffixes(e,t).forEach(function(r){B([e],l+r,t["defaultValue".concat(r)]||j)})}):B(M,l,j))}h=this.extendTranslation(h,e,t,m,r),O&&h===l&&this.options.appendNamespaceToMissingKey&&(h="".concat(c,":").concat(l)),(O||P)&&this.options.parseMissingKeyHandler&&(h="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(c,":").concat(l):l,P?h:void 0):this.options.parseMissingKeyHandler(h))}return a?(m.res=h,m):h}},{key:"extendTranslation",value:function(e,t,r,n,o){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,iy(iy({},this.options.interpolation.defaultVariables),r),n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(iy(iy({},r),{interpolation:iy(iy({},this.options.interpolation),r.interpolation)}));var i,s="string"==typeof e&&(r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(s){var l=e.match(this.interpolator.nestingRegexp);i=l&&l.length}var u=r.replace&&"string"!=typeof r.replace?r.replace:r;if(this.options.interpolation.defaultVariables&&(u=iy(iy({},this.options.interpolation.defaultVariables),u)),e=this.interpolator.interpolate(e,u,r.lng||this.language,r),s){var c=e.match(this.interpolator.nestingRegexp);i<(c&&c.length)&&(r.nest=!1)}!1!==r.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i];return o&&o[0]===n[0]&&!r.context?(a.logger.warn("It seems you are nesting recursively key: ".concat(n[0]," in key: ").concat(t[0])),null):a.translate.apply(a,n.concat([t]))},r)),r.interpolation&&this.interpolator.reset()}var d=r.postProcess||this.options.postProcess,f="string"==typeof d?[d]:d;return null!=e&&f&&f.length&&!1!==r.applyPostProcessor&&(e=ih.handle(f,e,t,this.options&&this.options.postProcessPassResolved?iy({i18nResolved:n},r):r,this)),e}},{key:"resolve",value:function(e){var t,r,n,o,a,i=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach(function(e){if(!i.isValidLookup(t)){var l=i.extractFromKey(e,s),u=l.key;r=u;var c=l.namespaces;i.options.fallbackNS&&(c=c.concat(i.options.fallbackNS));var d=void 0!==s.count&&"string"!=typeof s.count,f=d&&!s.ordinal&&0===s.count&&i.pluralResolver.shouldUseIntlApi(),p=void 0!==s.context&&("string"==typeof s.context||"number"==typeof s.context)&&""!==s.context,m=s.lngs?s.lngs:i.languageUtils.toResolveHierarchy(s.lng||i.language,s.fallbackLng);c.forEach(function(e){i.isValidLookup(t)||(a=e,!iv["".concat(m[0],"-").concat(e)]&&i.utils&&i.utils.hasLoadedNamespace&&!i.utils.hasLoadedNamespace(a)&&(iv["".concat(m[0],"-").concat(e)]=!0,i.logger.warn('key "'.concat(r,'" for languages "').concat(m.join(", "),'" won\'t get resolved as namespace "').concat(a,'" 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!!!")),m.forEach(function(r){if(!i.isValidLookup(t)){o=r;var a,l=[u];if(i.i18nFormat&&i.i18nFormat.addLookupKeys)i.i18nFormat.addLookupKeys(l,u,r,e,s);else{d&&(c=i.pluralResolver.getSuffix(r,s.count,s));var c,m="".concat(i.options.pluralSeparator,"zero");if(d&&(l.push(u+c),f&&l.push(u+m)),p){var h="".concat(u).concat(i.options.contextSeparator).concat(s.context);l.push(h),d&&(l.push(h+c),f&&l.push(h+m))}}for(;a=l.pop();)i.isValidLookup(t)||(n=a,t=i.getResource(r,e,a,s))}}))})}}),{res:t,usedKey:r,exactUsedKey:n,usedLng:o,usedNS:a}}},{key:"isValidLookup",value:function(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,t.length)&&void 0!==e[r])return!0;return!1}}]),n}(a8);function iw(e){return e.charAt(0).toUpperCase()+e.slice(1)}var iE=function(){function e(t){(0,aG.A)(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=a9.create("languageUtils")}return(0,aZ.A)(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||0>e.indexOf("-"))return null;var t=e.split("-");return 2===t.length||(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||0>e.indexOf("-"))return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],r=e.split("-");return this.options.lowerCaseLng?r=r.map(function(e){return e.toLowerCase()}):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=iw(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=iw(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=iw(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,r=this;return e?(e.forEach(function(e){if(!t){var n=r.formatLanguageCode(e);(!r.options.supportedLngs||r.isSupportedCode(n))&&(t=n)}}),!t&&this.options.supportedLngs&&e.forEach(function(e){if(!t){var n=r.getLanguagePartFromCode(e);if(r.isSupportedCode(n))return t=n;t=r.options.supportedLngs.find(function(e){if(0===e.indexOf(n))return e})}}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}},{key:"toResolveHierarchy",value:function(e,t){var r=this,n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],a=function(e){e&&(r.isSupportedCode(e)?o.push(e):r.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&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))):"string"==typeof e&&a(this.formatLanguageCode(e)),n.forEach(function(e){0>o.indexOf(e)&&a(r.formatLanguageCode(e))}),o}}]),e}(),ix=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],iD={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(+(1!=e&&(e%10!=1||e%100==11)))},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:3*(e%100==3||e%100==4))},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},i_=["v1","v2","v3"],iS={zero:0,one:1,two:2,few:3,many:4,other:5},iC=function(){function e(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,aG.A)(this,e),this.languageUtils=t,this.options=n,this.logger=a9.create("pluralResolver"),(!this.options.compatibilityJSON||"v4"===this.options.compatibilityJSON)&&("u"<typeof Intl||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(r={},ix.forEach(function(e){e.lngs.forEach(function(t){r[t]={numbers:e.nr,plurals:iD[e.fc]}})}),r)}return(0,aZ.A)(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,t);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,r).map(function(e){return"".concat(t).concat(e)})}},{key:"getSuffixes",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort(function(e,t){return iS[e]-iS[t]}).map(function(e){return"".concat(t.options.prepend).concat(e)}):n.numbers.map(function(n){return t.getSuffix(e,n,r)}):[]}},{key:"getSuffix",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(n.select(t)):this.getSuffixRetroCompatible(n,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var r=this,n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),o=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var a=function(){return r.options.prepend&&o.toString()?r.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?a():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}},{key:"shouldUseIntlApi",value:function(){return!i_.includes(this.options.compatibilityJSON)}}]),e}();function ik(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function iP(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ik(Object(r),!0).forEach(function(t){(0,a0.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ik(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var iO=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,aG.A)(this,e),this.logger=a9.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return(0,aZ.A)(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:il,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?ii(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?ii(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?ii(t.nestingPrefix):t.nestingPrefixEscaped||ii("$t("),this.nestingSuffix=t.nestingSuffix?ii(t.nestingSuffix):t.nestingSuffixEscaped||ii(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=RegExp(t,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=RegExp(r,"g")}},{key:"interpolate",value:function(e,t,r,n){var o,a,i,s=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(e){return e.replace(/\$/g,"$$$$")}var c=function(e){if(0>e.indexOf(s.formatSeparator)){var o=ia(t,l,e);return s.alwaysFormat?s.format(o,void 0,r,iP(iP(iP({},n),t),{},{interpolationkey:e})):o}var a=e.split(s.formatSeparator),i=a.shift().trim(),u=a.join(s.formatSeparator).trim();return s.format(ia(t,l,i),u,r,iP(iP(iP({},n),t),{},{interpolationkey:i}))};this.resetRegExp();var d=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler,f=n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return u(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?u(s.escape(e)):u(e)}}].forEach(function(t){for(i=0;o=t.regex.exec(e);){var r=o[1].trim();if(void 0===(a=c(r)))if("function"==typeof d){var l=d(e,o,n);a="string"==typeof l?l:""}else if(n&&n.hasOwnProperty(r))a="";else if(f){a=o[0];continue}else s.logger.warn("missed to pass in variable ".concat(r," for interpolating ").concat(e)),a="";else"string"==typeof a||s.useRawValueToEscape||(a=ie(a));var u=t.safeValue(a);if(e=e.replace(o[0],u),f?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++i>=s.maxReplaces)break}}),e}},{key:"nest",value:function(e,t){var r,n,o=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=iP({},a);function s(e,t){var r=this.nestingOptionsSeparator;if(0>e.indexOf(r))return e;var n=e.split(new RegExp("".concat(r,"[ ]*{"))),o="{".concat(n[1]);e=n[0];var a=(o=this.interpolate(o,i)).match(/'/g),s=o.match(/"/g);(a&&a.length%2==0&&!s||s.length%2!=0)&&(o=o.replace(/'/g,'"'));try{i=JSON.parse(o),t&&(i=iP(iP({},t),i))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(r).concat(o)}return delete i.defaultValue,e}for(i.applyPostProcessor=!1,delete i.defaultValue;r=this.nestingRegexp.exec(e);){var l=[],u=!1;if(-1!==r[0].indexOf(this.formatSeparator)&&!/{.*}/.test(r[1])){var c=r[1].split(this.formatSeparator).map(function(e){return e.trim()});r[1]=c.shift(),l=c,u=!0}if((n=t(s.call(this,r[1].trim(),i),i))&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=ie(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(e)),n=""),u&&(n=l.reduce(function(e,t){return o.format(e,t,a.lng,iP(iP({},a),{},{interpolationkey:r[1].trim()}))},n.trim())),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}]),e}();function iR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function iT(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?iR(Object(r),!0).forEach(function(t){(0,a0.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iR(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function iN(e){var t={};return function(r,n,o){var a=n+JSON.stringify(o),i=t[a];return i||(i=e(n,o),t[a]=i),i(r)}}var ij=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,aG.A)(this,e),this.logger=a9.create("formatter"),this.options=t,this.formats={number:iN(function(e,t){var r=new Intl.NumberFormat(e,t);return function(e){return r.format(e)}}),currency:iN(function(e,t){var r=new Intl.NumberFormat(e,iT(iT({},t),{},{style:"currency"}));return function(e){return r.format(e)}}),datetime:iN(function(e,t){var r=new Intl.DateTimeFormat(e,iT({},t));return function(e){return r.format(e)}}),relativetime:iN(function(e,t){var r=new Intl.RelativeTimeFormat(e,iT({},t));return function(e){return r.format(e,t.range||"day")}}),list:iN(function(e,t){var r=new Intl.ListFormat(e,iT({},t));return function(e){return r.format(e)}})},this.init(t)}return(0,aZ.A)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=t.interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=iN(t)}},{key:"format",value:function(e,t,r,n){var o=this;return t.split(this.formatSeparator).reduce(function(e,t){var a=function(e){var t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){var n=e.split("(");t=n[0].toLowerCase().trim();var o=n[1].substring(0,n[1].length-1);"currency"===t&&0>o.indexOf(":")?r.currency||(r.currency=o.trim()):"relativetime"===t&&0>o.indexOf(":")?r.range||(r.range=o.trim()):o.split(";").forEach(function(e){if(e){var t,n=(t=e.split(":"),(0,a1.A)(t)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||(0,a2.A)(t)||(0,a4.A)()),o=n[0],a=n.slice(1).join(":").trim().replace(/^'+|'+$/g,"");r[o.trim()]||(r[o.trim()]=a),"false"===a&&(r[o.trim()]=!1),"true"===a&&(r[o.trim()]=!0),isNaN(a)||(r[o.trim()]=parseInt(a,10))}})}return{formatName:t,formatOptions:r}}(t),i=a.formatName,s=a.formatOptions;if(o.formats[i]){var l=e;try{var u=n&&n.formatParams&&n.formatParams[n.interpolationkey]||{},c=u.locale||u.lng||n.locale||n.lng||r;l=o.formats[i](e,c,iT(iT(iT({},s),n),u))}catch(e){o.logger.warn(e)}return l}return o.logger.warn("there was no format function for ".concat(i)),e},e)}}]),e}();function iA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i$(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?iA(Object(r),!0).forEach(function(t){(0,a0.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iA(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var iI=function(e){aJ(n,e);var t,r=(t=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,r=aQ(n);return e=t?Reflect.construct(r,arguments,aQ(this).constructor):r.apply(this,arguments),aX(this,e)});function n(e,t,o){var a,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,aG.A)(this,n),a=r.call(this),iu&&a8.call(aY(a)),a.backend=e,a.store=t,a.services=o,a.languageUtils=o.languageUtils,a.options=i,a.logger=a9.create("backendConnector"),a.waitingReads=[],a.maxParallelReads=i.maxParallelReads||10,a.readingCalls=0,a.maxRetries=i.maxRetries>=0?i.maxRetries:5,a.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,a.state={},a.queue=[],a.backend&&a.backend.init&&a.backend.init(o,i.backend,i),a}return(0,aZ.A)(n,[{key:"queueLoad",value:function(e,t,r,n){var o=this,a={},i={},s={},l={};return e.forEach(function(e){var n=!0;t.forEach(function(t){var s="".concat(e,"|").concat(t);!r.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?void 0===i[s]&&(i[s]=!0):(o.state[s]=1,n=!1,void 0===i[s]&&(i[s]=!0),void 0===a[s]&&(a[s]=!0),void 0===l[t]&&(l[t]=!0)))}),n||(s[e]=!0)}),(Object.keys(a).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(a),pending:Object.keys(i),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),o=n[0],a=n[1];t&&this.emit("failedLoading",o,a,t),r&&this.store.addResourceBundle(o,a,r),this.state[e]=t?-1:2;var i={};this.queue.forEach(function(r){var n,s,l,u;n=r.loaded,(l=(s=it(n,[o],Object)).obj)[u=s.k]=l[u]||[],l[u].push(a),void 0!==r.pending[e]&&(delete r.pending[e],r.pendingCount--),t&&r.errors.push(t),0!==r.pendingCount||r.done||(Object.keys(r.loaded).forEach(function(e){i[e]||(i[e]={});var t=r.loaded[e];t.length&&t.forEach(function(t){void 0===i[e][t]&&(i[e][t]=!0)})}),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())}),this.emit("loaded",i),this.queue=this.queue.filter(function(e){return!e.done})}},{key:"read",value:function(e,t,r){var n=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;return e.length?this.readingCalls>=this.maxParallelReads?void this.waitingReads.push({lng:e,ns:t,fcName:r,tried:o,wait:a,callback:i}):(this.readingCalls++,this.backend[r](e,t,function(s,l){if(n.readingCalls--,n.waitingReads.length>0){var u=n.waitingReads.shift();n.read(u.lng,u.ns,u.fcName,u.tried,u.wait,u.callback)}s&&l&&o<n.maxRetries?setTimeout(function(){n.read.call(n,e,t,r,o+1,2*a,i)},a):i(s,l)})):i(null,{})}},{key:"prepareLoading",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var a=this.queueLoad(e,t,n,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach(function(e){r.loadOne(e)})}},{key:"load",value:function(e,t,r){this.prepareLoading(e,t,{},r)}},{key:"reload",value:function(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}},{key:"loadOne",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),o=n[0],a=n[1];this.read(o,a,"read",void 0,void 0,function(n,i){n&&t.logger.warn("".concat(r,"loading namespace ").concat(a," for language ").concat(o," failed"),n),!n&&i&&t.logger.log("".concat(r,"loaded namespace ").concat(a," for language ").concat(o),i),t.loaded(e,n,i)})}},{key:"saveMissing",value:function(e,t,r,n,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(r,'" as the namespace "').concat(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!!!"):null==r||""===r||(this.backend&&this.backend.create&&this.backend.create(e,t,r,n,null,i$(i$({},a),{},{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,r,n))}}]),n}(a8);function iM(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&0>e.supportedLngs.indexOf("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function iL(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function iF(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?iL(Object(r),!0).forEach(function(t){(0,a0.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iL(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function iB(){}var iU=function(e){aJ(n,e);var t,r=(t=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,r=aQ(n);return e=t?Reflect.construct(r,arguments,aQ(this).constructor):r.apply(this,arguments),aX(this,e)});function n(){var e,t,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;if((0,aG.A)(this,n),t=r.call(this),iu&&a8.call(aY(t)),t.options=iM(o),t.services={},t.logger=a9,t.modules={external:[]},Object.getOwnPropertyNames(Object.getPrototypeOf(e=aY(t))).forEach(function(t){"function"==typeof e[t]&&(e[t]=e[t].bind(e))}),a&&!t.isInitialized&&!o.isClone){if(!t.options.initImmediate)return t.init(o,a),aX(t,aY(t));setTimeout(function(){t.init(o,a)},0)}return t}return(0,aZ.A)(n,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(r=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:0>t.ns.indexOf("translation")&&(t.defaultNS=t.ns[0]));var n={debug:!1,initImmediate:!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:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===(0,aK.A)(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===(0,aK.A)(e[2])||"object"===(0,aK.A)(e[3])){var r=e[3]||e[2];Object.keys(r).forEach(function(e){t[e]=r[e]})}return t},interpolation:{escapeValue:!0,format:function(e,t,r,n){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}};function o(e){return e?"function"==typeof e?new e:e:null}if(this.options=iF(iF(iF({},n),this.options),iM(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=iF(iF({},n.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){this.modules.logger?a9.init(o(this.modules.logger),this.options):a9.init(null,this.options),this.modules.formatter?a=this.modules.formatter:"u">typeof Intl&&(a=ij);var a,i=new iE(this.options);this.store=new im(this.options.resources,this.options);var s=this.services;s.logger=a9,s.resourceStore=this.store,s.languageUtils=i,s.pluralResolver=new iC(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),a&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(s.formatter=o(a),s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new iO(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new iI(o(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit.apply(e,[t].concat(n))}),this.modules.languageDetector&&(s.languageDetector=o(this.modules.languageDetector),s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=o(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new ib(this.services,this.options),this.translator.on("*",function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit.apply(e,[t].concat(n))}),this.modules.external.forEach(function(t){t.init&&t.init(e)})}if(this.format=this.options.interpolation.format,r||(r=iB),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&"dev"!==l[0]&&(this.options.lng=l[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(function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments),e}});var u=a7(),c=function(){var t=function(t,n){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),u.resolve(n),r(t,n)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),u}},{key:"loadResources",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:iB,n=r,o="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return n();var a=[],i=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach(function(e){0>a.indexOf(e)&&a.push(e)})};o?i(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(e){return i(e)}),this.options.preload&&this.options.preload.forEach(function(e){return i(e)}),this.services.backendConnector.load(a,this.options.ns,function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),n(e)})}else n(null)}},{key:"reloadResources",value:function(e,t,r){var n=a7();return e||(e=this.languages),t||(t=this.options.ns),r||(r=iB),this.services.backendConnector.reload(e,t,function(e){n.resolve(),r(e)}),n}},{key:"use",value:function(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&&ih.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var r=this.languages[t];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}},{key:"changeLanguage",value:function(e,t){var r=this;this.isLanguageChangingTo=e;var n=a7();this.emit("languageChanging",e);var o=function(e){r.language=e,r.languages=r.services.languageUtils.toResolveHierarchy(e),r.resolvedLanguage=void 0,r.setResolvedLanguage(e)},a=function(e,a){a?(o(a),r.translator.changeLanguage(a),r.isLanguageChangingTo=void 0,r.emit("languageChanged",a),r.logger.log("languageChanged",a)):r.isLanguageChangingTo=void 0,n.resolve(function(){return r.t.apply(r,arguments)}),t&&t(e,function(){return r.t.apply(r,arguments)})},i=function(t){e||t||!r.services.languageDetector||(t=[]);var n="string"==typeof t?t:r.services.languageUtils.getBestMatchFromCodes(t);n&&(r.language||o(n),r.translator.language||r.translator.changeLanguage(n),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(n)),r.loadResources(n,function(e){a(e,n)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t,r){var n=this,o=function e(t,o){if("object"!==(0,aK.A)(o)){for(var a,i=arguments.length,s=Array(i>2?i-2:0),l=2;l<i;l++)s[l-2]=arguments[l];a=n.options.overloadTranslationOptionHandler([t,o].concat(s))}else a=iF({},o);a.lng=a.lng||e.lng,a.lngs=a.lngs||e.lngs,a.ns=a.ns||e.ns,a.keyPrefix=a.keyPrefix||r||e.keyPrefix;var u=n.options.keySeparator||".",c=a.keyPrefix?"".concat(a.keyPrefix).concat(u).concat(t):t;return n.t(c,a)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=r,o}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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;var n=this.resolvedLanguage||this.languages[0],o=!!this.options&&this.options.fallbackLng,a=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;var i=function(e,r){var n=t.services.backendConnector.state["".concat(e,"|").concat(r)];return -1===n||2===n};if(r.precheck){var s=r.precheck(this,i);if(void 0!==s)return s}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(n,e)&&(!o||i(a,e)))}},{key:"loadNamespaces",value:function(e,t){var r=this,n=a7();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach(function(e){0>r.options.ns.indexOf(e)&&r.options.ns.push(e)}),this.loadResources(function(e){n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var r=a7();"string"==typeof e&&(e=[e]);var n=this.options.preload||[],o=e.filter(function(e){return 0>n.indexOf(e)});return o.length?(this.options.preload=n.concat(o),this.loadResources(function(e){r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),e)?["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(this.services.languageUtils.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr":"rtl"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:iB,o=iF(iF(iF({},this.options),t),{isClone:!0}),a=new n(o);return(void 0!==t.debug||void 0!==t.prefix)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(function(t){a[t]=e[t]}),a.services=iF({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new ib(a.services,a.options),a.translator.on("*",function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];a.emit.apply(a,[e].concat(r))}),a.init(o,r),a.translator.options=a.options,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(a8);(0,a0.A)(iU,"createInstance",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new iU(e,t)});var iV=iU.createInstance();iV.createInstance=iU.createInstance,iV.createInstance,iV.init,iV.loadResources,iV.reloadResources,iV.use,iV.changeLanguage,iV.getFixedT,iV.t,iV.exists,iV.setDefaultNamespace,iV.hasLoadedNamespace,iV.loadNamespaces,iV.loadLanguages;let iW=iV.default||iV;function iH(e,t,r,n){return iW.t(t,{ns:e,defaultValue:r,...n})}function iz(e,t,r){return az[e]?iH("core",e,t??az[e],r):(console.error(`O3 Core Translations does not provide key '${e}'. The key itself is being rendered as text.`),e)}function iK(e,t){let r=window.getOpenmrsSpaBase().replace(/\/$/,""),n=iG(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:r,...t});return e.startsWith("//")?n:n.replace(/^\/\//,"/")}function iG(e,t){return Object.keys(t).reduce((e,r)=>e.split("${"+r+"}").join(t[r]),e)}function iZ({to:e,templateParams:t}){let r=window.getOpenmrsSpaBase().replace(/\/$/,""),n=iK(e,t).replace(window.location.origin,""),o=new URL(n,window.location.origin);if("http:"!=o.protocol&&"https:"!=o.protocol)throw console.error(`Received request to navigate to non-http URL: ${o.toString()}`),Error(iz("navigateNonHttp"));n.startsWith(r)?ac(n):window.location.assign(n)}iW.on("initialized",function(){window.i18next.loadNamespaces(["core"])});let iY="openmrs:history";function iq(e){let t=JSON.parse(sessionStorage.getItem(iY)??"[]")||[];t.push(e),t.length>50&&(t=t.slice(-50)),sessionStorage.setItem(iY,JSON.stringify(t))}function iJ(){0===JSON.parse(sessionStorage.getItem(iY)??"[]").length&&document.referrer&&iq(document.referrer),window.addEventListener("single-spa:routing-event",e=>{let t=iX();e.detail.originalEvent?.singleSpaTrigger=="replaceState"?(t[t.length-1]=window.location.href,sessionStorage.setItem(iY,JSON.stringify(t))):!e.detail.originalEvent?.singleSpa&&t.includes(window.location.href)?iQ({toUrl:window.location.href}):t[t.length-1]!==window.location.href&&iq(window.location.href)})}function iX(){return JSON.parse(sessionStorage.getItem(iY)??"[]")}function iQ({toUrl:e}){let t=iX(),r=t.lastIndexOf(e);if(-1!=r){let e=t.slice(0,r+1);iZ({to:t[r]}),sessionStorage.setItem(iY,JSON.stringify(e))}else throw Error(`URL ${e} not found in history; cannot go back to it.`)}function i0(){sessionStorage.removeItem(iY)}let i1="${openmrsSpaBase}/login",i2={redirectAuthFailure:{enabled:{_type:no.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:no.String,_default:i1,_validators:[od.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:no.Array,_default:[401],_elements:{_type:no.Number,_validators:[od.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:no.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:no.Boolean,_default:!0,_description:"Whether openmrsFetch should support redirects returned from the backend"}};function i4(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}let i3="/ws/rest/v1",i6="/ws/fhir2/R4",i5=`${i3}/session`;function i9(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)}function i8(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 r=i9(e);t.headers||(t.headers={}),eh(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 n=!1;try{let e=new URL(r,window.location.href),t=new URL(i9(i3),window.location.href),o=e.pathname.replace(/\/{2,}/g,"/"),a=t.pathname.replace(/\/{2,}/g,"/");n=e.origin===t.origin&&(o===a||o.startsWith(`${a}/`))}catch{}if(n){let e=!1;for(let[r,n]of Object.entries(t.headers))"disable-www-authenticate"===r.toLowerCase()&&(void 0===n?delete t.headers[r]:e=!0);e||(t.headers["Disable-WWW-Authenticate"]="true")}if(e.startsWith(i6)){let e=new URL(r,window.location.toString());e.searchParams.has("_summary")||(e.searchParams.set("_summary","data"),r=e.toString())}let o=Error();return window.fetch(r,t).then(async e=>{let{redirectAuthFailure:n,followRedirects:a}=await nY("@openmrs/esm-api");if(e.ok){let t=e.headers.get("location");return(a&&t&&(r===i9(i5)||204===e.status)&&iZ({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(r===i9(i5)&&403===e.status||n.enabled&&n.errors.includes(e.status))&&(i0(),iZ({to:n.url||e.headers.get("location")||i1}),!0!==t.rejectAuthFailure)?n.resolvePromise?Promise.resolve():new Promise(()=>{}):e.clone().text().then(t=>{let n=t;try{n=JSON.parse(t)}catch(e){}throw new i7(r,e,n,o)},()=>{throw new i7(r,e,null,o)})})}class i7 extends Error{constructor(e,t,r,n){super(),i4(this,"response",void 0),i4(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`,n.message=this.message,this.responseBody=r,this.response=t,this.stack=`Stacktrace for outgoing request:
|
|
13
13
|
${n.stack}
|
|
14
14
|
Stacktrace for incoming response:
|
|
15
|
-
${this.stack}`}}let sr=B("session",{loaded:!1,session:null}),sn=0,so=null;function sa(){return so||(sr.getState().loaded&&sn>=Date.now()-6e4?null:su())}function si(e){let t=e?.includeAuthStatus??!0,r=e=>t?e:e.user,n=sa();return n?new Promise(e=>{let t=()=>{let t=sr.getState();t.loaded&&(o(),e(r(t.session)))},o=sr.subscribe(t);n.then(t,t)}):Promise.resolve(r(sr.getState().session))}function ss(){return sa(),sr}function sl(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 su(e,t){sn=Date.now(),a??(a=sn);let r={};e&&t&&(r.Authorization=`Basic ${window.btoa(`${e}:${t}`)}`);let n=sb(se(i8,{headers:r,rejectAuthFailure:!0})),o=()=>{so===n&&(so=null)};return n.then(o,o),so=n,n}function sc(){sr.setState({loaded:!0,session:{authenticated:!1,sessionId:""}},!0)}function sd(e,t){var r,n;if(void 0===t)return!e;if(!e)return!0;return r=e,n=t,("string"==typeof r?!K(n.privileges.find(e=>r===e.display)):Array.isArray(r)?r.every(e=>!K(n.privileges.find(t=>e===t.display))):(K(r)||console.error(`Could not understand privileges "${r}"`),!0))||!K(t.roles.find(e=>"System Developer"===e.display))}function sf(){let e,t;return new Promise(r=>{let n=n=>{n.loaded&&n.session.user&&(e=n.session.user,r(n.session.user),t&&t())};n(sr.getState()),e||(t=sr.subscribe(n))})}async function sp(){return(await si()).sessionLocation}async function sm(e,t){return sb(se(i8,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},rejectAuthFailure:!0,signal:t?.signal}))}async function sh(e,t){return await se(i8,{method:"POST",body:{locale:e},headers:{"Content-Type":"application/json"},signal:t?.signal}),su()}async function sg(e,t,r){return r||(r=new AbortController),await se(`${i5}/user/${e}`,{method:"POST",body:{userProperties:t},headers:{"Content-Type":"application/json"},signal:r.signal}),su()}async function sy(e,t=!1){let r=await se(t?`${i8}?rememberMe=true`:i8,{headers:{"X-Totp-Code":e}});return r.data?.authenticated?(await su()).session:r.data}async function sv(){try{await se(i8,{method:"DELETE",rejectAuthFailure:!0})}catch(e){if(!sw(e))throw e}sc(),await su().catch(()=>{})}function sb(e){return new Promise((t,r)=>{e.then(e=>{if("object"==typeof e?.data){let r={loaded:!0,session:e.data};sr.setState(r,!0),t(r)}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)?r(sE(Error("The session endpoint did not respond with a session"))):r(sE(Error("The server is still starting up"),!0))}).catch(e=>{var n,o;if(sw(e)){"object"==typeof(n=e.responseBody)&&null!==n&&!1===n.authenticated?sr.setState({loaded:!0,session:e.responseBody},!0):sc(),t(sr.getState());return}(o=e)instanceof st&&502===o.response.status&&!sr.getState().loaded&&void 0!==a&&Date.now()-a<18e4?r(sE(e,!0)):(k(`Failed to fetch new session information: ${e}`),r(sE(e)))})})}function sw(e){return e instanceof st&&(401===e.response.status||403===e.response.status)}function sE(e,t=!1){return sr.getState().loaded||sr.setState({loaded:!1,session:null,error:e instanceof Error?e:Error(String(e)),initializing:t},!0),sr.getState()}function sx(){return"development"===window.spaEnv||"true"===localStorage.getItem("openmrs:devtools")}sr.subscribe(e=>{e.loaded&&e.session&&sl(e.session)});let sD={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"};function s_(){nW("@openmrs/esm-api",i3),su()}let sS="import-map-override:",sC="import-map-overrides-disabled",sk="import-map-overrides:change",sP=!1,sO=null,sR=null;async function sT(){return sR??(sR=sN().then(({map:e,complete:t})=>(t||(sR=null),e))),sR}async function sN(){let e=document.querySelectorAll('script[type="systemjs-importmap"]'),t=[],r=!0;for(let n=0;n<e.length;n++){let o=e[n];try{if(o.src){let e=await fetch(o.src);if(!e.ok)throw Error(`Request for ${o.src} returned ${e.status} ${e.statusText}`);t.push(await e.json())}else o.textContent&&t.push(JSON.parse(o.textContent))}catch(e){r=!1,console.warn(`[import-maps] Failed to parse import map from script tag at index ${n}`,e)}}return{map:sj(t),complete:r}}function sj(e){let t={imports:{}};for(let r of e)r?.imports&&Object.assign(t.imports,r.imports);return t}function sA(){let e={};try{let t=sF();for(let r=0;r<localStorage.length;r++){let n=localStorage.key(r);if(n?.startsWith(sS)){let r=n.slice(sS.length);if(!t.includes(r)){let t=localStorage.getItem(n);t&&(e[r]=t)}}}}catch(e){console.warn("[import-maps] Failed to read import-map overrides from localStorage",e)}return{imports:e}}async function s$(){let e=await sT();return sP?sj([e,sO??sA()]):e}async function sI(){return sT()}async function sM(){return sP?sj([await sT(),sA()]):sT()}function sL(e){if(!sP)return{imports:{}};if(e){let e={};for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);if(r?.startsWith(sS)){let t=localStorage.getItem(r);t&&(e[r.slice(sS.length)]=t)}}return{imports:e}}return sA()}function sF(){if(!sP)return[];try{let e=localStorage.getItem(sC);if(e){let t=JSON.parse(e);if(Array.isArray(t))return t}}catch{}return[]}function sB(e){return!!sP&&sF().includes(e)}function sU(e,t){if(!sP)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.setItem(sS+e,t),window.dispatchEvent(new CustomEvent(sk))}catch(e){console.warn("[import-maps] Failed to write import-map override to localStorage",e)}}function sV(e){if(!sP)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.removeItem(sS+e);let t=sF().filter(t=>t!==e);t.length>0?localStorage.setItem(sC,JSON.stringify(t)):localStorage.removeItem(sC),window.dispatchEvent(new CustomEvent(sk))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}function sW(){if(!sP)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 r=localStorage.key(t);r?.startsWith(sS)&&e.push(r)}e.forEach(e=>localStorage.removeItem(e)),localStorage.removeItem(sC),window.dispatchEvent(new CustomEvent(sk))}catch(e){console.warn("[import-maps] Failed to clear import-map overrides from localStorage",e)}}function sH(e){if(!sP)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{let t=sF().filter(t=>t!==e);t.length>0?localStorage.setItem(sC,JSON.stringify(t)):localStorage.removeItem(sC),window.dispatchEvent(new CustomEvent(sk))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}let sz=!1;function sK(){!sz&&(sz=!0,(sP="development"===window.spaEnv)&&(sO=sA()))}function sG(e){return e.replace(/[\/\-@]/g,"_")}async function sZ(e,t="./start",n){var o;let a,i=!n?.maxLoadingTime||n.maxLoadingTime<=0?6e5:n.maxLoadingTime;await Promise.race([sY(e,n?.importMap),new Promise((t,r)=>{a=setTimeout(()=>{var t;r(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)})]),a&&clearTimeout(a);let s=sG(e),l=window[s];if(!("object"==typeof(o=l)&&null!==o&&"init"in o&&"function"==typeof o.init&&"get"in o&&"function"==typeof o.get)){let e=`The global variable ${s} does not refer to a federated module`;throw console.error(e),Error(e)}l.init(r.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 sY(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 r=sG(e);if(!window[r]){let r=t??await sq();if(!r.imports.hasOwnProperty(e)){let t=`Could not find the package ${e} defined in the current importmap`;throw console.error(t),Error(t)}let n=r.imports[e];n.startsWith("./")&&(n=window.spaBase+n.substring(1));let o=e in sL().imports;try{return await function(e){var t;let r=(t=window)[sJ]??(t[sJ]=new Map),n=r.get(e);if(n)return n;if(document.head.querySelector(`script[src="${e}"]`))return console.warn(`Script at ${e} already loaded. Not loading it again.`),Promise.resolve();let o=document.createElement("script");o.src=e,o.type="text/javascript",o.async=!0;let a=new Promise((t,n)=>{let a=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(a),o.removeEventListener("load",s),o.removeEventListener("error",l)}function s(){i(),t()}function l(t){i(),r.delete(e),o.remove();let a=`Failed to load script from ${e}`;console.error(a,t),n(t.message??a)}o.addEventListener("load",s),o.addEventListener("error",l),document.head.appendChild(o)});return r.set(e,a),a}(n)}catch(e){return o&&E({kind:"error",title:iG("scriptLoadingFailed","Error: Script failed to load"),description:iG("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:n}),actionButtonLabel:iG("resetOverrides","Reset overrides"),onActionButtonClick(){sW(),window.location.reload()}}),Promise.reject(e)}}return Promise.resolve()}async function sq(){return s$()}let sJ=Symbol.for("__openmrs_script_loading");function sX(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 sQ(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&&sX(t))}let s0="openmrs-routes:",s1="openmrs-routes:change",s2=!1,s4=null,s3=null;async function s6(){return s3??(s3=s5().then(({map:e,complete:t})=>(t||(s3=null),e))),s3}async function s5(){let e=document.querySelectorAll("script[type='openmrs-routes']"),t=[],r=!0;for(let n=0;n<e.length;n++){let o=e[n];try{let e;if(o.src){let t=await fetch(o.src);if(!t.ok)throw Error(`Request for ${o.src} returned ${t.status} ${t.statusText}`);e=await t.json()}else o.textContent&&(e=JSON.parse(o.textContent));e&&sQ(e)&&t.push(e)}catch(e){r=!1,console.warn(`[route-maps] Failed to parse routes from script tag at index ${n}`,e)}}return{map:s9(t),complete:r}}function s9(e){let t={routes:{}};for(let r of e)r&&"object"==typeof r&&!Array.isArray(r)&&(Object.assign(t.routes,r.routes),void 0===t.version&&void 0!==r.version&&(t.version=r.version));return t}async function s8(){let e={version:void 0,routes:{}};try{let t=[];for(let e=0;e<localStorage.length;e++){let r=localStorage.key(e);if(r?.startsWith(s0)){let e=localStorage.getItem(r);e&&t.push({moduleName:r.slice(s0.length),raw:e})}}for(let r of(await Promise.allSettled(t.map(async({moduleName:e,raw:t})=>{let r=JSON.parse(t);if(sX(r))return{moduleName:e,routes:r};if("string"==typeof r&&r.startsWith("http")){let t=await fetch(r),n=await t.json();if(sX(n))return{moduleName:e,routes:n};throw Error(`${r} did not resolve to a valid OpenmrsAppRoutes object`)}throw Error(`Override for ${e} is neither a valid routes object nor a URL`)}))))"fulfilled"===r.status?e.routes[r.value.moduleName]=r.value.routes:console.warn("[route-maps] Failed to load route override",r.reason)}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}async function s7(){let e=await s6();return s2?s9([e,s4??await s8()]):e}async function le(){return s6()}async function lt(){return s2?s9([await s6(),await s8()]):s6()}function lr(){if(!s2)return{};let e={};try{for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);if(r?.startsWith(s0)){let t=localStorage.getItem(r);t&&(e[r.slice(s0.length)]=t)}}}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}function ln(e,t){if(!s2)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{if("string"==typeof t)if(t.startsWith("http"))localStorage.setItem(s0+e,JSON.stringify(t));else{let r=JSON.parse(t);if(!sX(r))return void console.error(`The supplied routes for ${e} is not a valid OpenmrsAppRoutes object`,t);localStorage.setItem(s0+e,JSON.stringify(r))}else if(t instanceof URL)localStorage.setItem(s0+e,JSON.stringify(t.toString()));else{if(!sX(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(s0+e,JSON.stringify(t))}window.dispatchEvent(new CustomEvent(s1))}catch(e){console.warn("[route-maps] Failed to write route override to localStorage",e)}}function lo(e){if(!s2)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{localStorage.removeItem(s0+e),window.dispatchEvent(new CustomEvent(s1))}catch(e){console.warn("[route-maps] Failed to remove route override from localStorage",e)}}function la(){if(!s2)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{let e=[];for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);r?.startsWith(s0)&&e.push(r)}e.forEach(e=>localStorage.removeItem(e)),window.dispatchEvent(new CustomEvent(s1))}catch(e){console.warn("[route-maps] Failed to clear route overrides from localStorage",e)}}let li=null;function ls(){return li||(li=(s2="development"===window.spaEnv)?s8().then(e=>{s4=e}):Promise.resolve())}let ll=`${i5}/attachment`;function lu(e,t){return se(`${ll}/${e}`,{signal:t.signal})}function lc(e,t,r,n){return se(ld(e,t,n),{signal:r.signal})}function ld(e,t,r){return r?`${ll}?patient=${e}&encounter=${r}`:`${ll}?patient=${e}&includeEncounterless=${t}`}async function lf(e,t,r){let n=new FormData;return n.append("fileCaption",t.fileDescription),n.append("patient",e),r&&n.append("encounter",r),t.file?n.append("file",t.file,t.fileName):(n.append("file",new File([""],t.fileName),t.fileName),n.append("base64Content",t.base64Content)),se(`${ll}`,{method:"POST",body:n})}function lp(e,t){return se(`${ll}/${e}`,{method:"DELETE",signal:t.signal})}async function lm(e,t){return e?(await se(`${i9}/Patient/${e}`,t)).data:null}function lh(e,t){let r=new CustomEvent(`openmrs:${e}`,{detail:t??void 0,cancelable:!0,bubbles:!0});return window.dispatchEvent(r)}function lg(e,t){let r=e=>{t("detail"in e&&null!==e.detail?e.detail:void 0)};return window.addEventListener(`openmrs:${e}`,r),()=>{window.removeEventListener(`openmrs:${e}`,r)}}function ly(e){return{uuid:e.uuid,display:e.display}}function lv(e=null,t=null){let r=new URLSearchParams;e&&r.set("tag",e),t&&r.set("q",t);let n=r.toString();return se(`${i5}/location${n?"?"+n:""}`).then(e=>e.data.results.map(ly))}function lb(e){return{uuid:e.uuid,display:e.display,name:e.name}}let lw=`${i5}/visittype`;function lE(e=lw){return se(e).then(e=>e.data.results.map(lb))}var lx=((et={}).NEWVISIT="startVisit",et.EDITVISIT="editVisit",et.LOADING="loadingVisit",et),lD=((er={}).NOTSTARTED="notStarted",er.ONGOING="ongoing",er);let l_="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))",lS=function(){try{return JSON.parse(sessionStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null};function lC(){return W("visit",lS)}function lk(e,t){lC().setState({patientUuid:e,manuallySetVisitUuid:t})}function lP(e,t){return se(`${i5}/visit`,{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function lO(e,t,r){return se(`${i5}/visit/${e}`,{signal:r.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}function lR(e,t,r){return se(`${i5}/visit?patient=${e}&v=${r??l_}`,{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}})}lC().subscribe(e=>{var t;t=e,sessionStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))});class lT{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+lT.version}static addUnaryOp(e){return lT.max_unop_len=Math.max(e.length,lT.max_unop_len),lT.unary_ops[e]=1,lT}static addBinaryOp(e,t,r){return lT.max_binop_len=Math.max(e.length,lT.max_binop_len),lT.binary_ops[e]=t,r?lT.right_associative.add(e):lT.right_associative.delete(e),lT}static addIdentifierChar(e){return lT.additional_identifier_chars.add(e),lT}static addLiteral(e,t){return lT.literals[e]=t,lT}static removeUnaryOp(e){return delete lT.unary_ops[e],e.length===lT.max_unop_len&&(lT.max_unop_len=lT.getMaxKeyLen(lT.unary_ops)),lT}static removeAllUnaryOps(){return lT.unary_ops={},lT.max_unop_len=0,lT}static removeIdentifierChar(e){return lT.additional_identifier_chars.delete(e),lT}static removeBinaryOp(e){return delete lT.binary_ops[e],e.length===lT.max_binop_len&&(lT.max_binop_len=lT.getMaxKeyLen(lT.binary_ops)),lT.right_associative.delete(e),lT}static removeAllBinaryOps(){return lT.binary_ops={},lT.max_binop_len=0,lT}static removeLiteral(e){return delete lT.literals[e],lT}static removeAllLiterals(){return lT.literals={},lT}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 lT(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 lT.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!lT.binary_ops[String.fromCharCode(e)]||lT.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return lT.isIdentifierStart(e)||lT.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(lT.hooks[e]){let r={context:this,node:t};return lT.hooks.run(e,r),r.node}return t}searchHook(e){if(lT.hooks[e]){let t={context:this};return lT.hooks[e].find(function(e){return e.call(t.context,t),t.node}),t.node}}gobbleSpaces(){let e=this.code;for(;e===lT.SPACE_CODE||e===lT.TAB_CODE||e===lT.LF_CODE||e===lT.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:lT.COMPOUND,body:e};return this.runHook("after-all",t)}gobbleExpressions(e){let t=[],r,n;for(;this.index<this.expr.length;)if((r=this.code)===lT.SEMCOL_CODE||r===lT.COMMA_CODE)this.index++;else if(n=this.gobbleExpression())t.push(n);else if(this.index<this.expr.length){if(r===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,lT.max_binop_len),t=e.length;for(;t>0;){if(lT.binary_ops.hasOwnProperty(e)&&(!lT.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!lT.isIdentifierPart(this.expr.charCodeAt(this.index+e.length))))return this.index+=t,e;e=e.substr(0,--t)}return!1}gobbleBinaryExpression(){let e,t,r,n,o,a,i,s,l;if(!(a=this.gobbleToken())||!(t=this.gobbleBinaryOp()))return a;for(o={value:t,prec:lT.binaryPrecedence(t),right_a:lT.right_associative.has(t)},(i=this.gobbleToken())||this.throwError("Expected expression after "+t),n=[a,o,i];t=this.gobbleBinaryOp();){if(0===(r=lT.binaryPrecedence(t))){this.index-=t.length;break}o={value:t,prec:r,right_a:lT.right_associative.has(t)},l=t;let s=e=>o.right_a&&e.right_a?r>e.prec:r<=e.prec;for(;n.length>2&&s(n[n.length-2]);)i=n.pop(),t=n.pop().value,a=n.pop(),e={type:lT.BINARY_EXP,operator:t,left:a,right:i},n.push(e);(e=this.gobbleToken())||this.throwError("Expected expression after "+l),n.push(o,e)}for(s=n.length-1,e=n[s];s>1;)e={type:lT.BINARY_EXP,operator:n[s-1].value,left:n[s-2],right:e},s-=2;return e}gobbleToken(){let e,t,r,n;if(this.gobbleSpaces(),n=this.searchHook("gobble-token"))return this.runHook("after-token",n);if(e=this.code,lT.isDecimalDigit(e)||e===lT.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===lT.SQUOTE_CODE||e===lT.DQUOTE_CODE)n=this.gobbleStringLiteral();else if(e===lT.OBRACK_CODE)n=this.gobbleArray();else{for(r=(t=this.expr.substr(this.index,lT.max_unop_len)).length;r>0;){if(lT.unary_ops.hasOwnProperty(t)&&(!lT.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!lT.isIdentifierPart(this.expr.charCodeAt(this.index+t.length)))){this.index+=r;let e=this.gobbleToken();return e||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:lT.UNARY_EXP,operator:t,argument:e,prefix:!0})}t=t.substr(0,--r)}lT.isIdentifierStart(e)?(n=this.gobbleIdentifier(),lT.literals.hasOwnProperty(n.name)?n={type:lT.LITERAL,value:lT.literals[n.name],raw:n.name}:n.name===lT.this_str&&(n={type:lT.THIS_EXP})):e===lT.OPAREN_CODE&&(n=this.gobbleGroup())}return n?(n=this.gobbleTokenProperty(n),this.runHook("after-token",n)):this.runHook("after-token",!1)}gobbleTokenProperty(e){this.gobbleSpaces();let t=this.code;for(;t===lT.PERIOD_CODE||t===lT.OBRACK_CODE||t===lT.OPAREN_CODE||t===lT.QUMARK_CODE;){let r;if(t===lT.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==lT.PERIOD_CODE)break;r=!0,this.index+=2,this.gobbleSpaces(),t=this.code}this.index++,t===lT.OBRACK_CODE?((e={type:lT.MEMBER_EXP,computed:!0,object:e,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),(t=this.code)!==lT.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):t===lT.OPAREN_CODE?e={type:lT.CALL_EXP,arguments:this.gobbleArguments(lT.CPAREN_CODE),callee:e}:(t===lT.PERIOD_CODE||r)&&(r&&this.index--,this.gobbleSpaces(),e={type:lT.MEMBER_EXP,computed:!1,object:e,property:this.gobbleIdentifier()}),r&&(e.optional=!0),this.gobbleSpaces(),t=this.code}return e}gobbleNumericLiteral(){let e="",t,r;for(;lT.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(this.code===lT.PERIOD_CODE)for(e+=this.expr.charAt(this.index++);lT.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++));lT.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);lT.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+e+this.char+")")}return r=this.code,lT.isIdentifierStart(r)?this.throwError("Variable names cannot start with a number ("+e+this.char+")"):(r===lT.PERIOD_CODE||1===e.length&&e.charCodeAt(0)===lT.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:lT.LITERAL,value:parseFloat(e),raw:e}}gobbleStringLiteral(){let e="",t=this.index,r=this.expr.charAt(this.index++),n=!1;for(;this.index<this.expr.length;){let t=this.expr.charAt(this.index++);if(t===r){n=!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 n||this.throwError('Unclosed quote after "'+e+'"'),{type:lT.LITERAL,value:e,raw:this.expr.substring(t,this.index)}}gobbleIdentifier(){let e=this.code,t=this.index;for(lT.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length;)if(e=this.code,lT.isIdentifierPart(e))this.index++;else break;return{type:lT.IDENTIFIER,name:this.expr.slice(t,this.index)}}gobbleArguments(e){let t=[],r=!1,n=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let o=this.code;if(o===e){r=!0,this.index++,e===lT.CPAREN_CODE&&n&&n>=t.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}if(o===lT.COMMA_CODE){if(this.index++,++n!==t.length){if(e===lT.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===lT.CBRACK_CODE)for(let e=t.length;e<n;e++)t.push(null)}}else if(t.length!==n&&0!==n)this.throwError("Expected comma");else{let e=this.gobbleExpression();e&&e.type!==lT.COMPOUND||this.throwError("Expected comma"),t.push(e)}}return r||this.throwError("Expected "+String.fromCharCode(e)),t}gobbleGroup(){this.index++;let e=this.gobbleExpressions(lT.CPAREN_CODE);if(this.code===lT.CPAREN_CODE)return(this.index++,1===e.length)?e[0]:!!e.length&&{type:lT.SEQUENCE_EXP,expressions:e};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:lT.ARRAY_EXP,elements:this.gobbleArguments(lT.CBRACK_CODE)}}}Object.assign(lT,{hooks:new class{add(e,t,r){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][r?"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)})}}(lT),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"}),lT.max_unop_len=lT.getMaxKeyLen(lT.unary_ops),lT.max_binop_len=lT.getMaxKeyLen(lT.binary_ops);let lN=e=>new lT(e).parse(),lj=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(lT).filter(e=>!lj.includes(e)&&void 0===lN[e]).forEach(e=>{lN[e]=lT[e]}),lN.Jsep=lT,lN.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let r=t.node,n=this.gobbleExpression();if(n||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let o=this.gobbleExpression();if(o||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:r,consequent:n,alternate:o},r.operator&&e.binary_ops[r.operator]<=.9){let n=r;for(;n.right.operator&&e.binary_ops[n.right.operator]<=.9;)n=n.right;t.node.test=n.right,n.right=t.node,t.node=r}}else this.throwError("Expected :")}})}});let lA="ArrowFunctionExpression",l$={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)}},lI={...l$,Promise};function lM(e,t={}){return lW(e,t,lK)}async function lL(e,t={}){return lH(e,t,lK)}function lF(e,t={}){return lW(e,t,lG)}function lB(e,t={}){return lH(e,t,lG)}function lU(e,t={}){return lW(e,t,lZ)}function lV(e,t={}){return lH(e,t,lZ)}function lW(e,t={},r){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 n=lQ(t,l$),o=lY("string"==typeof e?lN(e):e,n);if(r(o))return o;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 lH(e,t={},r){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 n=lQ(t,lI);return Promise.resolve(lY("string"==typeof e?lN(e):e,n)).then(t=>{if(r(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 lz(e){return lN(e)}function lK(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||e instanceof Date}function lG(e){return"boolean"==typeof e}function lZ(e){return"number"==typeof e}function lY(e,t){switch(e.type){case"UnaryExpression":var r,n,o,a,i,s,l,u,c,d,f,p,m,h=e,g=t;let y=lY(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 lY(v.left,b)&&lY(v.right,b);case"||":return lY(v.left,b)||lY(v.right,b);case"??":return lY(v.left,b)??lY(v.right,b)}let w=lY(v.left,b),E=lY(v.right,b);switch(v.operator){case"+":return w+E;case"-":return w-E;case"*":return w*E;case"/":return w/E;case"%":return w%E;case"**":return w**E;case"==":return w==E;case"===":return w===E;case"!=":return w!=E;case"!==":return w!==E;case">":return w>E;case">=":return w>=E;case"<":return w<E;case"<=":return w<=E;case"in":return w in E;default:throw`Expression evaluator does not support operator '${v.operator}' operator`}case"ConditionalExpression":return r=e,n=t,lY(r.test,n)?lY(r.consequent,n):lY(r.alternate,n);case"CallExpression":return l2(lJ(e,t));case"ArrowFunctionExpression":let x;return o=e,a=t,x=o.params?.map(e=>{if("Identifier"===e.type)return e.name;throw`Cannot handle parameter of type ${e.type}`})??[],(function(...e){if(e.length<x.length)throw`Required argument(s) ${x.slice(e.length,-1).join(", ")} were not provided`;let t=Object.fromEntries(x.reduce((t,r,n)=>{let o=e[n];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 r of Object.keys(t))if(!e(t[r]))return!1;return!0}if(Array.isArray(t)){for(let r of t)if(!e(r))break}return!1}(o)&&t.push([r,o]),t},[]));return lY(o.body,a.addVariables(t))}).bind(null);case"MemberExpression":return l2(lX(e,t));case"ArrayExpression":return i=e,s=t,i.elements?.map(l4(s));case"SequenceExpression":let D;return l=e,u=t,(D=l.expressions.map(l4(u)))[D.length-1];case"NewExpression":var _=e,S=t;if(_.callee&&"Identifier"===_.callee.type){let e=_.arguments?.map(l4(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,(l3(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 f=e,p=t,C=f.expressions?.map(l4(p))??[],(k=f.quasis?.map(l4(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:(m=e).cooked,tail:m.tail};default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function lq(e,t){switch(e.type){case"Literal":return e.value;case"Identifier":return e.name;case"MemberExpression":return lq(e.property,t);default:throw`VisitExpressionName does not support expression of type '${e.type}'`}}function lJ(e,t){let r=l1(e.callee,t);if(r===l0||e.optional&&null==r)return l0;let n=e.arguments?.map(l4(t));if(r){if("function"!=typeof r)throw`${l9(e.callee)} is not a function`}else throw`No function named ${l9(e.callee)} is defined in this context`;return r(...n)}function lX(e,t){let r=l1(e.object,t);if(r===l0||e.optional&&null==r)return l0;if(null===r)throw TypeError(`TypeError: cannot read properties of null (reading '${l5(e.property,t)}')`);if(void 0===r)switch(e.object.type){case"Identifier":{let r=lq(e.object,t);throw ReferenceError(`ReferenceError: ${r} is not defined`)}case"MemberExpression":throw TypeError(`TypeError: cannot read properties of undefined (reading '${l5(e.property,t)}')`);default:throw`VisitMemberExpression does not support operator '${e.object.type}' type`}if("object"!=typeof r&&"function"!=typeof r&&"string"!=typeof r&&"number"!=typeof r)throw`VisitMemberExpression does not support member access on type ${typeof r}`;let n=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}(lY(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);l3(n),function(e,t){if(l6.has(String(t)))return;let r=Object(e);for(;null!==r;){if(Object.hasOwn(r,t)){if(r===Object.prototype||r===Function.prototype)throw{type:"Illegal property access",message:`Cannot access the ${t} property of objects`};return}r=Object.getPrototypeOf(r)}}(r,n);let o=r[n];return"function"==typeof o?o.bind(r):o}function lQ(e,t){let r={variables:{...e},globals:{...t},addVariables(e){return this.variables={...this.variables,...e},this}};return r.addVariables.bind(r),r}lN.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 r=this.index;if(this.index++,this.gobbleSpaces(),this.code===e.CPAREN_CODE){this.index++;let e=this.gobbleBinaryOp();if("=>"===e){let r=this.gobbleBinaryExpression();r||this.throwError("Expected expression after "+e),t.node={type:lA,params:null,body:r};return}}this.index=r}}),e.hooks.add("after-expression",function(t){!function t(r){r&&(Object.values(r).forEach(e=>{e&&"object"==typeof e&&t(e)}),"=>"===r.operator&&(r.type=lA,r.params=r.left?[r.left]:null,r.body=r.right,r.params&&r.params[0].type===e.SEQUENCE_EXP&&(r.params=r.params[0].expressions),delete r.left,delete r.right,delete r.operator))}(t.node)})}}),lN.plugins.register({name:"new",init(e){e.addUnaryOp("new"),e.hooks.add("after-token",function(t){let r=t.node;if(r&&"new"===r.operator){r.argument&&[e.CALL_EXP,e.MEMBER_EXP].includes(r.argument.type)||this.throwError("Expected new function()"),t.node=r.argument;let n=t.node;for(;n.type===e.MEMBER_EXP||n.type===e.CALL_EXP&&n.callee.type===e.MEMBER_EXP;)n=n.type===e.MEMBER_EXP?n.object:n.callee.object;n.type="NewExpression"}})}}),lN.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 r(t){let r=this.index,n="",o=()=>{for(;e.isDecimalDigit(this.code)||95===this.code;)95===this.code?this.index++:n+=this.expr.charAt(this.index++)};o(),this.code===e.PERIOD_CODE&&(n+=this.expr.charAt(this.index++),o());let a=this.char;("e"===a||"E"===a)&&(n+=this.expr.charAt(this.index++),("+"===(a=this.char)||"-"===a)&&(n+=this.expr.charAt(this.index++)),o(),e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+n+this.char+")"));let i=this.code;if(e.isIdentifierStart(i))this.throwError("Variable names cannot start with a number ("+n+this.char+")");else if(i===e.PERIOD_CODE){n.length>1&&this.throwError(`Unexpected period ${JSON.stringify({chCode:i,number:n},null,2)}`),this.index=r;return}t.node={type:e.LITERAL,value:parseFloat(n),raw:this.expr.substring(r,this.index)}}e.hooks.add("gobble-token",function(n){if(48===this.code){var o,a,i;let s=this.index,l=this.expr.charAt(this.index+1),u=t.call(this,l);if(!u)return;let c="";for(;o=this.code,a=u,95===o||a.some(([e,t])=>o>=e&&o<=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,r.call(this,n);return}this.throwError("unexpected char within number")}n.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)&&r.call(this,n)})}}),lN.plugins.register({name:"regex",init(e){e.hooks.add("gobble-token",function(t){if(47===this.code){let r=++this.index,n=!1;for(;this.index<this.expr.length;){if(47===this.code&&!n){let n,o=this.expr.slice(r,this.index),a="";for(;++this.index<this.expr.length;){let e=this.code;if(e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57)a+=this.char;else break}try{n=new RegExp(o,a)}catch(e){this.throwError(e.message)}return t.node={type:e.LITERAL,value:n,raw:this.expr.slice(r-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===e.OBRACK_CODE?n=!0:n&&this.code===e.CBRACK_CODE&&(n=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}})}}),lN.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let r=t.node,n=this.gobbleExpression();if(n||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let o=this.gobbleExpression();if(o||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:r,consequent:n,alternate:o},r.operator&&e.binary_ops[r.operator]<=.9){let n=r;for(;n.right.operator&&e.binary_ops[n.right.operator]<=.9;)n=n.right;t.node.test=n.right,n.right=t.node,t.node=r}}else this.throwError("Expected :")}})}}),lN.plugins.register({name:"jsepTemplateLiteral",init(e){function t(e,r=!0){if(96===this.code){let t={type:"TemplateLiteral",quasis:[],expressions:[]},n="",o="",a=!1,i=this.expr.length,s=()=>t.quasis.push({type:"TemplateElement",value:{raw:o,cooked:n},tail:a});for(;this.index<i;){let i=this.expr.charAt(++this.index);if("`"===i)return this.index+=1,a=!0,s(),e.node=t,r&&(e.node=this.gobbleTokenProperty(e.node)),e.node;if("$"===i&&"{"===this.expr.charAt(this.index+1))this.index+=2,s(),o="",n="",t.expressions.push(...this.gobbleExpressions(125)),125!==this.code&&this.throwError("unclosed ${");else if("\\"===i)switch(o+=i,i=this.expr.charAt(++this.index),o+=i,i){case"n":n+="\n";break;case"r":n+="\r";break;case"t":n+=" ";break;case"b":n+="\b";break;case"f":n+="\f";break;case"v":n+="\v";break;default:n+=i}else n+=i,o+=i}this.throwError("Unclosed `")}}e.hooks.add("gobble-token",t),e.hooks.add("after-token",function(r){if((r.node.type===e.IDENTIFIER||r.node.type===e.MEMBER_EXP)&&96===this.code)return r.node={type:"TaggedTemplateExpression",tag:r.node,quasi:t.bind(this)(r,!1)},r.node=this.gobbleTokenProperty(r.node),r.node})}}),lN.addBinaryOp("in",7),lN.addBinaryOp("??",1);let l0=Symbol("optional chain short-circuited");function l1(e,t){switch(e.type){case"MemberExpression":return lX(e,t);case"CallExpression":return lJ(e,t);default:return lY(e,t)}}function l2(e){return e===l0?void 0:e}function l4(e){return function(t){return null===t?null:lY(t,e)}}function l3(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:`Cannot access the ${e} property of objects`}}let l6=new Set(["toString","valueOf","hasOwnProperty"]);function l5(e,t){try{return lq(e,t)}catch{return"<computed>"}}function l9(e){return e?"MemberExpression"===e.type?e.property?.name:e.name:null}function l8(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:{...lI},isLocalExpression:!1,variables:new Set};return l7("string"==typeof e?lN(e):e,t),[...t.variables]}function l7(e,t){switch(e.type){case"UnaryExpression":return n=e,o=t,l7(n.argument,o);case"BinaryExpression":return a=e,i=t,[l7(a.left,i),l7(a.right,i)].filter(Boolean);case"ConditionalExpression":return s=e,l=t,[l7(s.consequent,l),l7(s.test,l),l7(s.alternate,l)].filter(Boolean);case"CallExpression":let r;return u=e,c=t,r=l7(u.callee,c),u.arguments?.map(ue(c)),r;case"ArrowFunctionExpression":var n,o,a,i,s,l,u,c,d,f,p,m,h,g,y,v,b=e,w=t;let E={...w};E.isLocalExpression=!0;let x=b.params?.map(ue(E))??[],D=l7(b.body,E)??[];if(D&&Array.isArray(D))for(let e of D)x.includes(e)||w.variables.add(e);return;case"MemberExpression":var _=e,S=t;if(l7(_.object,S),_.computed)return void l7(_.property,S);let C={...S};C.isLocalExpression=!0,l7(_.property,C);return;case"ArrayExpression":return d=e,f=t,void d.elements?.map(ue(f));case"SequenceExpression":return p=e,m=t,void p.expressions?.map(ue(m));case"NewExpression":return h=e,g=t,void h.arguments?.map(ue(g));case"Literal":case"TemplateElement":return;case"Identifier":var k=e,P=t;if(!(k.name in P.globals))if(P.isLocalExpression)return k.name;else P.variables.add(k.name);return;case"TemplateLiteral":return y=e,v=t,void(y.expressions?.map(ue(v)),y.quasis?.map(ue(v)));default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function ue(e){return function(t){return null===t?null:l7(t,e)}}let ut=W("feature-flags",{flags:function(){let e={};for(let t of Object.keys(localStorage))if(t.startsWith("openmrs:feature-flag:")){let r=t.replace("openmrs:feature-flag:",""),n=JSON.parse(localStorage.getItem(`openmrs:feature-flag-meta:${r}`)||"{}");e[r]={enabled:"true"===localStorage.getItem(t),...n}}return e}()});function ur(e,t,r){ut.setState(n=>({flags:{...n.flags,[e]:{enabled:n.flags[e]?.enabled??!1,label:t,description:r}}}))}function un(){let e=ut.getState().flags;Object.keys(localStorage).filter(e=>e.startsWith("openmrs:feature-flag:")).forEach(t=>{let r=t.replace("openmrs:feature-flag:","");e[r]||(localStorage.removeItem(t),localStorage.removeItem(`openmrs:feature-flag-meta:${r}`))})}function uo(e){return ut.getState().flags[e].enabled}function ua(e,t){ut.subscribe(r=>{t(r.flags[e].enabled)})}function ui(e,t){ut.setState(r=>({flags:{...r.flags,[e]:{...r.flags[e],enabled:t}}}))}ut.subscribe(e=>{for(let[t,r]of Object.entries(e.flags))localStorage.setItem(`openmrs:feature-flag:${t}`,r.enabled.toString()),localStorage.setItem(`openmrs:feature-flag-meta:${t}`,JSON.stringify({label:r.label,description:r.description}))});var us=tB(function(e,t,r){tN(e,t,r)});let ul=B("extensionsInternal",{slots:{},extensions:{}}),uu=B("extensionRenderings",{renderings:new Map}),uc=()=>W("extensionsInternal",{slots:{},extensions:{}}),ud=()=>W("extensionRenderings",{renderings:new Map});function uf(e){let t=ul.getState(),r=e(t);r!==t&&ul.setState(r)}let up=null,um=null;function uh(){let e=uu.getState();return up&&e===um||(up=new Map(e.renderings),um=e,function(e){for(let t of(uS.clear(),e.values()))uk(t,1);uC=!0}(up)),up}function ug(e){um={renderings:e},uu.setState(um,!0)}function uy(e){let t=uh();t.has(e.renderingId)||(t.set(e.renderingId,e),uk(e,1),ug(t))}function uv(e){let t=uh(),r=t.get(e);r&&(t.delete(e),uk(r,-1),ug(t))}let ub=()=>W("extensions",{slots:{}}),uw=0,uE=new Set;function ux(e){uw++;try{return e()}finally{if(0==--uw&&uE.size>0){let e=Array.from(uE);for(let t of(uE.clear(),e))uD(t)}}}function uD(e){try{e()}catch(t){console.error(`The extension system's '${e.name}' recomputation failed`,t)}}function u_(e){uw>0?uE.add(e):uD(e)}let uS=new Map,uC=!1;function uk(e,t){let r=JSON.stringify([e.slotName,e.extensionId,e.slotModuleName,e.extensionModuleName]),n=uS.get(r);if(!n){if(t<0)return;uS.set(r,{count:1,record:{slotModuleName:e.slotModuleName,extensionModuleName:e.extensionModuleName,slotName:e.slotName,extensionId:e.extensionId}}),uC=!0;return}n.count+=t,n.count<1&&(uS.delete(r),uC=!0)}function uP(){var e,t;if(uh(),!uC)return;uC=!1;let r=Array.from(uS.values(),({record:e})=>e);r.sort(uO),e=nm.getState().mountedExtensions,t=r,e.length===t.length&&e.every((e,r)=>0===uO(e,t[r]))||nm.setState({mountedExtensions:r})}function uO(e,t){return uR(e.slotName,t.slotName)||uR(e.extensionId,t.extensionId)||uR(e.slotModuleName,t.slotModuleName)||uR(e.extensionModuleName,t.extensionModuleName)}function uR(e,t){return e===t?0:e<t?-1:1}uP(),uu.subscribe(()=>u_(uP));let uT=uc(),uN=ub(),uj=ng(),uA=nb(),u$=new Set,uI=!1;function uM(e){if(null===e)u$=null;else if(null!==u$)for(let t of e)u$.add(t);u_(uL)}function uL(){if(!uI){uI=!0;try{for(let e=1;;e++){let t=u$;if(null!==t&&0===t.size)return;u$=new Set;try{!function(e,t,r,n,o,a=null){let i=uN.getState().slots,s={},l=!1,u=Object.entries(n.flags).filter(([,{enabled:e}])=>e).map(([e])=>e);for(let[n,c]of Object.entries(e.slots)){let d=i[n];if(d&&a&&!a.has(n)){s[n]=d;continue}let{config:f}=nv(t,c.name),p=function(e,t,r,n,o,a){let i=function(e,t){let r=e.add||[],n=e.remove||[],o=e.order||[],{extensions:a}=uT.getState(),i=new Set(n),s=[...t,...r].filter(e=>!i.has(e)),l=uZ(o),u=uZ(t),c=new Map(s.map(e=>[e,function(e,t,r,n){let o=t.get(e);if(void 0!==o)return o;{if(void 0!==r)return 1e3+r;let t=n.get(e);return void 0!==t?2e3+t:3e3}}(e,l,a[uU(e)]?.order,u)]));return s.sort((e,t)=>c.get(e)-c.get(t))}(r,t.slots[e].attachedIds),s=[];for(let l of i){let{config:i}=nE(n,e,l),u=nx(r,e,l),c=u?us({},i,u):i,d=uU(l),f=t.extensions[d];if(f){let e=c?.["Display conditions"]?.privileges??f.privileges??[];if(e&&("string"==typeof e||Array.isArray(e)&&e.length>0)&&(!a?.user||!sd(e,a.user))||f.featureFlag&&!o.includes(f.featureFlag))continue;s.push({id:l,name:d,moduleName:f.moduleName,config:c,featureFlag:f.featureFlag,meta:f.meta,displayConditionExpression:c?.["Display conditions"]?.expression||f.displayExpression})}}return s}(n,e,f,r,u,o.session);d&&d.moduleName===c.moduleName&&rx(d.candidateExtensions,p)?s[n]=d:(s[n]={moduleName:c.moduleName,candidateExtensions:p},l=!0)}(l||Object.keys(i).length!==Object.keys(s).length)&&uN.setState({slots:s})}(uT.getState(),uj.getState(),uA.getState(),ut.getState(),sr.getState(),t)}catch(e){throw u$=null===t||null===u$?null:new Set([...t,...u$]),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{uI=!1}}}function uF(e,t){let r=new Set;for(let n of Object.keys(e))e[n]!==t[n]&&r.add(n);for(let n of Object.keys(t))n in e||r.add(n);return r}function uB(e,t){return{moduleName:t,name:e,attachedIds:[]}}function uU(e){let[t]=e.split("#");return t}function uV(e,t){let r=uU(t);return e.extensions[r]}function uW(e){return uV(uT.getState(),e)}uT.subscribe((e,t)=>{uM(e.extensions!==t.extensions?null:uF(e.slots,t.slots))}),uj.subscribe((e,t)=>{uM(uF(e.slots,t.slots))}),uA.subscribe((e,t)=>{uM(uF(e.configs,t.configs))}),ut.subscribe(()=>uM(null)),sr.subscribe(()=>uM(null)),uM(null);let uH=e=>uf(t=>({...t,extensions:{...t.extensions,[e.name]:{...e}}}));function uz(e,t){uf(r=>{let n=r.slots[e];return n?{...r,slots:{...r.slots,[e]:{...n,attachedIds:[...n.attachedIds,t]}}}:{...r,slots:{...r.slots,[e]:{...uB(e),attachedIds:[t]}}}})}function uK(e,t){uf(r=>{let n=r.slots[e];return n&&n.attachedIds.includes(t)?{...r,slots:{...r.slots,[e]:{...n,attachedIds:n.attachedIds.filter(e=>e!==t)}}}:r})}function uG(e){uf(t=>{let r=t.slots[e];return r?{...t,slots:{...t.slots,[e]:{...r,attachedIds:[]}}}:t})}function uZ(e){let t=new Map;return e.forEach((e,r)=>{t.has(e)||t.set(e,r)}),t}function uY(e,t){return function(e,t,r=null,n){let o;return e.filter(e=>{let a=e.displayConditionExpression;if("string"!=typeof a||0===a.trim().length)return!0;o??(o=t&&"object"==typeof t?{session:r,...t}:{session:r});try{return!!lF(a,o)}catch(t){return console.error(`Error while evaluating expression '${a}' for ${e.id}`+(n?` in ${n}`:""),t),!1}})}(uq(e),t,sr.getState().session,e)}function uq(e){return uN.getState().slots[e]?.candidateExtensions??[]}let uJ=(e,t)=>uT.setState(r=>{let n=r.slots[t]?.moduleName;if(n&&n!=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 ${n}.`),r;if(n&&n==e)return r;if(r.slots[t])return{...r,slots:{...r.slots,[t]:{...r.slots[t],moduleName:e}}};let o=uB(t,e);return{...r,slots:{...r.slots,[t]:{...o}}}}),uX=()=>{u$=null,uf(()=>({slots:{},extensions:{}})),ud().setState({renderings:new Map}),uN.setState({slots:{}})},uQ=B("left-nav",{slotName:null,basePath:window.spaBase,mode:"normal"});function u0({name:e,basePath:t,mode:r,componentContext:n,state:o}){uQ.setState({slotName:e,basePath:t,mode:r??"normal",componentContext:n,state:o})}function u1(e){uQ.getState().slotName===e&&uQ.setState(uQ.getInitialState(),!0)}let u2=B("modalRegistry",{modals:{}});function u4(e){u2.setState(t=>(t.modals[e.name]=e,t))}function u3(e){let t=u2.getState().modals[e];if(!t){let r=uW(e);r&&(t={name:e,load:r.load,moduleName:r.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.`),u4(t))}return t}let u6=B("workspace2",{registeredGroupsByName:{},registeredWindowsByName:{},registeredWorkspacesByName:{},openedGroup:null,openedWindows:[],isMostRecentlyOpenedWindowHidden:!1});function u5(e){let{registeredWorkspacesByName:t,registeredWindowsByName:r}=u6.getState(),n=t[e];if(n){let t=r[n.window];if(t)return t;throw Error(`No workspace window found with name: ${n.window} for workspace: ${e}`)}throw Error(`No workspace found with name: ${e}`)}function u9(e){let{registeredGroupsByName:t,registeredWindowsByName:r}=u6.getState(),n=r[e];if(n){let r=t[n.group];if(r)return r;throw Error(`No workspace group found with name: ${n.group} for window: ${e}`)}throw Error(`No workspace window found with name: ${e}`)}function u8(e){let{openedWindows:t}=u6.getState();return t.findIndex(t=>t.openedWorkspaces.find(t=>t.workspaceName===e))}function u7(e,t){if(0==t.length)return;let{registeredGroupsByName:r}=u6.getState(),n={...r};for(let r of t){if(n[r.name])throw Error(`Cannot register workspace group ${r.name} more than once`);n[r.name]={...r,moduleName:e}}u6.setState({registeredGroupsByName:n})}function ce(e,t){if(0==t.length)return;let{registeredWindowsByName:r}=u6.getState(),n={...r};for(let r of t){if(n[r.name])throw Error(`Cannot register workspace window ${r.name} more than once`);let t={...r,moduleName:e};n[r.name]=t}u6.setState({registeredWindowsByName:n})}function ct(e,t){if(0==t.length)return;let{registeredWorkspacesByName:r}=u6.getState(),n={...r};for(let r of t){if(n[r.name])throw Error(`Cannot register workspace ${r.name} more than once`);let t={...r,moduleName:e};n[r.name]=t}u6.setState({registeredWorkspacesByName:n})}let cr=0,cn=null,co={bootstrap:15e3,mount:15e3,unmount:15e3};function ca(e,t){if(e.timeouts)return e;let r=e.name??"parcel",n=Object.fromEntries(Object.keys(co).filter(t=>e[t]).map(n=>{var o,a;let i,s;return[n,(o=e[n],a=co[n],i=Array.isArray(o)?o:[o],s=e=>i.reduce((t,o,a)=>t.then(()=>{let t=o(e);return"function"==typeof t?.then&&"function"==typeof t?.catch?t:Promise.reject(Error(`Lifecycle function ${n} at array index ${a} for parcel ${r} did not return a promise`))}),Promise.resolve(void 0)),e=>{let o,i=new Promise((e,t)=>{o=setTimeout(()=>t(Error(`Lifecycle function ${n} for parcel ${r} did not settle within ${a}ms`)),a)});return Promise.race([s(e),i]).finally(()=>clearTimeout(o)).then(e=>(t(n,!1),e),e=>{throw t(n,!0),e})})]}));return{...e,...n}}async function ci(e,t){var r,n;let o,a,i,s,l,u=await (cn??(cn=new Promise((e,t)=>{o9({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),o9))),cn),c={...t},d=(o=c,a=!1,{retarget:e=>o={...e},release:i=()=>(function(e){for(let t of Object.keys(e))delete e[t]})(o),onSettled(e,t){switch(e){case"bootstrap":t&&i();return;case"mount":a||(a=t);return;case"unmount":(t||a)&&i();return}}});return n=u((r=d.onSettled,"function"==typeof e?()=>e().then(e=>ca(e,r)):ca(e,r)),c),s=e=>t=>e.call(n,d.retarget(t)).catch(e=>{throw"SKIP_BECAUSE_BROKEN"===n.getStatus()&&d.release(),e}),l=n.update&&s(n.update),Object.defineProperty(n,"update",{configurable:!0,enumerable:!0,get:()=>l,set:e=>{l=e&&s(e)}})}function cs(){return cl}function cl(e,t){let r,n=ci(e,t).then(e=>r=e);return{mount:()=>n.then(e=>e.mount()),unmount:()=>n.then(e=>e.unmount()),update:e=>n.then(t=>t.update?.(e)),getStatus:()=>r?.getStatus()??"LOADING_SOURCE_CODE",get loadPromise(){return n.then(e=>e.loadPromise)},get bootstrapPromise(){return n.then(e=>e.bootstrapPromise)},get mountPromise(){return n.then(e=>e.mountPromise)},get unmountPromise(){return n.then(e=>e.unmountPromise)}}}async function cu(e,t,r,n,o=e=>e,a={}){let i=uU(n),s=uW(n),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:f}=s,p=cr++,m=`${t}/${n}-${p}`;e.dataset.extensionRenderingId=m;let h=e=>{try{uv(m)}catch(t){console.error(e,t)}};try{uy({renderingId:m,extensionName:i,extensionModuleName:d,extensionId:n,slotName:t,slotModuleName:r})}catch(e){throw h(`Recomputing configuration after registering '${n}' failed also failed`),e}try{u=await f()}catch(e){throw h(`Recomputing configuration after '${n}' failed to load also failed`),e}try{l=await ci(o({...u,name:`${t}/${i}-${p}`}),{...a,_meta:c,_extensionContext:{extensionId:n,extensionSlotName:t,extensionSlotModuleName:r,extensionModuleName:d,extensionMeta:c},domElement:e})}catch(e){throw h(`Recomputing configuration after '${n}' failed to mount also failed`),e}l.mountPromise.then(void 0,e=>{console.error(`Extension '${n}' in slot '${t}' failed to mount`,e),h(`Recomputing configuration after '${n}' failed to mount also failed`)}),l.unmountPromise.then(()=>h(`Recomputing configuration after unmounting '${n}' failed`),e=>{console.error(`Extension '${n}' in slot '${t}' failed to unmount`,e),h(`Recomputing configuration after '${n}' failed to unmount also failed`)})}else console.warn(`Tried to render ${n} into ${t} but no DOM element was available.`);return l}var cc=r(4923),cd=r.n(cc);let cf=(0,cc.createContext)({moduleName:"",featureName:""});function cp({to:e,templateParams:t,onBeforeNavigate:r,children:n,...o}){return(0,cc.useEffect)(()=>{o.href&&console.warn(`ConfigurableLink does not support the href prop. Use the 'to' prop instead. The provided href value is '${o.href}'`),o.onClick&&console.warn(`ConfigurableLink does not support the onClick prop. Use the 'onBeforeNavigate' prop instead. The 'to' prop of the offending link is ${e}`)},[]),cd().createElement("a",{onClick:n=>{0===n.button&&!n.ctrlKey&&!n.shiftKey&&!n.altKey&&!n.metaKey&&(n.preventDefault(),r?.(n),iq({to:e,templateParams:t})),0===n.button&&(n.ctrlKey||n.metaKey)&&r?.(n),0===n.button&&n.shiftKey&&r?.(n),1===n.button&&r?.(n)},href:iZ(e,t),...o},n)}let cm=({state:e,children:t,...r})=>{let{extension:n}=(0,cc.useContext)(cf),o=(0,cc.useRef)(null),a=(0,cc.useRef)(Promise.resolve()),i=(0,cc.useRef)(!1),s=(0,cc.useRef)(!1),l=(0,cc.useRef)(e),u=(0,cc.useCallback)(e=>{if(!e)return;let t=()=>{"MOUNTED"===e.getStatus()&&e.unmount()};switch(e.getStatus()){case"MOUNTED":e.unmount();break;case"UPDATING":a.current?.then(t,t);break;default:e.mountPromise.then(t,()=>{})}},[]),c=(0,cc.useCallback)((e,t)=>{e.update&&"UNMOUNTING"!==e.getStatus()&&(a.current=Promise.all([e.mountPromise,a.current]).then(()=>{if(o.current?.getStatus()==="MOUNTED"&&o.current.update)return o.current.update({...t})}).catch(e=>{let t=o.current?.getStatus();"UNMOUNTING"!==t&&"NOT_MOUNTED"!==t&&"UNLOADING"!==t&&console.error(`The extension '${n?.extensionId}' failed to update`,e)}))},[]),d=(0,cc.useCallback)(t=>{t&&!o.current&&!s.current&&n?.extensionSlotName&&n.extensionSlotModuleName&&(s.current=!0,cu(t,n.extensionSlotName,n.extensionSlotModuleName,n.extensionId,void 0,e).then(t=>{(s.current=!1,o.current=t,i.current)?u(t):t&&l.current!==e&&c(t,l.current)},()=>{s.current=!1}))},[]);return(0,cc.useEffect)(()=>(i.current=!1,()=>{i.current=!0,u(o.current)}),[]),(0,cc.useEffect)(()=>{l.current=e,o.current&&c(o.current,e)},[e]),n?cd().createElement("div",{ref:d,"data-extension-id":n?.extensionId,style:{position:"relative"},...r}):null};function ch(e){let t=(0,cc.useRef)(e);return R(t.current,e)||(t.current=e),t.current}function cg(e,t){"function"==typeof t&&(t=t(e));let r={};for(let[n,o]of Object.entries(t)){let t=function(...t){e.setState(e=>o(e,...t))};r[n]=t}return r}let cy=e=>e;function cv(e,t=cy,r){let n=(0,cc.useCallback)(t=>e.subscribe(t),[e]),o=(0,cc.useCallback)(()=>t(e.getState()),[e,t]),a=(0,cc.useSyncExternalStore)(n,o,o),i=(0,cc.useMemo)(()=>r?cg(e,r):null,[e,r]);return(0,cc.useMemo)(()=>i?{...a,...i}:a,[a,i])}function cb(e,t){return cv(e,cy,t)}function cw(e){return function(t){let r=(0,cc.useCallback)(t=>e.subscribe(t),[]),n=(0,cc.useCallback)(()=>e.getState(),[]),o=(0,cc.useSyncExternalStore)(r,n,n),a=(0,cc.useMemo)(()=>t?cg(e,t):null,[t]);return(0,cc.useMemo)(()=>a?{...o,...a}:o,[o,a])}}let cE=[];Object.freeze(cE);let cx={candidateExtensions:cE};Object.freeze(cx);let cD=e=>{let t=(0,cc.useCallback)(t=>t.slots?.[e]??cx,[e]);return cv(ub(),t)},c_=e=>e.session;function cS(e,t){let{candidateExtensions:r}=cD(e),n=cv(sr,c_),o=ch(t);return(0,cc.useMemo)(()=>uY(e,o),[e,o,n,r])}function cC(e,t){let{moduleName:r}=(0,cc.useContext)(cf);if(!r)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,cc.useEffect)(()=>{uJ(r,e)},[r,e]),{extensions:cS(e,t),extensionSlotName:e,extensionSlotModuleName:r}}function ck(e){return e}function cP({name:e,extensionSlotName:t,select:r=ck,children:n,state:o,style:a,...i}){if(n&&o)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,cc.useRef)(null),{extensions:u,extensionSlotModuleName:c}=cC(s,o),d=(0,cc.useMemo)(()=>r(u),[r,u]),f=(0,cc.useMemo)(()=>{if("function"==typeof n&&!cd().isValidElement(n))return d.map(e=>n(e,o))},[n,d]);return cd().createElement("div",{ref:l,"data-extension-slot-name":s,"data-extension-slot-module-name":c,style:{...a,position:"relative"},...i},s&&d?.map((e,t)=>cd().createElement(cf.Provider,{key:e.id,value:{moduleName:c,featureName:"",extension:{extensionId:e.id,extensionSlotName:s,extensionSlotModuleName:c,extensionMeta:e.meta}}},f?.[t]??("function"!=typeof n?n:null)??cd().createElement(cm,{state:o}))))}var cO=r(5338);function cR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function cT(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?cR(Object(r),!0).forEach(function(t){var n,o,a;n=e,o=t,a=r[t],o in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cR(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function cN(e){return(cN="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 cj(e){return(cj="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 cA(e,t){var r;if("function"!=typeof(r=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 r="single-spa-application:".concat(t);return function(){var e=document.getElementById(r);return e||((e=document.createElement("div")).id=r,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(cj(r)));return function(){var e=r(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(cj(e)));return e}}var c$=null;try{c$=require("react").createContext()}catch(e){}var cI={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 cM(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then(function(t){e.rootComponent=t})}function cL(e,t){return new Promise(function(r,n){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 o,a=cV(e,t,function(){r(this)}),i=cA(e,t)(),s=function(e){var t=e.reactDom,r=e.renderType,n=e.elementToRender,o=e.domElement,a=t[r];if("function"!=typeof a)throw Error('renderType "'.concat(r,'" did not return a function.'));switch(r){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var i=a(o);return i.render(n),i;case"hydrateRoot":return a(o,n);default:return a(n,o),null}}({elementToRender:a,domElement:i,reactDom:cU(e),renderType:"function"==typeof(o=e).renderType?o.renderType():o.renderType});e.domElements[t.name]=i,e.renderResults[t.name]=s})}function cF(e,t){return new Promise(function(r){e.unmountResolves[t.name]=r;var n=e.renderResults[t.name];n&&n.unmount?n.unmount():cU(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]})}function cB(e,t){return new Promise(function(r){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(r);var n=cV(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(n);else{var a=cA(e,t)();cU(e).render(n,a)}})}function cU(e){return e.ReactDOMClient||e.ReactDOM}function cV(e,t,r){var n=e.React.createElement(e.rootComponent,t),o=c$?e.React.createElement(c$.Provider,{value:t},n):n;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function r(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},r.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return r.prototype=Object.create(e.React.Component.prototype),r.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},r.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},r}(e,t),o=e.React.createElement(e.errorBoundaryClass,t,o)),o=e.React.createElement(e.SingleSpaRoot,cT(cT({},t),{},{mountFinished:r,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])}}),o)}var cW=r(202),cH=r(2551),cz=r.n(cH),cK=r(7900);let cG={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},cZ=new Map;(0,cK.initCache)(cZ);let cY={errorRetryCount:3,fetcher:se,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,shouldRetryOnError:e=>{if(e instanceof st){let t=e.response.status;return!!(t>=500)||401===t||403===t||429===t}return!0},provider:()=>cZ};function cq(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw Error("Invalid options");let t=Object.assign({},cG,e),r={...cY,...t.swrConfig};return function(e){var n,o,a,i,s;return a=o=class extends(n=cd().Component){componentDidCatch(e,r){r&&r.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:r.componentStack})),t.throwErrorsToConsole&&setTimeout(()=>{throw e}),this.setState({caughtError:e,caughtErrorInfo:r})}render(){if(this.state.caughtError)return cd().createElement("div",null,"An error has occurred. Please try reloading the page.");{let n=cd().createElement(cc.Suspense,{fallback:null},cd().createElement(cH.SWRConfig,{value:r},cd().createElement(cf.Provider,{value:this.state.config},t.disableTranslations?cd().createElement(e,this.props):cd().createElement(cW.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},cd().createElement(e,this.props)))));return t.strictMode&&cd().StrictMode?cd().createElement(cd().StrictMode,null,n):n}}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 a?Object.defineProperty(a,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[i]=s,o}}function cJ(e,t){return function(e){if("object"!==cN(e))throw Error("single-spa-react requires a configuration object");var t,r=cT(cT({},cI),e);if(!r.React)throw Error("single-spa-react must be passed opts.React");if(!r.ReactDOM&&!r.ReactDOMClient)throw Error("single-spa-react must be passed opts.ReactDOM or opts.ReactDOMClient");if(r.renderType||(null!=(t=r.ReactDOMClient)&&t.createRoot?r.renderType="createRoot":r.renderType="render"),!r.rootComponent&&!r.loadRootComponent)throw Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(r.errorBoundary&&"function"!=typeof r.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!c$&&r.React.createContext&&(c$=r.React.createContext()),r.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}(r);var n={bootstrap:cM.bind(null,r),mount:cL.bind(null,r),unmount:cF.bind(null,r)};return r.parcelCanUpdate&&(n.update=cB.bind(null,r)),n}({React:cd(),ReactDOMClient:cO,rootComponent:cq(t)(e)})}function cX(e,t){return()=>e().then(({default:e})=>cJ(e,t))}function cQ(e,t){return()=>Promise.resolve(cJ(e,t))}let c0=cX,c1=A()(()=>({}));V("openmrs-app-context",c1);let c2={};function c4(e,t=e=>e){let r=c1.getState();return e in r?Object.freeze(Object.assign({},t?t(r[e]):r[e])):null}function c3(e,t){c1.setState(r=>(e in r||(r[e]={}),r[e]=t(r[e]),Object.assign({},r)))}function c6(e){return null===e?null:Object.freeze(Object.assign({},e))}let c5=new Map;function c9(e,t){let r=(0,cc.useRef)(t??{}),n=(0,cc.useRef)(t=>c3(e,t)),o=(0,cc.useRef)(Symbol());return(0,cc.useEffect)(()=>{let r=t??{},n=o.current;return null===c4(e)?!function(e,t=c2){c1.setState(r=>{if(e in r)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({},r,{[e]:t===c2?{}:t})})}(e,r):(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.`),c3(e,()=>r)),c5.set(e,n),()=>{c5.get(e)===n&&(c1.setState(t=>(e in t&&delete t[e],t)),c5.delete(e))}},[e]),(0,cc.useEffect)(()=>{let n=t??{};R(r.current,n)||(c3(e,()=>n),r.current=n)},[t]),n.current}function c8({namespace:e,value:t}){return c9(e,t),null}let c7=({children:e,value:t,fallback:r})=>t?cd().createElement(cd().Fragment,null,e):r?cd().createElement(cd().Fragment,null,r):null;function de(){let e=(0,cc.useRef)();return(!e.current||e.current.signal.aborted)&&(e.current=new AbortController),(0,cc.useEffect)(()=>{let t=e.current;return()=>t?.abort()},[]),e.current}function dt(e,t=e=>e??{}){let[r,n]=(0,cc.useState)(()=>{if(dr(e))return;let r=c4(e);if(null!==r)return t?t(r):r});return(0,cc.useEffect)(()=>{if(dr(e))throw Error(`The namespace supplied to useAppContext must be a non-empty string, but was "${e}".`)},[e]),(0,cc.useEffect)(()=>{var r;let o;return(r=e=>{if(null==e)return void n(void 0);let r=t?t(e):e;n(e=>R(e,r)?e:r)})(c6(o=c4(e))),c1.subscribe(t=>{let n=e in t?t[e]:null;n!==o&&(o=n,r(c6(n)))})},[e,t]),r}function dr(e){return"string"!=typeof e||0===e.trim().length}function dn(e){let t=cS(e);return(0,cc.useMemo)(()=>t.map(e=>e.id),[t])}function da(e){return cD(e).candidateExtensions}function di(e,t,r){let{data:n,error:o,mutate:a,isLoading:i,isValidating:s}=cz()(e?ld(e,t,r):null,se);return(0,cc.useMemo)(()=>({isLoading:i,data:n?.data.results??[],error:o,mutate:a,isValidating:s}),[n,o,i,s,a])}function ds(e){(0,cc.useEffect)(()=>{if(e){let e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])}let dl={},du=`No ComponentContext has been provided. This should come from "openmrsComponentDecorator".
|
|
16
|
-
Usually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".`;function dc(e){let{moduleName:t,extension:r}=(0,cc.useContext)(cf),n=e?.externalModuleName??t;if(!n&&!r)throw Error(du);let o=function(e){let t=(0,cc.useMemo)(()=>nh(e),[e]),r=function(e){let[t,r]=(0,cc.useState)(()=>{let t=e.getState();return t.loaded&&t.config?t.config:null});return(0,cc.useEffect)(()=>e?.subscribe(e=>{e.loaded&&e.config&&r(e.config)}),[e]),t}(t);if(!r)throw dl[e]||(dl[e]=new Promise(e=>{let r=t.subscribe(t=>{t.loaded&&t.config&&(e(t.config),r())})})),dl[e];return r}(n),a=function(e){let t=(0,cc.useMemo)(nb,[]),r=function(e,t){let[r,n]=(0,cc.useState)(t?()=>{let r=nE(e.getState(),t.extensionSlotName,t.extensionId);if(r.loaded&&r.config)return r.config}:null);return(0,cc.useEffect)(()=>{if(t)return e.subscribe(e=>{let o=nE(e,t.extensionSlotName,t.extensionId);o.loaded&&o.config&&!rx(o.config,r)&&n(o.config)})},[e,t,r]),r}(t,e);if(!r&&e){let r=`${e.extensionSlotName}-${e.extensionId}`;throw!dl[r]&&t&&(dl[r]=new Promise(r=>{let n=t.subscribe(t=>{let o=nE(t,e.extensionSlotName,e.extensionId);o.loaded&&o.config&&(r(o.config),n())})})),dl[r]}return r||{}}(r);return(0,cc.useMemo)(()=>e?.externalModuleName&&n===e.externalModuleName?{...o}:{...o,...a},[n,e?.externalModuleName,o,a])}let dd=cS;function df(e,t=300){let[r,n]=(0,cc.useState)(e);return(0,cc.useEffect)(()=>{let r=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(r)}},[e,t]),r}var dp=r(6880),dm=r.n(dp);let dh=`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 dg(){let e=`${i5}/emrapi/configuration?v=${dh}`,t=dm()(e,se);return(0,cc.useMemo)(()=>({emrConfiguration:t.data?.data,isLoadingEmrConfiguration:t.isLoading,mutateEmrConfiguration:t.mutate,errorFetchingEmrConfiguration:t.error}),[t])}function dy(){return(0,cc.useContext)(cf).extension}let dv=cw(uc());function db(e){let t=cS(e);return(0,cc.useMemo)(()=>Object.fromEntries(t.map(e=>[e.name,e.meta])),[t])}let dw=cw(ub());function dE(e){let{flags:t}=cv(ut);return t[e]?.enabled??!1}function dx(){let[,e]=(0,cc.useState)(0);return(0,cc.useCallback)(()=>{e(e=>e+1)},[])}function dD(e,t,r={}){return dS(e,t,d_,r)}let d_={getPaginatedUrl:(e,t,r)=>{if(!e)return null;{let n=new URL(i7(e.toString()),window.location.toString());return n.searchParams.set("limit",""+t),n.searchParams.set("startIndex",""+r),n.searchParams.set("totalCount","true"),n.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 dS(e,t,r,n={}){let{getPaginatedUrl:o,getTotalCount:a,getCurrentPageSize:i,getData:s}=r,{immutable:l,swrConfig:u}=n,c=n.fetcher??se,[d,f]=(0,cc.useState)(1),p=(0,cc.useRef)(NaN),m=(0,cc.useRef)(NaN),h=(0,cc.useRef)(d),g=(0,cc.useRef)(!1),y=(0,cc.useRef)(!1),v=e?.toString()??"",[b,w]=(0,cc.useState)(v);v!==b&&(w(v),f(1),h.current=1,p.current=NaN,m.current=NaN,g.current=!1,y.current=!1);let E=(d-1)*t,x=(0,cc.useMemo)(()=>o(e,t,E),[e,t,E]),{data:D,..._}=(l?dm():cz())(x,c,u);D?.data&&(p.current=a(D?.data),m.current=i(D?.data),g.current=!0);let S=Math.ceil(p.current/t),C=(0,cc.useCallback)(e=>{if(!Number.isInteger(e)||e<1)return void console.warn(`useServerPagination: ignoring goTo(${e}); page must be a positive integer.`);let r=Math.ceil(p.current/t);!g.current||Number.isNaN(r)||e<=r?(h.current=e,f(e)):console.warn("Invalid attempt to go to out of bounds page: "+e)},[t]);(0,cc.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,f(e))},[d,t,v,D]);let k=(0,cc.useCallback)(()=>{C(h.current+1)},[C]),P=(0,cc.useCallback)(()=>{C(h.current-1)},[C]);return{data:s(D?.data),totalPages:S,totalCount:p.current,currentPage:d,currentPageSize:m.current,paginated:S>1,showNextButton:d<S,showPreviousButton:d>1,goTo:C,goToNext:k,goToPrevious:P,..._}}function dC(e,t,r={}){return dS(e,t,dk(),r)}function dk(){return{getPaginatedUrl:(e,t,r)=>{if(!e)return null;{let n=new URL(i7(e.toString()),window.location.toString());return n.searchParams.set("_count",""+t),n.searchParams.set("_getpagesoffset",""+r),n.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 dP=r(6310),dO=r.n(dP);function dR(e,t={}){return dT(e,d_,t)}function dT(e,t,r={}){let{swrInfiniteConfig:n,immutable:o}=r,{getNextUrl:a,getTotalCount:i,getData:s}=t,l=r.fetcher??se,u=(0,cc.useCallback)((r,n)=>0==r?e?.toString()??null:t.getNextUrl(n.data),[e]),{data:c,size:d,setSize:f,...p}=dO()(u,l,{...n,...o?{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1}:{}}),m=a(c?.[c.length-1].data),h=i(c?.[0]?.data);return{data:c?.flatMap(e=>s(e.data)),totalCount:h,hasMore:null!=m,loadMore:()=>{f((c?.length??0)+1)},nextUri:m,...p}}function dN(e,t={}){return dj(e,d_,t)}function dj(e,t,r={}){let n=dT(e,t,r),{hasMore:o,error:a,data:i,loadMore:s,isLoading:l,nextUri:u}=n;return((0,cc.useEffect)(()=>{o&&!a&&s()},[o,u]),r.partialData)?n:{...n,data:o||a?void 0:i,isLoading:l||o}}function dA(e,t={}){return dj(e,dk(),t)}function d$(e,t={}){return dT(e,dk(),t)}function dI(){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 dM(){let[e,t]=(0,cc.useState)(dI);return(0,cc.useEffect)(()=>{let e=()=>{t(dI())};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}let dL=e=>"small-desktop"===e||"large-desktop"===e;function dF(e){let t=(0,cc.useContext)(cf);(0,cc.useEffect)(()=>(t&&t.moduleName&&(e.componentContext=t),u0(e),()=>{u1(e.name)}),[t,e])}function dB(){return cv(uQ)}let dU=[];function dV(e=null,t=null){let r=new URLSearchParams;e&&r.set("tag",e),t&&r.set("q",t);let n=r.toString(),{data:o}=dN(`${i5}/location${n?"?"+n:""}`,{immutable:!0});return o??dU}function dW(e,t=!0){let r=(0,cc.useRef)(null);return(0,cc.useEffect)(()=>{let n=n=>{t&&r.current&&n.target&&n.target instanceof Node&&(r.current.contains(n.target)||e(n))};return window.addEventListener("mousedown",n),window.addEventListener("touchstart",n),()=>{window.removeEventListener("mousedown",n),window.removeEventListener("touchstart",n)}},[e,t]),r}function dH(e){let t=(0,cc.useRef)();return(0,cc.useEffect)(()=>{let r=new IntersectionObserver(t=>{for(let r of t)if(r.isIntersecting)return void e()},{threshold:1});return t.current&&r.observe(t.current),()=>{t.current&&r.unobserve(t.current)}},[t.current,e]),t}function dz(e,t={}){let{abortController:r,fetchInit:n,url:o,swrConfig:a}=t,i=de(),s=(0,cc.useMemo)(()=>n?.signal??r?.signal??i.signal,[r?.signal,n?.signal,i.signal]),l=(0,cc.useCallback)(e=>se(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,o),{...n,signal:s}),[s,n,o]);return cz()(e,l,a)}function dK(e=[],t=10){let[r,n]=(0,cc.useState)(1),o=(0,cc.useMemo)(()=>"number"==typeof t&&t>0?Math.max(1,Math.ceil(e.length/t)):1,[e.length,t]);r>o&&n(o);let a=Math.min(Math.max(1,r),o),i=(0,cc.useMemo)(()=>{let r=(a-1)*t,n=(a+0)*t;return e.slice(r,n)},[e,a,t]),s=(0,cc.useCallback)(e=>{!Number.isInteger(e)||e<1?console.warn(`usePagination: ignoring goTo(${e}); page must be a positive integer.`):n(e)},[]),l=(0,cc.useCallback)(()=>{n(e=>e+1)},[]),u=(0,cc.useCallback)(()=>{n(e=>Math.max(1,e-1))},[]);return(0,cc.useMemo)(()=>({results:i,totalPages:o,currentPage:a,paginated:e.length>t,showNextButton:a<o,showPreviousButton:a>1,goTo:s,goToNext:l,goToPrevious:u}),[i,o,e.length,t,a,s,l,u])}function dG(e,t,r,n){return{pageSizes:(0,cc.useMemo)(()=>{let r=Math.ceil(t/e);return isNaN(r)&&(r=0),[...Array(r).keys()].map(t=>(t+1)*e)},[e,t]),pageItemsCount:(0,cc.useMemo)(()=>e>t?t:e*r>t?e*(r-1)+n:e*r,[e,t,r,n])}}function dZ(){let e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function dY(e){let[t,r]=(0,cc.useState)(e??dZ()),{data:n,error:o,isValidating:a}=cz()(t?["patient",t]:null,()=>lm(t,{}));return(0,cc.useEffect)(()=>{let e=()=>{let e=dZ();e!==t&&r(e)};return window.addEventListener("single-spa:routing-event",e),()=>window.removeEventListener("single-spa:routing-event",e)},[t]),(0,cc.useMemo)(()=>({isLoading:a&&!o&&!n,patient:n,patientUuid:t,error:o}),[a,o,n,t])}function dq(){let e=`${i5}/metadatamapping/termmapping?v=custom:(metadataUuid)&code=emr.primaryIdentifierType`,{data:t,error:r,isLoading:n}=cz()(e,se);return(0,cc.useMemo)(()=>({primaryIdentifierCode:t?.data?.results[0]?.metadataUuid,isLoading:n,error:r}),[t,r,n])}function dJ(e){let{extensions:t,extensionSlotModuleName:r}=cC(e);return e?t.map(t=>({state:n})=>cd().createElement(cf.Provider,{value:{moduleName:r,featureName:"",extension:{extensionId:t.id,extensionSlotName:e,extensionSlotModuleName:r,extensionMeta:t.meta}}},cd().createElement(cm,{state:n}))):[]}function dX(){let e=(0,cc.useRef)(),[t,r]=(0,cc.useState)(null),n=null;if(!t){if(i){let e=ss().getState();e.loaded&&(n=e.session)}else i=new Promise(t=>{let r=({loaded:r,session:o})=>{r&&(t(o),n=o,e.current&&(e.current(),e.current=void 0))};r(ss().getState()),n||(e.current=ss().subscribe(r))});if(n)r(n);else throw i}(0,cc.useEffect)(()=>(e.current||(e.current=ss().subscribe(({loaded:e,session:t})=>{e&&(n=t,r(t))})),()=>{e.current&&(e.current(),e.current=void 0)}),[]);let o=t||n;if(!o)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 o}let dQ=({privilege:e,fallback:t,children:r})=>{let[n,o]=(0,cc.useState)(null);return((0,cc.useEffect)(()=>{let e=ss(),t=e.subscribe(({loaded:e,session:t})=>{o(e?t?.user??null:null)}),{loaded:r,session:n}=e.getState();return r&&o(n?.user??null),t},[]),n&&sd(e,n))?cd().createElement(cd().Fragment,null,r):t?cd().createElement(cd().Fragment,null,t):null};var d0=r(4353),d1=r.n(d0),d2=r(7581);let d4=new Map;function d3(){for(let e of Array.from(d4.values()))e()}let d6={setVisitContext:(e,t)=>null==t?{manuallySetVisitUuid:null}:{manuallySetVisitUuid:t.uuid,patientUuid:t.patient?.uuid}};function d5(e){let t=(0,cc.useId)();return(0,cc.useEffect)(()=>{if(e)return d4.set(t,e),()=>{d4.delete(t)}},[t,e]),{...cb(lC(),d6),mutateVisit:d3}}function d9(e,t=l_){let r=(0,cc.useRef)(void 0),{patientUuid:n,manuallySetVisitUuid:o,setVisitContext:a}=d5((0,cc.useCallback)(()=>r.current?.(),[])),i=e&&n==e?o:null,s=`?patient=${e}&v=${t}&includeInactive=false`,l=`/${i}?v=${t}`,{data:u,error:c,mutate:d,isValidating:f}=cz()(e?`${i5}/visit${s}`:null,se),{data:p,error:m,mutate:h,isValidating:g}=cz()(e&&i?`${i5}/visit${l}`:null,se),y=(0,cc.useMemo)(()=>u?.data.results.find(e=>null===e.stopDatetime)??null,[u]),v=(0,cc.useMemo)(()=>i&&p?p.data:null,[p,i]),b=(0,cc.useRef)(null);(0,cc.useEffect)(()=>{!f&&y&&n===e&&null===o&&a(y),g||(b.current&&v&&b.current.uuid===v.uuid&&!b.current.stopDatetime&&v.stopDatetime&&a(null),b.current=v)},[v,o,y,f,g,n]);let w=(0,cc.useCallback)(()=>{d(),h()},[d,h]);(0,cc.useEffect)(()=>{r.current=w},[w]);let E=!!(!u||i&&!p),x=!!(i?m:c);return{error:c||m,mutate:w,isValidating:f||g,activeVisit:y,currentVisit:v,currentVisitIsRetrospective:!!i,isLoading:E&&!x}}d0.extend(d2);let d8=[];function d7(){let{data:e}=dm()(lw,lE);return e??d8}let fe=new Map;async function ft(e,t){let r=t.indexOf("#"),n=r>=0,o=n?t.substring(0,r):e,a=n?t.substring(r+1):t,i=await sZ(o);return i&&Object.hasOwn(i,a)&&"function"==typeof i[a]?fn(o,i).then(()=>i[a]()):(i?i&&Object.hasOwn(i,a)?console.warn(`The export ${t}, defined in ${e}'s routes.json, is not a function`):console.warn(`${o} does not define a component called "${a}", referenced in ${e}'s routes.json. This cannot be loaded.`):console.warn(`Unknown app ${o} for ${t} defined in ${e}'s routes.json`),fr)}let fr={bootstrap:()=>Promise.resolve(),mount:()=>Promise.resolve(),unmount:()=>Promise.resolve()};async function fn(e,t){if(e in fe)await fe[e];else{let r=t??await sZ(e);await (fe[e]=new Promise((t,n)=>{if(Object.hasOwn(r,"startupApp")){let o=r.startupApp;if("function"==typeof o)return Promise.resolve(o()).then(()=>{nz(e),t(null)}).catch(n)}nz(e),t(null)}))}}function fo(e,t){let r=t.name;if(!r)return void console.error(`An extension definition in ${e} is missing an name and thus cannot be
|
|
15
|
+
${this.stack}`}}let se=B("session",{loaded:!1,session:null}),st=0,sr=null;function sn(){return sr||(se.getState().loaded&&st>=Date.now()-6e4?null:ss())}function so(e){let t=e?.includeAuthStatus??!0,r=e=>t?e:e.user,n=sn();return n?new Promise(e=>{let t=()=>{let t=se.getState();t.loaded&&(o(),e(r(t.session)))},o=se.subscribe(t);n.then(t,t)}):Promise.resolve(r(se.getState().session))}function sa(){return sn(),se}function si(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 ss(e,t){st=Date.now(),a??(a=st);let r={};e&&t&&(r.Authorization=`Basic ${window.btoa(`${e}:${t}`)}`);let n=sy(i8(i5,{headers:r,rejectAuthFailure:!0})),o=()=>{sr===n&&(sr=null)};return n.then(o,o),sr=n,n}function sl(){se.setState({loaded:!0,session:{authenticated:!1,sessionId:""}},!0)}function su(e,t){var r,n;if(void 0===t)return!e;if(!e)return!0;return r=e,n=t,("string"==typeof r?!K(n.privileges.find(e=>r===e.display)):Array.isArray(r)?r.every(e=>!K(n.privileges.find(t=>e===t.display))):(K(r)||console.error(`Could not understand privileges "${r}"`),!0))||!K(t.roles.find(e=>"System Developer"===e.display))}function sc(){let e,t;return new Promise(r=>{let n=n=>{n.loaded&&n.session.user&&(e=n.session.user,r(n.session.user),t&&t())};n(se.getState()),e||(t=se.subscribe(n))})}async function sd(){return(await so()).sessionLocation}async function sf(e,t){return sy(i8(i5,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},rejectAuthFailure:!0,signal:t?.signal}))}async function sp(e,t){return await i8(i5,{method:"POST",body:{locale:e},headers:{"Content-Type":"application/json"},signal:t?.signal}),ss()}async function sm(e,t,r){return r||(r=new AbortController),await i8(`${i3}/user/${e}`,{method:"POST",body:{userProperties:t},headers:{"Content-Type":"application/json"},signal:r.signal}),ss()}async function sh(e,t=!1){let r=await i8(t?`${i5}?rememberMe=true`:i5,{headers:{"X-Totp-Code":e}});return r.data?.authenticated?(await ss()).session:r.data}async function sg(){try{await i8(i5,{method:"DELETE",rejectAuthFailure:!0})}catch(e){if(!sv(e))throw e}sl(),await ss().catch(()=>{})}function sy(e){return new Promise((t,r)=>{e.then(e=>{if("object"==typeof e?.data){let r={loaded:!0,session:e.data};se.setState(r,!0),t(r)}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)?r(sb(Error("The session endpoint did not respond with a session"))):r(sb(Error("The server is still starting up"),!0))}).catch(e=>{var n,o;if(sv(e)){"object"==typeof(n=e.responseBody)&&null!==n&&!1===n.authenticated?se.setState({loaded:!0,session:e.responseBody},!0):sl(),t(se.getState());return}(o=e)instanceof i7&&502===o.response.status&&!se.getState().loaded&&void 0!==a&&Date.now()-a<18e4?r(sb(e,!0)):(k(`Failed to fetch new session information: ${e}`),r(sb(e)))})})}function sv(e){return e instanceof i7&&(401===e.response.status||403===e.response.status)}function sb(e,t=!1){return se.getState().loaded||se.setState({loaded:!1,session:null,error:e instanceof Error?e:Error(String(e)),initializing:t},!0),se.getState()}function sw(){return"development"===window.spaEnv||"true"===localStorage.getItem("openmrs:devtools")}se.subscribe(e=>{e.loaded&&e.session&&si(e.session)});let sE={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"};function sx(){nV("@openmrs/esm-api",i2),ss()}let sD="import-map-override:",s_="import-map-overrides-disabled",sS="import-map-overrides:change",sC=!1,sk=null,sP=null;async function sO(){return sP??(sP=sR().then(({map:e,complete:t})=>(t||(sP=null),e))),sP}async function sR(){let e=document.querySelectorAll('script[type="systemjs-importmap"]'),t=[],r=!0;for(let n=0;n<e.length;n++){let o=e[n];try{if(o.src){let e=await fetch(o.src);if(!e.ok)throw Error(`Request for ${o.src} returned ${e.status} ${e.statusText}`);t.push(await e.json())}else o.textContent&&t.push(JSON.parse(o.textContent))}catch(e){r=!1,console.warn(`[import-maps] Failed to parse import map from script tag at index ${n}`,e)}}return{map:sT(t),complete:r}}function sT(e){let t={imports:{}};for(let r of e)r?.imports&&Object.assign(t.imports,r.imports);return t}function sN(){let e={};try{let t=sM();for(let r=0;r<localStorage.length;r++){let n=localStorage.key(r);if(n?.startsWith(sD)){let r=n.slice(sD.length);if(!t.includes(r)){let t=localStorage.getItem(n);t&&(e[r]=t)}}}}catch(e){console.warn("[import-maps] Failed to read import-map overrides from localStorage",e)}return{imports:e}}async function sj(){let e=await sO();return sC?sT([e,sk??sN()]):e}async function sA(){return sO()}async function s$(){return sC?sT([await sO(),sN()]):sO()}function sI(e){if(!sC)return{imports:{}};if(e){let e={};for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);if(r?.startsWith(sD)){let t=localStorage.getItem(r);t&&(e[r.slice(sD.length)]=t)}}return{imports:e}}return sN()}function sM(){if(!sC)return[];try{let e=localStorage.getItem(s_);if(e){let t=JSON.parse(e);if(Array.isArray(t))return t}}catch{}return[]}function sL(e){return!!sC&&sM().includes(e)}function sF(e,t){if(!sC)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.setItem(sD+e,t),window.dispatchEvent(new CustomEvent(sS))}catch(e){console.warn("[import-maps] Failed to write import-map override to localStorage",e)}}function sB(e){if(!sC)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.removeItem(sD+e);let t=sM().filter(t=>t!==e);t.length>0?localStorage.setItem(s_,JSON.stringify(t)):localStorage.removeItem(s_),window.dispatchEvent(new CustomEvent(sS))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}function sU(){if(!sC)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 r=localStorage.key(t);r?.startsWith(sD)&&e.push(r)}e.forEach(e=>localStorage.removeItem(e)),localStorage.removeItem(s_),window.dispatchEvent(new CustomEvent(sS))}catch(e){console.warn("[import-maps] Failed to clear import-map overrides from localStorage",e)}}function sV(e){if(!sC)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{let t=sM().filter(t=>t!==e);t.length>0?localStorage.setItem(s_,JSON.stringify(t)):localStorage.removeItem(s_),window.dispatchEvent(new CustomEvent(sS))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}let sW=!1;function sH(){!sW&&(sW=!0,(sC="development"===window.spaEnv)&&(sk=sN()))}function sz(e){return e.replace(/[\/\-@]/g,"_")}async function sK(e,t="./start",n){var o;let a,i=!n?.maxLoadingTime||n.maxLoadingTime<=0?6e5:n.maxLoadingTime;await Promise.race([sG(e,n?.importMap),new Promise((t,r)=>{a=setTimeout(()=>{var t;r(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)})]),a&&clearTimeout(a);let s=sz(e),l=window[s];if(!("object"==typeof(o=l)&&null!==o&&"init"in o&&"function"==typeof o.init&&"get"in o&&"function"==typeof o.get)){let e=`The global variable ${s} does not refer to a federated module`;throw console.error(e),Error(e)}l.init(r.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 sG(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 r=sz(e);if(!window[r]){let r=t??await sZ();if(!r.imports.hasOwnProperty(e)){let t=`Could not find the package ${e} defined in the current importmap`;throw console.error(t),Error(t)}let n=r.imports[e];n.startsWith("./")&&(n=window.spaBase+n.substring(1));let o=e in sI().imports;try{return await function(e){var t;let r=(t=window)[sY]??(t[sY]=new Map),n=r.get(e);if(n)return n;if(document.head.querySelector(`script[src="${e}"]`))return console.warn(`Script at ${e} already loaded. Not loading it again.`),Promise.resolve();let o=document.createElement("script");o.src=e,o.type="text/javascript",o.async=!0;let a=new Promise((t,n)=>{let a=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(a),o.removeEventListener("load",s),o.removeEventListener("error",l)}function s(){i(),t()}function l(t){i(),r.delete(e),o.remove();let a=`Failed to load script from ${e}`;console.error(a,t),n(t.message??a)}o.addEventListener("load",s),o.addEventListener("error",l),document.head.appendChild(o)});return r.set(e,a),a}(n)}catch(e){return o&&E({kind:"error",title:iz("scriptLoadingFailed","Error: Script failed to load"),description:iz("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:n}),actionButtonLabel:iz("resetOverrides","Reset overrides"),onActionButtonClick(){sU(),window.location.reload()}}),Promise.reject(e)}}return Promise.resolve()}async function sZ(){return sj()}let sY=Symbol.for("__openmrs_script_loading");function sq(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 sJ(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&&sq(t))}let sX="openmrs-routes:",sQ="openmrs-routes:change",s0=!1,s1=null,s2=null;async function s4(){return s2??(s2=s3().then(({map:e,complete:t})=>(t||(s2=null),e))),s2}async function s3(){let e=document.querySelectorAll("script[type='openmrs-routes']"),t=[],r=!0;for(let n=0;n<e.length;n++){let o=e[n];try{let e;if(o.src){let t=await fetch(o.src);if(!t.ok)throw Error(`Request for ${o.src} returned ${t.status} ${t.statusText}`);e=await t.json()}else o.textContent&&(e=JSON.parse(o.textContent));e&&sJ(e)&&t.push(e)}catch(e){r=!1,console.warn(`[route-maps] Failed to parse routes from script tag at index ${n}`,e)}}return{map:s6(t),complete:r}}function s6(e){let t={routes:{}};for(let r of e)r&&"object"==typeof r&&!Array.isArray(r)&&(Object.assign(t.routes,r.routes),void 0===t.version&&void 0!==r.version&&(t.version=r.version));return t}async function s5(){let e={version:void 0,routes:{}};try{let t=[];for(let e=0;e<localStorage.length;e++){let r=localStorage.key(e);if(r?.startsWith(sX)){let e=localStorage.getItem(r);e&&t.push({moduleName:r.slice(sX.length),raw:e})}}for(let r of(await Promise.allSettled(t.map(async({moduleName:e,raw:t})=>{let r=JSON.parse(t);if(sq(r))return{moduleName:e,routes:r};if("string"==typeof r&&r.startsWith("http")){let t=await fetch(r),n=await t.json();if(sq(n))return{moduleName:e,routes:n};throw Error(`${r} did not resolve to a valid OpenmrsAppRoutes object`)}throw Error(`Override for ${e} is neither a valid routes object nor a URL`)}))))"fulfilled"===r.status?e.routes[r.value.moduleName]=r.value.routes:console.warn("[route-maps] Failed to load route override",r.reason)}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}async function s9(){let e=await s4();return s0?s6([e,s1??await s5()]):e}async function s8(){return s4()}async function s7(){return s0?s6([await s4(),await s5()]):s4()}function le(){if(!s0)return{};let e={};try{for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);if(r?.startsWith(sX)){let t=localStorage.getItem(r);t&&(e[r.slice(sX.length)]=t)}}}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}function lt(e,t){if(!s0)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{if("string"==typeof t)if(t.startsWith("http"))localStorage.setItem(sX+e,JSON.stringify(t));else{let r=JSON.parse(t);if(!sq(r))return void console.error(`The supplied routes for ${e} is not a valid OpenmrsAppRoutes object`,t);localStorage.setItem(sX+e,JSON.stringify(r))}else if(t instanceof URL)localStorage.setItem(sX+e,JSON.stringify(t.toString()));else{if(!sq(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(sX+e,JSON.stringify(t))}window.dispatchEvent(new CustomEvent(sQ))}catch(e){console.warn("[route-maps] Failed to write route override to localStorage",e)}}function lr(e){if(!s0)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{localStorage.removeItem(sX+e),window.dispatchEvent(new CustomEvent(sQ))}catch(e){console.warn("[route-maps] Failed to remove route override from localStorage",e)}}function ln(){if(!s0)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{let e=[];for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);r?.startsWith(sX)&&e.push(r)}e.forEach(e=>localStorage.removeItem(e)),window.dispatchEvent(new CustomEvent(sQ))}catch(e){console.warn("[route-maps] Failed to clear route overrides from localStorage",e)}}let lo=null;function la(){return lo||(lo=(s0="development"===window.spaEnv)?s5().then(e=>{s1=e}):Promise.resolve())}let li=`${i3}/attachment`;function ls(e,t){return i8(`${li}/${e}`,{signal:t.signal})}function ll(e,t,r,n){return i8(lu(e,t,n),{signal:r.signal})}function lu(e,t,r){return r?`${li}?patient=${e}&encounter=${r}`:`${li}?patient=${e}&includeEncounterless=${t}`}async function lc(e,t,r){let n=new FormData;return n.append("fileCaption",t.fileDescription),n.append("patient",e),r&&n.append("encounter",r),t.file?n.append("file",t.file,t.fileName):(n.append("file",new File([""],t.fileName),t.fileName),n.append("base64Content",t.base64Content)),i8(`${li}`,{method:"POST",body:n})}function ld(e,t){return i8(`${li}/${e}`,{method:"DELETE",signal:t.signal})}async function lf(e,t){return e?(await i8(`${i6}/Patient/${e}`,t)).data:null}function lp(e,t){let r=new CustomEvent(`openmrs:${e}`,{detail:t??void 0,cancelable:!0,bubbles:!0});return window.dispatchEvent(r)}function lm(e,t){let r=e=>{t("detail"in e&&null!==e.detail?e.detail:void 0)};return window.addEventListener(`openmrs:${e}`,r),()=>{window.removeEventListener(`openmrs:${e}`,r)}}function lh(e){return{uuid:e.uuid,display:e.display}}function lg(e=null,t=null){let r=new URLSearchParams;e&&r.set("tag",e),t&&r.set("q",t);let n=r.toString();return i8(`${i3}/location${n?"?"+n:""}`).then(e=>e.data.results.map(lh))}function ly(e){return{uuid:e.uuid,display:e.display,name:e.name}}let lv=`${i3}/visittype`;function lb(e=lv){return i8(e).then(e=>e.data.results.map(ly))}var lw=((et={}).NEWVISIT="startVisit",et.EDITVISIT="editVisit",et.LOADING="loadingVisit",et),lE=((er={}).NOTSTARTED="notStarted",er.ONGOING="ongoing",er);let lx="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))",lD=function(){try{return JSON.parse(sessionStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null};function l_(){return W("visit",lD)}function lS(e,t){l_().setState({patientUuid:e,manuallySetVisitUuid:t})}function lC(e,t){return i8(`${i3}/visit`,{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function lk(e,t,r){return i8(`${i3}/visit/${e}`,{signal:r.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}function lP(e,t,r){return i8(`${i3}/visit?patient=${e}&v=${r??lx}`,{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}})}l_().subscribe(e=>{var t;t=e,sessionStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))});class lO{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+lO.version}static addUnaryOp(e){return lO.max_unop_len=Math.max(e.length,lO.max_unop_len),lO.unary_ops[e]=1,lO}static addBinaryOp(e,t,r){return lO.max_binop_len=Math.max(e.length,lO.max_binop_len),lO.binary_ops[e]=t,r?lO.right_associative.add(e):lO.right_associative.delete(e),lO}static addIdentifierChar(e){return lO.additional_identifier_chars.add(e),lO}static addLiteral(e,t){return lO.literals[e]=t,lO}static removeUnaryOp(e){return delete lO.unary_ops[e],e.length===lO.max_unop_len&&(lO.max_unop_len=lO.getMaxKeyLen(lO.unary_ops)),lO}static removeAllUnaryOps(){return lO.unary_ops={},lO.max_unop_len=0,lO}static removeIdentifierChar(e){return lO.additional_identifier_chars.delete(e),lO}static removeBinaryOp(e){return delete lO.binary_ops[e],e.length===lO.max_binop_len&&(lO.max_binop_len=lO.getMaxKeyLen(lO.binary_ops)),lO.right_associative.delete(e),lO}static removeAllBinaryOps(){return lO.binary_ops={},lO.max_binop_len=0,lO}static removeLiteral(e){return delete lO.literals[e],lO}static removeAllLiterals(){return lO.literals={},lO}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 lO(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 lO.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!lO.binary_ops[String.fromCharCode(e)]||lO.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return lO.isIdentifierStart(e)||lO.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(lO.hooks[e]){let r={context:this,node:t};return lO.hooks.run(e,r),r.node}return t}searchHook(e){if(lO.hooks[e]){let t={context:this};return lO.hooks[e].find(function(e){return e.call(t.context,t),t.node}),t.node}}gobbleSpaces(){let e=this.code;for(;e===lO.SPACE_CODE||e===lO.TAB_CODE||e===lO.LF_CODE||e===lO.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:lO.COMPOUND,body:e};return this.runHook("after-all",t)}gobbleExpressions(e){let t=[],r,n;for(;this.index<this.expr.length;)if((r=this.code)===lO.SEMCOL_CODE||r===lO.COMMA_CODE)this.index++;else if(n=this.gobbleExpression())t.push(n);else if(this.index<this.expr.length){if(r===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,lO.max_binop_len),t=e.length;for(;t>0;){if(lO.binary_ops.hasOwnProperty(e)&&(!lO.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!lO.isIdentifierPart(this.expr.charCodeAt(this.index+e.length))))return this.index+=t,e;e=e.substr(0,--t)}return!1}gobbleBinaryExpression(){let e,t,r,n,o,a,i,s,l;if(!(a=this.gobbleToken())||!(t=this.gobbleBinaryOp()))return a;for(o={value:t,prec:lO.binaryPrecedence(t),right_a:lO.right_associative.has(t)},(i=this.gobbleToken())||this.throwError("Expected expression after "+t),n=[a,o,i];t=this.gobbleBinaryOp();){if(0===(r=lO.binaryPrecedence(t))){this.index-=t.length;break}o={value:t,prec:r,right_a:lO.right_associative.has(t)},l=t;let s=e=>o.right_a&&e.right_a?r>e.prec:r<=e.prec;for(;n.length>2&&s(n[n.length-2]);)i=n.pop(),t=n.pop().value,a=n.pop(),e={type:lO.BINARY_EXP,operator:t,left:a,right:i},n.push(e);(e=this.gobbleToken())||this.throwError("Expected expression after "+l),n.push(o,e)}for(s=n.length-1,e=n[s];s>1;)e={type:lO.BINARY_EXP,operator:n[s-1].value,left:n[s-2],right:e},s-=2;return e}gobbleToken(){let e,t,r,n;if(this.gobbleSpaces(),n=this.searchHook("gobble-token"))return this.runHook("after-token",n);if(e=this.code,lO.isDecimalDigit(e)||e===lO.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===lO.SQUOTE_CODE||e===lO.DQUOTE_CODE)n=this.gobbleStringLiteral();else if(e===lO.OBRACK_CODE)n=this.gobbleArray();else{for(r=(t=this.expr.substr(this.index,lO.max_unop_len)).length;r>0;){if(lO.unary_ops.hasOwnProperty(t)&&(!lO.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!lO.isIdentifierPart(this.expr.charCodeAt(this.index+t.length)))){this.index+=r;let e=this.gobbleToken();return e||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:lO.UNARY_EXP,operator:t,argument:e,prefix:!0})}t=t.substr(0,--r)}lO.isIdentifierStart(e)?(n=this.gobbleIdentifier(),lO.literals.hasOwnProperty(n.name)?n={type:lO.LITERAL,value:lO.literals[n.name],raw:n.name}:n.name===lO.this_str&&(n={type:lO.THIS_EXP})):e===lO.OPAREN_CODE&&(n=this.gobbleGroup())}return n?(n=this.gobbleTokenProperty(n),this.runHook("after-token",n)):this.runHook("after-token",!1)}gobbleTokenProperty(e){this.gobbleSpaces();let t=this.code;for(;t===lO.PERIOD_CODE||t===lO.OBRACK_CODE||t===lO.OPAREN_CODE||t===lO.QUMARK_CODE;){let r;if(t===lO.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==lO.PERIOD_CODE)break;r=!0,this.index+=2,this.gobbleSpaces(),t=this.code}this.index++,t===lO.OBRACK_CODE?((e={type:lO.MEMBER_EXP,computed:!0,object:e,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),(t=this.code)!==lO.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):t===lO.OPAREN_CODE?e={type:lO.CALL_EXP,arguments:this.gobbleArguments(lO.CPAREN_CODE),callee:e}:(t===lO.PERIOD_CODE||r)&&(r&&this.index--,this.gobbleSpaces(),e={type:lO.MEMBER_EXP,computed:!1,object:e,property:this.gobbleIdentifier()}),r&&(e.optional=!0),this.gobbleSpaces(),t=this.code}return e}gobbleNumericLiteral(){let e="",t,r;for(;lO.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(this.code===lO.PERIOD_CODE)for(e+=this.expr.charAt(this.index++);lO.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++));lO.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);lO.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+e+this.char+")")}return r=this.code,lO.isIdentifierStart(r)?this.throwError("Variable names cannot start with a number ("+e+this.char+")"):(r===lO.PERIOD_CODE||1===e.length&&e.charCodeAt(0)===lO.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:lO.LITERAL,value:parseFloat(e),raw:e}}gobbleStringLiteral(){let e="",t=this.index,r=this.expr.charAt(this.index++),n=!1;for(;this.index<this.expr.length;){let t=this.expr.charAt(this.index++);if(t===r){n=!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 n||this.throwError('Unclosed quote after "'+e+'"'),{type:lO.LITERAL,value:e,raw:this.expr.substring(t,this.index)}}gobbleIdentifier(){let e=this.code,t=this.index;for(lO.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length;)if(e=this.code,lO.isIdentifierPart(e))this.index++;else break;return{type:lO.IDENTIFIER,name:this.expr.slice(t,this.index)}}gobbleArguments(e){let t=[],r=!1,n=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let o=this.code;if(o===e){r=!0,this.index++,e===lO.CPAREN_CODE&&n&&n>=t.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}if(o===lO.COMMA_CODE){if(this.index++,++n!==t.length){if(e===lO.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===lO.CBRACK_CODE)for(let e=t.length;e<n;e++)t.push(null)}}else if(t.length!==n&&0!==n)this.throwError("Expected comma");else{let e=this.gobbleExpression();e&&e.type!==lO.COMPOUND||this.throwError("Expected comma"),t.push(e)}}return r||this.throwError("Expected "+String.fromCharCode(e)),t}gobbleGroup(){this.index++;let e=this.gobbleExpressions(lO.CPAREN_CODE);if(this.code===lO.CPAREN_CODE)return(this.index++,1===e.length)?e[0]:!!e.length&&{type:lO.SEQUENCE_EXP,expressions:e};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:lO.ARRAY_EXP,elements:this.gobbleArguments(lO.CBRACK_CODE)}}}Object.assign(lO,{hooks:new class{add(e,t,r){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][r?"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)})}}(lO),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"}),lO.max_unop_len=lO.getMaxKeyLen(lO.unary_ops),lO.max_binop_len=lO.getMaxKeyLen(lO.binary_ops);let lR=e=>new lO(e).parse(),lT=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(lO).filter(e=>!lT.includes(e)&&void 0===lR[e]).forEach(e=>{lR[e]=lO[e]}),lR.Jsep=lO,lR.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let r=t.node,n=this.gobbleExpression();if(n||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let o=this.gobbleExpression();if(o||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:r,consequent:n,alternate:o},r.operator&&e.binary_ops[r.operator]<=.9){let n=r;for(;n.right.operator&&e.binary_ops[n.right.operator]<=.9;)n=n.right;t.node.test=n.right,n.right=t.node,t.node=r}}else this.throwError("Expected :")}})}});let lN="ArrowFunctionExpression",lj={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)}},lA={...lj,Promise};function l$(e,t={}){return lU(e,t,lH)}async function lI(e,t={}){return lV(e,t,lH)}function lM(e,t={}){return lU(e,t,lz)}function lL(e,t={}){return lV(e,t,lz)}function lF(e,t={}){return lU(e,t,lK)}function lB(e,t={}){return lV(e,t,lK)}function lU(e,t={},r){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 n=lJ(t,lj),o=lG("string"==typeof e?lR(e):e,n);if(r(o))return o;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 lV(e,t={},r){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 n=lJ(t,lA);return Promise.resolve(lG("string"==typeof e?lR(e):e,n)).then(t=>{if(r(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 lW(e){return lR(e)}function lH(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||e instanceof Date}function lz(e){return"boolean"==typeof e}function lK(e){return"number"==typeof e}function lG(e,t){switch(e.type){case"UnaryExpression":var r,n,o,a,i,s,l,u,c,d,f,p,m,h=e,g=t;let y=lG(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 lG(v.left,b)&&lG(v.right,b);case"||":return lG(v.left,b)||lG(v.right,b);case"??":return lG(v.left,b)??lG(v.right,b)}let w=lG(v.left,b),E=lG(v.right,b);switch(v.operator){case"+":return w+E;case"-":return w-E;case"*":return w*E;case"/":return w/E;case"%":return w%E;case"**":return w**E;case"==":return w==E;case"===":return w===E;case"!=":return w!=E;case"!==":return w!==E;case">":return w>E;case">=":return w>=E;case"<":return w<E;case"<=":return w<=E;case"in":return w in E;default:throw`Expression evaluator does not support operator '${v.operator}' operator`}case"ConditionalExpression":return r=e,n=t,lG(r.test,n)?lG(r.consequent,n):lG(r.alternate,n);case"CallExpression":return l0(lY(e,t));case"ArrowFunctionExpression":let x;return o=e,a=t,x=o.params?.map(e=>{if("Identifier"===e.type)return e.name;throw`Cannot handle parameter of type ${e.type}`})??[],(function(...e){if(e.length<x.length)throw`Required argument(s) ${x.slice(e.length,-1).join(", ")} were not provided`;let t=Object.fromEntries(x.reduce((t,r,n)=>{let o=e[n];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 r of Object.keys(t))if(!e(t[r]))return!1;return!0}if(Array.isArray(t)){for(let r of t)if(!e(r))break}return!1}(o)&&t.push([r,o]),t},[]));return lG(o.body,a.addVariables(t))}).bind(null);case"MemberExpression":return l0(lq(e,t));case"ArrayExpression":return i=e,s=t,i.elements?.map(l1(s));case"SequenceExpression":let D;return l=e,u=t,(D=l.expressions.map(l1(u)))[D.length-1];case"NewExpression":var _=e,S=t;if(_.callee&&"Identifier"===_.callee.type){let e=_.arguments?.map(l1(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,(l2(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 f=e,p=t,C=f.expressions?.map(l1(p))??[],(k=f.quasis?.map(l1(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:(m=e).cooked,tail:m.tail};default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function lZ(e,t){switch(e.type){case"Literal":return e.value;case"Identifier":return e.name;case"MemberExpression":return lZ(e.property,t);default:throw`VisitExpressionName does not support expression of type '${e.type}'`}}function lY(e,t){let r=lQ(e.callee,t);if(r===lX||e.optional&&null==r)return lX;let n=e.arguments?.map(l1(t));if(r){if("function"!=typeof r)throw`${l6(e.callee)} is not a function`}else throw`No function named ${l6(e.callee)} is defined in this context`;return r(...n)}function lq(e,t){let r=lQ(e.object,t);if(r===lX||e.optional&&null==r)return lX;if(null===r)throw TypeError(`TypeError: cannot read properties of null (reading '${l3(e.property,t)}')`);if(void 0===r)switch(e.object.type){case"Identifier":{let r=lZ(e.object,t);throw ReferenceError(`ReferenceError: ${r} is not defined`)}case"MemberExpression":throw TypeError(`TypeError: cannot read properties of undefined (reading '${l3(e.property,t)}')`);default:throw`VisitMemberExpression does not support operator '${e.object.type}' type`}if("object"!=typeof r&&"function"!=typeof r&&"string"!=typeof r&&"number"!=typeof r)throw`VisitMemberExpression does not support member access on type ${typeof r}`;let n=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}(lG(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);l2(n),function(e,t){if(l4.has(String(t)))return;let r=Object(e);for(;null!==r;){if(Object.hasOwn(r,t)){if(r===Object.prototype||r===Function.prototype)throw{type:"Illegal property access",message:`Cannot access the ${t} property of objects`};return}r=Object.getPrototypeOf(r)}}(r,n);let o=r[n];return"function"==typeof o?o.bind(r):o}function lJ(e,t){let r={variables:{...e},globals:{...t},addVariables(e){return this.variables={...this.variables,...e},this}};return r.addVariables.bind(r),r}lR.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 r=this.index;if(this.index++,this.gobbleSpaces(),this.code===e.CPAREN_CODE){this.index++;let e=this.gobbleBinaryOp();if("=>"===e){let r=this.gobbleBinaryExpression();r||this.throwError("Expected expression after "+e),t.node={type:lN,params:null,body:r};return}}this.index=r}}),e.hooks.add("after-expression",function(t){!function t(r){r&&(Object.values(r).forEach(e=>{e&&"object"==typeof e&&t(e)}),"=>"===r.operator&&(r.type=lN,r.params=r.left?[r.left]:null,r.body=r.right,r.params&&r.params[0].type===e.SEQUENCE_EXP&&(r.params=r.params[0].expressions),delete r.left,delete r.right,delete r.operator))}(t.node)})}}),lR.plugins.register({name:"new",init(e){e.addUnaryOp("new"),e.hooks.add("after-token",function(t){let r=t.node;if(r&&"new"===r.operator){r.argument&&[e.CALL_EXP,e.MEMBER_EXP].includes(r.argument.type)||this.throwError("Expected new function()"),t.node=r.argument;let n=t.node;for(;n.type===e.MEMBER_EXP||n.type===e.CALL_EXP&&n.callee.type===e.MEMBER_EXP;)n=n.type===e.MEMBER_EXP?n.object:n.callee.object;n.type="NewExpression"}})}}),lR.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 r(t){let r=this.index,n="",o=()=>{for(;e.isDecimalDigit(this.code)||95===this.code;)95===this.code?this.index++:n+=this.expr.charAt(this.index++)};o(),this.code===e.PERIOD_CODE&&(n+=this.expr.charAt(this.index++),o());let a=this.char;("e"===a||"E"===a)&&(n+=this.expr.charAt(this.index++),("+"===(a=this.char)||"-"===a)&&(n+=this.expr.charAt(this.index++)),o(),e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+n+this.char+")"));let i=this.code;if(e.isIdentifierStart(i))this.throwError("Variable names cannot start with a number ("+n+this.char+")");else if(i===e.PERIOD_CODE){n.length>1&&this.throwError(`Unexpected period ${JSON.stringify({chCode:i,number:n},null,2)}`),this.index=r;return}t.node={type:e.LITERAL,value:parseFloat(n),raw:this.expr.substring(r,this.index)}}e.hooks.add("gobble-token",function(n){if(48===this.code){var o,a,i;let s=this.index,l=this.expr.charAt(this.index+1),u=t.call(this,l);if(!u)return;let c="";for(;o=this.code,a=u,95===o||a.some(([e,t])=>o>=e&&o<=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,r.call(this,n);return}this.throwError("unexpected char within number")}n.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)&&r.call(this,n)})}}),lR.plugins.register({name:"regex",init(e){e.hooks.add("gobble-token",function(t){if(47===this.code){let r=++this.index,n=!1;for(;this.index<this.expr.length;){if(47===this.code&&!n){let n,o=this.expr.slice(r,this.index),a="";for(;++this.index<this.expr.length;){let e=this.code;if(e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57)a+=this.char;else break}try{n=new RegExp(o,a)}catch(e){this.throwError(e.message)}return t.node={type:e.LITERAL,value:n,raw:this.expr.slice(r-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===e.OBRACK_CODE?n=!0:n&&this.code===e.CBRACK_CODE&&(n=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}})}}),lR.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let r=t.node,n=this.gobbleExpression();if(n||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let o=this.gobbleExpression();if(o||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:r,consequent:n,alternate:o},r.operator&&e.binary_ops[r.operator]<=.9){let n=r;for(;n.right.operator&&e.binary_ops[n.right.operator]<=.9;)n=n.right;t.node.test=n.right,n.right=t.node,t.node=r}}else this.throwError("Expected :")}})}}),lR.plugins.register({name:"jsepTemplateLiteral",init(e){function t(e,r=!0){if(96===this.code){let t={type:"TemplateLiteral",quasis:[],expressions:[]},n="",o="",a=!1,i=this.expr.length,s=()=>t.quasis.push({type:"TemplateElement",value:{raw:o,cooked:n},tail:a});for(;this.index<i;){let i=this.expr.charAt(++this.index);if("`"===i)return this.index+=1,a=!0,s(),e.node=t,r&&(e.node=this.gobbleTokenProperty(e.node)),e.node;if("$"===i&&"{"===this.expr.charAt(this.index+1))this.index+=2,s(),o="",n="",t.expressions.push(...this.gobbleExpressions(125)),125!==this.code&&this.throwError("unclosed ${");else if("\\"===i)switch(o+=i,i=this.expr.charAt(++this.index),o+=i,i){case"n":n+="\n";break;case"r":n+="\r";break;case"t":n+=" ";break;case"b":n+="\b";break;case"f":n+="\f";break;case"v":n+="\v";break;default:n+=i}else n+=i,o+=i}this.throwError("Unclosed `")}}e.hooks.add("gobble-token",t),e.hooks.add("after-token",function(r){if((r.node.type===e.IDENTIFIER||r.node.type===e.MEMBER_EXP)&&96===this.code)return r.node={type:"TaggedTemplateExpression",tag:r.node,quasi:t.bind(this)(r,!1)},r.node=this.gobbleTokenProperty(r.node),r.node})}}),lR.addBinaryOp("in",7),lR.addBinaryOp("??",1);let lX=Symbol("optional chain short-circuited");function lQ(e,t){switch(e.type){case"MemberExpression":return lq(e,t);case"CallExpression":return lY(e,t);default:return lG(e,t)}}function l0(e){return e===lX?void 0:e}function l1(e){return function(t){return null===t?null:lG(t,e)}}function l2(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:`Cannot access the ${e} property of objects`}}let l4=new Set(["toString","valueOf","hasOwnProperty"]);function l3(e,t){try{return lZ(e,t)}catch{return"<computed>"}}function l6(e){return e?"MemberExpression"===e.type?e.property?.name:e.name:null}function l5(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:{...lA},isLocalExpression:!1,variables:new Set};return l9("string"==typeof e?lR(e):e,t),[...t.variables]}function l9(e,t){switch(e.type){case"UnaryExpression":return n=e,o=t,l9(n.argument,o);case"BinaryExpression":return a=e,i=t,[l9(a.left,i),l9(a.right,i)].filter(Boolean);case"ConditionalExpression":return s=e,l=t,[l9(s.consequent,l),l9(s.test,l),l9(s.alternate,l)].filter(Boolean);case"CallExpression":let r;return u=e,c=t,r=l9(u.callee,c),u.arguments?.map(l8(c)),r;case"ArrowFunctionExpression":var n,o,a,i,s,l,u,c,d,f,p,m,h,g,y,v,b=e,w=t;let E={...w};E.isLocalExpression=!0;let x=b.params?.map(l8(E))??[],D=l9(b.body,E)??[];if(D&&Array.isArray(D))for(let e of D)x.includes(e)||w.variables.add(e);return;case"MemberExpression":var _=e,S=t;if(l9(_.object,S),_.computed)return void l9(_.property,S);let C={...S};C.isLocalExpression=!0,l9(_.property,C);return;case"ArrayExpression":return d=e,f=t,void d.elements?.map(l8(f));case"SequenceExpression":return p=e,m=t,void p.expressions?.map(l8(m));case"NewExpression":return h=e,g=t,void h.arguments?.map(l8(g));case"Literal":case"TemplateElement":return;case"Identifier":var k=e,P=t;if(!(k.name in P.globals))if(P.isLocalExpression)return k.name;else P.variables.add(k.name);return;case"TemplateLiteral":return y=e,v=t,void(y.expressions?.map(l8(v)),y.quasis?.map(l8(v)));default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function l8(e){return function(t){return null===t?null:l9(t,e)}}let l7=W("feature-flags",{flags:function(){let e={};for(let t of Object.keys(localStorage))if(t.startsWith("openmrs:feature-flag:")){let r=t.replace("openmrs:feature-flag:",""),n=JSON.parse(localStorage.getItem(`openmrs:feature-flag-meta:${r}`)||"{}");e[r]={enabled:"true"===localStorage.getItem(t),...n}}return e}()});function ue(e,t,r){l7.setState(n=>({flags:{...n.flags,[e]:{enabled:n.flags[e]?.enabled??!1,label:t,description:r}}}))}function ut(){let e=l7.getState().flags;Object.keys(localStorage).filter(e=>e.startsWith("openmrs:feature-flag:")).forEach(t=>{let r=t.replace("openmrs:feature-flag:","");e[r]||(localStorage.removeItem(t),localStorage.removeItem(`openmrs:feature-flag-meta:${r}`))})}function ur(e){return l7.getState().flags[e].enabled}function un(e,t){l7.subscribe(r=>{t(r.flags[e].enabled)})}function uo(e,t){l7.setState(r=>({flags:{...r.flags,[e]:{...r.flags[e],enabled:t}}}))}l7.subscribe(e=>{for(let[t,r]of Object.entries(e.flags))localStorage.setItem(`openmrs:feature-flag:${t}`,r.enabled.toString()),localStorage.setItem(`openmrs:feature-flag-meta:${t}`,JSON.stringify({label:r.label,description:r.description}))});var ua=tB(function(e,t,r){tN(e,t,r)});let ui=B("extensionsInternal",{slots:{},extensions:{}}),us=B("extensionRenderings",{renderings:new Map}),ul=()=>W("extensionsInternal",{slots:{},extensions:{}}),uu=()=>W("extensionRenderings",{renderings:new Map});function uc(e){let t=ui.getState(),r=e(t);r!==t&&ui.setState(r)}let ud=null,uf=null;function up(){let e=us.getState();return ud&&e===uf||(ud=new Map(e.renderings),uf=e,function(e){for(let t of(uD.clear(),e.values()))uS(t,1);u_=!0}(ud)),ud}function um(e){uf={renderings:e},us.setState(uf,!0)}function uh(e){let t=up();t.has(e.renderingId)||(t.set(e.renderingId,e),uS(e,1),um(t))}function ug(e){let t=up(),r=t.get(e);r&&(t.delete(e),uS(r,-1),um(t))}let uy=()=>W("extensions",{slots:{}}),uv=0,ub=new Set;function uw(e){uv++;try{return e()}finally{if(0==--uv&&ub.size>0){let e=Array.from(ub);for(let t of(ub.clear(),e))uE(t)}}}function uE(e){try{e()}catch(t){console.error(`The extension system's '${e.name}' recomputation failed`,t)}}function ux(e){uv>0?ub.add(e):uE(e)}let uD=new Map,u_=!1;function uS(e,t){let r=JSON.stringify([e.slotName,e.extensionId,e.slotModuleName,e.extensionModuleName]),n=uD.get(r);if(!n){if(t<0)return;uD.set(r,{count:1,record:{slotModuleName:e.slotModuleName,extensionModuleName:e.extensionModuleName,slotName:e.slotName,extensionId:e.extensionId}}),u_=!0;return}n.count+=t,n.count<1&&(uD.delete(r),u_=!0)}function uC(){var e,t;if(up(),!u_)return;u_=!1;let r=Array.from(uD.values(),({record:e})=>e);r.sort(uk),e=nm.getState().mountedExtensions,t=r,e.length===t.length&&e.every((e,r)=>0===uk(e,t[r]))||nm.setState({mountedExtensions:r})}function uk(e,t){return uP(e.slotName,t.slotName)||uP(e.extensionId,t.extensionId)||uP(e.slotModuleName,t.slotModuleName)||uP(e.extensionModuleName,t.extensionModuleName)}function uP(e,t){return e===t?0:e<t?-1:1}uC(),us.subscribe(()=>ux(uC));let uO=ul(),uR=uy(),uT=ng(),uN=nb(),uj=new Set,uA=!1;function u$(e){if(null===e)uj=null;else if(null!==uj)for(let t of e)uj.add(t);ux(uI)}function uI(){if(!uA){uA=!0;try{for(let e=1;;e++){let t=uj;if(null!==t&&0===t.size)return;uj=new Set;try{!function(e,t,r,n,o,a=null){let i=uR.getState().slots,s={},l=!1,u=Object.entries(n.flags).filter(([,{enabled:e}])=>e).map(([e])=>e);for(let[n,c]of Object.entries(e.slots)){let d=i[n];if(d&&a&&!a.has(n)){s[n]=d;continue}let{config:f}=nv(t,c.name),p=function(e,t,r,n,o,a){let i=function(e,t){let r=e.add||[],n=e.remove||[],o=e.order||[],{extensions:a}=uO.getState(),i=new Set(n),s=[...t,...r].filter(e=>!i.has(e)),l=uK(o),u=uK(t),c=new Map(s.map(e=>[e,function(e,t,r,n){let o=t.get(e);if(void 0!==o)return o;{if(void 0!==r)return 1e3+r;let t=n.get(e);return void 0!==t?2e3+t:3e3}}(e,l,a[uF(e)]?.order,u)]));return s.sort((e,t)=>c.get(e)-c.get(t))}(r,t.slots[e].attachedIds),s=[];for(let l of i){let{config:i}=nw(n,e,l),u=nE(r,e,l),c=u?ua({},i,u):i,d=uF(l),f=t.extensions[d];if(f){let e=c?.["Display conditions"]?.privileges??f.privileges??[];if(e&&("string"==typeof e||Array.isArray(e)&&e.length>0)&&(!a?.user||!su(e,a.user))||f.featureFlag&&!o.includes(f.featureFlag))continue;s.push({id:l,name:d,moduleName:f.moduleName,config:c,featureFlag:f.featureFlag,meta:f.meta,displayConditionExpression:c?.["Display conditions"]?.expression||f.displayExpression})}}return s}(n,e,f,r,u,o.session);d&&d.moduleName===c.moduleName&&rx(d.candidateExtensions,p)?s[n]=d:(s[n]={moduleName:c.moduleName,candidateExtensions:p},l=!0)}(l||Object.keys(i).length!==Object.keys(s).length)&&uR.setState({slots:s})}(uO.getState(),uT.getState(),uN.getState(),l7.getState(),se.getState(),t)}catch(e){throw uj=null===t||null===uj?null:new Set([...t,...uj]),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{uA=!1}}}function uM(e,t){let r=new Set;for(let n of Object.keys(e))e[n]!==t[n]&&r.add(n);for(let n of Object.keys(t))n in e||r.add(n);return r}function uL(e,t){return{moduleName:t,name:e,attachedIds:[]}}function uF(e){let[t]=e.split("#");return t}function uB(e,t){let r=uF(t);return e.extensions[r]}function uU(e){return uB(uO.getState(),e)}uO.subscribe((e,t)=>{u$(e.extensions!==t.extensions?null:uM(e.slots,t.slots))}),uT.subscribe((e,t)=>{u$(uM(e.slots,t.slots))}),uN.subscribe((e,t)=>{u$(uM(e.configs,t.configs))}),l7.subscribe(()=>u$(null)),se.subscribe(()=>u$(null)),u$(null);let uV=e=>uc(t=>({...t,extensions:{...t.extensions,[e.name]:{...e}}}));function uW(e,t){uc(r=>{let n=r.slots[e];return n?{...r,slots:{...r.slots,[e]:{...n,attachedIds:[...n.attachedIds,t]}}}:{...r,slots:{...r.slots,[e]:{...uL(e),attachedIds:[t]}}}})}function uH(e,t){uc(r=>{let n=r.slots[e];return n&&n.attachedIds.includes(t)?{...r,slots:{...r.slots,[e]:{...n,attachedIds:n.attachedIds.filter(e=>e!==t)}}}:r})}function uz(e){uc(t=>{let r=t.slots[e];return r?{...t,slots:{...t.slots,[e]:{...r,attachedIds:[]}}}:t})}function uK(e){let t=new Map;return e.forEach((e,r)=>{t.has(e)||t.set(e,r)}),t}function uG(e,t){return function(e,t,r=null,n){let o;return e.filter(e=>{let a=e.displayConditionExpression;if("string"!=typeof a||0===a.trim().length)return!0;o??(o=t&&"object"==typeof t?{session:r,...t}:{session:r});try{return!!lM(a,o)}catch(t){return console.error(`Error while evaluating expression '${a}' for ${e.id}`+(n?` in ${n}`:""),t),!1}})}(uZ(e),t,se.getState().session,e)}function uZ(e){return uR.getState().slots[e]?.candidateExtensions??[]}let uY=(e,t)=>uO.setState(r=>{let n=r.slots[t]?.moduleName;if(n&&n!=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 ${n}.`),r;if(n&&n==e)return r;if(r.slots[t])return{...r,slots:{...r.slots,[t]:{...r.slots[t],moduleName:e}}};let o=uL(t,e);return{...r,slots:{...r.slots,[t]:{...o}}}}),uq=()=>{uj=null,uc(()=>({slots:{},extensions:{}})),uu().setState({renderings:new Map}),uR.setState({slots:{}})},uJ=B("left-nav",{slotName:null,basePath:window.spaBase,mode:"normal"});function uX({name:e,basePath:t,mode:r,componentContext:n,state:o}){uJ.setState({slotName:e,basePath:t,mode:r??"normal",componentContext:n,state:o})}function uQ(e){uJ.getState().slotName===e&&uJ.setState(uJ.getInitialState(),!0)}let u0=B("modalRegistry",{modals:{}});function u1(e){u0.setState(t=>(t.modals[e.name]=e,t))}function u2(e){let t=u0.getState().modals[e];if(!t){let r=uU(e);r&&(t={name:e,load:r.load,moduleName:r.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.`),u1(t))}return t}let u4=B("workspace2",{registeredGroupsByName:{},registeredWindowsByName:{},registeredWorkspacesByName:{},openedGroup:null,openedWindows:[],isMostRecentlyOpenedWindowHidden:!1});function u3(e){let{registeredWorkspacesByName:t,registeredWindowsByName:r}=u4.getState(),n=t[e];if(n){let t=r[n.window];if(t)return t;throw Error(`No workspace window found with name: ${n.window} for workspace: ${e}`)}throw Error(`No workspace found with name: ${e}`)}function u6(e){let{registeredGroupsByName:t,registeredWindowsByName:r}=u4.getState(),n=r[e];if(n){let r=t[n.group];if(r)return r;throw Error(`No workspace group found with name: ${n.group} for window: ${e}`)}throw Error(`No workspace window found with name: ${e}`)}function u5(e){let{openedWindows:t}=u4.getState();return t.findIndex(t=>t.openedWorkspaces.find(t=>t.workspaceName===e))}function u9(e,t){if(0==t.length)return;let{registeredGroupsByName:r}=u4.getState(),n={...r};for(let r of t){if(n[r.name])throw Error(`Cannot register workspace group ${r.name} more than once`);n[r.name]={...r,moduleName:e}}u4.setState({registeredGroupsByName:n})}function u8(e,t){if(0==t.length)return;let{registeredWindowsByName:r}=u4.getState(),n={...r};for(let r of t){if(n[r.name])throw Error(`Cannot register workspace window ${r.name} more than once`);let t={...r,moduleName:e};n[r.name]=t}u4.setState({registeredWindowsByName:n})}function u7(e,t){if(0==t.length)return;let{registeredWorkspacesByName:r}=u4.getState(),n={...r};for(let r of t){if(n[r.name])throw Error(`Cannot register workspace ${r.name} more than once`);let t={...r,moduleName:e};n[r.name]=t}u4.setState({registeredWorkspacesByName:n})}let ce=0,ct=null,cr={bootstrap:15e3,mount:15e3,unmount:15e3};function cn(e,t){if(e.timeouts)return e;let r=e.name??"parcel",n=Object.fromEntries(Object.keys(cr).filter(t=>e[t]).map(n=>{var o,a;let i,s;return[n,(o=e[n],a=cr[n],i=Array.isArray(o)?o:[o],s=e=>i.reduce((t,o,a)=>t.then(()=>{let t=o(e);return"function"==typeof t?.then&&"function"==typeof t?.catch?t:Promise.reject(Error(`Lifecycle function ${n} at array index ${a} for parcel ${r} did not return a promise`))}),Promise.resolve(void 0)),e=>{let o,i=new Promise((e,t)=>{o=setTimeout(()=>t(Error(`Lifecycle function ${n} for parcel ${r} did not settle within ${a}ms`)),a)});return Promise.race([s(e),i]).finally(()=>clearTimeout(o)).then(e=>(t(n,!1),e),e=>{throw t(n,!0),e})})]}));return{...e,...n}}async function co(e,t){var r,n;let o,a,i,s,l,u=await (ct??(ct=new Promise((e,t)=>{o6({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),o6))),ct),c={...t},d=(o=c,a=!1,{retarget:e=>o={...e},release:i=()=>(function(e){for(let t of Object.keys(e))delete e[t]})(o),onSettled(e,t){switch(e){case"bootstrap":t&&i();return;case"mount":a||(a=t);return;case"unmount":(t||a)&&i();return}}});return n=u((r=d.onSettled,"function"==typeof e?()=>e().then(e=>cn(e,r)):cn(e,r)),c),s=e=>t=>e.call(n,d.retarget(t)).catch(e=>{throw"SKIP_BECAUSE_BROKEN"===n.getStatus()&&d.release(),e}),l=n.update&&s(n.update),Object.defineProperty(n,"update",{configurable:!0,enumerable:!0,get:()=>l,set:e=>{l=e&&s(e)}})}function ca(){return ci}function ci(e,t){let r,n=co(e,t).then(e=>r=e);return{mount:()=>n.then(e=>e.mount()),unmount:()=>n.then(e=>e.unmount()),update:e=>n.then(t=>t.update?.(e)),getStatus:()=>r?.getStatus()??"LOADING_SOURCE_CODE",get loadPromise(){return n.then(e=>e.loadPromise)},get bootstrapPromise(){return n.then(e=>e.bootstrapPromise)},get mountPromise(){return n.then(e=>e.mountPromise)},get unmountPromise(){return n.then(e=>e.unmountPromise)}}}async function cs(e,t,r,n,o=e=>e,a={}){let i=uF(n),s=uU(n),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:f}=s,p=ce++,m=`${t}/${n}-${p}`;e.dataset.extensionRenderingId=m;let h=e=>{try{ug(m)}catch(t){console.error(e,t)}};try{uh({renderingId:m,extensionName:i,extensionModuleName:d,extensionId:n,slotName:t,slotModuleName:r})}catch(e){throw h(`Recomputing configuration after registering '${n}' failed also failed`),e}try{u=await f()}catch(e){throw h(`Recomputing configuration after '${n}' failed to load also failed`),e}try{l=await co(o({...u,name:`${t}/${i}-${p}`}),{...a,_meta:c,_extensionContext:{extensionId:n,extensionSlotName:t,extensionSlotModuleName:r,extensionModuleName:d,extensionMeta:c},domElement:e})}catch(e){throw h(`Recomputing configuration after '${n}' failed to mount also failed`),e}l.mountPromise.then(void 0,e=>{console.error(`Extension '${n}' in slot '${t}' failed to mount`,e),h(`Recomputing configuration after '${n}' failed to mount also failed`)}),l.unmountPromise.then(()=>h(`Recomputing configuration after unmounting '${n}' failed`),e=>{console.error(`Extension '${n}' in slot '${t}' failed to unmount`,e),h(`Recomputing configuration after '${n}' failed to unmount also failed`)})}else console.warn(`Tried to render ${n} into ${t} but no DOM element was available.`);return l}var cl=r(4923),cu=r.n(cl);let cc=(0,cl.createContext)({moduleName:"",featureName:""});function cd({to:e,templateParams:t,onBeforeNavigate:r,children:n,...o}){return(0,cl.useEffect)(()=>{o.href&&console.warn(`ConfigurableLink does not support the href prop. Use the 'to' prop instead. The provided href value is '${o.href}'`),o.onClick&&console.warn(`ConfigurableLink does not support the onClick prop. Use the 'onBeforeNavigate' prop instead. The 'to' prop of the offending link is ${e}`)},[]),cu().createElement("a",{onClick:n=>{0===n.button&&!n.ctrlKey&&!n.shiftKey&&!n.altKey&&!n.metaKey&&(n.preventDefault(),r?.(n),iZ({to:e,templateParams:t})),0===n.button&&(n.ctrlKey||n.metaKey)&&r?.(n),0===n.button&&n.shiftKey&&r?.(n),1===n.button&&r?.(n)},href:iK(e,t),...o},n)}let cf=({state:e,children:t,...r})=>{let{extension:n}=(0,cl.useContext)(cc),o=(0,cl.useRef)(null),a=(0,cl.useRef)(Promise.resolve()),i=(0,cl.useRef)(!1),s=(0,cl.useRef)(!1),l=(0,cl.useRef)(e),u=(0,cl.useCallback)(e=>{if(!e)return;let t=()=>{"MOUNTED"===e.getStatus()&&e.unmount()};switch(e.getStatus()){case"MOUNTED":e.unmount();break;case"UPDATING":a.current?.then(t,t);break;default:e.mountPromise.then(t,()=>{})}},[]),c=(0,cl.useCallback)((e,t)=>{e.update&&"UNMOUNTING"!==e.getStatus()&&(a.current=Promise.all([e.mountPromise,a.current]).then(()=>{if(o.current?.getStatus()==="MOUNTED"&&o.current.update)return o.current.update({...t})}).catch(e=>{let t=o.current?.getStatus();"UNMOUNTING"!==t&&"NOT_MOUNTED"!==t&&"UNLOADING"!==t&&console.error(`The extension '${n?.extensionId}' failed to update`,e)}))},[]),d=(0,cl.useCallback)(t=>{t&&!o.current&&!s.current&&n?.extensionSlotName&&n.extensionSlotModuleName&&(s.current=!0,cs(t,n.extensionSlotName,n.extensionSlotModuleName,n.extensionId,void 0,e).then(t=>{(s.current=!1,o.current=t,i.current)?u(t):t&&l.current!==e&&c(t,l.current)},()=>{s.current=!1}))},[]);return(0,cl.useEffect)(()=>(i.current=!1,()=>{i.current=!0,u(o.current)}),[]),(0,cl.useEffect)(()=>{l.current=e,o.current&&c(o.current,e)},[e]),n?cu().createElement("div",{ref:d,"data-extension-id":n?.extensionId,style:{position:"relative"},...r}):null};function cp(e){let t=(0,cl.useRef)(e);return R(t.current,e)||(t.current=e),t.current}function cm(e,t){"function"==typeof t&&(t=t(e));let r={};for(let[n,o]of Object.entries(t)){let t=function(...t){e.setState(e=>o(e,...t))};r[n]=t}return r}let ch=e=>e;function cg(e,t=ch,r){let n=(0,cl.useCallback)(t=>e.subscribe(t),[e]),o=(0,cl.useCallback)(()=>t(e.getState()),[e,t]),a=(0,cl.useSyncExternalStore)(n,o,o),i=(0,cl.useMemo)(()=>r?cm(e,r):null,[e,r]);return(0,cl.useMemo)(()=>i?{...a,...i}:a,[a,i])}function cy(e,t){return cg(e,ch,t)}function cv(e){return function(t){let r=(0,cl.useCallback)(t=>e.subscribe(t),[]),n=(0,cl.useCallback)(()=>e.getState(),[]),o=(0,cl.useSyncExternalStore)(r,n,n),a=(0,cl.useMemo)(()=>t?cm(e,t):null,[t]);return(0,cl.useMemo)(()=>a?{...o,...a}:o,[o,a])}}let cb=[];Object.freeze(cb);let cw={candidateExtensions:cb};Object.freeze(cw);let cE=e=>{let t=(0,cl.useCallback)(t=>t.slots?.[e]??cw,[e]);return cg(uy(),t)},cx=e=>e.session;function cD(e,t){let{candidateExtensions:r}=cE(e),n=cg(se,cx),o=cp(t);return(0,cl.useMemo)(()=>uG(e,o),[e,o,n,r])}function c_(e,t){let{moduleName:r}=(0,cl.useContext)(cc);if(!r)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,cl.useEffect)(()=>{uY(r,e)},[r,e]),{extensions:cD(e,t),extensionSlotName:e,extensionSlotModuleName:r}}function cS(e){return e}function cC({name:e,extensionSlotName:t,select:r=cS,children:n,state:o,style:a,...i}){if(n&&o)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,cl.useRef)(null),{extensions:u,extensionSlotModuleName:c}=c_(s,o),d=(0,cl.useMemo)(()=>r(u),[r,u]),f=(0,cl.useMemo)(()=>{if("function"==typeof n&&!cu().isValidElement(n))return d.map(e=>n(e,o))},[n,d]);return cu().createElement("div",{ref:l,"data-extension-slot-name":s,"data-extension-slot-module-name":c,style:{...a,position:"relative"},...i},s&&d?.map((e,t)=>cu().createElement(cc.Provider,{key:e.id,value:{moduleName:c,featureName:"",extension:{extensionId:e.id,extensionSlotName:s,extensionSlotModuleName:c,extensionMeta:e.meta}}},f?.[t]??("function"!=typeof n?n:null)??cu().createElement(cf,{state:o}))))}var ck=r(5338);function cP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function cO(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?cP(Object(r),!0).forEach(function(t){var n,o,a;n=e,o=t,a=r[t],o in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cP(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function cR(e){return(cR="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 cT(e){return(cT="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 cN(e,t){var r;if("function"!=typeof(r=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 r="single-spa-application:".concat(t);return function(){var e=document.getElementById(r);return e||((e=document.createElement("div")).id=r,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(cT(r)));return function(){var e=r(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(cT(e)));return e}}var cj=null;try{cj=require("react").createContext()}catch(e){}var cA={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 c$(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then(function(t){e.rootComponent=t})}function cI(e,t){return new Promise(function(r,n){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 o,a=cB(e,t,function(){r(this)}),i=cN(e,t)(),s=function(e){var t=e.reactDom,r=e.renderType,n=e.elementToRender,o=e.domElement,a=t[r];if("function"!=typeof a)throw Error('renderType "'.concat(r,'" did not return a function.'));switch(r){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var i=a(o);return i.render(n),i;case"hydrateRoot":return a(o,n);default:return a(n,o),null}}({elementToRender:a,domElement:i,reactDom:cF(e),renderType:"function"==typeof(o=e).renderType?o.renderType():o.renderType});e.domElements[t.name]=i,e.renderResults[t.name]=s})}function cM(e,t){return new Promise(function(r){e.unmountResolves[t.name]=r;var n=e.renderResults[t.name];n&&n.unmount?n.unmount():cF(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]})}function cL(e,t){return new Promise(function(r){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(r);var n=cB(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(n);else{var a=cN(e,t)();cF(e).render(n,a)}})}function cF(e){return e.ReactDOMClient||e.ReactDOM}function cB(e,t,r){var n=e.React.createElement(e.rootComponent,t),o=cj?e.React.createElement(cj.Provider,{value:t},n):n;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function r(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},r.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return r.prototype=Object.create(e.React.Component.prototype),r.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},r.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},r}(e,t),o=e.React.createElement(e.errorBoundaryClass,t,o)),o=e.React.createElement(e.SingleSpaRoot,cO(cO({},t),{},{mountFinished:r,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])}}),o)}var cU=r(202),cV=r(2551),cW=r.n(cV),cH=r(7900);let cz={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},cK=new Map;(0,cH.initCache)(cK);let cG={errorRetryCount:3,fetcher:i8,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,shouldRetryOnError:e=>{if(e instanceof i7){let t=e.response.status;return!!(t>=500)||401===t||403===t||429===t}return!0},provider:()=>cK};function cZ(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw Error("Invalid options");let t=Object.assign({},cz,e),r={...cG,...t.swrConfig};return function(e){var n,o,a,i,s;return a=o=class extends(n=cu().Component){componentDidCatch(e,r){r&&r.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:r.componentStack})),t.throwErrorsToConsole&&setTimeout(()=>{throw e}),this.setState({caughtError:e,caughtErrorInfo:r})}render(){if(this.state.caughtError)return cu().createElement("div",null,"An error has occurred. Please try reloading the page.");{let n=cu().createElement(cl.Suspense,{fallback:null},cu().createElement(cV.SWRConfig,{value:r},cu().createElement(cc.Provider,{value:this.state.config},t.disableTranslations?cu().createElement(e,this.props):cu().createElement(cU.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},cu().createElement(e,this.props)))));return t.strictMode&&cu().StrictMode?cu().createElement(cu().StrictMode,null,n):n}}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 a?Object.defineProperty(a,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[i]=s,o}}function cY(e,t){return function(e){if("object"!==cR(e))throw Error("single-spa-react requires a configuration object");var t,r=cO(cO({},cA),e);if(!r.React)throw Error("single-spa-react must be passed opts.React");if(!r.ReactDOM&&!r.ReactDOMClient)throw Error("single-spa-react must be passed opts.ReactDOM or opts.ReactDOMClient");if(r.renderType||(null!=(t=r.ReactDOMClient)&&t.createRoot?r.renderType="createRoot":r.renderType="render"),!r.rootComponent&&!r.loadRootComponent)throw Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(r.errorBoundary&&"function"!=typeof r.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!cj&&r.React.createContext&&(cj=r.React.createContext()),r.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}(r);var n={bootstrap:c$.bind(null,r),mount:cI.bind(null,r),unmount:cM.bind(null,r)};return r.parcelCanUpdate&&(n.update=cL.bind(null,r)),n}({React:cu(),ReactDOMClient:ck,rootComponent:cZ(t)(e)})}function cq(e,t){return()=>e().then(({default:e})=>cY(e,t))}function cJ(e,t){return()=>Promise.resolve(cY(e,t))}let cX=cq,cQ=A()(()=>({}));V("openmrs-app-context",cQ);let c0={};function c1(e,t=e=>e){let r=cQ.getState();return e in r?Object.freeze(Object.assign({},t?t(r[e]):r[e])):null}function c2(e,t){cQ.setState(r=>(e in r||(r[e]={}),r[e]=t(r[e]),Object.assign({},r)))}function c4(e){return null===e?null:Object.freeze(Object.assign({},e))}let c3=new Map;function c6(e,t){let r=(0,cl.useRef)(t??{}),n=(0,cl.useRef)(t=>c2(e,t)),o=(0,cl.useRef)(Symbol());return(0,cl.useEffect)(()=>{let r=t??{},n=o.current;return null===c1(e)?!function(e,t=c0){cQ.setState(r=>{if(e in r)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({},r,{[e]:t===c0?{}:t})})}(e,r):(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.`),c2(e,()=>r)),c3.set(e,n),()=>{c3.get(e)===n&&(cQ.setState(t=>(e in t&&delete t[e],t)),c3.delete(e))}},[e]),(0,cl.useEffect)(()=>{let n=t??{};R(r.current,n)||(c2(e,()=>n),r.current=n)},[t]),n.current}function c5({namespace:e,value:t}){return c6(e,t),null}let c9=({children:e,value:t,fallback:r})=>t?cu().createElement(cu().Fragment,null,e):r?cu().createElement(cu().Fragment,null,r):null;function c8(){let e=(0,cl.useRef)();return(!e.current||e.current.signal.aborted)&&(e.current=new AbortController),(0,cl.useEffect)(()=>{let t=e.current;return()=>t?.abort()},[]),e.current}function c7(e,t=e=>e??{}){let[r,n]=(0,cl.useState)(()=>{if(de(e))return;let r=c1(e);if(null!==r)return t?t(r):r});return(0,cl.useEffect)(()=>{if(de(e))throw Error(`The namespace supplied to useAppContext must be a non-empty string, but was "${e}".`)},[e]),(0,cl.useEffect)(()=>{var r;let o;return(r=e=>{if(null==e)return void n(void 0);let r=t?t(e):e;n(e=>R(e,r)?e:r)})(c4(o=c1(e))),cQ.subscribe(t=>{let n=e in t?t[e]:null;n!==o&&(o=n,r(c4(n)))})},[e,t]),r}function de(e){return"string"!=typeof e||0===e.trim().length}function dt(e){let t=cD(e);return(0,cl.useMemo)(()=>t.map(e=>e.id),[t])}function dr(e){return cE(e).candidateExtensions}function dn(e,t,r){let{data:n,error:o,mutate:a,isLoading:i,isValidating:s}=cW()(e?lu(e,t,r):null,i8);return(0,cl.useMemo)(()=>({isLoading:i,data:n?.data.results??[],error:o,mutate:a,isValidating:s}),[n,o,i,s,a])}function da(e){(0,cl.useEffect)(()=>{if(e){let e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])}let di={},ds=`No ComponentContext has been provided. This should come from "openmrsComponentDecorator".
|
|
16
|
+
Usually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".`;function dl(e,t,r){let n=di[e];if(n)return n;let o=new Promise(e=>{let n=r(t.getState());if(n)return void e(n);let o=t.subscribe(t=>{let n=r(t);n&&(o(),e(n))})});return di[e]=o,o.then(()=>{di[e]===o&&delete di[e]}),o}function du(e){let{moduleName:t,extension:r}=(0,cl.useContext)(cc),n=e?.externalModuleName??t;if(!n&&!r)throw Error(ds);let o=function(e){let t=(0,cl.useMemo)(()=>nh(e),[e]),r=function(e){let[t,r]=(0,cl.useState)(()=>{let t=e.getState();return t.loaded&&t.config?t.config:null});return(0,cl.useEffect)(()=>e?.subscribe(e=>{e.loaded&&e.config&&r(e.config)}),[e]),t}(t);if(!r)throw dl(e,t,e=>e.loaded?e.config:null);return r}(n),a=function(e){let t=(0,cl.useMemo)(nb,[]),r=function(e,t){let[r,n]=(0,cl.useState)(t?()=>{let r=nw(e.getState(),t.extensionSlotName,t.extensionId);if(r.loaded&&r.config)return r.config}:null);return(0,cl.useEffect)(()=>{if(t)return e.subscribe(e=>{let o=nw(e,t.extensionSlotName,t.extensionId);o.loaded&&o.config&&!rx(o.config,r)&&n(o.config)})},[e,t,r]),r}(t,e);if(!r&&e)throw dl(`${e.extensionSlotName}-${e.extensionId}`,t,t=>{let r=nw(t,e.extensionSlotName,e.extensionId);return r.loaded?r.config:null});return r||{}}(r);return(0,cl.useMemo)(()=>e?.externalModuleName&&n===e.externalModuleName?{...o}:{...o,...a},[n,e?.externalModuleName,o,a])}let dc=cD;function dd(e,t=300){let[r,n]=(0,cl.useState)(e);return(0,cl.useEffect)(()=>{let r=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(r)}},[e,t]),r}var df=r(6880),dp=r.n(df);let dm=`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 dh(){let e=`${i3}/emrapi/configuration?v=${dm}`,t=dp()(e,i8);return(0,cl.useMemo)(()=>({emrConfiguration:t.data?.data,isLoadingEmrConfiguration:t.isLoading,mutateEmrConfiguration:t.mutate,errorFetchingEmrConfiguration:t.error}),[t])}function dg(){return(0,cl.useContext)(cc).extension}let dy=cv(ul());function dv(e){let t=cD(e);return(0,cl.useMemo)(()=>Object.fromEntries(t.map(e=>[e.name,e.meta])),[t])}let db=cv(uy());function dw(e){let{flags:t}=cg(l7);return t[e]?.enabled??!1}function dE(){let[,e]=(0,cl.useState)(0);return(0,cl.useCallback)(()=>{e(e=>e+1)},[])}function dx(e,t,r={}){return d_(e,t,dD,r)}let dD={getPaginatedUrl:(e,t,r)=>{if(!e)return null;{let n=new URL(i9(e.toString()),window.location.toString());return n.searchParams.set("limit",""+t),n.searchParams.set("startIndex",""+r),n.searchParams.set("totalCount","true"),n.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 d_(e,t,r,n={}){let{getPaginatedUrl:o,getTotalCount:a,getCurrentPageSize:i,getData:s}=r,{immutable:l,swrConfig:u}=n,c=n.fetcher??i8,[d,f]=(0,cl.useState)(1),p=(0,cl.useRef)(NaN),m=(0,cl.useRef)(NaN),h=(0,cl.useRef)(d),g=(0,cl.useRef)(!1),y=(0,cl.useRef)(!1),v=e?.toString()??"",[b,w]=(0,cl.useState)(v);v!==b&&(w(v),f(1),h.current=1,p.current=NaN,m.current=NaN,g.current=!1,y.current=!1);let E=(d-1)*t,x=(0,cl.useMemo)(()=>o(e,t,E),[e,t,E]),{data:D,..._}=(l?dp():cW())(x,c,u);D?.data&&(p.current=a(D?.data),m.current=i(D?.data),g.current=!0);let S=Math.ceil(p.current/t),C=(0,cl.useCallback)(e=>{if(!Number.isInteger(e)||e<1)return void console.warn(`useServerPagination: ignoring goTo(${e}); page must be a positive integer.`);let r=Math.ceil(p.current/t);!g.current||Number.isNaN(r)||e<=r?(h.current=e,f(e)):console.warn("Invalid attempt to go to out of bounds page: "+e)},[t]);(0,cl.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,f(e))},[d,t,v,D]);let k=(0,cl.useCallback)(()=>{C(h.current+1)},[C]),P=(0,cl.useCallback)(()=>{C(h.current-1)},[C]);return{data:s(D?.data),totalPages:S,totalCount:p.current,currentPage:d,currentPageSize:m.current,paginated:S>1,showNextButton:d<S,showPreviousButton:d>1,goTo:C,goToNext:k,goToPrevious:P,..._}}function dS(e,t,r={}){return d_(e,t,dC(),r)}function dC(){return{getPaginatedUrl:(e,t,r)=>{if(!e)return null;{let n=new URL(i9(e.toString()),window.location.toString());return n.searchParams.set("_count",""+t),n.searchParams.set("_getpagesoffset",""+r),n.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 dk=r(6310),dP=r.n(dk);function dO(e,t={}){return dR(e,dD,t)}function dR(e,t,r={}){let{swrInfiniteConfig:n,immutable:o}=r,{getNextUrl:a,getTotalCount:i,getData:s}=t,l=r.fetcher??i8,u=(0,cl.useCallback)((r,n)=>0==r?e?.toString()??null:t.getNextUrl(n.data),[e]),{data:c,size:d,setSize:f,...p}=dP()(u,l,{...n,...o?{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1}:{}}),m=a(c?.[c.length-1].data),h=i(c?.[0]?.data);return{data:c?.flatMap(e=>s(e.data)),totalCount:h,hasMore:null!=m,loadMore:()=>{f((c?.length??0)+1)},nextUri:m,...p}}function dT(e,t={}){return dN(e,dD,t)}function dN(e,t,r={}){let n=dR(e,t,r),{hasMore:o,error:a,data:i,loadMore:s,isLoading:l,nextUri:u}=n;return((0,cl.useEffect)(()=>{o&&!a&&s()},[o,u]),r.partialData)?n:{...n,data:o||a?void 0:i,isLoading:l||o}}function dj(e,t={}){return dN(e,dC(),t)}function dA(e,t={}){return dR(e,dC(),t)}function d$(){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 dI(){let[e,t]=(0,cl.useState)(d$);return(0,cl.useEffect)(()=>{let e=()=>{t(d$())};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}let dM=e=>"small-desktop"===e||"large-desktop"===e;function dL(e){let t=(0,cl.useContext)(cc);(0,cl.useEffect)(()=>(t&&t.moduleName&&(e.componentContext=t),uX(e),()=>{uQ(e.name)}),[t,e])}function dF(){return cg(uJ)}let dB=[];function dU(e=null,t=null){let r=new URLSearchParams;e&&r.set("tag",e),t&&r.set("q",t);let n=r.toString(),{data:o}=dT(`${i3}/location${n?"?"+n:""}`,{immutable:!0});return o??dB}function dV(e,t=!0){let r=(0,cl.useRef)(null);return(0,cl.useEffect)(()=>{let n=n=>{t&&r.current&&n.target&&n.target instanceof Node&&(r.current.contains(n.target)||e(n))};return window.addEventListener("mousedown",n),window.addEventListener("touchstart",n),()=>{window.removeEventListener("mousedown",n),window.removeEventListener("touchstart",n)}},[e,t]),r}function dW(e){let t=(0,cl.useRef)();return(0,cl.useEffect)(()=>{let r=new IntersectionObserver(t=>{for(let r of t)if(r.isIntersecting)return void e()},{threshold:1});return t.current&&r.observe(t.current),()=>{t.current&&r.unobserve(t.current)}},[t.current,e]),t}function dH(e,t={}){let{abortController:r,fetchInit:n,url:o,swrConfig:a}=t,i=c8(),s=(0,cl.useMemo)(()=>n?.signal??r?.signal??i.signal,[r?.signal,n?.signal,i.signal]),l=(0,cl.useCallback)(e=>i8(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,o),{...n,signal:s}),[s,n,o]);return cW()(e,l,a)}function dz(e=[],t=10){let[r,n]=(0,cl.useState)(1),o=(0,cl.useMemo)(()=>"number"==typeof t&&t>0?Math.max(1,Math.ceil(e.length/t)):1,[e.length,t]);r>o&&n(o);let a=Math.min(Math.max(1,r),o),i=(0,cl.useMemo)(()=>{let r=(a-1)*t,n=(a+0)*t;return e.slice(r,n)},[e,a,t]),s=(0,cl.useCallback)(e=>{!Number.isInteger(e)||e<1?console.warn(`usePagination: ignoring goTo(${e}); page must be a positive integer.`):n(e)},[]),l=(0,cl.useCallback)(()=>{n(e=>e+1)},[]),u=(0,cl.useCallback)(()=>{n(e=>Math.max(1,e-1))},[]);return(0,cl.useMemo)(()=>({results:i,totalPages:o,currentPage:a,paginated:e.length>t,showNextButton:a<o,showPreviousButton:a>1,goTo:s,goToNext:l,goToPrevious:u}),[i,o,e.length,t,a,s,l,u])}function dK(e,t,r,n){return{pageSizes:(0,cl.useMemo)(()=>{let r=Math.ceil(t/e);return isNaN(r)&&(r=0),[...Array(r).keys()].map(t=>(t+1)*e)},[e,t]),pageItemsCount:(0,cl.useMemo)(()=>e>t?t:e*r>t?e*(r-1)+n:e*r,[e,t,r,n])}}function dG(){let e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function dZ(e){let[t,r]=(0,cl.useState)(e??dG()),{data:n,error:o,isValidating:a}=cW()(t?["patient",t]:null,()=>lf(t,{}));return(0,cl.useEffect)(()=>{let e=()=>{let e=dG();e!==t&&r(e)};return window.addEventListener("single-spa:routing-event",e),()=>window.removeEventListener("single-spa:routing-event",e)},[t]),(0,cl.useMemo)(()=>({isLoading:a&&!o&&!n,patient:n,patientUuid:t,error:o}),[a,o,n,t])}function dY(){let e=`${i3}/metadatamapping/termmapping?v=custom:(metadataUuid)&code=emr.primaryIdentifierType`,{data:t,error:r,isLoading:n}=cW()(e,i8);return(0,cl.useMemo)(()=>({primaryIdentifierCode:t?.data?.results[0]?.metadataUuid,isLoading:n,error:r}),[t,r,n])}function dq(e){let{extensions:t,extensionSlotModuleName:r}=c_(e);return e?t.map(t=>({state:n})=>cu().createElement(cc.Provider,{value:{moduleName:r,featureName:"",extension:{extensionId:t.id,extensionSlotName:e,extensionSlotModuleName:r,extensionMeta:t.meta}}},cu().createElement(cf,{state:n}))):[]}function dJ(){let e=(0,cl.useRef)(),[t,r]=(0,cl.useState)(null),n=null;if(!t){if(i){let e=sa().getState();e.loaded&&(n=e.session)}else i=new Promise(t=>{let r=({loaded:r,session:o})=>{r&&(t(o),n=o,e.current&&(e.current(),e.current=void 0))};r(sa().getState()),n||(e.current=sa().subscribe(r))});if(n)r(n);else throw i}(0,cl.useEffect)(()=>(e.current||(e.current=sa().subscribe(({loaded:e,session:t})=>{e&&(n=t,r(t))})),()=>{e.current&&(e.current(),e.current=void 0)}),[]);let o=t||n;if(!o)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 o}let dX=({privilege:e,fallback:t,children:r})=>{let[n,o]=(0,cl.useState)(null);return((0,cl.useEffect)(()=>{let e=sa(),t=e.subscribe(({loaded:e,session:t})=>{o(e?t?.user??null:null)}),{loaded:r,session:n}=e.getState();return r&&o(n?.user??null),t},[]),n&&su(e,n))?cu().createElement(cu().Fragment,null,r):t?cu().createElement(cu().Fragment,null,t):null};var dQ=r(4353),d0=r.n(dQ),d1=r(7581);let d2=new Map;function d4(){for(let e of Array.from(d2.values()))e()}let d3={setVisitContext:(e,t)=>null==t?{manuallySetVisitUuid:null}:{manuallySetVisitUuid:t.uuid,patientUuid:t.patient?.uuid}};function d6(e){let t=(0,cl.useId)();return(0,cl.useEffect)(()=>{if(e)return d2.set(t,e),()=>{d2.delete(t)}},[t,e]),{...cy(l_(),d3),mutateVisit:d4}}function d5(e,t=lx){let r=(0,cl.useRef)(void 0),{patientUuid:n,manuallySetVisitUuid:o,setVisitContext:a}=d6((0,cl.useCallback)(()=>r.current?.(),[])),i=e&&n==e?o:null,s=`?patient=${e}&v=${t}&includeInactive=false`,l=`/${i}?v=${t}`,{data:u,error:c,mutate:d,isValidating:f}=cW()(e?`${i3}/visit${s}`:null,i8),{data:p,error:m,mutate:h,isValidating:g}=cW()(e&&i?`${i3}/visit${l}`:null,i8),y=(0,cl.useMemo)(()=>u?.data.results.find(e=>null===e.stopDatetime)??null,[u]),v=(0,cl.useMemo)(()=>i&&p?p.data:null,[p,i]),b=(0,cl.useRef)(null);(0,cl.useEffect)(()=>{!f&&y&&n===e&&null===o&&a(y),g||(b.current&&v&&b.current.uuid===v.uuid&&!b.current.stopDatetime&&v.stopDatetime&&a(null),b.current=v)},[v,o,y,f,g,n]);let w=(0,cl.useCallback)(()=>{d(),h()},[d,h]);(0,cl.useEffect)(()=>{r.current=w},[w]);let E=!!(!u||i&&!p),x=!!(i?m:c);return{error:c||m,mutate:w,isValidating:f||g,activeVisit:y,currentVisit:v,currentVisitIsRetrospective:!!i,isLoading:E&&!x}}dQ.extend(d1);let d9=[];function d8(){let{data:e}=dp()(lv,lb);return e??d9}let d7=new Map;async function fe(e,t){let r=t.indexOf("#"),n=r>=0,o=n?t.substring(0,r):e,a=n?t.substring(r+1):t,i=await sK(o);return i&&Object.hasOwn(i,a)&&"function"==typeof i[a]?fr(o,i).then(()=>i[a]()):(i?i&&Object.hasOwn(i,a)?console.warn(`The export ${t}, defined in ${e}'s routes.json, is not a function`):console.warn(`${o} does not define a component called "${a}", referenced in ${e}'s routes.json. This cannot be loaded.`):console.warn(`Unknown app ${o} for ${t} defined in ${e}'s routes.json`),ft)}let ft={bootstrap:()=>Promise.resolve(),mount:()=>Promise.resolve(),unmount:()=>Promise.resolve()};async function fr(e,t){if(e in d7)await d7[e];else{let r=t??await sK(e);await (d7[e]=new Promise((t,n)=>{if(Object.hasOwn(r,"startupApp")){let o=r.startupApp;if("function"==typeof o)return Promise.resolve(o()).then(()=>{nH(e),t(null)}).catch(n)}nH(e),t(null)}))}}function fn(e,t){let r=t.name;if(!r)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 ${r} from ${e} declares both a 'slots' property and
|
|
19
19
|
a 'slot' property. Only the 'slots' property will be honored.`);let n=t.slots?t.slots:t.slot?[t.slot]:[];if(!t.component)return void console.error(`The extension ${r} 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 o of(
|
|
20
|
+
To fix this, ensure that you define a 'component' field inside the extension definition.`,t);for(let o of(uV({name:r,load:()=>fe(e,t.component),meta:t.meta||{},order:t.order,moduleName:e,privileges:t.privileges,featureFlag:t.featureFlag,displayExpression:t.displayExpression}),n))uW(o,r)}let fo=[];function fa(e,t){uw(()=>(function(e,t){if(e&&t&&"object"==typeof t){nW(e);let r=t.extensions??[],n=t.modals??[],o=t.featureFlags??[],a=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"))?fo.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)}),r.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")?fn(e,t):console.warn(`An extension for ${e} could not be registered as it does not appear to have the required properties`,t)}),n.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")){let r;(r=t.name)?t.component?u1({name:r,moduleName:e,load:()=>fe(e,t.component)}):console.error(`The modal ${r} 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.`),u9(e,a);for(let t of(u8(e,i),i))t.icon&&fn(e,{name:t.name,component:t.icon,slot:t.group,order:t.order});u7(e,s),o.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"flagName"))t.flagName?t.label?t.description?ue(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?
|
|
28
|
-
To fix this, ensure that you define the "component" field inside the page definition.`,e)}(n,t)}}let fl={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 fu(){document.body.classList.toggle("omrs-breakpoint-lt-tablet",window.innerWidth<fl.TABLET_MIN),document.body.classList.toggle("omrs-breakpoint-gt-phone",window.innerWidth>fl.PHONE_MAX),document.body.classList.toggle("omrs-breakpoint-gt-tablet",window.innerWidth>fl.TABLET_MAX),document.body.classList.toggle("omrs-breakpoint-lt-desktop",window.innerWidth<fl.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-small-desktop",window.innerWidth<fl.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-large-desktop",window.innerWidth<fl.LARGE_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-gt-small-desktop",window.innerWidth>fl.SMALL_DESKTOP_MAX)}let fc=!1;function fd(){fc||(window.addEventListener("resize",fu),fu(),fc=!0)}var ff=r(4848),fp=r(6942),fm=r.n(fp);function fh({title:e,children:t}){let r="tablet"===dM();return(0,ff.jsxs)("div",{className:fm()({"-esm-cohort-builder__card-header-module__tabletHeader___rUYi0":r,"-esm-cohort-builder__card-header-module__desktopHeader___CDa37":!r}),children:[(0,ff.jsx)("h4",{children:e}),t]})}let fg=["red","magenta","purple","blue","teal","cyan","gray","green","warm-gray","cool-gray","high-contrast","outline"],fy={primaryColor:{_type:no.String,_description:"The color for displaying primary diagnoses tags",_default:"blue",_validators:[op.oneOf(fg)]},secondaryColor:{_type:no.String,_description:"The color for displaying secondary diagnoses tags",_default:"gray",_validators:[op.oneOf(fg)]}},fv={"Brand color #1":{_default:"#005d5d",_type:no.String},"Brand color #2":{_default:"#004144",_type:no.String},"Brand color #3":{_default:"#007d79",_type:no.String},excludePatientIdentifierCodeTypes:{uuids:{_type:no.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:no.UUID}}},implementationName:{_type:no.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},logo:{src:{_type:no.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:[op.isUrl]},alt:{_type:no.String,_default:"Logo",_description:"The alternative text for the logo image, displayed when the image cannot be loaded or on hover."}},patientPhotoConceptUuid:{_type:no.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:no.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:[op.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:no.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:no.String}},diagnosisTags:fy};var fb=r(9536);let fw={"carbon.table.batch.cancel":"cancel","carbon.table.batch.items.selected":"batchActionsItemsSelected","carbon.table.batch.item.selected":"batchActionItemSelected","carbon.table.batch.selectAll":"selectAll"},fE=e=>(0,ff.jsx)(fb.TableBatchActions,{translateWithId:(e,t)=>{let r=fw[e];return r?iG(r,e,t):e},...e}),fx="-esm-cohort-builder__custom-overflow-menu-module__container___lY3iq",fD="-esm-cohort-builder__custom-overflow-menu-module__menu___dReHr",f_="-esm-cohort-builder__custom-overflow-menu-module__show___48R0e",fS="-esm-cohort-builder__custom-overflow-menu-module__overflowMenuButton___tsY8r",fC=(0,cc.createContext)(null);function fk(){let e=(0,cc.useContext)(fC);if(!e)throw Error("useCustomOverflowMenu must be used within a CustomOverflowMenu");return e}function fP({menuTitle:e,children:t}){let[r,n]=cd().useState(!1),o=dW(()=>n(!1),r),a="tablet"===dM(),i=(0,cc.useCallback)(()=>n(e=>!e),[]),s=(0,cc.useRef)(null),l=(0,cc.useRef)(null),u=(0,cc.useId)(),c=`custom-overflow-menu-trigger-${u}`,d=`custom-overflow-menu-${u}`,f=(0,cc.useCallback)(()=>{n(!1),s.current?.focus()},[]),p=(0,cc.useMemo)(()=>({closeMenu:f}),[f]),m=(0,cc.useCallback)(e=>{"Escape"===e.key&&r&&(e.stopPropagation(),f())},[f,r]),h=cc.Children.toArray(t);(0,cc.useEffect)(()=>{if(r&&l.current){let e=l.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[r]);let g=(0,cc.useCallback)(({currentIndex:e,direction:t})=>{let r=l.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!r?.length)return;let n=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,o=Array.from(r).indexOf(n);if(-1===o)return void r[t>0?0:r.length-1]?.focus();let a=o+t,i=a<0?r.length-1:a>=r.length?0:a;r[i]?.focus()},[]),y=h.map((e,t)=>(0,cc.isValidElement)(e)?(0,cc.cloneElement)(e,{closeMenu:f,handleOverflowMenuItemFocus:g,index:t}):e);return(0,ff.jsxs)("div",{"data-overflow-menu":!0,className:fm()("cds--overflow-menu",fx),ref:o,children:[(0,ff.jsx)("button",{className:fm()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":r},fS),"aria-controls":d,"aria-expanded":r,"aria-haspopup":"true",id:c,onClick:i,onKeyDown:m,ref:s,children:e}),(0,ff.jsxs)("div",{className:fm()("cds--overflow-menu-options","cds--overflow-menu--flip",fD,{[f_]:r}),"aria-labelledby":c,"data-floating-menu-direction":"bottom",id:d,onKeyDown:m,ref:l,role:"menu",tabIndex:-1,children:[(0,ff.jsx)("ul",{className:fm()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":a}),children:(0,ff.jsx)(fC.Provider,{value:p,children:y})}),(0,ff.jsx)("span",{})]})]})}function fO(e){let t=(0,cc.useContext)(fC);return(0,ff.jsx)(fb.OverflowMenuItem,{...e,closeMenu:t?.closeMenu})}var fR=r(8168);(en=ea||(ea={})).Pop="POP",en.Push="PUSH",en.Replace="REPLACE";var fT=function(e){return e},fN="beforeunload";function fj(e){e.preventDefault(),e.returnValue=""}function fA(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter(function(e){return e!==t})}},call:function(t){e.forEach(function(e){return e&&e(t)})}}}function f$(e){var t={};if(e){var r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));var n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}let fI=(0,cc.createContext)(null),fM=(0,cc.createContext)(null);function fL(e,t){if(!e)throw Error(t)}function fF(){return null!=(0,cc.useContext)(fM)}function fB(e){let{basename:t="/",children:r=null,location:n,navigationType:o=ea.Pop,navigator:a,static:i=!1}=e;fF()&&fL(!1);let s=t.replace(/\/+$/,"").replace(/^\/*/,"/"),l=(0,cc.useMemo)(()=>({basename:s,navigator:a,static:i}),[s,a,i]);"string"==typeof n&&(n=f$(n));let{pathname:u="/",search:c="",hash:d="",state:f=null,key:p="default"}=n,m=(0,cc.useMemo)(()=>{let e=function(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=e.charAt(t.length);return r&&"/"!==r?null:e.slice(t.length)||"/"}(u,s);return null==e?null:{pathname:e,search:c,hash:d,state:f,key:p}},[s,u,c,d,f,p]);return null==m?null:(0,cc.createElement)(fI.Provider,{value:l},(0,cc.createElement)(fM.Provider,{children:r,value:{location:m,navigationType:o}}))}function fU(e){let{basename:t,children:r,window:n}=e,o=(0,cc.useRef)();null==o.current&&(o.current=function(e){void 0===e&&(e={});var t=e.window,r=void 0===t?document.defaultView:t,n=r.history;function o(){var e=r.location,t=e.pathname,o=e.search,a=e.hash,i=n.state||{};return[i.idx,fT({pathname:t,search:o,hash:a,state:i.usr||null,key:i.key||"default"})]}var a=null;r.addEventListener("popstate",function(){if(a)d.call(a),a=null;else{var e=ea.Pop,t=o(),r=t[0],n=t[1];if(d.length){if(null!=r){var i=l-r;i&&(a={action:e,location:n,retry:function(){y(-1*i)}},y(i))}}else g(e)}});var i=ea.Pop,s=o(),l=s[0],u=s[1],c=fA(),d=fA();function f(e){var t,r,n,o,a,i,s;return"string"==typeof e?e:(n=void 0===(r=(t=e).pathname)?"/":r,a=void 0===(o=t.search)?"":o,s=void 0===(i=t.hash)?"":i,a&&"?"!==a&&(n+="?"===a.charAt(0)?a:"?"+a),s&&"#"!==s&&(n+="#"===s.charAt(0)?s:"#"+s),n)}function p(e,t){return void 0===t&&(t=null),fT((0,fR.A)({pathname:u.pathname,hash:"",search:""},"string"==typeof e?f$(e):e,{state:t,key:Math.random().toString(36).substr(2,8)}))}function m(e,t){return[{usr:e.state,key:e.key,idx:t},f(e)]}function h(e,t,r){return!d.length||(d.call({action:e,location:t,retry:r}),!1)}function g(e){i=e;var t=o();l=t[0],u=t[1],c.call({action:i,location:u})}function y(e){n.go(e)}return null==l&&(l=0,n.replaceState((0,fR.A)({},n.state,{idx:l}),"")),{get action(){return i},get location(){return u},createHref:f,push:function e(t,o){var a=ea.Push,i=p(t,o);if(h(a,i,function(){e(t,o)})){var s=m(i,l+1),u=s[0],c=s[1];try{n.pushState(u,"",c)}catch(e){r.location.assign(c)}g(a)}},replace:function e(t,r){var o=ea.Replace,a=p(t,r);if(h(o,a,function(){e(t,r)})){var i=m(a,l),s=i[0],u=i[1];n.replaceState(s,"",u),g(o)}},go:y,back:function(){y(-1)},forward:function(){y(1)},listen:function(e){return c.push(e)},block:function(e){var t=d.push(e);return 1===d.length&&r.addEventListener(fN,fj),function(){t(),d.length||r.removeEventListener(fN,fj)}}}}({window:n}));let a=o.current,[i,s]=(0,cc.useState)({action:a.action,location:a.location});return(0,cc.useLayoutEffect)(()=>a.listen(s),[a]),(0,cc.createElement)(fB,{basename:t,children:r,location:i.location,navigationType:i.action,navigator:a})}let fV=["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"],fW=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-activity",iconProps:e})})),fH=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-add",iconProps:e})})),fz=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-arrow-down",iconProps:e})})),fK=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-arrow-left",iconProps:e})})),fG=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-arrow-right",iconProps:e})})),fZ=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-arrow-up",iconProps:e})})),fY=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-baby",iconProps:e})})),fq=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-calendar-heat-map",iconProps:e})})),fJ=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-calendar",iconProps:e})})),fX=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-caret-down",iconProps:e})})),fQ=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-caret-left",iconProps:e})})),f0=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-caret-right",iconProps:e})})),f1=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-caret-up",iconProps:e})})),f2=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-chart-average",iconProps:e})})),f4=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-chart-line",iconProps:e})})),f3=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-checkmark-filled",iconProps:e})})),f6=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-checkmark-outline",iconProps:e})})),f5=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-chemistry",iconProps:e})})),f9=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-chevron-down",iconProps:e})})),f8=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-chevron-left",iconProps:e})})),f7=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-chevron-right",iconProps:e})})),pe=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-chevron-up",iconProps:e})})),pt=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-close",iconProps:e})})),pr=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-close-filled",iconProps:e})})),pn=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-close-outline",iconProps:e})})),po=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-document",iconProps:e})})),pa=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-document-attachment",iconProps:e})})),pi=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-download",iconProps:e})})),ps=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-drug-order",iconProps:e})})),pl=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-edit",iconProps:e})})),pu=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-event-schedule",iconProps:e})})),pc=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-events",iconProps:e})})),pd=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-gender-female",iconProps:e})})),pf=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-gender-male",iconProps:e})})),pp=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-gender-other",iconProps:e})})),pm=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-gender-unknown",iconProps:e})})),ph=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-generic-order-type",iconProps:e})})),pg=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-group",iconProps:e})})),py=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-group-access",iconProps:e})})),pv=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-hospital-bed",iconProps:e})})),pb=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-image-medical",iconProps:e})})),pw=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-information",iconProps:e})})),pE=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-information-filled",iconProps:e})})),px=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-information-square",iconProps:e})})),pD=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-inventory-management",iconProps:e})})),p_=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-lab-order",iconProps:e})})),pS=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-list-checked",iconProps:e})})),pC=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-location",iconProps:e})})),pk=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-material-order",iconProps:e})})),pP=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-maximize",iconProps:e})})),pO=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-medication",iconProps:e})})),pR=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-message-queue",iconProps:e})})),pT=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-microscope",iconProps:e})})),pN=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-mobile-check",iconProps:e})})),pj=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-money",iconProps:e})})),pA=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-mother",iconProps:e})})),p$=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-movement",iconProps:e})})),pI=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),pM=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),pL=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-password",iconProps:e})})),pF=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-pedestrian-family",iconProps:e})})),pB=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-pen",iconProps:e})})),pU=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-printer",iconProps:e})})),pV=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-procedure-order",iconProps:e})})),pW=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-programs",iconProps:e})})),pH=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-referral-order",iconProps:e})})),pz=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-renew",iconProps:e})})),pK=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-report",iconProps:e})})),pG=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-reset",iconProps:e})})),pZ=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-save",iconProps:e})})),pY=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-search",iconProps:e})})),pq=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-settings",iconProps:e})})),pJ=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-switcher",iconProps:e})})),pX=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-shopping-cart",iconProps:e})})),pQ=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-shopping-cart--arrow-down",iconProps:e})})),p0=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-sticky-note-add",iconProps:e})})),p1=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-syringe",iconProps:e})})),p2=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-table-of-contents",iconProps:e})})),p4=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-table",iconProps:e})})),p3=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-time",iconProps:e})})),p6=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-tools",iconProps:e})})),p5=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-translate",iconProps:e})})),p9=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-trash-can",iconProps:e})})),p8=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-tree-view--alt",iconProps:e})})),p7=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-two-factor-authentication",iconProps:e})})),me=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-user-avatar",iconProps:e})})),mt=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-user-follow",iconProps:e})})),mr=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-user-xray",iconProps:e})})),mn=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-user",iconProps:e})})),mo=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-view-off",iconProps:e})})),ma=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-view",iconProps:e})})),mi=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(mp,{ref:t,icon:"omrs-icon-warning",iconProps:e})})),ms=mi,ml=pa,mu=pS,mc=pb,md=pQ,mf=(0,cc.memo)((0,cc.forwardRef)(function({icon:e,fallback:t,...r},n){let o=(0,cc.useRef)(e?document.getElementById(e):void 0);return(0,cc.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),r=new MutationObserver(t=>{for(let r of t)"childList"===r.type&&(o.current=e?document.getElementById(e):void 0)});return t&&r.observe(t,{childList:!0}),()=>r.disconnect()},[e]),(0,ff.jsx)(c7,{value:o.current,fallback:t,children:(0,ff.jsx)(mp,{ref:n,icon:e,iconProps:r})})})),mp=(0,cc.memo)((0,cc.forwardRef)(function({icon:e,iconProps:t},r){let{className:n,fill:o,size:a}=Object.assign({},{fill:"currentColor",size:20},t);(a<=0||a>72)&&(console.error(`Invalid size '${a}' specified for ${e}. Defaulting to 20.`),a=20);let i=(0,cc.useRef)(null);return(0,cc.useImperativeHandle)(r,()=>i.current),(0,cc.useEffect)(()=>{i.current&&"currentColor"!==o&&i.current.style.setProperty("--omrs-icon-fill",o)},[]),(0,ff.jsx)("svg",{ref:i,className:fm()("omrs-icon","-esm-cohort-builder__icons-module__icon___sq7Qp",n),height:a,width:a,viewBox:"0 0 16 16",children:(0,ff.jsx)("use",{href:`#${e}`})})})),mm=({path:e,title:t,basePath:r,icon:n})=>{let{t:o}=(0,cW.useTranslation)(),a=(fF()||fL(!1),(0,cc.useContext)(fM).location),i=(0,cc.useMemo)(()=>{if(!e)return!1;let t=e.startsWith("/")?e.slice(1):e;if(t.startsWith("http"))return t===window.location.href;let r=t.split("/").map(e=>decodeURIComponent(e)),n=(a.pathname??"").split("/").slice(1).map(e=>decodeURIComponent(e));return n.some((e,t)=>r.every((e,r)=>n[t+r]===e))},[a.pathname,e]);return(0,ff.jsx)("div",{children:(0,ff.jsx)(cp,{className:fm()("cds--side-nav__link",{"active-left-nav-link":i}),to:`${r}/${encodeURIComponent(e)}`,children:(0,ff.jsxs)("span",{className:"-esm-cohort-builder__dashboard-module__menu___Lg1M+",children:[(0,ff.jsx)(mf,{icon:n,className:"-esm-cohort-builder__dashboard-module__icon___Y2DxK",size:16}),(0,ff.jsx)("span",{children:o(t)})]})})},e)};function mh(e){return function({basePath:t}){return(0,ff.jsx)(fU,{children:(0,ff.jsx)(mm,{basePath:t,...e})})}}function mg(e){let t=(0,cc.useRef)(null);return(0,cc.useMemo)(()=>({get current(){return t.current},set current(value){t.current=value,"function"==typeof e?e(value):e&&(e.current=value)}}),[e])}function my(...e){return(...t)=>{for(let r of e)"function"==typeof r&&r(...t)}}let mv="u">typeof document?cd().useLayoutEffect:()=>{};function mb(e){let t=(0,cc.useRef)(null);return mv(()=>{t.current=e},[e]),(0,cc.useCallback)((...e)=>{let r=t.current;return null==r?void 0:r(...e)},[])}let mw={prefix:String(Math.round(1e10*Math.random())),current:0},mE=cd().createContext(mw),mx=cd().createContext(!1),mD=("u">typeof window&&window.document&&window.document.createElement,new WeakMap),m_="function"==typeof cd().useId?function(e){let t=cd().useId(),[r]=(0,cc.useState)(mP()),n=r?"react-aria":`react-aria${mw.prefix}`;return e||`${n}-${t}`}:function(e){let t=(0,cc.useContext)(mE),r=function(e=!1){let t=(0,cc.useContext)(mE),r=(0,cc.useRef)(null);if(null===r.current&&!e){var n,o;let e=null==(o=cd().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||null==(n=o.ReactCurrentOwner)?void 0:n.current;if(e){let r=mD.get(e);null==r?mD.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==r.state&&(t.current=r.id,mD.delete(e))}r.current=++t.current}return r.current}(!!e),n=`react-aria${t.prefix}`;return e||`${n}-${r}`};function mS(){return!1}function mC(){return!0}function mk(e){return()=>{}}function mP(){return"function"==typeof cd().useSyncExternalStore?cd().useSyncExternalStore(mk,mS,mC):(0,cc.useContext)(mx)}let mO=!!("u">typeof window&&window.document&&window.document.createElement),mR=new Map;function mT(e){let[t,r]=(0,cc.useState)(e),n=(0,cc.useRef)(null),o=m_(t),a=(0,cc.useRef)(null);if(s&&s.register(a,o),mO){let e=mR.get(o);e&&!e.includes(n)?e.push(n):mR.set(o,[n])}return mv(()=>()=>{s&&s.unregister(a),mR.delete(o)},[o]),(0,cc.useEffect)(()=>{let e=n.current;return e&&r(e),()=>{e&&(n.current=null)}}),o}function mN(e=[]){let t=mT(),[r,n]=function(e){let[t,r]=(0,cc.useState)(e),n=(0,cc.useRef)(null),o=mb(()=>{if(!n.current)return;let e=n.current.next();if(e.done){n.current=null;return}t===e.value?o():r(e.value)});mv(()=>{n.current&&o()});let a=mb(e=>{n.current=e(t),o()});return[t,a]}(t),o=(0,cc.useCallback)(()=>{n(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,n]);return mv(o,[t,o,...e]),r}"u">typeof FinalizationRegistry&&(s=new FinalizationRegistry(e=>{mR.delete(e)}));let mj=function(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=function e(t){var r,n,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var a=t.length;for(r=0;r<a;r++)t[r]&&(n=e(t[r]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}(e))&&(n&&(n+=" "),n+=t);return n};function mA(...e){let t={...e[0]};for(let r=1;r<e.length;r++){let n=e[r];for(let e in n){let r=t[e],o=n[e];"function"==typeof r&&"function"==typeof o&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?t[e]=my(r,o):("className"===e||"UNSAFE_className"===e)&&"string"==typeof r&&"string"==typeof o?t[e]=mj(r,o):"id"===e&&r&&o?t.id=function(e,t){if(e===t)return e;let r=mR.get(e);if(r)return r.forEach(e=>e.current=t),t;let n=mR.get(t);return n?(n.forEach(t=>t.current=e),e):t}(r,o):t[e]=void 0!==o?o:r}}return t}let m$=Symbol("default");function mI({values:e,children:t}){for(let[r,n]of e)t=cd().createElement(r.Provider,{value:n},t);return t}function mM(e){let{className:t,style:r,children:n,defaultClassName:o,defaultChildren:a,defaultStyle:i,values:s}=e;return(0,cc.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof r?r({...s,defaultStyle:i||{}}):r,u="function"==typeof n?n({...s,defaultChildren:a}):null==n?a:n,{className:null!=e?e:o,style:l||i?{...i,...l}:void 0,children:null!=u?u:a,"data-rac":""}},[t,r,n,o,a,i,s])}function mL(e,t){let r=(0,cc.useContext)(e);if(null===t)return null;if(r&&"object"==typeof r&&"slots"in r&&r.slots){let e=t||m$;if(!r.slots[e]){let e=new Intl.ListFormat().format(Object.keys(r.slots).map(e=>`"${e}"`)),n=t?`Invalid slot "${t}".`:"A slot prop is required.";throw Error(`${n} Valid slot names are ${e}.`)}return r.slots[e]}return r}function mF(e,t,r){let{ref:n,...o}=mL(r,e.slot)||{},a=mg((0,cc.useMemo)(()=>(function(...e){return 1===e.length&&e[0]?e[0]:t=>{for(let r of e)"function"==typeof r?r(t):null!=r&&(r.current=t)}})(t,n),[t,n])),i=mA(o,e);return"style"in o&&o.style&&"style"in e&&e.style&&("function"==typeof o.style||"function"==typeof e.style?i.style=t=>{let r="function"==typeof o.style?o.style(t):o.style,n={...t.defaultStyle,...r},a="function"==typeof e.style?e.style({...t,defaultStyle:n}):e.style;return{...n,...a}}:i.style={...o.style,...e.style}),[i,a]}function mB(e=!0){let[t,r]=(0,cc.useState)(e),n=(0,cc.useRef)(!1),o=(0,cc.useCallback)(e=>{n.current=!0,r(!!e)},[]);return mv(()=>{n.current||r(!1)},[]),[o,t]}function mU(e){let t=/^(data-.*)$/,r={};for(let n in e)t.test(n)||(r[n]=e[n]);return r}let mV=(0,cc.createContext)(null),mW=null;function mH(e,t="assertive",r=7e3){mW?mW.announce(e,t,r):(mW=new mz,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?mW.announce(e,t,r):setTimeout(()=>{(null==mW?void 0:mW.isAttached())&&(null==mW||mW.announce(e,t,r))},100))}class mz{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",r=7e3){var n,o;if(!this.node)return;let a=document.createElement("div");"object"==typeof e?(a.setAttribute("role","img"),a.setAttribute("aria-labelledby",e["aria-labelledby"])):a.textContent=e,"assertive"===t?null==(n=this.assertiveLog)||n.appendChild(a):null==(o=this.politeLog)||o.appendChild(a),""!==e&&setTimeout(()=>{a.remove()},r)}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 mK=new Set(["id"]),mG=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),mZ=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),mY=/^(data-.*)$/;function mq(e,t={}){let{labelable:r,isLink:n,propNames:o}=t,a={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(mK.has(t)||r&&mG.has(t)||n&&mZ.has(t)||(null==o?void 0:o.has(t))||mY.test(t))&&(a[t]=e[t]);return a}let mJ=["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"])'],mX=mJ.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";mJ.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let mQ=mJ.join(':not([hidden]):not([tabindex="-1"]),');function m0(e){return e.matches(mX)}function m1(e){return e.matches(mQ)}let m2=e=>{var t;return null!=(t=null==e?void 0:e.ownerDocument)?t:document},m4=e=>e&&"window"in e&&e.window===e?e:m2(e).defaultView||window;function m3(e){if(function(){if(null==m6){m6=!1;try{document.createElement("div").focus({get preventScroll(){return m6=!0,!0}})}catch{}}return m6}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==n;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}(e);e.focus(),function(e){for(let{element:t,scrollTop:r,scrollLeft:n}of e)t.scrollTop=r,t.scrollLeft=n}(t)}}let m6=null;function m5(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function m9(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function m8(e){let t=(0,cc.useRef)({isFocused:!1,observer:null});mv(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let r=mb(t=>{null==e||e(t)});return(0,cc.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let n=e.target;n.addEventListener("focusout",e=>{t.current.isFocused=!1,n.disabled&&r(m5(e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&n.disabled){var e;null==(e=t.current.observer)||e.disconnect();let r=n===document.activeElement?null:document.activeElement;n.dispatchEvent(new FocusEvent("blur",{relatedTarget:r})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:r}))}}),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]})}},[r])}let m7=!1;function he(e){var t;return!("u"<typeof window)&&null!=window.navigator&&((null==(t=window.navigator.userAgentData)?void 0:t.brands.some(t=>e.test(t.brand)))||e.test(window.navigator.userAgent))}function ht(e){var t;return"u">typeof window&&null!=window.navigator&&e.test((null==(t=window.navigator.userAgentData)?void 0:t.platform)||window.navigator.platform)}function hr(e){let t=null;return()=>(null==t&&(t=e()),t)}let hn=hr(function(){return ht(/^Mac/i)}),ho=hr(function(){return ht(/^iPhone/i)}),ha=hr(function(){return ht(/^iPad/i)||hn()&&navigator.maxTouchPoints>1}),hi=hr(function(){return ho()||ha()});hr(function(){return hn()||hi()});let hs=hr(function(){return he(/AppleWebKit/i)&&!hl()}),hl=hr(function(){return he(/Chrome/i)}),hu=hr(function(){return he(/Android/i)}),hc=hr(function(){return he(/Firefox/i)}),hd=new Map,hf=new Set;function hp(){if("u"<typeof window)return;function e(e){return"propertyName"in e}let t=r=>{if(!e(r)||!r.target)return;let n=hd.get(r.target);if(n&&(n.delete(r.propertyName),0===n.size&&(r.target.removeEventListener("transitioncancel",t),hd.delete(r.target)),0===hd.size)){for(let e of hf)e();hf.clear()}};document.body.addEventListener("transitionrun",r=>{if(!e(r)||!r.target)return;let n=hd.get(r.target);n||(n=new Set,hd.set(r.target,n),r.target.addEventListener("transitioncancel",t,{once:!0})),n.add(r.propertyName)}),document.body.addEventListener("transitionend",t)}function hm(e){requestAnimationFrame(()=>{0===hd.size?e():hf.add(e)})}"u">typeof document&&("loading"!==document.readyState?hp():document.addEventListener("DOMContentLoaded",hp));let hh="default",hg="",hy=new WeakMap;function hv(e){if(hi())"disabled"===hh&&(hh="restoring",setTimeout(()=>{hm(()=>{if("restoring"===hh){let t=m2(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=hg||""),hg="",hh="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&hy.has(e)){let t=hy.get(e),r="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[r]&&(e.style[r]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),hy.delete(e)}}let hb=cd().createContext({register:()=>{}});function hw(e,t,r){if(!t.has(e))throw TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function hE(e,t,r){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}function hx(e,t,r){var n=hw(e,t,"set");if(n.set)n.set.call(e,r);else{if(!n.writable)throw TypeError("attempted to set read only private field");n.value=r}return r}function hD(e,t){mv(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function h_(){let e=(0,cc.useRef)(new Map),t=(0,cc.useCallback)((t,r,n,o)=>{let a=(null==o?void 0:o.once)?(...t)=>{e.current.delete(n),n(...t)}:n;e.current.set(n,{type:r,eventTarget:t,fn:a,options:o}),t.addEventListener(r,a,o)},[]),r=(0,cc.useCallback)((t,r,n,o)=>{var a;let i=(null==(a=e.current.get(n))?void 0:a.fn)||n;t.removeEventListener(r,i,o),e.current.delete(n)},[]),n=(0,cc.useCallback)(()=>{e.current.forEach((e,t)=>{r(e.eventTarget,e.type,t,e.options)})},[r]);return(0,cc.useEffect)(()=>n,[n]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:n}}hb.displayName="PressResponderContext";function hS(e,t){return!!t&&!!e&&e.contains(t)}function hC(e){return e.target}function hk(e,t,r=!0){var n,o;let{metaKey:a,ctrlKey:i,altKey:s,shiftKey:l}=t;hc()&&(null==(o=window.event)||null==(n=o.type)?void 0:n.startsWith("key"))&&"_blank"===e.target&&(hn()?a=!0:i=!0);let u=hs()&&hn()&&!ha()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:a,ctrlKey:i,altKey:s,shiftKey:l}):new MouseEvent("click",{metaKey:a,ctrlKey:i,altKey:s,shiftKey:l,bubbles:!0,cancelable:!0});hk.isOpening=r,m3(e),e.dispatchEvent(u),hk.isOpening=!1}function hP(e){return 0===e.mozInputSource&&!!e.isTrusted||(hu()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}hk.isOpening=!1;var hO=r(1779),hR=r.n(hO),hT=new WeakMap;class hN{continuePropagation(){hx(this,hT,!1)}get shouldStopPropagation(){var e;return e=hw(this,hT,"get"),e.get?e.get.call(this):e.value}constructor(e,t,r,n){var o;hE(this,hT,{writable:!0,value:void 0}),hx(this,hT,!0);let a=null!=(o=null==n?void 0:n.target)?o:r.currentTarget;const i=null==a?void 0:a.getBoundingClientRect();let s,l=0,u,c=null;null!=r.clientX&&null!=r.clientY&&(u=r.clientX,c=r.clientY),i&&(null!=u&&null!=c?(s=u-i.left,l=c-i.top):(s=i.width/2,l=i.height/2)),this.type=e,this.pointerType=t,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=s,this.y=l}}let hj=Symbol("linkClicked");function hA(e){let{onPress:t,onPressChange:r,onPressStart:n,onPressEnd:o,onPressUp:a,onClick:i,isDisabled:s,isPressed:l,preventFocusOnPress:u,shouldCancelOnPointerExit:c,allowTextSelectionOnPress:d,ref:f,...p}=function(e){let t=(0,cc.useContext)(hb);if(t){let{register:r,...n}=t;e=mA(n,e),r()}return hD(t,e.ref),e}(e),[m,h]=(0,cc.useState)(!1),g=(0,cc.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:y,removeAllGlobalListeners:v}=h_(),b=mb((e,t)=>{let o=g.current;if(s||o.didFirePressStart)return!1;let a=!0;if(o.isTriggeringEvent=!0,n){let r=new hN("pressstart",t,e);n(r),a=r.shouldStopPropagation}return r&&r(!0),o.isTriggeringEvent=!1,o.didFirePressStart=!0,h(!0),a}),w=mb((e,n,a=!0)=>{let i=g.current;if(!i.didFirePressStart)return!1;i.didFirePressStart=!1,i.isTriggeringEvent=!0;let l=!0;if(o){let t=new hN("pressend",n,e);o(t),l=t.shouldStopPropagation}if(r&&r(!1),h(!1),t&&a&&!s){let r=new hN("press",n,e);t(r),l&&(l=r.shouldStopPropagation)}return i.isTriggeringEvent=!1,l}),E=mb((e,t)=>{let r=g.current;if(s)return!1;if(a){r.isTriggeringEvent=!0;let n=new hN("pressup",t,e);return a(n),r.isTriggeringEvent=!1,n.shouldStopPropagation}return!0}),x=mb(e=>{let t=g.current;if(t.isPressed&&t.target){for(let r of(t.didFirePressStart&&null!=t.pointerType&&w(hM(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,v(),d||hv(t.target),t.disposables))r();t.disposables=[]}}),D=mb(e=>{c&&x(e)}),_=mb(e=>{null==i||i(e)}),S=mb((e,t)=>{if(i){let r=new MouseEvent("click",e);m9(r,t),i(m5(r))}}),C=(0,cc.useMemo)(()=>{let e=g.current,t={onKeyDown(t){if(hI(t.nativeEvent,t.currentTarget)&&hS(t.currentTarget,hC(t.nativeEvent))){var n;hL(hC(t.nativeEvent),t.key)&&t.preventDefault();let o=!0;if(!e.isPressed&&!t.repeat){e.target=t.currentTarget,e.isPressed=!0,e.pointerType="keyboard",o=b(t,"keyboard");let n=t.currentTarget;y(m2(t.currentTarget),"keyup",my(t=>{hI(t,n)&&!t.repeat&&hS(n,hC(t))&&e.target&&E(hM(e.target,t),"keyboard")},r),!0)}o&&t.stopPropagation(),t.metaKey&&hn()&&(null==(n=e.metaKeyEvents)||n.set(t.key,t.nativeEvent))}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||hS(t.currentTarget,hC(t.nativeEvent)))&&t&&0===t.button&&!e.isTriggeringEvent&&!hk.isOpening){let r=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||hP(t.nativeEvent))){let e=b(t,"virtual"),n=E(t,"virtual"),o=w(t,"virtual");_(t),r=e&&n&&o}else if(e.isPressed&&"keyboard"!==e.pointerType){let n=e.pointerType||t.nativeEvent.pointerType||"virtual";r=w(hM(t.currentTarget,t),n,!0),e.isOverTarget=!1,_(t),x(t)}e.ignoreEmulatedMouseEvents=!1,r&&t.stopPropagation()}}},r=t=>{var r,n,o;if(e.isPressed&&e.target&&hI(t,e.target)){hL(hC(t),t.key)&&t.preventDefault();let r=hC(t),o=hS(e.target,hC(t));w(hM(e.target,t),"keyboard",o),o&&S(t,e.target),v(),"Enter"!==t.key&&h$(e.target)&&hS(e.target,r)&&!t[hj]&&(t[hj]=!0,hk(e.target,t,!1)),e.isPressed=!1,null==(n=e.metaKeyEvents)||n.delete(t.key)}else if("Meta"===t.key&&(null==(r=e.metaKeyEvents)?void 0:r.size)){let t=e.metaKeyEvents;for(let r of(e.metaKeyEvents=void 0,t.values()))null==(o=e.target)||o.dispatchEvent(new KeyboardEvent("keyup",r))}};if("u">typeof PointerEvent){t.onPointerDown=t=>{var o;if(0!==t.button||!hS(t.currentTarget,hC(t.nativeEvent)))return;if(o=t.nativeEvent,!hu()&&0===o.width&&0===o.height||1===o.width&&1===o.height&&0===o.pressure&&0===o.detail&&"mouse"===o.pointerType){e.pointerType="virtual";return}e.pointerType=t.pointerType;let a=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,d||function(e){if(hi()){if("default"===hh){let t=m2(e);hg=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}hh="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";hy.set(e,e.style[t]),e.style[t]="none"}}(e.target),a=b(t,e.pointerType);let o=hC(t.nativeEvent);"releasePointerCapture"in o&&o.releasePointerCapture(t.pointerId),y(m2(t.currentTarget),"pointerup",r,!1),y(m2(t.currentTarget),"pointercancel",n,!1)}a&&t.stopPropagation()},t.onMouseDown=t=>{if(hS(t.currentTarget,hC(t.nativeEvent))&&0===t.button){if(u){let r=function(e){for(;e&&!m0(e);)e=e.parentElement;let t=m4(e),r=t.document.activeElement;if(!r||r===e)return;m7=!0;let n=!1,o=e=>{(e.target===r||n)&&e.stopImmediatePropagation()},a=t=>{(t.target===r||n)&&(t.stopImmediatePropagation(),e||n||(n=!0,m3(r),l()))},i=t=>{(t.target===e||n)&&t.stopImmediatePropagation()},s=t=>{(t.target===e||n)&&(t.stopImmediatePropagation(),n||(n=!0,m3(r),l()))};t.addEventListener("blur",o,!0),t.addEventListener("focusout",a,!0),t.addEventListener("focusin",s,!0),t.addEventListener("focus",i,!0);let l=()=>{cancelAnimationFrame(u),t.removeEventListener("blur",o,!0),t.removeEventListener("focusout",a,!0),t.removeEventListener("focusin",s,!0),t.removeEventListener("focus",i,!0),m7=!1,n=!1},u=requestAnimationFrame(l);return l}(t.target);r&&e.disposables.push(r)}t.stopPropagation()}},t.onPointerUp=t=>{hS(t.currentTarget,hC(t.nativeEvent))&&"virtual"!==e.pointerType&&0===t.button&&E(t,e.pointerType||t.pointerType)},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!0,b(hM(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,w(hM(e.target,t),e.pointerType,!1),D(t))};let r=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target){if(hS(e.target,hC(t))&&null!=e.pointerType){let r=!1,n=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(r?x(t):(m3(e.target),e.target.click()))},80);y(t.currentTarget,"click",()=>r=!0,!0),e.disposables.push(()=>clearTimeout(n))}else x(t);e.isOverTarget=!1}},n=e=>{x(e)};t.onDragStart=e=>{hS(e.currentTarget,hC(e.nativeEvent))&&x(e)}}return t},[y,s,u,v,d,x,D,w,b,E,_,S]);return(0,cc.useEffect)(()=>{let e=null==f?void 0:f.current;e&&e instanceof m4(e).Element&&"auto"===m4(e).getComputedStyle(e).touchAction&&(e.style.touchAction="pan-x pan-y pinch-zoom")},[f]),(0,cc.useEffect)(()=>{let e=g.current;return()=>{var t;for(let r of(d||hv(null!=(t=e.target)?t:void 0),e.disposables))r();e.disposables=[]}},[d]),{isPressed:l||m,pressProps:mA(p,C)}}function h$(e){return"A"===e.tagName&&e.hasAttribute("href")}function hI(e,t){let{key:r,code:n}=e,o=t.getAttribute("role");return("Enter"===r||" "===r||"Spacebar"===r||"Space"===n)&&!(t instanceof m4(t).HTMLInputElement&&!hB(t,r)||t instanceof m4(t).HTMLTextAreaElement||t.isContentEditable)&&!(("link"===o||!o&&h$(t))&&"Enter"!==r)}function hM(e,t){let r=t.clientX,n=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:r,clientY:n}}function hL(e,t){return e instanceof HTMLInputElement?!hB(e,t):!(e instanceof HTMLInputElement)&&(e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!h$(e))}let hF=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function hB(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:hF.has(e.type)}let hU=null,hV=new Set,hW=new Map,hH=!1,hz=!1,hK={Tab:!0,Escape:!0};function hG(e,t){for(let r of hV)r(e,t)}function hZ(e){hH=!0,e.metaKey||!hn()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(hU="keyboard",hG("keyboard",e))}function hY(e){hU="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(hH=!0,hG("pointer",e))}function hq(e){hP(e)&&(hH=!0,hU="virtual")}function hJ(e){e.target!==window&&e.target!==document&&!m7&&e.isTrusted&&(hH||hz||(hU="virtual",hG("virtual",e)),hH=!1,hz=!1)}function hX(){m7||(hH=!1,hz=!0)}function hQ(e){if("u"<typeof window||hW.get(m4(e)))return;let t=m4(e),r=m2(e),n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){hH=!0,n.apply(this,arguments)},r.addEventListener("keydown",hZ,!0),r.addEventListener("keyup",hZ,!0),r.addEventListener("click",hq,!0),t.addEventListener("focus",hJ,!0),t.addEventListener("blur",hX,!1),"u">typeof PointerEvent&&(r.addEventListener("pointerdown",hY,!0),r.addEventListener("pointermove",hY,!0),r.addEventListener("pointerup",hY,!0)),t.addEventListener("beforeunload",()=>{h0(e)},{once:!0}),hW.set(t,{focus:n})}let h0=(e,t)=>{let r=m4(e),n=m2(e);t&&n.removeEventListener("DOMContentLoaded",t),hW.has(r)&&(r.HTMLElement.prototype.focus=hW.get(r).focus,n.removeEventListener("keydown",hZ,!0),n.removeEventListener("keyup",hZ,!0),n.removeEventListener("click",hq,!0),r.removeEventListener("focus",hJ,!0),r.removeEventListener("blur",hX,!1),"u">typeof PointerEvent&&(n.removeEventListener("pointerdown",hY,!0),n.removeEventListener("pointermove",hY,!0),n.removeEventListener("pointerup",hY,!0)),hW.delete(r))};function h1(){return"pointer"!==hU}"u">typeof document&&("loading"!==(f=m2(void 0)).readyState?hQ(void 0):f.addEventListener("DOMContentLoaded",()=>{hQ(void 0)}));let h2=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function h4(e){let t=m2(e),r=((e=document)=>e.activeElement)(t);"virtual"===hU?hm(()=>{((e=document)=>e.activeElement)(t)===r&&e.isConnected&&m3(e)}):m3(e)}function h3(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:o}=e,a=(0,cc.useCallback)(e=>{if(e.target===e.currentTarget)return n&&n(e),o&&o(!1),!0},[n,o]),i=m8(a),s=(0,cc.useCallback)(e=>{let t=m2(e.target),n=t?((e=document)=>e.activeElement)(t):((e=document)=>e.activeElement)();e.target===e.currentTarget&&n===hC(e.nativeEvent)&&(r&&r(e),o&&o(!0),i(e))},[o,r,i]);return{focusProps:{onFocus:!t&&(r||o||n)?s:void 0,onBlur:!t&&(n||o)?a:void 0}}}function h6(e){if(!e)return;let t=!0;return r=>{e({...r,preventDefault(){r.preventDefault()},isDefaultPrevented:()=>r.isDefaultPrevented(),stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped:()=>t}),t&&r.stopPropagation()}}let h5=cd().createContext(null),h9=cd().forwardRef(function(e,t){let{children:r,...n}=e,o=mg(t),a={...n,ref:o};return cd().createElement(h5.Provider,{value:a},r)});function h8(e,t){let{focusProps:r}=h3(e),{keyboardProps:n}={keyboardProps:e.isDisabled?{}:{onKeyDown:h6(e.onKeyDown),onKeyUp:h6(e.onKeyUp)}},o=mA(r,n),a=function(e){let t=(0,cc.useContext)(h5)||{};hD(t,e);let{ref:r,...n}=t;return n}(t),i=e.isDisabled?{}:a,s=(0,cc.useRef)(e.autoFocus);(0,cc.useEffect)(()=>{s.current&&t.current&&h4(t.current),s.current=!1},[t]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:mA({...o,tabIndex:l},i)}}function h7(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:o}=e,a=(0,cc.useRef)({isFocusWithin:!1}),{addGlobalListener:i,removeAllGlobalListeners:s}=h_(),l=(0,cc.useCallback)(e=>{e.currentTarget.contains(e.target)&&a.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(a.current.isFocusWithin=!1,s(),r&&r(e),o&&o(!1))},[r,o,a,s]),u=m8(l),c=(0,cc.useCallback)(e=>{if(!e.currentTarget.contains(e.target))return;let t=m2(e.target),r=((e=document)=>e.activeElement)(t);if(!a.current.isFocusWithin&&r===hC(e.nativeEvent)){n&&n(e),o&&o(!0),a.current.isFocusWithin=!0,u(e);let r=e.currentTarget;i(t,"focus",e=>{if(a.current.isFocusWithin&&!hS(r,e.target)){let n=new t.defaultView.FocusEvent("blur",{relatedTarget:e.target});m9(n,r),l(m5(n))}},{capture:!0})}},[n,o,u,i,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:l}}}function ge(e={}){var t;let{autoFocus:r=!1,isTextInput:n,within:o}=e,a=(0,cc.useRef)({isFocused:!1,isFocusVisible:r||h1()}),[i,s]=(0,cc.useState)(!1),[l,u]=(0,cc.useState)(()=>a.current.isFocused&&a.current.isFocusVisible),c=(0,cc.useCallback)(()=>u(a.current.isFocused&&a.current.isFocusVisible),[]),d=(0,cc.useCallback)(e=>{a.current.isFocused=e,s(e),c()},[c]);t={isTextInput:n},hQ(),(0,cc.useEffect)(()=>{let e=(e,r)=>{var n;let o,i,s,l,u;n=!!(null==t?void 0:t.isTextInput),o=m2(null==r?void 0:r.target),i="u">typeof window?m4(null==r?void 0:r.target).HTMLInputElement:HTMLInputElement,s="u">typeof window?m4(null==r?void 0:r.target).HTMLTextAreaElement:HTMLTextAreaElement,l="u">typeof window?m4(null==r?void 0:r.target).HTMLElement:HTMLElement,u="u">typeof window?m4(null==r?void 0:r.target).KeyboardEvent:KeyboardEvent,(n=n||o.activeElement instanceof i&&!h2.has(o.activeElement.type)||o.activeElement instanceof s||o.activeElement instanceof l&&o.activeElement.isContentEditable)&&"keyboard"===e&&r instanceof u&&!hK[r.key]||(e=>{a.current.isFocusVisible=e,c()})(h1())};return hV.add(e),()=>{hV.delete(e)}},[]);let{focusProps:f}=h3({isDisabled:o,onFocusChange:d}),{focusWithinProps:p}=h7({isDisabled:!o,onFocusWithinChange:d});return{isFocused:i,isFocusVisible:l,focusProps:o?p:f}}let gt=!1,gr=0;function gn(e){"touch"===e.pointerType&&(gt=!0,setTimeout(()=>{gt=!1},50))}function go(){if("u">typeof document)return"u">typeof PointerEvent&&document.addEventListener("pointerup",gn),gr++,()=>{!(--gr>0)&&"u">typeof PointerEvent&&document.removeEventListener("pointerup",gn)}}function ga(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:o}=e,[a,i]=(0,cc.useState)(!1),s=(0,cc.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,cc.useEffect)(go,[]);let{addGlobalListener:l,removeAllGlobalListeners:u}=h_(),{hoverProps:c,triggerHoverEnd:d}=(0,cc.useMemo)(()=>{let e=(e,t)=>{let o=s.target;s.pointerType="",s.target=null,"touch"!==t&&s.isHovered&&o&&(s.isHovered=!1,u(),n&&n({type:"hoverend",target:o,pointerType:t}),r&&r(!1),i(!1))},a={};return"u">typeof PointerEvent&&(a.onPointerEnter=n=>{gt&&"mouse"===n.pointerType||((n,a)=>{if(s.pointerType=a,o||"touch"===a||s.isHovered||!n.currentTarget.contains(n.target))return;s.isHovered=!0;let u=n.currentTarget;s.target=u,l(m2(n.target),"pointerover",t=>{s.isHovered&&s.target&&!hS(s.target,t.target)&&e(t,t.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:u,pointerType:a}),r&&r(!0),i(!0)})(n,n.pointerType)},a.onPointerLeave=t=>{!o&&t.currentTarget.contains(t.target)&&e(t,t.pointerType)}),{hoverProps:a,triggerHoverEnd:e}},[t,r,n,o,s,l,u]);return(0,cc.useEffect)(()=>{o&&d({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:c,isHovered:a}}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 gi=(0,cc.createContext)(!1);function gs(e){let t=(t,r)=>(0,cc.useContext)(gi)?null:e(t,r);return t.displayName=e.displayName||e.name,(0,cc.forwardRef)(t)}let gl=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),gu=(0,cc.createContext)({}),gc=gs(function(e,t){var r;[e,t]=mF(e,t,gu);let n=((r=e).isPending&&(r.onPress=void 0,r.onPressStart=void 0,r.onPressEnd=void 0,r.onPressChange=void 0,r.onPressUp=void 0,r.onKeyDown=void 0,r.onKeyUp=void 0,r.onClick=void 0,r.href=void 0),e=r),{isPending:o}=n,{buttonProps:a,isPressed:i}=function(e,t){let r,{elementType:n="button",isDisabled:o,onPress:a,onPressStart:i,onPressEnd:s,onPressUp:l,onPressChange:u,preventFocusOnPress:c,allowFocusWhenDisabled:d,onClick:f,href:p,target:m,rel:h,type:g="button"}=e;r="button"===n?{type:g,disabled:o}:{role:"button",href:"a"!==n||o?void 0:p,target:"a"===n?m:void 0,type:"input"===n?g:void 0,disabled:"input"===n?o:void 0,"aria-disabled":o&&"input"!==n?o:void 0,rel:"a"===n?h:void 0};let{pressProps:y,isPressed:v}=hA({onPressStart:i,onPressEnd:s,onPressChange:u,onPress:a,onPressUp:l,onClick:f,isDisabled:o,preventFocusOnPress:c,ref:t}),{focusableProps:b}=h8(e,t);d&&(b.tabIndex=o?-1:b.tabIndex);let w=mA(b,y,mq(e,{labelable:!0}));return{isPressed:v,buttonProps:mA(r,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"]})}}(e,t),{focusProps:s,isFocused:l,isFocusVisible:u}=ge(e),{hoverProps:c,isHovered:d}=ga({...e,isDisabled:e.isDisabled||o}),f={isHovered:d,isPressed:(n.isPressed||i)&&!o,isFocused:l,isFocusVisible:u,isDisabled:e.isDisabled||!1,isPending:null!=o&&o},p=mM({...e,values:f,defaultClassName:"react-aria-Button"}),m=mT(a.id),h=mT(),g=a["aria-labelledby"];o&&(g?g=`${g} ${h}`:a["aria-label"]&&(g=`${m} ${h}`));let y=(0,cc.useRef)(o);return(0,cc.useEffect)(()=>{let e={"aria-labelledby":g||m};!y.current&&l&&o?mH(e,"assertive"):y.current&&l&&!o&&mH(e,"assertive"),y.current=o},[o,l,g,m]),cd().createElement("button",{...mq(e,{propNames:gl}),...mA(a,s,c),...p,type:"submit"===a.type&&o?"button":a.type,id:m,ref:t,"aria-labelledby":g,slot:e.slot||void 0,"aria-disabled":o?"true":a["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":f.isPressed||void 0,"data-hovered":d||void 0,"data-focused":l||void 0,"data-pending":o||void 0,"data-focus-visible":u||void 0},cd().createElement(mV.Provider,{value:{id:h}},p.children))});(0,cc.createContext)(null),(0,cc.createContext)(null),(0,cc.createContext)(null),(0,cc.createContext)(null),(0,cc.createContext)(null);let gd=(0,cc.createContext)({}),gf=(0,cc.createContext)({}),gp=(0,cc.forwardRef)(function(e,t){[e,t]=mF(e,t,gf);let{elementType:r="span",...n}=e;return cd().createElement(r,{className:"react-aria-Text",...n,ref:t})}),gm=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),gh=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function gg(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),r="function"==typeof t.getTextInfo?t.getTextInfo():t.textInfo;if(r)return"rtl"===r.direction;if(t.script)return gm.has(t.script)}let t=e.split("-")[0];return gh.has(t)}let gy=Symbol.for("react-aria.i18n.locale");function gv(){let e="u">typeof window&&window[gy]||"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:gg(e)?"rtl":"ltr"}}let gb=gv(),gw=new Set;function gE(){for(let e of(gb=gv(),gw))e(gb)}function gx(){let e=mP(),[t,r]=(0,cc.useState)(gb);return((0,cc.useEffect)(()=>(0===gw.size&&window.addEventListener("languagechange",gE),gw.add(r),()=>{gw.delete(r),0===gw.size&&window.removeEventListener("languagechange",gE)}),[]),e)?{locale:"en-US",direction:"ltr"}:t}let gD=cd().createContext(null);function g_(e){let{locale:t,children:r}=e,n=gx(),o=cd().useMemo(()=>t?{locale:t,direction:gg(t)?"rtl":"ltr"}:n,[n,t]);return cd().createElement(gD.Provider,{value:o},r)}function gS(){let e=gx();return(0,cc.useContext)(gD)||e}var gC={};function gk(e,t){return e-t*Math.floor(e/t)}function gP(e,t,r,n){let o=(t=gR(e,t))-1,a=-2;return r<=2?a=0:gO(t)&&(a=-1),1721425+365*o+Math.floor(o/4)-Math.floor(o/100)+Math.floor(o/400)+Math.floor((367*r-362)/12+a+n)}function gO(e){return e%4==0&&(e%100!=0||e%400==0)}function gR(e,t){return"BC"===e?1-t:t}function gT(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}gC={"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 gN={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 gj{fromJulianDay(e){let t=e-1721426,r=Math.floor(t/146097),n=gk(t,146097),o=Math.floor(n/36524),a=gk(n,36524),i=Math.floor(a/1461),s=Math.floor(gk(a,1461)/365),[l,u]=gT(400*r+100*o+4*i+s+ +(4!==o&&4!==s)),c=e-gP(l,u,1,1),d=2;e<gP(l,u,3,1)?d=0:gO(u)&&(d=1);let f=Math.floor(((c+d)*12+373)/367),p=e-gP(l,u,f,1)+1;return new g1(l,u,f,p)}toJulianDay(e){return gP(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return gN[gO(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return gO(e.year)?366:365}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 gA(e,t){let r=e.copy(),n="hour"in r?gH(r,t):0;g$(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,gI(r),gM(r),r.day+=7*(t.weeks||0),r.day+=t.days||0,r.day+=n,function(e){for(;e.day<1;)e.month--,gI(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,gI(e)}(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let o=r.calendar.getYearsInEra(r);if(r.year>o){var a,i;let e=null==(a=(i=r.calendar).isInverseEra)?void 0:a.call(i,r);r.year=o,r.month=e?1:r.calendar.getMonthsInYear(r),r.day=e?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let s=r.calendar.getMonthsInYear(r);return r.month>s&&(r.month=s,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function g$(e,t){var r,n;(null==(r=(n=e.calendar).isInverseEra)?void 0:r.call(n,e))&&(t=-t),e.year+=t}function gI(e){for(;e.month<1;)g$(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,g$(e,1)}function gM(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 gL(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),gM(e)}function gF(e){let t={};for(let r in e)"number"==typeof e[r]&&(t[r]=-e[r]);return t}function gB(e,t){let r=e.copy();return null!=t.era&&(r.era=t.era),null!=t.year&&(r.year=t.year),null!=t.month&&(r.month=t.month),null!=t.day&&(r.day=t.day),gL(r),r}function gU(e,t){let r=e.copy();return null!=t.hour&&(r.hour=t.hour),null!=t.minute&&(r.minute=t.minute),null!=t.second&&(r.second=t.second),null!=t.millisecond&&(r.millisecond=t.millisecond),gV(r),r}function gV(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 gW(e,t){let r=e%t;return r<0&&(r+=t),r}function gH(e,t){let r;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=gW(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=gW(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=gW(e.minute,60),r=Math.floor(e.hour/24),e.hour=gW(e.hour,24),r}function gz(e,t){let r=e.copy();return gH(r,t),r}function gK(e,t,r,n){let o=e.copy();switch(t){case"era":{let t=e.calendar.getEras(),a=t.indexOf(e.era);if(a<0)throw Error("Invalid era: "+e.era);a=gZ(a,r,0,t.length-1,null==n?void 0:n.round),o.era=t[a],gL(o);break}case"year":var a,i;(null==(a=(i=o.calendar).isInverseEra)?void 0:a.call(i,o))&&(r=-r),o.year=gZ(e.year,r,-1/0,9999,null==n?void 0:n.round),o.year===-1/0&&(o.year=1),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,e);break;case"month":o.month=gZ(e.month,r,1,e.calendar.getMonthsInYear(e),null==n?void 0:n.round);break;case"day":o.day=gZ(e.day,r,1,e.calendar.getDaysInMonth(e),null==n?void 0:n.round);break;default:throw Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(o),gL(o),o}function gG(e,t,r,n){let o=e.copy();switch(t){case"hour":{let t=e.hour,a=0,i=23;if((null==n?void 0:n.hourCycle)===12){let e=t>=12;a=12*!!e,i=e?23:11}o.hour=gZ(t,r,a,i,null==n?void 0:n.round);break}case"minute":o.minute=gZ(e.minute,r,0,59,null==n?void 0:n.round);break;case"second":o.second=gZ(e.second,r,0,59,null==n?void 0:n.round);break;case"millisecond":o.millisecond=gZ(e.millisecond,r,0,999,null==n?void 0:n.round);break;default:throw Error("Unsupported field "+t)}return o}function gZ(e,t,r,n,o=!1){if(o){(e+=Math.sign(t))<r&&(e=n);let o=Math.abs(t);(e=t>0?Math.ceil(e/o)*o:Math.floor(e/o)*o)>n&&(e=r)}else(e+=t)<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function gY(e,t){let r;return r=(null!=t.years&&0!==t.years||null!=t.months&&0!==t.months||null!=t.weeks&&0!==t.weeks||null!=t.days&&0!==t.days?yn(gA(ys(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):g8(e)-e.offset)+(t.milliseconds||0),r+=1e3*(t.seconds||0),r+=6e4*(t.minutes||0),yl(ya(r+=36e5*(t.hours||0),e.timeZone),e.calendar)}function gq(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 gJ(e){let t,r=yl(e,new gj);return t="BC"===r.era?1===r.year?"0000":"-"+String(Math.abs(1-r.year)).padStart(6,"00"):String(r.year).padStart(4,"0"),`${t}-${String(r.month).padStart(2,"0")}-${String(r.day).padStart(2,"0")}`}function gX(e){return`${gJ(e)}T${gq(e)}`}function gQ(e){let t,r="object"==typeof e[0]?e.shift():new gj;if("string"==typeof e[0])t=e.shift();else{let e=r.getEras();t=e[e.length-1]}return[r,t,e.shift(),e.shift(),e.shift()]}var g0=new WeakMap;class g1{copy(){return this.era?new g1(this.calendar,this.era,this.year,this.month,this.day):new g1(this.calendar,this.year,this.month,this.day)}add(e){return gA(this,e)}subtract(e){return gA(this,gF(e))}set(e){return gB(this,e)}cycle(e,t,r){return gK(this,e,t,r)}toDate(e){return yo(this,e)}toString(){return gJ(this)}compare(e){return yy(this,e)}constructor(...e){hE(this,g0,{writable:!0,value:void 0});let[t,r,n,o,a]=gQ(e);this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=a,gL(this)}}var g2=new WeakMap;class g4{copy(){return new g4(this.hour,this.minute,this.second,this.millisecond)}add(e){return gz(this,e)}subtract(e){return gz(this,gF(e))}set(e){return gU(this,e)}cycle(e,t,r){return gG(this,e,t,r)}toString(){return gq(this)}compare(e){var t,r;return t=this,r=e,yv(t)-yv(r)}constructor(e=0,t=0,r=0,n=0){hE(this,g2,{writable:!0,value:void 0}),this.hour=e,this.minute=t,this.second=r,this.millisecond=n,gV(this)}}var g3=new WeakMap;class g6{copy(){return this.era?new g6(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new g6(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return gA(this,e)}subtract(e){return gA(this,gF(e))}set(e){return gB(gU(this,e),e)}cycle(e,t,r){switch(e){case"era":case"year":case"month":case"day":return gK(this,e,t,r);default:return gG(this,e,t,r)}}toDate(e,t){return yo(this,e,t)}toString(){return gX(this)}compare(e){var t,r;let n=yy(this,e);return 0===n?(t=this,r=ys(e),yv(t)-yv(r)):n}constructor(...e){hE(this,g3,{writable:!0,value:void 0});let[t,r,n,o,a]=gQ(e);this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=a,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,gL(this)}}var g5=new WeakMap;class g9{copy(){return this.era?new g9(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new g9(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return gY(this,e)}subtract(e){return gY(this,gF(e))}set(e,t){let r,n;return 0===(n=gU(gB(r=ys(this),e),e)).compare(r)?this:yl(ya(yn(n,this.timeZone,t),this.timeZone),this.calendar)}cycle(e,t,r){return function(e,t,r,n){switch(t){case"hour":{let t=0,o=23;if((null==n?void 0:n.hourCycle)===12){let r=e.hour>=12;t=12*!!r,o=r?23:11}let a=ys(e),i=yl(gU(a,{hour:t}),new gj),s=[yn(i,e.timeZone,"earlier"),yn(i,e.timeZone,"later")].filter(t=>ya(t,e.timeZone).day===i.day)[0],l=yl(gU(a,{hour:o}),new gj),u=[yn(l,e.timeZone,"earlier"),yn(l,e.timeZone,"later")].filter(t=>ya(t,e.timeZone).day===l.day).pop(),c=g8(e)-e.offset,d=Math.floor(c/36e5),f=c%36e5;return yl(ya(c=36e5*gZ(d,r,Math.floor(s/36e5),Math.floor(u/36e5),null==n?void 0:n.round)+f,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return gG(e,t,r,n);case"era":case"year":case"month":case"day":return yl(ya(yn(gK(ys(e),t,r,n),e.timeZone),e.timeZone),e.calendar);default:throw Error("Unsupported field "+t)}}(this,e,t,r)}toDate(){var e;return e=this,new Date(g8(e)-e.offset)}toString(){var e;let t,r,n;return`${gX(this)}${t=0>Math.sign(e=this.offset)?"-":"+",r=Math.floor((e=Math.abs(e))/36e5),n=e%36e5/6e4,`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`}[${this.timeZone}]`}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-(function(e,t){if(e instanceof g9){var r,n;return e.timeZone===t?e:(r=e,n=t,yl(ya(g8(r)-r.offset,n),r.calendar))}return ya(yn(e,t,void 0),t)})(e,this.timeZone).toDate().getTime()}constructor(...e){hE(this,g5,{writable:!0,value:void 0});let[t,r,n,o,a]=gQ(e),i=e.shift(),s=e.shift();this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=a,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,gL(this)}}function g8(e){return g7(gR((e=yl(e,new gj)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function g7(e,t,r,n,o,a,i){let s=new Date;return s.setUTCHours(n,o,a,i),s.setUTCFullYear(e,t-1,r),s.getTime()}function ye(e,t){if("UTC"===t)return 0;if(e>0&&t===yw())return -6e4*new Date(e).getTimezoneOffset();let{year:r,month:n,day:o,hour:a,minute:i,second:s}=yr(e,t);return g7(r,n,o,a,i,s,0)-1e3*Math.floor(e/1e3)}let yt=new Map;function yr(e,t){let r=yt.get(t);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),yt.set(t,r));let n=r.formatToParts(new Date(e)),o={};for(let e of n)"literal"!==e.type&&(o[e.type]=e.value);return{year:"BC"===o.era||"B"===o.era?-o.year+1:+o.year,month:+o.month,day:+o.day,hour:"24"===o.hour?0:+o.hour,minute:+o.minute,second:+o.second}}function yn(e,t,r="compatible"){var n,o,a;let i=ys(e);if("UTC"===t)return g8(i);if(t===yw()&&"compatible"===r){i=yl(i,new gj);let e=new Date,t=gR(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=g8(i),l=ye(s-864e5,t),u=ye(s+864e5,t),c=(n=i,((o=s-l)==(a=s-u)?[o]:[o,a]).filter(e=>{var r;let o;return r=n,o=yr(e,t),r.year===o.year&&r.month===o.month&&r.day===o.day&&r.hour===o.hour&&r.minute===o.minute&&r.second===o.second}));if(1===c.length)return c[0];if(c.length>1)switch(r){case"compatible":case"earlier":return c[0];case"later":return c[c.length-1];case"reject":throw RangeError("Multiple possible absolute times found")}switch(r){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 yo(e,t,r="compatible"){return new Date(yn(e,t,r))}function ya(e,t){let r=ye(e,t),n=new Date(e+r),o=n.getUTCFullYear();return new g9(o<1?"BC":"AD",o<1?-o+1:o,n.getUTCMonth()+1,n.getUTCDate(),t,r,n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),n.getUTCMilliseconds())}function yi(e){return new g1(e.calendar,e.era,e.year,e.month,e.day)}function ys(e,t){let r=0,n=0,o=0,a=0;if("timeZone"in e)({hour:r,minute:n,second:o,millisecond:a}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:o,millisecond:a}=t),new g6(e.calendar,e.era,e.year,e.month,e.day,r,n,o,a)}function yl(e,t){if(yf(e.calendar,t))return e;let r=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,gL(n),n}let yu={"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 yc(e,t){return t=yl(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function yd(e,t){return yf(e.calendar,t.calendar)&&yc(e,t)}function yf(e,t){var r,n,o,a;return null!=(a=null!=(o=null==(r=e.isEqual)?void 0:r.call(e,t))?o:null==(n=t.isEqual)?void 0:n.call(t,e))?a:e.identifier===t.identifier}let yp={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function ym(e,t,r){let n,o=Math.ceil(e.calendar.toJulianDay(e)+1-(r?yp[r]:(n=function(e){if(Intl.Locale){let t=y_.get(e);return!t&&(t=new Intl.Locale(e).maximize().region)&&y_.set(e,t),t}let t=e.split("-")[1];return"u"===t?void 0:t}(t))&&yu[n]||0))%7;return o<0&&(o+=7),o}function yh(e){return ya(Date.now(),e)}function yg(e){return yi(yh(e))}function yy(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function yv(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let yb=null;function yw(){return null==yb&&(yb=new Intl.DateTimeFormat().resolvedOptions().timeZone),yb}function yE(e){return e.subtract({days:e.day-1})}function yx(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function yD(e,t,r){let n=ym(e,t,r);return e.subtract({days:n})}let y_=new Map;function yS(e,t){return e&&t?0>=e.compare(t)?e:t:e||t}function yC(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}let yk=Symbol.for("react-aria.i18n.locale"),yP=Symbol.for("react-aria.i18n.strings");class yO{getStringForLocale(e,t){let r=this.getStringsForLocale(t)[e];if(!r)throw Error(`Could not find intl message ${e} in ${t} locale`);return r}getStringsForLocale(e){let t=this.strings[e];return t||(t=function(e,t,r="en-US"){var n;if(t[e])return t[e];let o=(n=e,Intl.Locale?new Intl.Locale(n).language:n.split("-")[0]);if(t[o])return t[o];for(let e in t)if(e.startsWith(o+"-"))return t[e];return t[r]}(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(e){if("u"<typeof window)return null;let t=window[yk];if(void 0===p){let e=window[yP];if(!e)return null;for(let r in p={},e)p[r]=new yO({[t]:e[r]},t)}let r=null==p?void 0:p[e];if(!r)throw Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(e,t="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,e])=>e)),this.defaultLocale=t}}let yR=new Map,yT=new Map;class yN{format(e,t){let r=this.strings.getStringForLocale(e,this.locale);return"function"==typeof r?r(t,this):r}plural(e,t,r="cardinal"){let n=t["="+e];if(n)return"function"==typeof n?n():n;let o=this.locale+":"+r,a=yR.get(o);return a||(a=new Intl.PluralRules(this.locale,{type:r}),yR.set(o,a)),"function"==typeof(n=t[a.select(e)]||t.other)?n():n}number(e){let t=yT.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),yT.set(this.locale,t)),t.format(e)}select(e,t){let r=e[t]||e.other;return"function"==typeof r?r():r}constructor(e,t){this.locale=e,this.strings=t}}let yj=new WeakMap;function yA(e,t){let r;return t&&yO.getGlobalDictionaryForPackage(t)||((r=yj.get(e))||(r=new yO(e),yj.set(e,r)),r)}function y$(e,t){let{locale:r}=gS(),n=yA(e,t);return(0,cc.useMemo)(()=>new yN(r,n),[r,n])}let yI=new Map;class yM{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 r=this.formatter.formatToParts(e),n=this.formatter.formatToParts(t);return[...r.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...n.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return null==yU&&(yU="h12"===new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle),yU&&(this.resolvedHourCycle||(this.resolvedHourCycle=function(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,"");let r=yF(e+=(e.includes("-u-")?"":"-u")+"-nu-latn",{...t,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(e=>"hour"===e.type).value,10),o=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(e=>"hour"===e.type).value,10);if(0===n&&23===o)return"h23";if(24===n&&23===o)return"h24";if(0===n&&11===o)return"h11";if(12===n&&11===o)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}constructor(e,t={}){this.formatter=yF(e,t),this.options=t}}let yL={true:{ja:"h11"},false:{}};function yF(e,t={}){if("boolean"==typeof t.hour12&&(null==yB&&(yB="24"===new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))),yB)){let r=yL[String((t={...t}).hour12)][e.split("-")[0]],n=t.hour12?"h12":"h23";t.hourCycle=null!=r?r:n,delete t.hour12}let r=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(yI.has(r))return yI.get(r);let n=new Intl.DateTimeFormat(e,t);return yI.set(r,n),n}let yB=null,yU=null;function yV(e,t){let r=(0,cc.useRef)(null);return e&&r.current&&t(e,r.current)&&(e=r.current),r.current=e,e}function yW(e){e=yV(null!=e?e:{},yH);let{locale:t}=gS();return(0,cc.useMemo)(()=>new yM(t,e),[t,e])}function yH(e,t){if(e===t)return!0;let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n of r)if(t[n]!==e[n])return!1;return!0}function yz(e){return e&&e.__esModule?e.default:e}let yK=new WeakMap;function yG(e){return(null==e?void 0:e.calendar.identifier)==="gregory"&&"BC"===e.era?"short":void 0}function yZ(e,t,r,n){let o=y$(yz(gC),"@react-aria/calendar"),a=yG(e)||yG(t),i=yW({month:"long",year:"numeric",era:a,calendar:e.calendar.identifier,timeZone:r}),s=yW({month:"long",year:"numeric",day:"numeric",era:a,calendar:e.calendar.identifier,timeZone:r});return(0,cc.useMemo)(()=>{if(yc(e,yE(e))){let a=e,s=t;if(e.calendar.getFormattableMonth&&(a=e.calendar.getFormattableMonth(e)),t.calendar.getFormattableMonth&&(s=t.calendar.getFormattableMonth(t)),yc(t,yx(e)))return i.format(a.toDate(r));if(yc(t,yx(t)))return n?yY(i,o,a,s,r):i.formatRange(a.toDate(r),s.toDate(r))}return n?yY(s,o,e,t,r):s.formatRange(e.toDate(r),t.toDate(r))},[e,t,i,s,o,r,n])}function yY(e,t,r,n,o){let a=e.formatRangeToParts(r.toDate(o),n.toDate(o)),i=-1;for(let e=0;e<a.length;e++){let t=a[e];if("shared"===t.source&&"literal"===t.type)i=e;else if("endRange"===t.source)break}let s="",l="";for(let e=0;e<a.length;e++)e<i?s+=a[e].value:e>i&&(l+=a[e].value);return t.format("dateRange",{startDate:s,endDate:l})}function yq(e,t){let r=(0,cc.useRef)(!0),n=(0,cc.useRef)(null);(0,cc.useEffect)(()=>(r.current=!0,()=>{r.current=!1}),[]),(0,cc.useEffect)(()=>{let o=n.current;r.current?r.current=!1:(!o||t.some((e,t)=>!Object.is(e,o[t])))&&e(),n.current=t},t)}function yJ(e,t){let{id:r,"aria-label":n,"aria-labelledby":o}=e;return r=mT(r),o&&n?o=[...new Set([r,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),n||o||!t||(n=t),{id:r,"aria-label":n,"aria-labelledby":o}}function yX(e,t){var r,n;let o,a,i,s,l,u=y$((r=gC)&&r.__esModule?r.default:r,"@react-aria/calendar"),c=mq(e),d=yZ(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),f=yZ(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);yq(()=>{t.isFocused||mH(f)},[f]);let p=(i=y$(yz(gC),"@react-aria/calendar"),"highlightedRange"in t?{start:o,end:a}=t.highlightedRange||{}:o=a=null!=(n=t.value)?n:void 0,s=yW({weekday:"long",month:"long",year:"numeric",day:"numeric",era:yG(o)||yG(a),timeZone:t.timeZone}),l="anchorDate"in t?t.anchorDate:null,(0,cc.useMemo)(()=>{if(!l&&o&&a)if(yc(o,a)){let e=s.format(o.toDate(t.timeZone));return i.format("selectedDateDescription",{date:e})}else{let e=yY(s,i,o,a,t.timeZone);return i.format("selectedRangeDescription",{dateRange:e})}return""},[o,a,l,t.timeZone,i,s]));yq(()=>{p&&mH(p,"polite",4e3)},[p]);let m=mN([!!e.errorMessage,e.isInvalid,e.validationState]);yK.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:m,selectedDateDescription:p});let[h,g]=(0,cc.useState)(!1),y=e.isDisabled||t.isNextVisibleRangeInvalid();y&&h&&(g(!1),t.setFocused(!0));let[v,b]=(0,cc.useState)(!1),w=e.isDisabled||t.isPreviousVisibleRangeInvalid();return w&&v&&(b(!1),t.setFocused(!0)),{calendarProps:mA(c,yJ({id:e.id,"aria-label":[e["aria-label"],f].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]}),{role:"application","aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":u.format("next"),isDisabled:y,onFocusChange:g},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":u.format("previous"),isDisabled:w,onFocusChange:b},errorMessageProps:{id:m},title:d}}let yQ={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 y0(e){let{children:t,elementType:r="div",isFocusable:n,style:o,...a}=e,{visuallyHiddenProps:i}=function(e={}){let{style:t,isFocusable:r}=e,[n,o]=(0,cc.useState)(!1),{focusWithinProps:a}=h7({isDisabled:!r,onFocusWithinChange:e=>o(e)}),i=(0,cc.useMemo)(()=>n?t:t?{...yQ,...t}:yQ,[n]);return{visuallyHiddenProps:{...a,style:i}}}(e);return cd().createElement(r,mA(a,i),t)}function y1(e,t,r,n){let o=mb(r),a=null==r;(0,cc.useEffect)(()=>{if(a||!e.current)return;let r=e.current;return r.addEventListener(t,o,n),()=>{r.removeEventListener(t,o,n)}},[e,t,n,a,o])}let y2=0,y4=new Map;function y3(e){let[t,r]=(0,cc.useState)();return mv(()=>{if(!e)return;let t=y4.get(e);if(t)r(t.element.id);else{let n=`react-aria-description-${y2++}`;r(n);let o=document.createElement("div");o.id=n,o.style.display="none",o.textContent=e,document.body.appendChild(o),t={refCount:0,element:o},y4.set(e,t)}return t.refCount++,()=>{t&&0==--t.refCount&&(t.element.remove(),y4.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function y6(e,t){if(!e)return!1;let r=window.getComputedStyle(e),n=/(auto|scroll)/.test(r.overflow+r.overflowX+r.overflowY);return n&&t&&(n=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),n}function y5(e,t,r){let n="left"===r?"offsetLeft":"offsetTop",o=0;for(;t.offsetParent&&(o+=t[n],t.offsetParent!==e);){if(t.offsetParent.contains(e)){o-=e[n];break}t=t.offsetParent}return o}function y9(e,t){if(e&&document.contains(e)){let i=document.scrollingElement||document.documentElement;if("hidden"===window.getComputedStyle(i).overflow)for(let t of function(e){let t=[];for(;e&&e!==document.documentElement;)y6(e,void 0)&&t.push(e),e=e.parentElement;return t}(e))!function(e,t){let r=y5(e,t,"left"),n=y5(e,t,"top"),o=t.offsetWidth,a=t.offsetHeight,i=e.scrollLeft,s=e.scrollTop,{borderTopWidth:l,borderLeftWidth:u,scrollPaddingTop:c,scrollPaddingRight:d,scrollPaddingBottom:f,scrollPaddingLeft:p}=getComputedStyle(e),m=i+parseInt(u,10),h=s+parseInt(l,10),g=m+e.clientWidth,y=h+e.clientHeight,v=parseInt(c,10)||0,b=parseInt(f,10)||0,w=parseInt(d,10)||0,E=parseInt(p,10)||0;r<=i+E?i=r-parseInt(u,10)-E:r+o>g-w&&(i+=r+o-g+w),n<=h+v?s=n-parseInt(l,10)-v:n+a>y-b&&(s+=n+a-y+b),e.scrollLeft=i,e.scrollTop=s}(t,e);else{var r,n,o,a;let{left:i,top:s}=e.getBoundingClientRect();null==e||null==(r=e.scrollIntoView)||r.call(e,{block:"nearest"});let{left:l,top:u}=e.getBoundingClientRect();(Math.abs(i-l)>1||Math.abs(s-u)>1)&&(null==t||null==(o=t.containingElement)||null==(n=o.scrollIntoView)||n.call(o,{block:"center",inline:"center"}),null==(a=e.scrollIntoView)||a.call(e,{block:"nearest"}))}}}function y8(e,t){let r=e;for(y6(r,t)&&(r=r.parentElement);r&&!y6(r,t);)r=r.parentElement;return r||document.scrollingElement||document.documentElement}class y7 extends gj{fromJulianDay(e){let t=super.fromJulianDay(e);return new g1(this,gR(t.era,t.year)- -543,t.month,t.day)}toJulianDay(e){return super.toJulianDay(ve(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(ve(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function ve(e){let[t,r]=gT(e.year+-543);return new g1(t,r,e.month,e.day)}function vt(e,t,r,n){return e+365*t+Math.floor(t/4)+30*(r-1)+n-1}function vr(e,t){let r=Math.floor(4*(t-e)/1461),n=1+Math.floor((t-vt(e,r,1,1))/30),o=t+1-vt(e,r,n,1);return[r,n,o]}function vn(e){return Math.floor(e%4/3)}function vo(e,t){return t%13!=0?30:vn(e)+5}class va{fromJulianDay(e){let[t,r,n]=vr(1723856,e),o="AM";return t<=0&&(o="AA",t+=5500),new g1(this,o,t,r,n)}toJulianDay(e){let t=e.year;return"AA"===e.era&&(t-=5500),vt(1723856,t,e.month,e.day)}getDaysInMonth(e){return vo(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+vn(e.year)}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class vi extends va{fromJulianDay(e){let[t,r,n]=vr(1723856,e);return new g1(this,"AA",t+=5500,r,n)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class vs extends va{fromJulianDay(e){let[t,r,n]=vr(1824665,e),o="CE";return t<=0&&(o="BCE",t=1-t),new g1(this,o,t,r,n)}toJulianDay(e){let t=e.year;return"BCE"===e.era&&(t=1-t),vt(1824665,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return"BCE"===e.era&&(t=1-t),vo(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 vl=765433;function vu(e){return 7>gk(7*e+1,19)}function vc(e){let t=Math.floor((235*e-234)/19),r=29*t+Math.floor((12084+13753*t)/25920);return 3>gk(3*(r+1),7)&&(r+=1),r}function vd(e){let t,r;return vc(e)+(t=vc(e-1),r=vc(e),vc(e+1)-r==356?2:+(r-t==382))}function vf(e){return vd(e+1)-vd(e)}function vp(e,t){if(t>=6&&!vu(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;let r=function(e){let t=vf(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}(e);return 2===t?2===r?30:29:3===t?0===r?29:30:6===t?30*!!vu(e):30}class vm{fromJulianDay(e){let t=e-347997,r=Math.floor((25920*t/vl*19+234)/235)+1,n=vd(r),o=Math.floor(t-n);for(;o<1;)o=Math.floor(t-(n=vd(--r)));let a=1,i=0;for(;i<o;)i+=vp(r,a),a++;let s=o-(i-=vp(r,--a));return new g1(this,r,a,s)}toJulianDay(e){let t=vd(e.year);for(let r=1;r<e.month;r++)t+=vp(e.year,r);return t+e.day+347997}getDaysInMonth(e){return vp(e.year,e.month)}getMonthsInYear(e){return vu(e.year)?13:12}getDaysInYear(e){return vf(e.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,t){t.year!==e.year&&(vu(t.year)&&!vu(e.year)&&t.month>6?e.month--:!vu(t.year)&&vu(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class vh extends gj{fromJulianDay(e){let t,r,n,o=super.fromJulianDay(e),a=o.year-78,i=e-gP(o.era,o.year,1,1);if(i<80?(a--,i+=(t=gO(o.year-1)?31:30)+155+90+10):(t=gO(o.year)?31:30,i-=80),i<t)r=1,n=i+1;else{let e=i-t;e<155?(r=Math.floor(e/31)+2,n=e%31+1):(e-=155,r=Math.floor(e/30)+7,n=e%30+1)}return new g1(this,a,r,n)}toJulianDay(e){let t,r,[n,o]=gT(e.year+78);return(gO(o)?(t=31,r=gP(n,o,3,21)):(t=30,r=gP(n,o,3,22)),1===e.month)?r+e.day-1:(r+=t+31*Math.min(e.month-2,5),e.month>=8&&(r+=(e.month-7)*30),r+=e.day-1)}getDaysInMonth(e){return 1===e.month&&gO(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 vg(e,t,r,n){return n+Math.ceil(29.5*(r-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function vy(e,t,r){let n=Math.floor((30*(r-t)+10646)/10631),o=Math.min(12,Math.ceil((r-(29+vg(t,n,1,1)))/29.5)+1),a=r-vg(t,n,o,1)+1;return new g1(e,n,o,a)}function vv(e){return(14+11*e)%30<11}class vb{fromJulianDay(e){return vy(this,1948440,e)}toJulianDay(e){return vg(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return 12===e.month&&vv(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return vv(e.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class vw extends vb{fromJulianDay(e){return vy(this,1948439,e)}toJulianDay(e){return vg(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function vE(e){return 460322+u[e-1300]}function vx(e,t){return(l[e-1300]&1<<11-(t-1))==0?29:30}function vD(e,t){let r=vE(e);for(let n=1;n<t;n++)r+=vx(e,n);return r}function v_(e){return u[e+1-1300]-u[e-1300]}class vS extends vb{fromJulianDay(e){let t=e-1948440,r=vE(1300),n=vE(1600);if(t<r||t>n)return super.fromJulianDay(e);{let e=1299,r=1,n=1;for(;n>0;){n=t-vE(++e)+1;let o=v_(e);if(n===o){r=12;break}if(n<o){let t=vx(e,r);for(r=1;n>t;)n-=t,t=vx(e,++r);break}}return new g1(this,e,r,t-vD(e,r)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+vD(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):vx(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):v_(e.year)}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 r=1;r<=12;r++)e+=vx(t,r)}}}}let vC=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],vk=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],vP=[1867,1911,1925,1988,2018],vO=["meiji","taisho","showa","heisei","reiwa"];function vR(e){let t=vC.findIndex(([t,r,n])=>!!(e.year<t)||e.year===t&&!!(e.month<r)||e.year===t&&e.month===r&&!!(e.day<n));return -1===t?vC.length-1:0===t?0:t-1}function vT(e){let t=vP[vO.indexOf(e.era)];if(!t)throw Error("Unknown era: "+e.era);return new g1(e.year+t,e.month,e.day)}class vN extends gj{fromJulianDay(e){let t=super.fromJulianDay(e),r=vR(t);return new g1(this,vO[r],t.year-vP[r],t.month,t.day)}toJulianDay(e){return super.toJulianDay(vT(e))}balanceDate(e){let t=vT(e),r=vR(t);vO[r]!==e.era&&(e.era=vO[r],e.year=t.year-vP[r]),this.constrainDate(e)}constrainDate(e){let t=vO.indexOf(e.era),r=vk[t];if(null!=r){let[n,o,a]=r,i=n-vP[t];e.year=Math.max(1,Math.min(i,e.year)),e.year===i&&(e.month=Math.min(o,e.month),e.month===o&&(e.day=Math.min(a,e.day)))}if(1===e.year&&t>=0){let[,r,n]=vC[t];e.month=Math.max(r,e.month),e.month===r&&(e.day=Math.max(n,e.day))}}getEras(){return vO}getYearsInEra(e){let t=vO.indexOf(e.era),r=vC[t],n=vC[t+1];if(null==n)return 9999-r[0]+1;let o=n[0]-r[0];return(e.month<n[1]||e.month===n[1]&&e.day<n[2])&&o++,o}getDaysInMonth(e){return super.getDaysInMonth(vT(e))}getMinimumMonthInYear(e){let t=vj(e);return t?t[1]:1}getMinimumDayInMonth(e){let t=vj(e);return t&&e.month===t[1]?t[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function vj(e){if(1===e.year)return vC[vO.indexOf(e.era)]}let vA=[0,31,62,93,124,155,186,216,246,276,306,336];class v${fromJulianDay(e){let t=e-1948320,r=1+Math.floor((33*t+3)/12053),n=t-(365*(r-1)+Math.floor((8*r+21)/33)),o=n<216?Math.floor(n/31):Math.floor((n-6)/30),a=n-vA[o]+1;return new g1(this,r,o+1,a)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=vA[e.month-1],t+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>gk(25*e.year+11,33)?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function vI(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function vM(e){let t=e-1911;return t>0?["minguo",t]:["before_minguo",1-t]}class vL extends gj{fromJulianDay(e){let t=super.fromJulianDay(e),[r,n]=vM(gR(t.era,t.year));return new g1(this,r,n,t.month,t.day)}toJulianDay(e){return super.toJulianDay(vF(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[t,r]=vM(vI(e));e.era=t,e.year=r}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(vF(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function vF(e){let[t,r]=gT(vI(e));return new g1(t,r,e.month,e.day)}function vB(e){switch(e){case"buddhist":return new y7;case"ethiopic":return new va;case"ethioaa":return new vi;case"coptic":return new vs;case"hebrew":return new vm;case"indian":return new vh;case"islamic-civil":return new vb;case"islamic-tbla":return new vw;case"islamic-umalqura":return new vS;case"japanese":return new vN;case"persian":return new v$;case"roc":return new vL;default:return new gj}}function vU(e,t,r){return null!=t&&0>e.compare(t)||null!=r&&e.compare(r)>0}function vV(e,t,r,n,o){let a={};for(let e in t)a[e]=Math.floor(t[e]/2),a[e]>0&&t[e]%2==0&&a[e]--;let i=vW(e,t,r).subtract(a);return vz(e,i,t,r,n,o)}function vW(e,t,r,n,o){let a=e;if(t.years)a=yE(e.subtract({months:e.month-1}));else t.months?a=yE(e):t.weeks&&(a=yD(e,r));return vz(e,a,t,r,n,o)}function vH(e,t,r,n,o){let a={...t};a.days?a.days--:a.weeks?a.weeks--:a.months?a.months--:a.years&&a.years--;let i=vW(e,t,r).subtract(a);return vz(e,i,t,r,n,o)}function vz(e,t,r,n,o,a){if(o&&e.compare(o)>=0){let e=yC(t,vW(yi(o),r,n));e&&(t=e)}if(a&&0>=e.compare(a)){let e=yS(t,vH(yi(a),r,n));e&&(t=e)}return t}function vK(e,t,r){if(t){let r=yC(e,yi(t));r&&(e=r)}if(r){let t=yS(e,yi(r));t&&(e=t)}return e}function vG(e,t,r){if(!r)return e;for(;e.compare(t)>=0&&r(e);)e=e.subtract({days:1});return e.compare(t)>=0?e:null}function vZ(e,t,r){let[n,o]=(0,cc.useState)(e||t),a=(0,cc.useRef)(void 0!==e),i=void 0!==e;(0,cc.useEffect)(()=>{a.current,a.current=i},[i]);let s=i?e:n,l=(0,cc.useCallback)((e,...t)=>{let n=(e,...t)=>{r&&!Object.is(s,e)&&r(e,...t),i||(s=e)};"function"==typeof e?o((r,...o)=>{let a=e(i?s:r,...o);return(n(a,...t),i)?r:a}):(i||o(e),n(e,...t))},[i,s,r]);return[s,l]}function vY(e){var t,r,n;let o=(0,cc.useMemo)(()=>new yM(e.locale),[e.locale]),a=(0,cc.useMemo)(()=>o.resolvedOptions(),[o]),{locale:i,createCalendar:s,visibleDuration:l={months:1},minValue:u,maxValue:c,selectionAlignment:d,isDateUnavailable:f,pageBehavior:p="visible",firstDayOfWeek:m}=e,h=(0,cc.useMemo)(()=>s(a.calendar),[s,a.calendar]),[g,y]=vZ(e.value,null!=(t=e.defaultValue)?t:null,e.onChange),v=(0,cc.useMemo)(()=>g?yl(yi(g),h):null,[g,h]),b=(0,cc.useMemo)(()=>g&&"timeZone"in g?g.timeZone:a.timeZone,[g,a.timeZone]),[w,E]=vZ((0,cc.useMemo)(()=>e.focusedValue?vK(yl(yi(e.focusedValue),h),u,c):void 0,[e.focusedValue,h,u,c]),(0,cc.useMemo)(()=>vK(e.defaultFocusedValue?yl(yi(e.defaultFocusedValue),h):v||yl(yg(b),h),u,c),[e.defaultFocusedValue,v,b,h,u,c]),e.onFocusChange),[x,D]=(0,cc.useState)(()=>{switch(d){case"start":return vW(w,l,i,u,c);case"end":return vH(w,l,i,u,c);default:return vV(w,l,i,u,c)}}),[_,S]=(0,cc.useState)(e.autoFocus||!1),C=(0,cc.useMemo)(()=>{let e={...l};return e.days?e.days--:e.days=-1,x.add(e)},[x,l]),[k,P]=(0,cc.useState)(h);if(!yf(h,k)){let e=yl(w,h);D(vV(e,l,i,u,c)),E(e),P(h)}function O(e){E(e=vK(e,u,c))}function R(t){if(!e.isDisabled&&!e.isReadOnly){let e=t;if(null===e)return void y(null);(e=vG(e=vK(e,u,c),x,f))&&(e=yl(e,(null==g?void 0:g.calendar)||new gj),g&&"hour"in g?y(g.set(e)):y(e))}}vU(w,u,c)?E(vK(w,u,c)):0>w.compare(x)?D(vH(w,l,i,u,c)):w.compare(C)>0&&D(vW(w,l,i,u,c));let T=(0,cc.useMemo)(()=>!!v&&(!!(f&&f(v))||vU(v,u,c)),[v,f,u,c]),N=e.isInvalid||"invalid"===e.validationState||T,j=(0,cc.useMemo)(()=>"visible"===p?l:vq(l),[p,l]);return{isDisabled:null!=(r=e.isDisabled)&&r,isReadOnly:null!=(n=e.isReadOnly)&&n,value:v,setValue:R,visibleRange:{start:x,end:C},minValue:u,maxValue:c,focusedDate:w,timeZone:b,validationState:N?"invalid":null,isValueInvalid:N,setFocusedDate(e){O(e),S(!0)},focusNextDay(){O(w.add({days:1}))},focusPreviousDay(){O(w.subtract({days:1}))},focusNextRow(){l.days?this.focusNextPage():(l.weeks||l.months||l.years)&&O(w.add({weeks:1}))},focusPreviousRow(){l.days?this.focusPreviousPage():(l.weeks||l.months||l.years)&&O(w.subtract({weeks:1}))},focusNextPage(){let e=x.add(j);E(vK(w.add(j),u,c)),D(vW(vz(w,e,j,i,u,c),j,i))},focusPreviousPage(){let e=x.subtract(j);E(vK(w.subtract(j),u,c)),D(vW(vz(w,e,j,i,u,c),j,i))},focusSectionStart(){l.days?O(x):l.weeks?O(yD(w,i)):(l.months||l.years)&&O(yE(w))},focusSectionEnd(){l.days?O(C):l.weeks?O(yD(w,i,void 0).add({days:6})):(l.months||l.years)&&O(yx(w))},focusNextSection(e){e||l.days?l.days?this.focusNextPage():l.weeks?O(w.add({months:1})):(l.months||l.years)&&O(w.add({years:1})):O(w.add(vq(l)))},focusPreviousSection(e){e||l.days?l.days?this.focusPreviousPage():l.weeks?O(w.subtract({months:1})):(l.months||l.years)&&O(w.subtract({years:1})):O(w.subtract(vq(l)))},selectFocusedDate(){f&&f(w)||R(w)},selectDate(e){R(e)},isFocused:_,setFocused:S,isInvalid:e=>vU(e,u,c),isSelected(e){return null!=v&&yc(e,v)&&!this.isCellDisabled(e)&&!this.isCellUnavailable(e)},isCellFocused:e=>_&&w&&yc(e,w),isCellDisabled(t){return e.isDisabled||0>t.compare(x)||t.compare(C)>0||this.isInvalid(t)},isCellUnavailable:t=>!!e.isDateUnavailable&&e.isDateUnavailable(t),isPreviousVisibleRangeInvalid(){let e=x.subtract({days:1});return yc(e,x)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=C.add({days:1});return yc(e,C)||this.isInvalid(e)},getDatesInWeek(e,t=x){let r=t.add({weeks:e}),n=[],o=ym(r=yD(r,i,m),i,m);for(let e=0;e<o;e++)n.push(null);for(;n.length<7;){n.push(r);let e=r.add({days:1});if(yc(r,e))break;r=e}for(;n.length<7;)n.push(null);return n}}}function vq(e){let t={...e};for(let r in e)t[r]=1;return t}function vJ(e,t){return e&&t?(0>t.compare(e)&&([e,t]=[t,e]),{start:yi(e),end:yi(t)}):null}function vX(e,t){return(e=yl(e,(null==t?void 0:t.calendar)||new gj),t&&"hour"in t)?t.set(e):e}function vQ(e,t,r){let n=e.add({days:r});for(;(r<0?n.compare(t.visibleRange.start)>=0:0>=n.compare(t.visibleRange.end))&&!t.isCellUnavailable(n);)n=n.add({days:r});if(t.isCellUnavailable(n))return n.add({days:-r})}let v0=(0,cc.createContext)(null),v1=(0,cc.createContext)(null),v2=(0,cc.createContext)(null),v4=(0,cc.createContext)(null),v3=(0,cc.forwardRef)(function(e,t){[e,t]=mF(e,t,v0);let{locale:r}=gS(),n=vY({...e,locale:r,createCalendar:e.createCalendar||vB}),{calendarProps:o,prevButtonProps:a,nextButtonProps:i,errorMessageProps:s,title:l}=yX(e,n),u=mM({...e,values:{state:n,isDisabled:e.isDisabled||!1,isInvalid:n.isValueInvalid},defaultClassName:"react-aria-Calendar"});return cd().createElement("div",{...u,...o,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":n.isValueInvalid||void 0},cd().createElement(mI,{values:[[gu,{slots:{previous:a,next:i}}],[gd,{"aria-hidden":!0,level:2,children:l}],[v2,n],[v0,e],[gf,{slots:{errorMessage:s}}]]},cd().createElement(y0,null,cd().createElement("h2",null,o["aria-label"])),u.children,cd().createElement(y0,null,cd().createElement("button",{"aria-label":i["aria-label"],disabled:i.isDisabled,onClick:()=>n.focusNextPage(),tabIndex:-1}))))}),v6=(0,cc.forwardRef)(function(e,t){var r,n;let o,a,i;[e,t]=mF(e,t,v1);let{locale:s}=gS(),l=function(e){let{value:t,defaultValue:r,onChange:n,createCalendar:o,locale:a,visibleDuration:i={months:1},minValue:s,maxValue:l,...u}=e,[c,d]=vZ(t,r||null,n),[f,p]=(0,cc.useState)(null),m="center";if(c&&c.start&&c.end){let e=vV(yi(c.start),i,a,s,l).add(i).subtract({days:1});c.end.compare(e)>0&&(m="start")}let h=(0,cc.useRef)(null),[g,y]=(0,cc.useState)(null),v=(0,cc.useMemo)(()=>yC(s,null==g?void 0:g.start),[s,g]),b=(0,cc.useMemo)(()=>yS(l,null==g?void 0:g.end),[l,g]),w=vY({...u,value:c&&c.start,createCalendar:o,locale:a,visibleDuration:i,minValue:v,maxValue:b,selectionAlignment:m}),E=t=>{t&&e.isDateUnavailable&&!e.allowsNonContiguousRanges?(h.current={start:vQ(t,w,-1),end:vQ(t,w,1)},y(h.current)):(h.current=null,y(null))},[x,D]=(0,cc.useState)(w.visibleRange);yd(w.visibleRange.start,x.start)&&yd(w.visibleRange.end,x.end)||(E(f),D(w.visibleRange));let _=e=>{e?(p(e),E(e)):(p(null),E(null))},S=f?vJ(f,w.focusedDate):c&&vJ(c.start,c.end),C=t=>{if(e.isReadOnly)return;let r=vG(vK(t,v,b),w.visibleRange.start,e.isDateUnavailable);if(r)if(f){let e=vJ(f,r);e&&d({start:vX(e.start,null==c?void 0:c.start),end:vX(e.end,null==c?void 0:c.end)}),_(null)}else _(r)},[k,P]=(0,cc.useState)(!1),{isDateUnavailable:O}=e,R=(0,cc.useMemo)(()=>!!c&&!f&&(!!(O&&(O(c.start)||O(c.end)))||vU(c.start,s,l)||vU(c.end,s,l)),[O,c,f,s,l]),T=e.isInvalid||"invalid"===e.validationState||R;return{...w,value:c,setValue:d,anchorDate:f,setAnchorDate:_,highlightedRange:S,validationState:T?"invalid":null,isValueInvalid:T,selectFocusedDate(){C(w.focusedDate)},selectDate:C,highlightDate(e){f&&w.setFocusedDate(e)},isSelected:e=>!!(S&&e.compare(S.start)>=0&&0>=e.compare(S.end)&&!w.isCellDisabled(e)&&!w.isCellUnavailable(e)),isInvalid(e){var t,r;return w.isInvalid(e)||vU(e,null==(t=h.current)?void 0:t.start,null==(r=h.current)?void 0:r.end)},isDragging:k,setDragging:P}}({...e,locale:s,createCalendar:e.createCalendar||vB}),{calendarProps:u,prevButtonProps:c,nextButtonProps:d,errorMessageProps:f,title:p}=(r=e,n=t,o=yX(r,l),a=(0,cc.useRef)(!1),y1(i=(0,cc.useRef)("u">typeof window?window:null),"pointerdown",e=>{a.current=0===e.width&&0===e.height}),y1(i,"pointerup",e=>{if(a.current){a.current=!1;return}if(l.setDragging(!1),!l.anchorDate)return;let t=e.target;n.current&&n.current.contains(document.activeElement)&&(!n.current.contains(t)||!t.closest('button, [role="button"]'))&&l.selectFocusedDate()}),o.calendarProps.onBlur=e=>{n.current&&(e.relatedTarget&&n.current.contains(e.relatedTarget)||!l.anchorDate||l.selectFocusedDate())},y1(n,"touchmove",e=>{l.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),o),m=mM({...e,values:{state:l,isDisabled:e.isDisabled||!1,isInvalid:l.isValueInvalid},defaultClassName:"react-aria-RangeCalendar"});return cd().createElement("div",{...m,...u,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":l.isValueInvalid||void 0},cd().createElement(mI,{values:[[gu,{slots:{previous:c,next:d}}],[gd,{"aria-hidden":!0,level:2,children:p}],[v4,l],[v1,e],[gf,{slots:{errorMessage:f}}]]},cd().createElement(y0,null,cd().createElement("h2",null,u["aria-label"])),m.children,cd().createElement(y0,null,cd().createElement("button",{"aria-label":d["aria-label"],disabled:d.isDisabled,onClick:()=>l.focusNextPage(),tabIndex:-1}))))}),v5=(0,cc.createContext)(null),v9=(0,cc.forwardRef)(function(e,t){var r,n;let o=(0,cc.useContext)(v2),a=(0,cc.useContext)(v4),i=mL(v0),s=mL(v1),l=null!=o?o:a,u=l.visibleRange.start;e.offset&&(u=u.add(e.offset));let c=null!=(r=null==i?void 0:i.firstDayOfWeek)?r:null==s?void 0:s.firstDayOfWeek,{gridProps:d,headerProps:f,weekDays:p,weeksInMonth:m}=function(e,t){let r,{startDate:n=t.visibleRange.start,endDate:o=t.visibleRange.end,firstDayOfWeek:a}=e,{direction:i}=gS(),s=yZ(n,o,t.timeZone,!0),{ariaLabel:l,ariaLabelledBy:u}=yK.get(t),c=yJ({"aria-label":[l,s].filter(Boolean).join(", "),"aria-labelledby":u}),d=yW({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:f}=gS(),p=(0,cc.useMemo)(()=>{let e=yD(yg(t.timeZone),f,a);return[...Array(7).keys()].map(r=>{let n=e.add({days:r}).toDate(t.timeZone);return d.format(n)})},[f,t.timeZone,d,a]),m=(r=n.calendar.getDaysInMonth(n),Math.ceil((ym(yE(n),f,a)+r)/7));return{gridProps:mA(c,{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"===i?t.focusNextDay():t.focusPreviousDay();break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),t.focusPreviousRow();break;case"ArrowRight":e.preventDefault(),e.stopPropagation(),"rtl"===i?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:p,weeksInMonth:m}}({startDate:u,endDate:yx(u),weekdayStyle:e.weekdayStyle,firstDayOfWeek:c},l);return cd().createElement(v5.Provider,{value:{headerProps:f,weekDays:p,startDate:u,weeksInMonth:m}},cd().createElement("table",{...mq(e),...d,ref:t,style:e.style,className:null!=(n=e.className)?n:"react-aria-CalendarGrid"},"function"!=typeof e.children?e.children:cd().createElement(cd().Fragment,null,cd().createElement(v8,null,e=>cd().createElement(v7,null,e)),cd().createElement(be,null,e.children))))}),v8=(0,cc.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e,{headerProps:a,weekDays:i}=(0,cc.useContext)(v5);return cd().createElement("thead",{...mq(e),...a,ref:t,style:n,className:o||"react-aria-CalendarGridHeader"},cd().createElement("tr",null,i.map((e,t)=>cd().cloneElement(r(e),{key:t}))))}),v7=(0,cc.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e;return cd().createElement("th",{...mq(e),ref:t,style:n,className:o||"react-aria-CalendarHeaderCell"},r)}),be=(0,cc.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e,a=(0,cc.useContext)(v2),i=(0,cc.useContext)(v4),s=null!=a?a:i,{startDate:l,weeksInMonth:u}=(0,cc.useContext)(v5);return cd().createElement("tbody",{...mq(e),ref:t,style:n,className:o||"react-aria-CalendarGridBody"},[...Array(u).keys()].map(e=>cd().createElement("tr",{key:e},s.getDatesInWeek(e,l).map((e,t)=>e?cd().cloneElement(r(e),{key:t}):cd().createElement("td",{key:t})))))}),bt=(0,cc.forwardRef)(function({date:e,...t},r){var n,o,a;let i=(0,cc.useContext)(v2),s=(0,cc.useContext)(v4),l=null!=i?i:s,{startDate:u}=null!=(n=(0,cc.useContext)(v5))?n:{startDate:l.visibleRange.start},c=(0,cc.useRef)(null),{cellProps:d,buttonProps:f,...p}=function(e,t,r){var n;let o,{date:a,isDisabled:i}=e,{errorMessageId:s,selectedDateDescription:l}=yK.get(t),u=y$((n=gC)&&n.__esModule?n.default:n,"@react-aria/calendar"),c=yW({weekday:"long",day:"numeric",month:"long",year:"numeric",era:yG(a),timeZone:t.timeZone}),d=t.isSelected(a),f=t.isCellFocused(a);i=i||t.isCellDisabled(a);let p=t.isCellUnavailable(a),m=!i&&!p,h=t.isValueInvalid&&!!("highlightedRange"in t?!t.anchorDate&&t.highlightedRange&&a.compare(t.highlightedRange.start)>=0&&0>=a.compare(t.highlightedRange.end):t.value&&yc(t.value,a));h&&(d=!0),a=yV(a,yd);let g=(0,cc.useMemo)(()=>a.toDate(t.timeZone),[a,t.timeZone]),y=yc(a,yg(t.timeZone)),v=(0,cc.useMemo)(()=>{let e="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(yc(a,t.value.start)||yc(a,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&&yc(a,t.minValue)?e+=", "+u.format("minimumDate"):t.maxValue&&yc(a,t.maxValue)&&(e+=", "+u.format("maximumDate")),e},[c,g,u,d,y,a,t,l]),b="";"anchorDate"in t&&f&&!t.isReadOnly&&m&&(b=t.anchorDate?u.format("finishRangeSelectionPrompt"):u.format("startRangeSelectionPrompt"));let w=y3(b),E=(0,cc.useRef)(!1),x=(0,cc.useRef)(!1),D=(0,cc.useRef)(void 0),{pressProps:_,isPressed:S}=hA({shouldCancelOnPointerExit:"anchorDate"in t&&!!t.anchorDate,preventFocusOnPress:!0,isDisabled:!m||t.isReadOnly,onPressStart(e){if(t.isReadOnly)return void t.setFocusedDate(a);if("highlightedRange"in t&&!t.anchorDate&&("mouse"===e.pointerType||"touch"===e.pointerType)){if(t.highlightedRange&&!h){if(yc(a,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(a),t.setDragging(!0),x.current=!0;return}else if(yc(a,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(a),t.setDragging(!0),x.current=!0;return}}let r=()=>{t.setDragging(!0),D.current=void 0,t.selectDate(a),t.setFocusedDate(a),E.current=!0};"touch"===e.pointerType?D.current=setTimeout(r,200):r()}},onPressEnd(){x.current=!1,E.current=!1,clearTimeout(D.current),D.current=void 0},onPress(){"anchorDate"in t||t.isReadOnly||(t.selectDate(a),t.setFocusedDate(a))},onPressUp(e){if(!t.isReadOnly&&("anchorDate"in t&&D.current&&(t.selectDate(a),t.setFocusedDate(a)),"anchorDate"in t))if(x.current)t.setAnchorDate(a);else if(t.anchorDate&&!E.current)t.selectDate(a),t.setFocusedDate(a);else if("keyboard"!==e.pointerType||t.anchorDate)"virtual"===e.pointerType&&(t.selectDate(a),t.setFocusedDate(a));else{t.selectDate(a);let e=a.add({days:1});t.isInvalid(e)&&(e=a.subtract({days:1})),t.isInvalid(e)||t.setFocusedDate(e)}}});i||(o=yc(a,t.focusedDate)?0:-1),(0,cc.useEffect)(()=>{f&&r.current&&(m3(r.current),"pointer"!==hU&&document.activeElement===r.current&&y9(r.current,{containingElement:y8(r.current)}))},[f,r]);let C=yW({day:"numeric",timeZone:t.timeZone,calendar:a.calendar.identifier}),k=(0,cc.useMemo)(()=>C.formatToParts(g).find(e=>"day"===e.type).value,[C,g]);return{cellProps:{role:"gridcell","aria-disabled":!m||void 0,"aria-selected":d||void 0,"aria-invalid":h||void 0},buttonProps:mA(_,{onFocus(){i||t.setFocusedDate(a)},tabIndex:o,role:"button","aria-disabled":!m||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)&&m&&t.highlightDate(a)},onPointerDown(e){"releasePointerCapture"in e.target&&e.target.releasePointerCapture(e.pointerId)},onContextMenu(e){e.preventDefault()}}),isPressed:S,isFocused:f,isSelected:d,isDisabled:i,isUnavailable:p,isOutsideVisibleRange:0>a.compare(t.visibleRange.start)||a.compare(t.visibleRange.end)>0,isInvalid:h,formattedDate:k}}({date:e},l,c),{hoverProps:m,isHovered:h}=ga({...t,isDisabled:p.isDisabled}),{focusProps:g,isFocusVisible:y}=ge();y&&(y=p.isFocused);let v=(o=u,a=yl(a=e,o.calendar),o=yE(o),a=yE(a),o.era!==a.era||o.year!==a.year||o.month!==a.month),b=!1,w=!1;"highlightedRange"in l&&l.highlightedRange&&(b=yc(e,l.highlightedRange.start),w=yc(e,l.highlightedRange.end));let E=mM({...t,defaultChildren:p.formattedDate,defaultClassName:"react-aria-CalendarCell",values:{date:e,isHovered:h,isOutsideMonth:v,isFocusVisible:y,isSelectionStart:b,isSelectionEnd:w,...p}}),x={"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 cd().createElement("td",{...d,ref:r},cd().createElement("div",{...mA(mq(t),f,g,m,x,E),ref:c}))}),br=(0,cc.createContext)({}),bn=(0,cc.forwardRef)(function(e,t){var r,n;[e,t]=mF(e,t,br);let{isDisabled:o,isInvalid:a,onHoverStart:i,onHoverChange:s,onHoverEnd:l,...u}=e,{hoverProps:c,isHovered:d}=ga({onHoverStart:i,onHoverChange:s,onHoverEnd:l,isDisabled:o}),{isFocused:f,isFocusVisible:p,focusProps:m}=ge({within:!0});null!=o||(o=!!e["aria-disabled"]&&"false"!==e["aria-disabled"]),null!=a||(a=!!e["aria-invalid"]&&"false"!==e["aria-invalid"]);let h=mM({...e,values:{isHovered:d,isFocusWithin:f,isFocusVisible:p,isDisabled:o,isInvalid:a},defaultClassName:"react-aria-Group"});return cd().createElement("div",{...mA(u,m,c),...h,ref:t,role:null!=(r=e.role)?r:"group",slot:null!=(n=e.slot)?n:void 0,"data-focus-within":f||void 0,"data-hovered":d||void 0,"data-focus-visible":p||void 0,"data-disabled":o||void 0,"data-invalid":a||void 0},h.children)}),bo=(0,cc.createContext)({}),ba=gs(function(e,t){[e,t]=mF(e,t,bo);let{hoverProps:r,isHovered:n}=ga(e),{isFocused:o,isFocusVisible:a,focusProps:i}=ge({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e["aria-invalid"]&&"false"!==e["aria-invalid"],l=mM({...e,values:{isHovered:n,isFocused:o,isFocusVisible:a,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:"react-aria-Input"});return cd().createElement("input",{...mA((e=>{let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,...o}=e;return o})(e),i,r),...l,ref:t,"data-focused":o||void 0,"data-disabled":e.disabled||void 0,"data-hovered":n||void 0,"data-focus-visible":a||void 0,"data-invalid":s||void 0})});var bi={};bi={"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:"Anfangsdatum",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 bs=cd().createContext(null),bl="react-aria-focus-scope-restore",bu=null;function bc(e){var t,r,n,o,a,i,s,l,u,c;let d,f,p,m,{children:h,contain:g,restoreFocus:y,autoFocus:v}=e,b=(0,cc.useRef)(null),w=(0,cc.useRef)(null),E=(0,cc.useRef)([]),{parentNode:x}=(0,cc.useContext)(bs)||{},D=(0,cc.useMemo)(()=>new bS({scopeRef:E}),[E]);mv(()=>{let e=x||bC.root;if(bC.getTreeNode(e.scopeRef)&&bu&&!bh(bu,e.scopeRef)){let t=bC.getTreeNode(bu);t&&(e=t)}e.addChild(D),bC.addNode(D)},[D,x]),mv(()=>{let e=bC.getTreeNode(E);e&&(e.contain=!!g)},[g]),mv(()=>{var e;let t=null==(e=b.current)?void 0:e.nextSibling,r=[],n=e=>e.stopPropagation();for(;t&&t!==w.current;)r.push(t),t.addEventListener(bl,n),t=t.nextSibling;return E.current=r,()=>{for(let e of r)e.removeEventListener(bl,n)}},[h]),mv(()=>{if(r||n)return;let e=t.current,o=m2(e?e[0]:void 0),a=e=>{let r=hC(e);bp(r,t.current)?bu=t:bm(r)||(bu=null)};return o.addEventListener("focusin",a,!1),null==e||e.forEach(e=>e.addEventListener("focusin",a,!1)),()=>{o.removeEventListener("focusin",a,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",a,!1))}},[t=E,r=y,n=g]),o=E,a=g,d=(0,cc.useRef)(void 0),f=(0,cc.useRef)(void 0),mv(()=>{let e=o.current;if(!a){f.current&&(cancelAnimationFrame(f.current),f.current=void 0);return}let t=m2(e?e[0]:void 0),r=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!bf(o)||e.isComposing)return;let r=((e=document)=>e.activeElement)(t),n=o.current;if(!n||!bp(r,n))return;let a=bE(bd(n),{tabbable:!0},n);if(!r)return;a.currentNode=r;let i=e.shiftKey?a.previousNode():a.nextNode();i||(a.currentNode=e.shiftKey?n[n.length-1].nextElementSibling:n[0].previousElementSibling,i=e.shiftKey?a.previousNode():a.nextNode()),e.preventDefault(),i&&bg(i,!0)},n=e=>{(!bu||bh(bu,o))&&bp(hC(e),o.current)?(bu=o,d.current=hC(e)):bf(o)&&!bm(hC(e),o)?d.current?d.current.focus():bu&&bu.current&&bv(bu.current):bf(o)&&(d.current=hC(e))},i=e=>{f.current&&cancelAnimationFrame(f.current),f.current=requestAnimationFrame(()=>{let r=hU,n=("virtual"===r||null===r)&&hu()&&hl(),a=((e=document)=>e.activeElement)(t);if(!n&&a&&bf(o)&&!bm(a,o)){bu=o;let t=hC(e);if(t&&t.isConnected){var i;d.current=t,null==(i=d.current)||i.focus()}else bu.current&&bv(bu.current)}})};return t.addEventListener("keydown",r,!1),t.addEventListener("focusin",n,!1),null==e||e.forEach(e=>e.addEventListener("focusin",n,!1)),null==e||e.forEach(e=>e.addEventListener("focusout",i,!1)),()=>{t.removeEventListener("keydown",r,!1),t.removeEventListener("focusin",n,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",n,!1)),null==e||e.forEach(e=>e.removeEventListener("focusout",i,!1))}},[o,a]),mv(()=>()=>{f.current&&cancelAnimationFrame(f.current)},[f]),i=E,s=y,l=g,p=(0,cc.useRef)("u">typeof document?((e=document)=>e.activeElement)(m2(i.current?i.current[0]:void 0)):null),mv(()=>{let e=i.current,t=m2(e?e[0]:void 0);if(!s||l)return;let r=()=>{(!bu||bh(bu,i))&&bp(((e=document)=>e.activeElement)(t),i.current)&&(bu=i)};return t.addEventListener("focusin",r,!1),null==e||e.forEach(e=>e.addEventListener("focusin",r,!1)),()=>{t.removeEventListener("focusin",r,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",r,!1))}},[i,l]),mv(()=>{let e=m2(i.current?i.current[0]:void 0);if(!s)return;let t=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!bf(i)||t.isComposing)return;let r=e.activeElement;if(!bm(r,i)||!bb(i))return;let n=bC.getTreeNode(i);if(!n)return;let o=n.nodeToRestore,a=bE(e.body,{tabbable:!0});a.currentNode=r;let s=t.shiftKey?a.previousNode():a.nextNode();if(o&&o.isConnected&&o!==e.body||(o=void 0,n.nodeToRestore=void 0),(!s||!bm(s,i))&&o){a.currentNode=o;do s=t.shiftKey?a.previousNode():a.nextNode();while(bm(s,i));(t.preventDefault(),t.stopPropagation(),s)?bg(s,!0):bm(o)?bg(o,!0):r.blur()}};return l||e.addEventListener("keydown",t,!0),()=>{l||e.removeEventListener("keydown",t,!0)}},[i,s,l]),mv(()=>{var e;let t=m2(i.current?i.current[0]:void 0);if(!s)return;let r=bC.getTreeNode(i);if(r)return r.nodeToRestore=null!=(e=p.current)?e:void 0,()=>{let e=bC.getTreeNode(i);if(!e)return;let r=e.nodeToRestore,n=((e=document)=>e.activeElement)(t);if(s&&r&&(n&&bm(n,i)||n===t.body&&bb(i))){let e=bC.clone();requestAnimationFrame(()=>{if(t.activeElement===t.body){let t=e.getTreeNode(i);for(;t;){if(t.nodeToRestore&&t.nodeToRestore.isConnected)return void bw(t.nodeToRestore);t=t.parent}for(t=e.getTreeNode(i);t;){if(t.scopeRef&&t.scopeRef.current&&bC.getTreeNode(t.scopeRef))return void bw(by(t.scopeRef.current,!0));t=t.parent}}})}}},[i,s]),u=E,c=v,m=cd().useRef(c),(0,cc.useEffect)(()=>{m.current&&(bu=u,!bp(((e=document)=>e.activeElement)(m2(u.current?u.current[0]:void 0)),bu.current)&&u.current&&bv(u.current)),m.current=!1},[u]),(0,cc.useEffect)(()=>{let e=((e=document)=>e.activeElement)(m2(E.current?E.current[0]:void 0)),t=null;if(bp(e,E.current)){for(let r of bC.traverse())r.scopeRef&&bp(e,r.scopeRef.current)&&(t=r);t===bC.getTreeNode(E)&&(bu=t.scopeRef)}},[E]),mv(()=>()=>{var e,t,r;let n=null!=(r=null==(t=bC.getTreeNode(E))||null==(e=t.parent)?void 0:e.scopeRef)?r:null;(E===bu||bh(E,bu))&&(!n||bC.getTreeNode(n))&&(bu=n),bC.removeTreeNode(E)},[E]);let _=(0,cc.useMemo)(()=>{var e;return e=E,{focusNext(t={}){var r;let n=e.current,{from:o,tabbable:a,wrap:i,accept:s}=t,l=o||((e=document)=>e.activeElement)(m2(null!=(r=n[0])?r:void 0)),u=n[0].previousElementSibling,c=bE(bd(n),{tabbable:a,accept:s},n);c.currentNode=bp(l,n)?l:u;let d=c.nextNode();return!d&&i&&(c.currentNode=u,d=c.nextNode()),d&&bg(d,!0),d},focusPrevious(t={}){var r;let n=e.current,{from:o,tabbable:a,wrap:i,accept:s}=t,l=o||((e=document)=>e.activeElement)(m2(null!=(r=n[0])?r:void 0)),u=n[n.length-1].nextElementSibling,c=bE(bd(n),{tabbable:a,accept:s},n);c.currentNode=bp(l,n)?l:u;let d=c.previousNode();return!d&&i&&(c.currentNode=u,d=c.previousNode()),d&&bg(d,!0),d},focusFirst(t={}){let r=e.current,{tabbable:n,accept:o}=t,a=bE(bd(r),{tabbable:n,accept:o},r);a.currentNode=r[0].previousElementSibling;let i=a.nextNode();return i&&bg(i,!0),i},focusLast(t={}){let r=e.current,{tabbable:n,accept:o}=t,a=bE(bd(r),{tabbable:n,accept:o},r);a.currentNode=r[r.length-1].nextElementSibling;let i=a.previousNode();return i&&bg(i,!0),i}}},[]),S=(0,cc.useMemo)(()=>({focusManager:_,parentNode:D}),[D,_]);return cd().createElement(bs.Provider,{value:S},cd().createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:b}),h,cd().createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:w}))}function bd(e){return e[0].parentElement}function bf(e){let t=bC.getTreeNode(bu);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function bp(e,t){return!!e&&!!t&&t.some(t=>t.contains(e))}function bm(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:r}of bC.traverse(bC.getTreeNode(t)))if(r&&bp(e,r.current))return!0;return!1}function bh(e,t){var r;let n=null==(r=bC.getTreeNode(t))?void 0:r.parent;for(;n;){if(n.scopeRef===e)return!0;n=n.parent}return!1}function bg(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch{}}else try{h4(e)}catch{}}function by(e,t=!0){let r=e[0].previousElementSibling,n=bd(e),o=bE(n,{tabbable:t},e);o.currentNode=r;let a=o.nextNode();return t&&!a&&((o=bE(n=bd(e),{tabbable:!1},e)).currentNode=r,a=o.nextNode()),a}function bv(e,t=!0){bg(by(e,t))}function bb(e){let t=bC.getTreeNode(bu);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(null==t?void 0:t.scopeRef)===e}function bw(e){e.dispatchEvent(new CustomEvent(bl,{bubbles:!0,cancelable:!0}))&&bg(e)}function bE(e,t,r){var n,o,a;let i=(null==t?void 0:t.tabbable)?m1:m0,s=m2((null==e?void 0:e.nodeType)===Node.ELEMENT_NODE?e:null),l=(n=e||s,o=NodeFilter.SHOW_ELEMENT,a={acceptNode(e){var n;return(null==t||null==(n=t.from)?void 0:n.contains(e))?NodeFilter.FILTER_REJECT:i(e)&&function e(t,r){return"#comment"!==t.nodeName&&function(e){let t=m4(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:r,visibility:n}=e.style,o="none"!==r&&"hidden"!==n&&"collapse"!==n;if(o){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:r,visibility:n}=t(e);o="none"!==r&&"hidden"!==n&&"collapse"!==n}return o}(t)&&!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&("DETAILS"!==t.nodeName||!r||"SUMMARY"===r.nodeName||t.hasAttribute("open"))&&(!t.parentElement||e(t.parentElement,t))}(e)&&(!r||bp(e,r))&&(!(null==t?void 0:t.accept)||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}},s.createTreeWalker(n,o,a));return(null==t?void 0:t.from)&&(l.currentNode=t.from),l}function bx(e,t={}){return{focusNext(r={}){let n=e.current;if(!n)return null;let{from:o,tabbable:a=t.tabbable,wrap:i=t.wrap,accept:s=t.accept}=r,l=o||((e=document)=>e.activeElement)(m2(n)),u=bE(n,{tabbable:a,accept:s});n.contains(l)&&(u.currentNode=l);let c=u.nextNode();return!c&&i&&(u.currentNode=n,c=u.nextNode()),c&&bg(c,!0),c},focusPrevious(r=t){let n=e.current;if(!n)return null;let{from:o,tabbable:a=t.tabbable,wrap:i=t.wrap,accept:s=t.accept}=r,l=o||((e=document)=>e.activeElement)(m2(n)),u=bE(n,{tabbable:a,accept:s});if(n.contains(l))u.currentNode=l;else{let e=bD(u);return e&&bg(e,!0),null!=e?e:null}let c=u.previousNode();if(!c&&i){u.currentNode=n;let e=bD(u);if(!e)return null;c=e}return c&&bg(c,!0),null!=c?c:null},focusFirst(r=t){let n=e.current;if(!n)return null;let{tabbable:o=t.tabbable,accept:a=t.accept}=r,i=bE(n,{tabbable:o,accept:a}).nextNode();return i&&bg(i,!0),i},focusLast(r=t){let n=e.current;if(!n)return null;let{tabbable:o=t.tabbable,accept:a=t.accept}=r,i=bD(bE(n,{tabbable:o,accept:a}));return i&&bg(i,!0),null!=i?i:null}}}function bD(e){let t,r;do(t=e.lastChild())&&(r=t);while(t);return r}class b_{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,r){let n=this.fastMap.get(null!=t?t:null);if(!n)return;let o=new bS({scopeRef:e});n.addChild(o),o.parent=n,this.fastMap.set(e,o),r&&(o.nodeToRestore=r)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(null===e)return;let t=this.fastMap.get(e);if(!t)return;let r=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&bp(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let n=t.children;r&&(r.removeChild(t),n.size>0&&n.forEach(e=>r&&r.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(){var e,t;let r=new b_;for(let n of this.traverse())r.addTreeNode(n.scopeRef,null!=(t=null==(e=n.parent)?void 0:e.scopeRef)?t:null,n.nodeToRestore);return r}constructor(){this.fastMap=new Map,this.root=new bS({scopeRef:null}),this.fastMap.set(null,this.root)}}class bS{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}let bC=new b_;function bk(e,t,r){let{direction:n}=gS(),o=(0,cc.useMemo)(()=>bx(t),[t]),a=()=>{var e;if(!t.current)return;let r=null==(e=window.event)?void 0:e.target,n=bE(t.current,{tabbable:!0});if(r&&(n.currentNode=r,r=n.previousNode()),!r){let e;do(e=n.lastChild())&&(r=e);while(e)}for(;null==r?void 0:r.hasAttribute("data-placeholder");){let e=n.previousNode();if(e&&e.hasAttribute("data-placeholder"))r=e;else break}r&&r.focus()},{pressProps:i}=hA({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){"mouse"===e.pointerType&&a()},onPress(e){"mouse"!==e.pointerType&&a()}});return mA(i,{onKeyDown:a=>{if(a.currentTarget.contains(a.target)&&(a.altKey&&("ArrowDown"===a.key||"ArrowUp"===a.key)&&"setOpen"in e&&(a.preventDefault(),a.stopPropagation(),e.setOpen(!0)),!r))switch(a.key){case"ArrowLeft":if(a.preventDefault(),a.stopPropagation(),"rtl"===n){if(t.current){let e=a.target,r=bP(t.current,e.getBoundingClientRect().left,-1);r&&r.focus()}}else o.focusPrevious();break;case"ArrowRight":if(a.preventDefault(),a.stopPropagation(),"rtl"===n){if(t.current){let e=a.target,r=bP(t.current,e.getBoundingClientRect().left,1);r&&r.focus()}}else o.focusNext()}}})}function bP(e,t,r){let n=bE(e,{tabbable:!0}),o=n.nextNode(),a=null,i=1/0;for(;o;){let e=o.getBoundingClientRect().left-t,s=Math.abs(e);Math.sign(e)===r&&s<i&&(a=o,i=s),o=n.nextNode()}return a}function bO(e,t,r){let n=(0,cc.useRef)(t),o=mb(()=>{r&&r(n.current)});(0,cc.useEffect)(()=>{var t;let r=null==e||null==(t=e.current)?void 0:t.form;return null==r||r.addEventListener("reset",o),()=>{null==r||r.removeEventListener("reset",o)}},[e,o])}function bR(e){let{description:t,errorMessage:r,isInvalid:n,validationState:o}=e,{labelProps:a,fieldProps:i}=function(e){let{id:t,label:r,"aria-labelledby":n,"aria-label":o,labelElementType:a="label"}=e;t=mT(t);let i=mT(),s={};return r&&(n=n?`${i} ${n}`:i,s={id:i,htmlFor:"label"===a?t:void 0}),{labelProps:s,fieldProps:yJ({id:t,"aria-label":o,"aria-labelledby":n})}}(e),s=mN([!!t,!!r,n,o]),l=mN([!!t,!!r,n,o]);return{labelProps:a,fieldProps:i=mA(i,{"aria-describedby":[s,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),descriptionProps:{id:s},errorMessageProps:{id:l}}}function bT(e,t,r){let{validationBehavior:n,focus:o}=e;mv(()=>{if("native"===n&&(null==r?void 0:r.current)&&!r.current.disabled){var e;let n,o=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";r.current.setCustomValidity(o),r.current.hasAttribute("title")||(r.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation({isInvalid:!(e=r.current).validity.valid,validationDetails:{badInput:(n=e.validity).badInput,customError:n.customError,patternMismatch:n.patternMismatch,rangeOverflow:n.rangeOverflow,rangeUnderflow:n.rangeUnderflow,stepMismatch:n.stepMismatch,tooLong:n.tooLong,tooShort:n.tooShort,typeMismatch:n.typeMismatch,valueMissing:n.valueMissing,valid:n.valid},validationErrors:e.validationMessage?[e.validationMessage]:[]})}});let a=mb(()=>{t.resetValidation()}),i=mb(e=>{var n,a;t.displayValidation.isInvalid||t.commitValidation();let i=null==r||null==(n=r.current)?void 0:n.form;!e.defaultPrevented&&r&&i&&function(e){for(let t=0;t<e.elements.length;t++){let r=e.elements[t];if(!r.validity.valid)return r}return null}(i)===r.current&&(o?o():null==(a=r.current)||a.focus(),hU="keyboard",hG("keyboard",null)),e.preventDefault()}),s=mb(()=>{t.commitValidation()});(0,cc.useEffect)(()=>{let e=null==r?void 0:r.current;if(!e)return;let t=e.form;return e.addEventListener("invalid",i),e.addEventListener("change",s),null==t||t.addEventListener("reset",a),()=>{e.removeEventListener("invalid",i),e.removeEventListener("change",s),null==t||t.removeEventListener("reset",a)}},[r,i,s,a,n])}let bN=new WeakMap,bj="__role_"+Date.now(),bA="__focusManager_"+Date.now();function b$(e,t,r){var n,o;let a,{isInvalid:i,validationErrors:s,validationDetails:l}=t.displayValidation,{labelProps:u,fieldProps:c,descriptionProps:d,errorMessageProps:f}=bR({...e,labelElementType:"span",isInvalid:i,errorMessage:e.errorMessage||s}),p=(0,cc.useRef)(null),{focusWithinProps:m}=h7({...e,onFocusWithin(r){var n;p.current=t.value,null==(n=e.onFocus)||n.call(e,r)},onBlurWithin:r=>{var n;t.confirmPlaceholder(),t.value!==p.current&&t.commitValidation(),null==(n=e.onBlur)||n.call(e,r)},onFocusWithinChange:e.onFocusChange}),h=y$((o=bi)&&o.__esModule?o.default:o,"@react-aria/datepicker"),g="hour"===t.maxGranularity?"selectedTimeDescription":"selectedDateDescription",y="hour"===t.maxGranularity?"time":"date",v=y3(t.value?h.format(g,{[y]:t.formatValue({month:"long"})}):""),b="presentation"===e[bj]?c["aria-describedby"]:[v["aria-describedby"],c["aria-describedby"]].filter(Boolean).join(" ")||void 0,w=e[bA],E=(0,cc.useMemo)(()=>w||bx(r),[w,r]),x=bk(t,r,"presentation"===e[bj]);bN.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:[u.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:b,focusManager:E});let D=(0,cc.useRef)(e.autoFocus);a="presentation"===e[bj]?{role:"presentation"}:mA(c,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":b}),(0,cc.useEffect)(()=>{D.current&&E.focusFirst(),D.current=!1},[E]),bO(e.inputRef,t.value,t.setValue),bT({...e,focus(){E.focusFirst()}},t,e.inputRef);let _={type:"hidden",name:e.name,value:(null==(n=t.value)?void 0:n.toString())||"",disabled:e.isDisabled};"native"===e.validationBehavior&&(_.type="text",_.hidden=!0,_.required=e.isRequired,_.onChange=()=>{});let S=mq(e);return{labelProps:{...u,onClick:()=>{E.focusFirst()}},fieldProps:mA(S,a,x,m,{onKeyDown(t){e.onKeyDown&&e.onKeyDown(t)},onKeyUp(t){e.onKeyUp&&e.onKeyUp(t)},style:{unicodeBidi:"isolate"}}),inputProps:_,descriptionProps:d,errorMessageProps:f,isInvalid:i,validationErrors:s,validationDetails:l}}var bI={};bI={"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 Anfangsdatum 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{C0C1}\u{C774}\u{C5B4}\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 bM={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},bL={...bM,customError:!0,valid:!1},bF={isInvalid:!1,validationDetails:bM,validationErrors:[]},bB=(0,cc.createContext)({}),bU="__formValidationState"+Date.now();function bV(e){if(e[bU]){let{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:a}=e[bU];return{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:a}}return function(e){let{isInvalid:t,validationState:r,name:n,value:o,builtinValidation:a,validate:i,validationBehavior:s="aria"}=e;r&&(t||(t="invalid"===r));let l=void 0!==t?{isInvalid:t,validationErrors:[],validationDetails:bL}:null,u=(0,cc.useMemo)(()=>i&&null!=o?bH(function(e,t){if("function"==typeof e){let r=e(t);if(r&&"boolean"!=typeof r)return bW(r)}return[]}(i,o)):null,[i,o]);(null==a?void 0:a.validationDetails.valid)&&(a=void 0);let c=(0,cc.useContext)(bB),d=(0,cc.useMemo)(()=>n?Array.isArray(n)?n.flatMap(e=>bW(c[e])):bW(c[n]):[],[c,n]),[f,p]=(0,cc.useState)(c),[m,h]=(0,cc.useState)(!1);c!==f&&(p(c),h(!1));let g=(0,cc.useMemo)(()=>bH(m?[]:d),[m,d]),y=(0,cc.useRef)(bF),[v,b]=(0,cc.useState)(bF),w=(0,cc.useRef)(bF),[E,x]=(0,cc.useState)(!1);return(0,cc.useEffect)(()=>{if(!E)return;x(!1);let e=u||a||y.current;bz(e,w.current)||(w.current=e,b(e))}),{realtimeValidation:l||g||u||a||bF,displayValidation:"native"===s?l||g||v:l||g||u||a||v,updateValidation(e){"aria"!==s||bz(v,e)?y.current=e:b(e)},resetValidation(){bz(bF,w.current)||(w.current=bF,b(bF)),"native"===s&&x(!1),h(!0)},commitValidation(){"native"===s&&x(!0),h(!0)}}}(e)}function bW(e){return e?Array.isArray(e)?e:[e]:[]}function bH(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:bL}:null}function bz(e,t){return e===t||!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((e,r)=>e===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([e,r])=>t.validationDetails[e]===r)}function bK(...e){let t=new Set,r=!1,n={...bM};for(let o of e){for(let e of o.validationErrors)t.add(e);for(let e in r||(r=o.isInvalid),n)n[e]||(n[e]=o.validationDetails[e])}return n.valid=!r,{isInvalid:r,validationErrors:[...t],validationDetails:n}}let bG=new yO((eo=bI)&&eo.__esModule?eo.default:eo);function bZ(){return"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US"}function bY(e,t,r,n,o){let a=null!=e&&null!=r&&e.compare(r)>0,i=null!=e&&null!=t&&0>e.compare(t),s=null!=e&&(null==n?void 0:n(e))||!1,l=a||i||s,u=[];if(l){let e=bZ(),n=new yN(e,yO.getGlobalDictionaryForPackage("@react-stately/datepicker")||bG),l=new yM(e,bX({},o)),c=l.resolvedOptions().timeZone;i&&null!=t&&u.push(n.format("rangeUnderflow",{minValue:l.format(t.toDate(c))})),a&&null!=r&&u.push(n.format("rangeOverflow",{maxValue:l.format(r.toDate(c))})),s&&u.push(n.format("unavailableDate"))}return{isInvalid:l,validationErrors:u,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:a,rangeUnderflow:i,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!l}}}let bq={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},bJ={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function bX(e,t){var r;e={...t.shouldForceLeadingZeros?bJ:bq,...e};let n=t.granularity||"minute",o=Object.keys(e),a=o.indexOf(null!=(r=t.maxGranularity)?r:"year");a<0&&(a=0);let i=o.indexOf(n);if(i<0&&(i=2),a>i)throw Error("maxGranularity must be greater than granularity");let s=o.slice(a,i+1).reduce((t,r)=>(t[r]=e[r],t),{});return null!=t.hourCycle&&(s.hour12=12===t.hourCycle),s.timeZone=t.timeZone||"UTC",("hour"===n||"minute"===n||"second"===n)&&t.timeZone&&!t.hideTimeZone&&(s.timeZoneName="short"),t.showEra&&0===a&&(s.era="short"),s}function bQ(e){return e&&"hour"in e?e:new g4}function b0(e,t){return null===e?null:e?yl(e,t):void 0}function b1(e,t,r,n){if(e)return b0(e,r);let o=yl(yh(null!=n?n:yw()).set({hour:0,minute:0,second:0,millisecond:0}),r);return"year"===t||"month"===t||"day"===t?yi(o):n?o:ys(o)}function b2(e,t){let r=e&&"timeZone"in e?e.timeZone:void 0,n=e&&"minute"in e?"minute":"day";if(e&&t&&!(t in e))throw Error("Invalid granularity "+t+" for value "+e.toString());let[o,a]=(0,cc.useState)([n,r]);return e&&(o[0]!==n||o[1]!==r)&&a([n,r]),t||(t=e?n:o[0]),[t,e?r:o[1]]}let b4=new yO({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"},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"},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"),b3={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},b6={year:5,month:2,day:7,hour:2,minute:15,second:15},b5={dayperiod:"dayPeriod"};function b9(e){var t,r;let{locale:n,createCalendar:o,hideTimeZone:a,isDisabled:i=!1,isReadOnly:s=!1,isRequired:l=!1,minValue:u,maxValue:c,isDateUnavailable:d}=e,f=e.value||e.defaultValue||e.placeholderValue||null,[p,m]=b2(f,e.granularity),h=m||"UTC";if(f&&!(p in f))throw Error("Invalid granularity "+p+" for value "+f.toString());let g=(0,cc.useMemo)(()=>new yM(n),[n]),y=(0,cc.useMemo)(()=>o(g.resolvedOptions().calendar),[o,g]),[v,b]=vZ(e.value,null!=(t=e.defaultValue)?t:null,e.onChange),w=(0,cc.useMemo)(()=>{var e;return null!=(e=b0(v,y))?e:null},[v,y]),[E,x]=(0,cc.useState)(()=>b1(e.placeholderValue,p,y,m)),D="gregory"===y.identifier&&"BC"===(w||E).era,_=(0,cc.useMemo)(()=>{var t;return{granularity:p,maxGranularity:null!=(t=e.maxGranularity)?t:"year",timeZone:m,hideTimeZone:a,hourCycle:e.hourCycle,showEra:D,shouldForceLeadingZeros:e.shouldForceLeadingZeros}},[e.maxGranularity,p,e.hourCycle,e.shouldForceLeadingZeros,m,a,D]),S=(0,cc.useMemo)(()=>bX({},_),[_]),C=(0,cc.useMemo)(()=>new yM(n,S),[n,S]),k=(0,cc.useMemo)(()=>C.resolvedOptions(),[C]),P=(0,cc.useMemo)(()=>C.formatToParts(new Date).filter(e=>b3[e.type]).reduce((e,t)=>(e[t.type]=!0,e),{}),[C]),[O,R]=(0,cc.useState)(()=>e.value||e.defaultValue?{...P}:{}),T=(0,cc.useRef)(null),N=(0,cc.useRef)(y);(0,cc.useEffect)(()=>{yf(y,N.current)||(N.current=y,x(t=>Object.keys(O).length>0?yl(t,y):b1(e.placeholderValue,p,y,m)))},[y,p,O,m,e.placeholderValue]),v&&Object.keys(O).length<Object.keys(P).length&&R(O={...P}),null==v&&Object.keys(O).length===Object.keys(P).length&&(R(O={}),x(b1(e.placeholderValue,p,y,m)));let j=w&&Object.keys(O).length>=Object.keys(P).length?w:E,A=t=>{if(e.isDisabled||e.isReadOnly)return;let r=Object.keys(O),n=Object.keys(P);null==t?(b(null),x(b1(e.placeholderValue,p,y,m)),R({})):r.length>=n.length||r.length===n.length-1&&P.dayPeriod&&!O.dayPeriod&&"dayPeriod"!==T.current?b(t=yl(t,(null==f?void 0:f.calendar)||new gj)):x(t),T.current=null},$=(0,cc.useMemo)(()=>j.toDate(h),[j,h]),I=(0,cc.useMemo)(()=>(function(e,t,r,n,o,a,i,s){let l=["hour","minute","second"],u=r.formatToParts(e),c=[];for(let e of u){var d,f;let r=b3[e.type];"era"===e.type&&1===a.getEras().length&&(r=!1);let u=b3[e.type]&&!t[e.type],p=b3[e.type]?(d=e.type,f=e.value,"era"===d||"dayPeriod"===d?f:"year"===d||"month"===d||"day"===d?b4.getStringForLocale(d,i):"––"):null,m={type:b5[e.type]||e.type,text:u?p:e.value,...b8(o,e.type,n),isPlaceholder:u,placeholder:p,isEditable:r};"hour"===e.type?(c.push({type:"literal",text:"",...b8(o,"literal",n),isPlaceholder:!1,placeholder:"",isEditable:!1}),c.push(m),e.type===s&&c.push({type:"literal",text:"",...b8(o,"literal",n),isPlaceholder:!1,placeholder:"",isEditable:!1})):l.includes(e.type)&&e.type===s?(c.push(m),c.push({type:"literal",text:"",...b8(o,"literal",n),isPlaceholder:!1,placeholder:"",isEditable:!1})):c.push(m)}return c})($,O,C,k,j,y,n,p),[$,O,C,k,j,y,n,p]);P.era&&O.year&&!O.era?(O.era=!0,R({...O})):!P.era&&O.era&&(delete O.era,R({...O}));let M=e=>{O[e]=!0,"year"===e&&P.era&&(O.era=!0),R({...O})},L=(e,t)=>{if(O[e])A(function(e,t,r,n){switch(t){case"era":case"year":case"month":case"day":return e.cycle(t,r,{round:"year"===t})}if("hour"in e)switch(t){case"dayPeriod":{let t=e.hour;return e.set({hour:t>=12?t-12:t+12})}case"hour":case"minute":case"second":return e.cycle(t,r,{round:"hour"!==t,hourCycle:n.hour12?12:24})}throw Error("Unknown segment: "+t)}(j,e,t,k));else{M(e);let t=Object.keys(O),r=Object.keys(P);(t.length>=r.length||t.length===r.length-1&&P.dayPeriod&&!O.dayPeriod)&&A(j)}},F=(0,cc.useMemo)(()=>bY(v,u,c,d,_),[v,u,c,d,_]),B=bV({...e,value:v,builtinValidation:F}),U=B.displayValidation.isInvalid,V=e.validationState||(U?"invalid":null);return{...B,value:w,dateValue:$,calendar:y,setValue:A,segments:I,dateFormatter:C,validationState:V,isInvalid:U,granularity:p,maxGranularity:null!=(r=e.maxGranularity)?r:"year",isDisabled:i,isReadOnly:s,isRequired:l,increment(e){L(e,1)},decrement(e){L(e,-1)},incrementPage(e){L(e,b6[e]||1)},decrementPage(e){L(e,-(b6[e]||1))},setSegment(e,t){M(e),A(function(e,t,r,n){switch(t){case"day":case"month":case"year":case"era":return e.set({[t]:r})}if("hour"in e&&"number"==typeof r)switch(t){case"dayPeriod":{let t=e.hour,n=t>=12;if(r>=12===n)return e;return e.set({hour:n?t-12:t+12})}case"hour":if(n.hour12){let t=e.hour>=12;t||12!==r||(r=0),t&&r<12&&(r+=12)}case"minute":case"second":return e.set({[t]:r})}throw Error("Unknown segment: "+t)}(j,e,t,k))},confirmPlaceholder(){if(e.isDisabled||e.isReadOnly)return;let t=Object.keys(O),r=Object.keys(P);t.length===r.length-1&&P.dayPeriod&&!O.dayPeriod&&(R(O={...P}),A(j.copy()))},clearSegment(t){delete O[t],T.current=t,R({...O});let r=b1(e.placeholderValue,p,y,m),n=j;if("dayPeriod"===t&&"hour"in j&&"hour"in r){let e=j.hour>=12,t=r.hour>=12;e&&!t?n=j.set({hour:j.hour-12}):!e&&t&&(n=j.set({hour:j.hour+12}))}else"hour"===t&&"hour"in j&&j.hour>=12&&O.dayPeriod?n=j.set({hour:r.hour+12}):t in j&&(n=j.set({[t]:r[t]}));b(null),A(n)},formatValue:e=>w?new yM(n,bX(e,_)).format($):"",getDateFormatter:(e,t)=>new yM(e,bX({},{..._,...t}))}}function b8(e,t,r){switch(t){case"era":{let t=e.calendar.getEras();return{value:t.indexOf(e.era),minValue:0,maxValue:t.length-1}}case"year":return{value:e.year,minValue:1,maxValue:e.calendar.getYearsInEra(e)};case"month":return{value:e.month,minValue:e.calendar.getMinimumMonthInYear?e.calendar.getMinimumMonthInYear(e):1,maxValue:e.calendar.getMonthsInYear(e)};case"day":return{value:e.day,minValue:e.calendar.getMinimumDayInMonth?e.calendar.getMinimumDayInMonth(e):1,maxValue:e.calendar.getDaysInMonth(e)}}if("hour"in e)switch(t){case"dayPeriod":return{value:12*(e.hour>=12),minValue:0,maxValue:12};case"hour":if(r.hour12){let t=e.hour>=12;return{value:e.hour,minValue:12*!!t,maxValue:t?23:11}}return{value:e.hour,minValue:0,maxValue:23};case"minute":return{value:e.minute,minValue:0,maxValue:59};case"second":return{value:e.second,minValue:0,maxValue:59}}return{}}let b7=(0,cc.createContext)(null),we=(0,cc.createContext)(null),wt=(0,cc.createContext)(null),wr=(0,cc.forwardRef)(function(e,t){let r=(0,cc.useContext)(we),n=(0,cc.useContext)(wt);return r||n?cd().createElement(wo,{...e,ref:t}):cd().createElement(wn,{...e,ref:t})}),wn=(0,cc.forwardRef)((e,t)=>{let[r,n]=mF({slot:e.slot},t,b7),{locale:o}=gS(),a=b9({...r,locale:o,createCalendar:vB}),i=(0,cc.useRef)(null),{fieldProps:s,inputProps:l}=b$({...r,inputRef:i},a,n);return cd().createElement(mI,{values:[[we,a],[bo,{...l,ref:i}],[br,{...s,ref:n,isInvalid:a.isInvalid,isDisabled:a.isDisabled}]]},cd().createElement(wo,e))}),wo=(0,cc.forwardRef)((e,t)=>{let{className:r,children:n}=e,o=(0,cc.useContext)(we),a=(0,cc.useContext)(wt),i=null!=o?o:a;return cd().createElement(cd().Fragment,null,cd().createElement(bn,{...e,ref:t,slot:e.slot||void 0,className:null!=r?r:"react-aria-DateInput",isInvalid:i.isInvalid,isDisabled:i.isDisabled},i.segments.map((e,t)=>(0,cc.cloneElement)(n(e),{key:t}))),cd().createElement(ba,null))}),wa=(0,cc.createContext)({});function wi(){var e;return null!=(e=(0,cc.useContext)(wa))?e:{}}function ws({children:e}){let t=(0,cc.useMemo)(()=>({register:()=>{}}),[]);return cd().createElement(hb.Provider,{value:t},e)}cd().forwardRef(({children:e,...t},r)=>{let n=(0,cc.useRef)(!1),o=(0,cc.useContext)(hb);r=mg(r||(null==o?void 0:o.ref));let a=mA(o||{},{...t,ref:r,register(){n.current=!0,o&&o.register()}});return hD(o,r),(0,cc.useEffect)(()=>{n.current||(n.current=!0)},[]),cd().createElement(hb.Provider,{value:a},e)});let wl=cd().createContext(null);function wu(e){let t=mP(),{portalContainer:r=t?null:document.body,isExiting:n}=e,[o,a]=(0,cc.useState)(!1),i=(0,cc.useMemo)(()=>({contain:o,setContain:a}),[o,a]),{getContainer:s}=wi();if(!e.portalContainer&&s&&(r=s()),!r)return null;let l=e.children;return e.disableFocusManagement||(l=cd().createElement(bc,{restoreFocus:!0,contain:(e.shouldContainFocus||o)&&!n},l)),l=cd().createElement(wl.Provider,{value:i},cd().createElement(ws,null,l)),hR().createPortal(l,r)}let wc=(0,cc.createContext)(null),wd=(0,cc.createContext)(null),wf=(0,cc.forwardRef)(function(e,t){let r=e["aria-labelledby"];[e,t]=mF(e,t,wc);let{dialogProps:n,titleProps:o}=function(e,t){let r,n,{role:o="dialog"}=e,a=mN();a=e["aria-label"]?void 0:a;let i=(0,cc.useRef)(!1);return(0,cc.useEffect)(()=>{if(t.current&&!t.current.contains(document.activeElement)){h4(t.current);let e=setTimeout(()=>{document.activeElement===t.current&&(i.current=!0,t.current&&(t.current.blur(),h4(t.current)),i.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),mv(()=>{null==n||n(!0)},[n=null==(r=(0,cc.useContext)(wl))?void 0:r.setContain]),{dialogProps:{...mq(e,{labelable:!0}),role:o,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||a,onBlur:e=>{i.current&&e.stopPropagation()}},titleProps:{id:a}}}({...e,"aria-labelledby":r},t),a=(0,cc.useContext)(wd);n["aria-label"]||n["aria-labelledby"]||e["aria-labelledby"]&&(n["aria-labelledby"]=e["aria-labelledby"]);let i=mM({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(null==a?void 0:a.close)||(()=>{})}});return cd().createElement("section",{...mq(e),...n,...i,ref:t,slot:e.slot||void 0},cd().createElement(mI,{values:[[gd,{slots:{[m$]:{},title:{...o,level:2}}}],[gu,{slots:{[m$]:{},close:{onPress:()=>null==a?void 0:a.close()}}}]]},i.children))}),wp=(0,cc.createContext)(null),wm=(0,cc.forwardRef)(function(e,t){let r=(0,cc.useContext)(wp);return(null==r?void 0:r.isInvalid)?cd().createElement(wh,{...e,ref:t}):null}),wh=(0,cc.forwardRef)((e,t)=>{let r=(0,cc.useContext)(wp),n=mq(e),o=mM({...e,defaultClassName:"react-aria-FieldError",defaultChildren:0===r.validationErrors.length?void 0:r.validationErrors.join(" "),values:r});return null==o.children?null:cd().createElement(gp,{slot:"errorMessage",...n,...o,ref:t})}),wg=(0,cc.createContext)(null),wy=(0,cc.createContext)({}),wv=gs(function(e,t){[e,t]=mF(e,t,wy);let{elementType:r="label",...n}=e;return cd().createElement(r,{className:"react-aria-Label",...n,ref:t})}),wb=(0,cc.createContext)({placement:"bottom"}),ww=new WeakMap,wE=[];function wx(e,t=-1/0,r=1/0){return Math.min(Math.max(e,t),r)}function wD(e,t){let r=e,n=t.toString(),o=n.indexOf("."),a=o>=0?n.length-o:0;if(a>0){let e=Math.pow(10,a);r=Math.round(r*e)/e}return r}function w_(e,t,r,n){t=Number(t),r=Number(r);let o=(e-(isNaN(t)?0:t))%n,a=wD(2*Math.abs(o)>=n?e+Math.sign(o)*(n-Math.abs(o)):e-o,n);return isNaN(t)?!isNaN(r)&&a>r&&(a=Math.floor(wD(r/n,n))*n):a<t?a=t:!isNaN(r)&&a>r&&(a=t+Math.floor(wD((r-t)/n,n))*n),a=wD(a,n)}let wS={top:"top",bottom:"top",left:"left",right:"left"},wC={top:"bottom",bottom:"top",left:"right",right:"left"},wk={top:"left",left:"top"},wP={top:"height",left:"width"},wO={width:"totalWidth",height:"totalHeight"},wR={},wT="u">typeof document?window.visualViewport:null;function wN(e){var t,r,n,o,a;let i=0,s=0,l=0,u=0,c=0,d=0,f={},p=(null!=(t=null==wT?void 0:wT.scale)?t:1)>1;if("BODY"===e.tagName){let t=document.documentElement;l=t.clientWidth,u=t.clientHeight,i=null!=(r=null==wT?void 0:wT.width)?r:l,s=null!=(n=null==wT?void 0:wT.height)?n:u,f.top=t.scrollTop||e.scrollTop,f.left=t.scrollLeft||e.scrollLeft,wT&&(c=wT.offsetTop,d=wT.offsetLeft)}else({width:i,height:s,top:c,left:d}=wM(e)),f.top=e.scrollTop,f.left=e.scrollLeft,l=i,u=s;return hs()&&("BODY"===e.tagName||"HTML"===e.tagName)&&p&&(f.top=0,f.left=0,c=null!=(o=null==wT?void 0:wT.pageTop)?o:0,d=null!=(a=null==wT?void 0:wT.pageLeft)?a:0),{width:i,height:s,totalWidth:l,totalHeight:u,scroll:f,top:c,left:d}}function wj(e,t,r,n,o,a,i){var s;let l=null!=(s=o.scroll[e])?s:0,u=n[wP[e]],c=n.scroll[wS[e]]+a,d=u+n.scroll[wS[e]]-a,f=t-l+i[e]-n[wS[e]],p=t-l+r+i[e]-n[wS[e]];return f<c?c-f:p>d?Math.max(d-p,c-f):0}function wA(e){if(wR[e])return wR[e];let[t,r]=e.split(" "),n=wS[t]||"right",o=wk[n];wS[r]||(r="center");let a=wP[n],i=wP[o];return wR[e]={placement:t,crossPlacement:r,axis:n,crossAxis:o,size:a,crossSize:i},wR[e]}function w$(e,t,r,n,o,a,i,s,l,u){var c,d,f,p,m;let{placement:h,crossPlacement:g,axis:y,crossAxis:v,size:b,crossSize:w}=n,E={};E[v]=null!=(c=e[v])?c:0,"center"===g?E[v]+=((null!=(d=e[w])?d:0)-(null!=(f=r[w])?f:0))/2:g!==v&&(E[v]+=(null!=(p=e[w])?p:0)-(null!=(m=r[w])?m:0)),E[v]+=a;let x=e[v]-r[w]+l+u,D=e[v]+e[w]-l-u;if(E[v]=wx(E[v],x,D),h===y){let r=s?i[b]:t[wO[b]];E[wC[y]]=Math.floor(r-e[y]+o)}else E[y]=Math.floor(e[y]+e[b]+o);return E}function wI(e,t,r,n,o,a){var i,s,l;let{placement:u,axis:c,size:d}=a;return u===c?Math.max(0,r[c]-e[c]-(null!=(i=e.scroll[c])?i:0)+t[c]-(null!=(s=n[c])?s:0)-n[wC[c]]-o):Math.max(0,e[d]+e[c]+e.scroll[c]-t[c]-r[c]-r[d]-(null!=(l=n[c])?l:0)-n[wC[c]]-o)}function wM(e){let{top:t,left:r,width:n,height:o}=e.getBoundingClientRect(),{scrollTop:a,scrollLeft:i,clientTop:s,clientLeft:l}=document.documentElement;return{top:t+a-s,left:r+i-l,width:n,height:o}}function wL(e,t){let r,n=window.getComputedStyle(e);if("fixed"===n.position){let{top:t,left:n,width:o,height:a}=e.getBoundingClientRect();r={top:t,left:n,width:o,height:a}}else{r=wM(e);let n=wM(t),o=window.getComputedStyle(t);n.top+=(parseInt(o.borderTopWidth,10)||0)-t.scrollTop,n.left+=(parseInt(o.borderLeftWidth,10)||0)-t.scrollLeft,r.top-=n.top,r.left-=n.left}return r.top-=parseInt(n.marginTop,10)||0,r.left-=parseInt(n.marginLeft,10)||0,r}function wF(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 wB=new WeakMap;function wU(e){let{ref:t,box:r,onResize:n}=e;(0,cc.useEffect)(()=>{let e=null==t?void 0:t.current;if(e)if(void 0===window.ResizeObserver)return window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)};else{let t=new window.ResizeObserver(e=>{e.length&&n()});return t.observe(e,{box:r}),()=>{e&&t.unobserve(e)}}},[n,t,r])}let wV="u">typeof document?window.visualViewport:null;function wW(e){var t,r,n;let{direction:o}=gS(),{arrowSize:a=0,targetRef:i,overlayRef:s,scrollRef:l=s,placement:u="bottom",containerPadding:c=12,shouldFlip:d=!0,boundaryElement:f="u">typeof document?document.body:null,offset:p=0,crossOffset:m=0,shouldUpdatePosition:h=!0,isOpen:g=!0,onClose:y,maxHeight:v,arrowBoundaryOffset:b=0}=e,[w,E]=(0,cc.useState)(null),x=[h,u,s.current,i.current,l.current,c,d,f,p,m,g,o,v,b,a],D=(0,cc.useRef)(null==wV?void 0:wV.scale);(0,cc.useEffect)(()=>{g&&(D.current=null==wV?void 0:wV.scale)},[g]);let _=(0,cc.useCallback)(()=>{var e,t,r,n,y,w;if(!1===h||!g||!s.current||!i.current||!f||(null==wV?void 0:wV.scale)!==D.current)return;let x=null;if(l.current&&l.current.contains(document.activeElement)){let n=null==(e=document.activeElement)?void 0:e.getBoundingClientRect(),o=l.current.getBoundingClientRect();(x={type:"top",offset:(null!=(t=null==n?void 0:n.top)?t:0)-o.top}).offset>o.height/2&&(x.type="bottom",x.offset=(null!=(r=null==n?void 0:n.bottom)?r:0)-o.bottom)}let _=s.current;!v&&s.current&&(_.style.top="0px",_.style.bottom="",_.style.maxHeight=(null!=(y=null==(n=window.visualViewport)?void 0:n.height)?y:window.innerHeight)+"px");let S=function(e){var t,r,n,o;let a,{placement:i,targetNode:s,overlayNode:l,scrollNode:u,padding:c,shouldFlip:d,boundaryElement:f,offset:p,crossOffset:m,maxHeight:h,arrowSize:g=0,arrowBoundaryOffset:y=0}=e,v=l instanceof HTMLElement?function(e){let t=e.offsetParent;if(t&&t===document.body&&"static"===window.getComputedStyle(t).position&&!wF(t)&&(t=document.documentElement),null==t)for(t=e.parentElement;t&&!wF(t);)t=t.parentElement;return t||document.documentElement}(l):document.documentElement,b=v===document.documentElement,w=window.getComputedStyle(v).position,E=b?wM(s):wL(s,v);if(!b){let{marginTop:e,marginLeft:t}=window.getComputedStyle(s);E.top+=parseInt(e,10)||0,E.left+=parseInt(t,10)||0}let x=wM(l),D={top:parseInt((a=window.getComputedStyle(l)).marginTop,10)||0,bottom:parseInt(a.marginBottom,10)||0,left:parseInt(a.marginLeft,10)||0,right:parseInt(a.marginRight,10)||0};x.width+=(null!=(t=D.left)?t:0)+(null!=(r=D.right)?r:0),x.height+=(null!=(n=D.top)?n:0)+(null!=(o=D.bottom)?o:0);let _={top:u.scrollTop,left:u.scrollLeft,width:u.scrollWidth,height:u.scrollHeight},S=wN(f),C=wN(v),k="BODY"===f.tagName?wM(v):wL(v,f);return"HTML"===v.tagName&&"BODY"===f.tagName&&(C.scroll.top=0,C.scroll.left=0),function(e,t,r,n,o,a,i,s,l,u,c,d,f,p,m,h){var g,y,v,b,w,E,x,D,_,S,C,k,P,O;let R,T,N,j=wA(e),{size:A,crossAxis:$,crossSize:I,placement:M,crossPlacement:L}=j,F=w$(t,s,r,j,c,d,u,f,m,h),B=c,U=wI(s,u,t,o,a+c,j);if(i&&n[A]>U){let e=wA(`${wC[M]} ${L}`),n=w$(t,s,r,e,c,d,u,f,m,h);wI(s,u,t,o,a+c,e)>U&&(j=e,F=n,B=c)}let V="bottom";"top"===j.axis?"top"===j.placement?V="top":"bottom"===j.placement&&(V="bottom"):"top"===j.crossAxis&&("top"===j.crossPlacement?V="bottom":"bottom"===j.crossPlacement&&(V="top"));let W=wj($,F[$],r[I],s,l,a,u);F[$]+=W;let H=(w=F,E=r.height,x=V,R=f?u.height:s[wO.height],T=null!=w.top?u.top+w.top:u.top+(R-(null!=(D=w.bottom)?D:0)-E),N="top"!==x?Math.max(0,s.height+s.top+(null!=(_=s.scroll.top)?_:0)-T-((null!=(S=o.top)?S:0)+(null!=(C=o.bottom)?C:0)+a)):Math.max(0,T+E-(s.top+(null!=(k=s.scroll.top)?k:0))-((null!=(P=o.top)?P:0)+(null!=(O=o.bottom)?O:0)+a)),Math.min(s.height-2*a,N));p&&p<H&&(H=p),r.height=Math.min(r.height,H),W=wj($,(F=w$(t,s,r,j,B,d,u,f,m,h))[$],r[I],s,l,a,u),F[$]+=W;let z={},K=t[$]+.5*t[I]-F[$]-o[wS[$]],G=m/2+h,Z="left"===wS[$]?(null!=(g=o.left)?g:0)+(null!=(y=o.right)?y:0):(null!=(v=o.top)?v:0)+(null!=(b=o.bottom)?b:0),Y=r[I]-Z-m/2-h,q=wx(K,t[$]+m/2-(F[$]+o[wS[$]]),t[$]+t[I]-m/2-(F[$]+o[wS[$]]));return z[$]=wx(q,G,Y),{position:F,maxHeight:H,arrowOffsetLeft:z.left,arrowOffsetTop:z.top,placement:j.placement}}(i,E,x,_,D,c,d,S,C,k,p,m,!!w&&"static"!==w,h,g,y)}({placement:(w=u,"rtl"===o?w.replace("start","right").replace("end","left"):w.replace("start","left").replace("end","right")),overlayNode:s.current,targetNode:i.current,scrollNode:l.current||s.current,padding:c,shouldFlip:d,boundaryElement:f,offset:p,crossOffset:m,maxHeight:v,arrowSize:a,arrowBoundaryOffset:b});if(S.position){if(_.style.top="",_.style.bottom="",_.style.left="",_.style.right="",Object.keys(S.position).forEach(e=>_.style[e]=S.position[e]+"px"),_.style.maxHeight=null!=S.maxHeight?S.maxHeight+"px":"",x&&document.activeElement&&l.current){let e=document.activeElement.getBoundingClientRect(),t=l.current.getBoundingClientRect(),r=e[x.type]-t[x.type];l.current.scrollTop+=r-x.offset}E(S)}},x);mv(_,x),mv(()=>(window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)}),[n=_]),wU({ref:s,onResize:_}),wU({ref:i,onResize:_});let S=(0,cc.useRef)(!1);mv(()=>{let e,t=()=>{S.current=!0,clearTimeout(e),e=setTimeout(()=>{S.current=!1},500),_()},r=()=>{S.current&&t()};return null==wV||wV.addEventListener("resize",t),null==wV||wV.addEventListener("scroll",r),()=>{null==wV||wV.removeEventListener("resize",t),null==wV||wV.removeEventListener("scroll",r)}},[_]);let C=(0,cc.useCallback)(()=>{S.current||null==y||y()},[y,S]);return!function(e){let{triggerRef:t,isOpen:r,onClose:n}=e;(0,cc.useEffect)(()=>{if(!r||null===n)return;let e=e=>{let r=e.target;if(!t.current||r instanceof Node&&!r.contains(t.current)||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)return;let o=n||wB.get(t.current);o&&o()};return window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("scroll",e,!0)}},[r,n,t])}({triggerRef:i,isOpen:g,onClose:y&&C}),{overlayProps:{style:{position:"absolute",zIndex:1e5,...null==w?void 0:w.position,maxHeight:null!=(t=null==w?void 0:w.maxHeight)?t:"100vh"}},placement:null!=(r=null==w?void 0:w.placement)?r:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:null==w?void 0:w.arrowOffsetLeft,top:null==w?void 0:w.arrowOffsetTop}},updatePosition:_}}function wH(e,t){if(e.button>0)return!1;if(e.target){let t=e.target.ownerDocument;if(!t||!t.documentElement.contains(e.target)||e.target.closest("[data-react-aria-top-layer]"))return!1}return!!t.current&&!e.composedPath().includes(t.current)}let wz=[],wK="u">typeof document&&window.visualViewport,wG=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),wZ=0;function wY(e,t,r){let n=e.style[t];return e.style[t]=r,()=>{e.style[t]=n}}function wq(e,t,r,n){return e.addEventListener(t,r,n),()=>{e.removeEventListener(t,r,n)}}function wJ(e){let t=document.scrollingElement||document.documentElement,r=e;for(;r&&r!==t;){let e=y8(r);if(e!==document.documentElement&&e!==document.body&&e!==r){let t=e.getBoundingClientRect().top,n=r.getBoundingClientRect().top;n>t+r.clientHeight&&(e.scrollTop+=n-t)}r=e.parentElement}}var wX={};function wQ(e){var t;let{onDismiss:r,...n}=e,o=yJ(n,y$((t=wX)&&t.__esModule?t.default:t,"@react-aria/overlays").format("dismiss"));return cd().createElement(y0,null,cd().createElement("button",{...o,tabIndex:-1,onClick:()=>{r&&r()},style:{width:1,height:1}}))}function w0(e,t=!0){let[r,n]=(0,cc.useState)(!0),o=r&&t;return mv(()=>{if(o&&e.current&&"getAnimations"in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,o]),w2(e,o,(0,cc.useCallback)(()=>n(!1),[])),o}function w1(e,t){let[r,n]=(0,cc.useState)(t?"open":"closed");switch(r){case"open":t||n("exiting");break;case"closed":case"exiting":t&&n("open")}let o="exiting"===r;return w2(e,o,(0,cc.useCallback)(()=>{n(e=>"exiting"===e?"closed":e)},[])),o}function w2(e,t,r){mv(()=>{if(t&&e.current){if(!("getAnimations"in e.current))return void r();let t=e.current.getAnimations();if(0===t.length)return void r();let n=!1;return Promise.all(t.map(e=>e.finished)).then(()=>{n||(0,hO.flushSync)(()=>{r()})}).catch(()=>{}),()=>{n=!0}}},[e,t,r])}function w4(e){let[t,r]=vZ(e.isOpen,e.defaultOpen||!1,e.onOpenChange),n=(0,cc.useCallback)(()=>{r(!0)},[r]),o=(0,cc.useCallback)(()=>{r(!1)},[r]),a=(0,cc.useCallback)(()=>{r(!t)},[r,t]);return{isOpen:t,setOpen:r,open:n,close:o,toggle:a}}wX={"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 w3=(0,cc.createContext)(null),w6=(0,cc.createContext)(null),w5=(0,cc.forwardRef)(function(e,t){[e,t]=mF(e,t,w3);let r=(0,cc.useContext)(wd),n=w4(e),o=null==e.isOpen&&null==e.defaultOpen&&r?r:n,a=w1(t,o.isOpen)||e.isExiting||!1,i=(0,cc.useContext)(gi),{direction:s}=gS();if(i){let t=e.children;return"function"==typeof t&&(t=t({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),cd().createElement(cd().Fragment,null,t)}return!o||o.isOpen||a?cd().createElement(w9,{...e,triggerRef:e.triggerRef,state:o,popoverRef:t,isExiting:a,dir:s}):null});function w9({state:e,isExiting:t,UNSTABLE_portalContainer:r,...n}){var o,a;let i=(0,cc.useRef)(null),[s,l]=(0,cc.useState)(0),u=(0,cc.useRef)(null),d=(0,cc.useContext)(w6),f=d&&"SubmenuTrigger"===n.trigger;mv(()=>{i.current&&e.isOpen&&l(i.current.getBoundingClientRect().width)},[e.isOpen,i]);let{popoverProps:p,underlayProps:m,arrowProps:h,placement:g}=function(e,t){let{triggerRef:r,popoverRef:n,groupRef:o,isNonModal:a,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:s,...l}=e,u="SubmenuTrigger"===l.trigger,{overlayProps:d,underlayProps:f}=function(e,t){let{onClose:r,shouldCloseOnBlur:n,isOpen:o,isDismissable:a=!1,isKeyboardDismissDisabled:i=!1,shouldCloseOnInteractOutside:s}=e;(0,cc.useEffect)(()=>{if(o&&!wz.includes(t))return wz.push(t),()=>{let e=wz.indexOf(t);e>=0&&wz.splice(e,1)}},[o,t]);let l=()=>{wz[wz.length-1]===t&&r&&r()};!function(e){let{ref:t,onInteractOutside:r,isDisabled:n,onInteractOutsideStart:o}=e,a=(0,cc.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),i=mb(e=>{r&&wH(e,t)&&(o&&o(e),a.current.isPointerDown=!0)}),s=mb(e=>{r&&r(e)});(0,cc.useEffect)(()=>{let e=a.current;if(n)return;let r=m2(t.current);if("u">typeof PointerEvent){let n=r=>{e.isPointerDown&&wH(r,t)&&s(r),e.isPointerDown=!1};return r.addEventListener("pointerdown",i,!0),r.addEventListener("pointerup",n,!0),()=>{r.removeEventListener("pointerdown",i,!0),r.removeEventListener("pointerup",n,!0)}}},[t,n,i,s])}({ref:t,onInteractOutside:a&&o?e=>{(!s||s(e.target))&&(wz[wz.length-1]===t&&(e.stopPropagation(),e.preventDefault()),l())}:void 0,onInteractOutsideStart:e=>{(!s||s(e.target))&&wz[wz.length-1]===t&&(e.stopPropagation(),e.preventDefault())}});let{focusWithinProps:u}=h7({isDisabled:!n,onBlurWithin:e=>{!(!e.relatedTarget||bm(e.relatedTarget,bu))&&(!s||s(e.relatedTarget))&&(null==r||r())}});return{overlayProps:{onKeyDown:e=>{"Escape"!==e.key||i||e.nativeEvent.isComposing||(e.stopPropagation(),e.preventDefault(),l())},...u},underlayProps:{onPointerDown:e=>{e.target===e.currentTarget&&e.preventDefault()}}}}({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!a||u,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:s},null!=o?o:n),{overlayProps:p,arrowProps:m,placement:h}=wW({...l,targetRef:r,overlayRef:n,isOpen:t.isOpen,onClose:a&&!u?t.close:null});return!function(e={}){let{isDisabled:t}=e;mv(()=>{if(!t){let e,t,r,n;return 1==++wZ&&(c=hi()?(r=null,n=my(wq(document,"touchstart",r=>{((e=y8(r.target,!0))!==document.documentElement||e!==document.body)&&e instanceof HTMLElement&&"auto"===window.getComputedStyle(e).overscrollBehavior&&(t=wY(e,"overscrollBehavior","contain"))},{passive:!1,capture:!0}),wq(document,"touchmove",t=>{e&&e!==document.documentElement&&e!==document.body?e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&t.preventDefault():t.preventDefault()},{passive:!1,capture:!0}),wq(document,"touchend",()=>{t&&t()},{passive:!1,capture:!0}),wq(document,"focus",e=>{var t;let n=e.target;((t=n)instanceof HTMLInputElement&&!wG.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable)&&((()=>{if(r)return;let e=window.pageXOffset,t=window.pageYOffset;r=my(wq(window,"scroll",()=>{window.scrollTo(0,0)}),wY(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),wY(document.documentElement,"overflow","hidden"),wY(document.body,"marginTop",`-${t}px`),()=>{window.scrollTo(e,t)}),window.scrollTo(0,0)})(),n.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{n.style.transform="",wK&&(wK.height<window.innerHeight?requestAnimationFrame(()=>{wJ(n)}):wK.addEventListener("resize",()=>wJ(n),{once:!0}))}))},!0)),()=>{null==t||t(),null==r||r(),n()}):my(wY(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),wY(document.documentElement,"overflow","hidden"))),()=>{0==--wZ&&c()}}},[t])}({isDisabled:a||!t.isOpen}),mv(()=>{if(t.isOpen&&n.current){if(!a)return function(e,t=document.body){let r=new Set(e),n=new Set,o=e=>{for(let t of e.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))r.add(t);let t=e=>{if(r.has(e)||e.parentElement&&n.has(e.parentElement)&&"row"!==e.parentElement.getAttribute("role"))return NodeFilter.FILTER_REJECT;for(let t of r)if(e.contains(t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),i=t(e);if(i===NodeFilter.FILTER_ACCEPT&&a(e),i!==NodeFilter.FILTER_REJECT){let e=o.nextNode();for(;null!=e;)a(e),e=o.nextNode()}},a=e=>{var t;let r=null!=(t=ww.get(e))?t:0;("true"!==e.getAttribute("aria-hidden")||0!==r)&&(0===r&&e.setAttribute("aria-hidden","true"),n.add(e),ww.set(e,r+1))};wE.length&&wE[wE.length-1].disconnect(),o(t);let i=new MutationObserver(e=>{for(let t of e)if("childList"===t.type&&0!==t.addedNodes.length&&![...r,...n].some(e=>e.contains(t.target))){for(let e of t.removedNodes)e instanceof Element&&(r.delete(e),n.delete(e));for(let e of t.addedNodes)(e instanceof HTMLElement||e instanceof SVGElement)&&("true"===e.dataset.liveAnnouncer||"true"===e.dataset.reactAriaTopLayer)?r.add(e):e instanceof Element&&o(e)}});i.observe(t,{childList:!0,subtree:!0});let s={visibleNodes:r,hiddenNodes:n,observe(){i.observe(t,{childList:!0,subtree:!0})},disconnect(){i.disconnect()}};return wE.push(s),()=>{for(let e of(i.disconnect(),n)){let t=ww.get(e);null!=t&&(1===t?(e.removeAttribute("aria-hidden"),ww.delete(e)):ww.set(e,t-1))}s===wE[wE.length-1]?(wE.pop(),wE.length&&wE[wE.length-1].observe()):wE.splice(wE.indexOf(s),1)}}([null!=(r=null==o?void 0:o.current)?r:n.current]);var e,r,i=null!=(e=null==o?void 0:o.current)?e:n.current;let t=wE[wE.length-1];return t&&!t.visibleNodes.has(i)?(t.visibleNodes.add(i),()=>{t.visibleNodes.delete(i)}):void 0}},[a,t.isOpen,n,o]),{popoverProps:mA(d,p),arrowProps:m,underlayProps:f,placement:h}}({...n,offset:null!=(o=n.offset)?o:8,arrowSize:s,groupRef:f?d:u},e),y=n.popoverRef,v=w0(y,!!g)||n.isEntering||!1,b=mM({...n,defaultClassName:"react-aria-Popover",values:{trigger:n.trigger||null,placement:g,isEntering:v,isExiting:t}}),w=!n.isNonModal||"SubmenuTrigger"===n.trigger,[E,x]=(0,cc.useState)(!1);mv(()=>{y.current&&x(w&&!y.current.querySelector("[role=dialog]"))},[y,w]),(0,cc.useEffect)(()=>{E&&y.current&&!y.current.contains(document.activeElement)&&h4(y.current)},[E,y]);let D={...p.style,...b.style},_=cd().createElement("div",{...mA(mq(n),p),...b,role:E?"dialog":void 0,tabIndex:E?-1:void 0,"aria-label":n["aria-label"],"aria-labelledby":n["aria-labelledby"],ref:y,slot:n.slot||void 0,style:D,dir:n.dir,"data-trigger":n.trigger,"data-placement":g,"data-entering":v||void 0,"data-exiting":t||void 0},!n.isNonModal&&cd().createElement(wQ,{onDismiss:e.close}),cd().createElement(wb.Provider,{value:{...h,placement:g,ref:i}},b.children),cd().createElement(wQ,{onDismiss:e.close}));return f?cd().createElement(wu,{...n,shouldContainFocus:E,isExiting:t,portalContainer:null!=(a=null!=r?r:null==d?void 0:d.current)?a:void 0},_):cd().createElement(wu,{...n,shouldContainFocus:E,isExiting:t,portalContainer:r},!n.isNonModal&&e.isOpen&&cd().createElement("div",{"data-testid":"underlay",...m,style:{position:"fixed",inset:0}}),cd().createElement("div",{ref:u,style:{display:"contents"}},cd().createElement(w6.Provider,{value:u},_)))}function w8(e){return(null==e?void 0:e.start)!=null&&null!=e.end}let w7=(0,cc.createContext)(null),Ee=(0,cc.createContext)(null),Et=(0,cc.createContext)(null),Er=(0,cc.createContext)(null),En=(0,cc.forwardRef)(function(e,t){var r,n;[e,t]=mF(e,t,w7);let{validationBehavior:o}=mL(wg)||{},a=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",i=function(e){var t;let r=w4(e),[n,o]=vZ(e.value,e.defaultValue||null,e.onChange),a=n||e.placeholderValue||null,[i,s]=b2(a,e.granularity),l=null!=n?n.toDate(null!=s?s:"UTC"):null,u="hour"===i||"minute"===i||"second"===i,c=null==(t=e.shouldCloseOnSelect)||t,[d,f]=(0,cc.useState)(null),[p,m]=(0,cc.useState)(null);if(n&&(d=n,"hour"in n&&(p=n)),a&&!(i in a))throw Error("Invalid granularity "+i+" for value "+a.toString());let h=(null==n?void 0:n.calendar.identifier)==="gregory"&&"BC"===n.era,g=(0,cc.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,cc.useMemo)(()=>bY(n,y,v,b,g),[n,y,v,b,g]),E=bV({...e,value:n,builtinValidation:w}),x=E.displayValidation.isInvalid,D=e.validationState||(x?"invalid":null),_=(e,t)=>{o("timeZone"in t?t.set(yi(e)):ys(e,t)),f(null),m(null),E.commitValidation()};return{...E,value:n,setValue:o,dateValue:d,timeValue:p,setDateValue:t=>{let n="function"==typeof c?c():c;u?p||n?_(t,p||bQ(e.defaultValue||e.placeholderValue)):f(t):(o(t),E.commitValidation()),n&&r.setOpen(!1)},setTimeValue:e=>{d&&e?_(d,e):m(e)},granularity:i,hasTime:u,...r,setOpen(t){!t&&!n&&d&&u&&_(d,p||bQ(e.defaultValue||e.placeholderValue)),r.setOpen(t)},validationState:D,isInvalid:x,formatValue:(e,t)=>l?new yM(e,bX(t,g)).format(l):"",getDateFormatter:(e,t)=>new yM(e,bX({},{...g,...t}))}}({...e,validationBehavior:a}),s=(0,cc.useRef)(null),[l,u]=mB(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,fieldProps:f,buttonProps:p,dialogProps:m,calendarProps:h,descriptionProps:g,errorMessageProps:y,...v}=function(e,t,r){var n;let o=mT(),a=mT(),i=mT(),s=y$((n=bi)&&n.__esModule?n.default:n,"@react-aria/datepicker"),{isInvalid:l,validationErrors:u,validationDetails:c}=t.displayValidation,{labelProps:d,fieldProps:f,descriptionProps:p,errorMessageProps:m}=bR({...e,labelElementType:"span",isInvalid:l,errorMessage:e.errorMessage||u}),h=bk(t,r),g=f["aria-labelledby"]||f.id,{locale:y}=gS(),v=t.formatValue(y,{month:"long"}),b=y3(v?s.format("selectedDateDescription",{date:v}):""),w=[b["aria-describedby"],f["aria-describedby"]].filter(Boolean).join(" ")||void 0,E=mq(e),x=(0,cc.useMemo)(()=>bx(r),[r]),D=(0,cc.useRef)(!1),{focusWithinProps:_}=h7({...e,isDisabled:t.isOpen,onBlurWithin:t=>{let r=document.getElementById(a);if(!(null==r?void 0:r.contains(t.relatedTarget))){var n,o;D.current=!1,null==(n=e.onBlur)||n.call(e,t),null==(o=e.onFocusChange)||o.call(e,!1)}},onFocusWithin:t=>{if(!D.current){var r,n;D.current=!0,null==(r=e.onFocus)||r.call(e,t),null==(n=e.onFocusChange)||n.call(e,!0)}}});return{groupProps:mA(E,h,f,b,_,{role:"group","aria-disabled":e.isDisabled||null,"aria-labelledby":g,"aria-describedby":w,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...d,onClick:()=>{x.focusFirst()}},fieldProps:{...f,id:i,[bj]:"presentation","aria-describedby":w,value:t.value,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,[bU]:t,autoFocus:e.autoFocus,name:e.name},descriptionProps:p,errorMessageProps:m,buttonProps:{...b,id:o,"aria-haspopup":"dialog","aria-label":s.format("calendar"),"aria-labelledby":`${o} ${g}`,"aria-describedby":w,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:a,"aria-labelledby":`${o} ${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(" ")},isInvalid:l,validationErrors:u,validationDetails:c}}({...mU(e),label:u,validationBehavior:a},i,s),[b,w]=(0,cc.useState)(null),E=(0,cc.useCallback)(()=>{s.current&&w(s.current.offsetWidth+"px")},[]);wU({ref:s,onResize:E});let{focusProps:x,isFocused:D,isFocusVisible:_}=ge({within:!0}),S=mM({...e,values:{state:i,isFocusWithin:D,isFocusVisible:_,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DatePicker"}),C=mq(e);return delete C.id,cd().createElement(mI,{values:[[Et,i],[br,{...c,ref:s,isInvalid:i.isInvalid}],[b7,f],[gu,{...p,isPressed:i.isOpen}],[wy,{...d,ref:l,elementType:"span"}],[v0,h],[wd,i],[w3,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":b}}],[wc,m],[gf,{slots:{description:g,errorMessage:y}}],[wp,v]]},cd().createElement("div",{...x,...C,...S,ref:t,slot:e.slot||void 0,"data-focus-within":D||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}))}),Eo=(0,cc.forwardRef)(function(e,t){var r,n;[e,t]=mF(e,t,Ee);let{validationBehavior:o}=mL(wg)||{},a=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",i=function(e){var t,r,n;let o=w4(e),[a,i]=vZ(e.value,e.defaultValue||null,e.onChange),[s,l]=(0,cc.useState)(()=>a||{start:null,end:null});null==a&&s.start&&s.end&&l(s={start:null,end:null});let u=a||s,c=e=>{l(e||{start:null,end:null}),w8(e)?i(e):i(null)},[d,f]=b2((null==u?void 0:u.start)||(null==u?void 0:u.end)||e.placeholderValue||null,e.granularity),p="hour"===d||"minute"===d||"second"===d,m=null==(n=e.shouldCloseOnSelect)||n,[h,g]=(0,cc.useState)(null),[y,v]=(0,cc.useState)(null);u&&w8(u)&&(h=u,"hour"in u.start&&(y=u));let b=(e,t)=>{c({start:"timeZone"in t.start?t.start.set(yi(e.start)):ys(e.start,t.start),end:"timeZone"in t.end?t.end.set(yi(e.end)):ys(e.end,t.end)}),g(null),v(null),P.commitValidation()},w=t=>{let r="function"==typeof m?m():m;p?w8(t)&&(null==y?void 0:y.start)&&(null==y?void 0:y.end)?b(t,{start:(null==y?void 0:y.start)||bQ(e.placeholderValue),end:(null==y?void 0:y.end)||bQ(e.placeholderValue)}):g(t):w8(t)?(c(t),P.commitValidation()):g(t),r&&o.setOpen(!1)},E=e=>{w8(h)&&w8(e)?b(h,e):v(e)},x=(null==u||null==(t=u.start)?void 0:t.calendar.identifier)==="gregory"&&"BC"===u.start.era||(null==u||null==(r=u.end)?void 0:r.calendar.identifier)==="gregory"&&"BC"===u.end.era,D=(0,cc.useMemo)(()=>({granularity:d,timeZone:f,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:x}),[d,e.hourCycle,e.shouldForceLeadingZeros,f,e.hideTimeZone,x]),{minValue:_,maxValue:S,isDateUnavailable:C}=e,k=(0,cc.useMemo)(()=>{var e,t;let r;return r=bK(bY(null!=(e=null==u?void 0:u.start)?e:null,_,S,C,D),bY(null!=(t=null==u?void 0:u.end)?t:null,_,S,C,D)),(null==u?void 0:u.end)!=null&&null!=u.start&&0>u.end.compare(u.start)&&(r=bK(r,{isInvalid:!0,validationErrors:[(yO.getGlobalDictionaryForPackage("@react-stately/datepicker")||bG).getStringForLocale("rangeReversed",bZ())],validationDetails:{...bM,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),r},[u,_,S,C,D]),P=bV({...e,value:a,name:(0,cc.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:k}),O=P.displayValidation.isInvalid,R=e.validationState||(O?"invalid":null);return{...P,value:u,setValue:c,dateRange:h,timeRange:y,granularity:d,hasTime:p,setDate(e,t){var r,n;"start"===e?w({start:t,end:null!=(r=null==h?void 0:h.end)?r:null}):w({start:null!=(n=null==h?void 0:h.start)?n:null,end:t})},setTime(e,t){var r,n;"start"===e?E({start:t,end:null!=(r=null==y?void 0:y.end)?r:null}):E({start:null!=(n=null==y?void 0:y.start)?n:null,end:t})},setDateTime(e,t){var r,n;"start"===e?c({start:t,end:null!=(r=null==u?void 0:u.end)?r:null}):c({start:null!=(n=null==u?void 0:u.start)?n:null,end:t})},setDateRange:w,setTimeRange:E,...o,setOpen(t){!t&&!((null==u?void 0:u.start)&&(null==u?void 0:u.end))&&w8(h)&&p&&b(h,{start:(null==y?void 0:y.start)||bQ(e.placeholderValue),end:(null==y?void 0:y.end)||bQ(e.placeholderValue)}),o.setOpen(t)},validationState:R,isInvalid:O,formatValue(t,r){let n;if(!u||!u.start||!u.end)return null;let o="timeZone"in u.start?u.start.timeZone:void 0,a=e.granularity||(u.start&&"minute"in u.start?"minute":"day"),i="timeZone"in u.end?u.end.timeZone:void 0,s=e.granularity||(u.end&&"minute"in u.end?"minute":"day"),l=bX(r,{granularity:a,timeZone:o,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:"gregory"===u.start.calendar.identifier&&"BC"===u.start.era||"gregory"===u.end.calendar.identifier&&"BC"===u.end.era}),c=u.start.toDate(o||"UTC"),d=u.end.toDate(i||"UTC"),f=new yM(t,l);if(o===i&&a===s&&0!==u.start.compare(u.end)){try{let e=f.formatRangeToParts(c,d),t=-1;for(let r=0;r<e.length;r++){let n=e[r];if("shared"===n.source&&"literal"===n.type)t=r;else if("endRange"===n.source)break}let r="",n="";for(let o=0;o<e.length;o++)o<t?r+=e[o].value:o>t&&(n+=e[o].value);return{start:r,end:n}}catch{}n=f}else n=new yM(t,bX(r,{granularity:s,timeZone:i,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:f.format(c),end:n.format(d)}},getDateFormatter:(e,t)=>new yM(e,bX({},{...D,...t}))}}({...e,validationBehavior:a}),s=(0,cc.useRef)(null),[l,u]=mB(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,startFieldProps:f,endFieldProps:p,buttonProps:m,dialogProps:h,calendarProps:g,descriptionProps:y,errorMessageProps:v,...b}=function(e,t,r){var n,o,a,i,s,l;let u=y$((l=bi)&&l.__esModule?l.default:l,"@react-aria/datepicker"),{isInvalid:c,validationErrors:d,validationDetails:f}=t.displayValidation,{labelProps:p,fieldProps:m,descriptionProps:h,errorMessageProps:g}=bR({...e,labelElementType:"span",isInvalid:c,errorMessage:e.errorMessage||d}),y=m["aria-labelledby"]||m.id,{locale:v}=gS(),b=t.formatValue(v,{month:"long"}),w=y3(b?u.format("selectedRangeDescription",{startDate:b.start,endDate:b.end}):""),E={"aria-label":u.format("startDate"),"aria-labelledby":y},x={"aria-label":u.format("endDate"),"aria-labelledby":y},D=mT(),_=mT(),S=bk(t,r),C=[w["aria-describedby"],m["aria-describedby"]].filter(Boolean).join(" ")||void 0,k=(0,cc.useMemo)(()=>bx(r,{accept:e=>e.id!==D}),[r,D]),P={[bA]:k,[bj]:"presentation","aria-describedby":C,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},O=mq(e),R=(0,cc.useRef)(!1),{focusWithinProps:T}=h7({...e,isDisabled:t.isOpen,onBlurWithin:t=>{let r=document.getElementById(_);if(!(null==r?void 0:r.contains(t.relatedTarget))){var n,o;R.current=!1,null==(n=e.onBlur)||n.call(e,t),null==(o=e.onFocusChange)||o.call(e,!1)}},onFocusWithin:t=>{if(!R.current){var r,n;R.current=!0,null==(r=e.onFocus)||r.call(e,t),null==(n=e.onFocusChange)||n.call(e,!0)}}}),N=(0,cc.useRef)(bF),j=(0,cc.useRef)(bF);return{groupProps:mA(O,S,m,w,T,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":C,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...p,onClick:()=>{k.focusFirst()}},buttonProps:{...w,id:D,"aria-haspopup":"dialog","aria-label":u.format("calendar"),"aria-labelledby":`${D} ${y}`,"aria-describedby":C,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:_,"aria-labelledby":`${D} ${y}`},startFieldProps:{...E,...P,value:null!=(i=null==(n=t.value)?void 0:n.start)?i:null,onChange:e=>t.setDateTime("start",e),autoFocus:e.autoFocus,name:e.startName,[bU]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){N.current=e,t.updateValidation(bK(e,j.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...x,...P,value:null!=(s=null==(o=t.value)?void 0:o.end)?s:null,onChange:e=>t.setDateTime("end",e),name:e.endName,[bU]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){j.current=e,t.updateValidation(bK(N.current,e))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:h,errorMessageProps:g,calendarProps:{autoFocus:!0,value:(null==(a=t.dateRange)?void 0:a.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(" ")},isInvalid:c,validationErrors:d,validationDetails:f}}({...mU(e),label:u,validationBehavior:a},i,s),[w,E]=(0,cc.useState)(null),x=(0,cc.useCallback)(()=>{s.current&&E(s.current.offsetWidth+"px")},[]);wU({ref:s,onResize:x});let{focusProps:D,isFocused:_,isFocusVisible:S}=ge({within:!0}),C=mM({...e,values:{state:i,isFocusWithin:_,isFocusVisible:S,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DateRangePicker"}),k=mq(e);return delete k.id,cd().createElement(mI,{values:[[Er,i],[br,{...c,ref:s,isInvalid:i.isInvalid}],[gu,{...m,isPressed:i.isOpen}],[wy,{...d,ref:l,elementType:"span"}],[v1,g],[wd,i],[w3,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":w}}],[wc,h],[b7,{slots:{start:f,end:p}}],[gf,{slots:{description:y,errorMessage:v}}],[wp,b]]},cd().createElement("div",{...D,...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 Ea(e){return cd().createElement(g_,e)}function Ei(e,t,r=!1){if(null==e)return r?e:void 0;if("string"==typeof e&&!e)return r?null:void 0;if(e instanceof g1||e instanceof g6||e instanceof g9)return t?yl(e,t):e;{let r=d1()(e).toDate(),n=new g1(r.getFullYear(),r.getMonth()+1,r.getDate());return t?yl(n,t):n}}function Es(e){if(e)return e.toDate(yw())}function El(e){if("string"==typeof e&&0!==e.trim().length)try{return new Intl.Locale(e.replace(/[_@]/g,"-")).toString()}catch{return}}function Eu(e){let t=e??"",r=El(t);if(!r)return t;try{return new Intl.DisplayNames([r],{type:"language"}).of(r)??t}catch{return t}}function Ec(){let e=window.i18next.language,t=El(e)??e;return"ht"===t&&(t="fr-HT"),t}if("u">typeof navigator){let e=navigator;ei=Array.isArray(e.languages)?e.languages[0]:e.language}else if("u">typeof process){let e=process.env;ei=e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}var Ed=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch(e){return"en-US"}}(ei||"en-US"),Ef=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},Ep={};for(let e=1;e<100;e++)Ep[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var Em={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},Eh="[1234567890一二三四五六七八九〇\\d]",Eg={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},Ey={},Ev={"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},Eb={zone:Ev,year:Ep,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:{}},Ew={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(Ev).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,}"},EE={...Ew,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}"},Ex={},ED=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(t=Ed){return Ex[t.toLowerCase()]||(Ex[t.toLowerCase()]=new e(t)),Ex[t.toLowerCase()]}constructor(e=Ed){this.locale=e,this.lookups={...Eb},this.vars={...Ew};const 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 r=0;r<e.length;r++)t+=String(this.lookups.digit[e[r]]);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 r=this.lookups.meridiem[t?.toLowerCase()]||0,n=this.toInt(e);return n<12&&12===r&&(n+=12),12===n&&0===r&&(n=0),n}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,r,n]=t;return("-"===e||"−"===e?-1:1)*(60*this.toInt(r)+this.toInt(n||0))}return 0}build(){"latn"===this.dateOptions.numberingSystem?this.lookups.digit=Eg: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(Ey[e])return Ey[e];if("fullwide"===e||"hanidec"===e)return{group:Eh,lookup:{...Eg}};let t=Em[e];if(!t)return{group:"\\d",lookup:{...Eg}};let r=String.fromCharCode(t),n=String.fromCharCode(t+9),o={};for(let e=0;e<10;e++)o[String.fromCharCode(t+e)]=e;return Ey[e]={group:`[${r}-${n}]`,lookup:o},Ey[e]}(this.numberingSystem);for(let r in this.lookups.digit=t,EE)EE.hasOwnProperty(r)&&(this.vars[r]=EE[r].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((r,n)=>{["","k","kuu","kuuta"].forEach((o,a)=>{e[r+o+(a<2?"\\.?":"")]=!0,t[r+o]=n+1})});else{let r=[],n=e=>"month"===e.type;for(let e=0;e<12;e++)r.push(new Date(2017,e,1));for(let o of["full","long","medium"]){let a=Intl.DateTimeFormat(this.locale,{dateStyle:o});for(let i=0;i<12;i++){let s=a.formatToParts(r[i]).find(n).value.toLocaleLowerCase(this.locale);/^\d+$/.test(s)||(/^ko/i.test(this.locale)&&(s+="월"),"medium"===o?(s=s.replace(/\.$/,""),e[`${s}\\.?`]=!0):e[s]=!0,t[s]=i+1)}}let o=Intl.DateTimeFormat(this.locale,{month:"short"});for(let a=0;a<12;a++){let i=o.formatToParts(r[a]).find(n).value.toLocaleLowerCase(this.locale);i=i.replace(/\.$/,""),e[`${i}\\.?`]=!0,t[i]=a+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 r=[],n={};for(let o of["long","short"]){let a=Intl.DateTimeFormat(this.locale,{weekday:o});for(let i=0;i<7;i++){let s=a.formatToParts(e[i]).find(t).value.toLocaleLowerCase(this.locale);"short"===o?(s=s.replace(/\.$/,""),r.push(`${s}\\.?`)):r.push(s),n[s]=i}}this.vars.DAYNAME=r.join("|"),this.lookups.dayname=n}buildMeridiems(){let e=[new Date(2017,0,1),new Date(2017,0,1,23,0,0)],t=e=>"dayPeriod"===e.type,r=[],n={},o=Intl.DateTimeFormat(this.locale,{timeStyle:"long"});for(let a=0;a<2;a++){let i=o.formatToParts(e[a]).find(t);if(!i)return;let s=i.value.toLocaleLowerCase(this.locale);r.push(s),n[s]=12*a}this.vars.MERIDIEM=r.join("|"),this.lookups.meridiem=n}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")}},E_=["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"],ES={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},EC=()=>new Date;function Ek(e){return function(t){let r={};for(let n=0,o=e.length;n<o;n++){let o=e[n];o&&(r[o]=t[n])}return r}}var EP=class{doneChecker;fallback;patterns;formatter;constructor({doneChecker:e,fallback:t,patterns:r,formatter:n}){this.doneChecker=e,this.fallback=t,this.patterns=r,this.formatter=n}attempt(e){if("string"!=typeof e)return this.fallback(e);let t=e.trim(),r={},n=!1;for(let e of this.patterns){let o=t.match(e.regex);if(!o)continue;n=!0;let a=e.handler(o);if(a){for(let[e,t]of Object.entries(a))e in r||void 0===t||(r[e]=t);if(t=(t=t.slice(0,o.index)+t.slice(o.index+o[0].length+1)).trim(),this.doneChecker(r,t))break}}return n?this.formatter(r):this.fallback(e)}},EO=["year","month","day","hour","minute","second","millisecond","offset"],ER={};function ET(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 EN=[[/([^\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"]],Ej={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," "],...EN],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:EN,id:EN,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function EA(e,t=Ed){let r=function(e){if(!ER[e]){var t,r;let n,o,a=ED.factory(e);ER[e]=new EP({doneChecker:ET,fallback:(t=e,function(e){let r=String(e).slice(0,50);return""===r&&(r="(empty string)"),{invalid:`Unable to parse "${r}" with locale "${t}"`}}),patterns:(n=[{name:"timestampWithOffset",regex:a.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? ?(_OFFSET_|Z)?$"),handler:Ek(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:a.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:Ek(["","year","month","day","hour","minute","second","millisecond","zone"])},{name:"timestampWithOffsetAndZone",regex:a.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? (_OFFSET_|Z)\\s*(_ZONE_)$"),handler:Ek(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:a.compile(`^(${Eh}{2,4})\\s*\u5E74\\s*(${Eh}{1,2})\\s*\u6708\\s*(${Eh}{1,2})\\s*\u65E5$`),handler:Ek(["","year","month","day"])},{name:"korean",regex:a.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:Ek(["","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:Ek(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let t=EC(),r=e[0].toLowerCase(),n={now:0,today:0,tomorrow:864e5,yesterday:-864e5}[r];0!==n&&t.setTime(t.getTime()+n);let o={year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()};return"now"===r?{...o,hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),millisecond:t.getMilliseconds()}:o}},{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,r,n]){t=parseFloat(t),"week"===(r=r.length<=2?ES[r]:(r=r.replace(/s$/,"")).toLowerCase())&&(r="day",t*=7),("-"===e||n)&&(t*=-1);let o=EC();return"millisecond"===r?o.setUTCMilliseconds(o.getUTCMilliseconds()+t):"second"===r?o.setUTCSeconds(o.getUTCSeconds()+t):"minute"===r?o.setUTCMinutes(o.getUTCMinutes()+t):"hour"===r?o.setUTCHours(o.getUTCHours()+t):"day"===r?o.setUTCDate(o.getUTCDate()+t):"month"===r?o.setUTCMonth(o.getUTCMonth()+t):"year"===r&&o.setUTCFullYear(o.getUTCFullYear()+t),{year:o.getUTCFullYear(),month:o.getUTCMonth()+1,day:o.getUTCDate(),hour:o.getUTCHours(),minute:o.getUTCMinutes(),second:o.getUTCSeconds(),millisecond:o.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:a.compile("(?:^|[\\sT])(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?(Z)?$"),handler:Ek(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:a.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:Ek(["","hour","minute","second","millisecond","zone"])},{name:"hms12WithOffset",regex:a.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)\\s*(_OFFSET_)"),handler:Ek(["","hour","minute","second","meridiem","offset"])},{name:"hms12",regex:a.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:Ek(["","hour","minute","second","meridiem"])},{name:"hms24",regex:a.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:Ek(["","hour","minute","second","millisecond"])},{name:"hm12",regex:a.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:Ek(["","hour","minute","meridiem"])},{name:"hm24",regex:a.compile("(_H24_):(_MIN_)"),handler:Ek(["","hour","minute"])},{name:"h12",regex:a.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:Ek(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:Ek(["","year","month","day"])},{name:"yearMonthnameDay",regex:a.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:Ek(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:a.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:Ek(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:a.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:Ek(["","monthname","day","","year"])},{name:"dayMonthname",regex:a.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:Ek(["","day","","monthname"])},{name:"monthnameDay",regex:a.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:Ek(["","monthname","day"])},{name:"hmsNoMeridiem",regex:a.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:Ek(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:a.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:Ek(["","hour","minute"])},{name:"ymd",regex:a.compile("(_YEAR4_)([.-])(_MONTH_)\\2+(_DAY_)"),handler:Ek(["","year","","month","day"])},{name:"mdy",regex:a.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:Ek(["","month","","day","year"])},{name:"dmy",regex:a.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:Ek(["","day","month","year"])},{name:"yearLoose",regex:a.compile("_YEAR4_"),handler:Ek(["year"])},{name:"dayMonthnameLoose",regex:a.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:Ek(["","day","monthname"])},{name:"monthnameDayLoose",regex:a.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:Ek(["","monthname","day"])},{name:"monthname",regex:a.compile("_MONTHNAME_"),handler:Ek(["monthname"])},{name:"year4",regex:a.compile("_YEAR4_"),handler:Ek(["year"])},{name:"md",regex:a.compile("(_MONTH_)[/-](_DAY_)"),handler:Ek(["","month","day"])},{name:"dm",regex:a.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:Ek(["","day","month"])},{name:"day",regex:a.compile("_DAY_"),handler:Ek(["day"])},{name:"year2",regex:a.compile("_YEAR2_"),handler:Ek(["year"])},{name:"onlyZone",regex:a.compile("_ZONE_"),handler:Ek(["zone"])},{name:"onlyOffset",regex:a.compile("_OFFSET_"),handler:Ek(["offset"])}],o=a.baseName.slice(0,5),E_.includes(o)?n:n.filter(e=>!["mdy","md"].includes(e.name))),formatter:(r=a,function(e){let t={};for(let[n,o]of Object.entries(e))if("monthname"===n){if(o){let e=r.monthNameToInt(o);void 0!==e&&(t.month=e)}}else if("hour"===n&&e.meridiem){let n=r.h12ToInt(o,e.meridiem);void 0!==n&&(t.hour=n)}else if("zone"===n){if(o){let e=r.zoneToOffset(o);void 0!==e&&(t.offset=e)}}else if("offset"===n){let e=r.offsetToMinutes(o);void 0!==e&&(t.offset=e)}else if("millisecond"===n){let e=r.millisecondToInt(o);"number"==typeof e&&(t.millisecond=e)}else if(EO.includes(n)){let e=r.toInt(o);"number"==typeof e&&(t[n]=e)}return t.year<100&&(t.year=Ep[t.year]),t.year&&"buddhist"===r.dateOptions.calendar&&(t.year-=543),t})})}return ER[e]}(t),n=function(e,t){let r=Ej[t.slice(0,2).toLowerCase()];if(!r)return e;for(let[t,n]of r)e=e.replace(t,n);return e}(e,t);return r.attempt(n)}function E$(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let t=new Ef(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 Ef(t.valueOf()-60*e.offset*1e3):t}function EI(e,t=Ed){let r=EA(e,t),n=r.invalid?new Ef(NaN):E$(r);return n.isValid()||(n.invalid=`Unable to parse date "${e}"`),n}function EM(e,t=Ed){return e instanceof Date?new Ef(e.valueOf()):"number"==typeof e?new Ef(e):EI(e,t)}Date.fromString=Ef.fromString=EI,Date.fromAny=Ef.fromAny=EM,"u">typeof window&&(window.anyDateParser={fromString:EI,fromAny:EM,fromObject:E$,attempt:EA});var EL=r(5238),EF=r(3826);let EB=function(e){return null==e};function EU(e,t){var r=function(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}(e,t);return r.get?r.get.call(e):r.value}d0.extend(d2),d0.extend(EF),d0.extend(EL);let EV="YYYY-MM-DDTHH:mm:ss.SSSZZ";function EW(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&d0(e,EV).isValid()}function EH(e){return d0(e).isToday()}function Ez(e){return EW(e)?d0(e,EV).toDate():null}function EK(e,t=!1){let r=d0(e);return t&&(r=r.utc()),r.format(EV)}function EG(e){return d0(e).toDate()}var EZ=new WeakMap;let EY=new class{register(e,t){EU(this,EZ).set(e,t)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let t=`${e.language}-${e.region}`;if(EU(this,EZ).has(t))return EU(this,EZ).get(t)}if(e.language&&EU(this,EZ).has(e.language))return EU(this,EZ).get(e.language);let t=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return EU(this,EZ).set(`${e.language}${e.region?`-${e.region}`:""}`,t),t}constructor(){!function(e,t,r){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}(this,EZ,{writable:!0,value:new Map})}};function Eq(e,t){EY.register(e,t)}function EJ(e){let t=e??Ec();return EY.getCalendar(t instanceof Intl.Locale?t:new Intl.Locale(t))}let EX={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function EQ(e,t={}){let r=EA(e,Ec());if(r.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!EB(r.day)&&EB(r.month)&&(r=Object.assign({},nn(r,"day"),{month:r.day})),r.month&&(r.month-=1),r.day&&(r=Object.assign({},nn(r,"day"),{date:r.day}));let n=d0().set(r).toDate();return EB(r.year)&&(t.year=!1),EB(r.month)&&(t.month=!1),EB(r.date)&&(t.day=!1),E0(n,t)}function E0(e,t){let r,n=t?.locale??Ec(),o=new Intl.Locale(n),{calendar:a,mode:i,time:s,day:l,month:u,year:c,noToday:d,numberingSystem:f}={...EX,...{noToday:"am"===o.language},...t},p={calendar:a??EJ(o),year:c?"numeric":void 0,month:u?"short":void 0,day:l?"2-digit":void 0,numberingSystem:f},m=d0(e).isToday();if(m&&!d)r=(r=new Intl.RelativeTimeFormat(n,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(n)+r.slice(1);else{"en"===o.language&&(n="en-GB");let t=new Intl.DateTimeFormat(n,p).formatToParts(e);("en"===o.language||"am"===o.language)&&"standard"==i&&c&&l&&(t=t.map(E1("-"))),"wide"==i&&(t=t.map(E1(" — "))),"ethiopic"===p.calendar&&(t=t.filter((e,t,r)=>"era"!==e.type&&("literal"!==e.type||!(t<r.length-1)||"era"!==r[t+1].type))),r=t.map(e=>e.value).join("")}return(!0===s||m&&"for today"===s)&&(r+=`, ${E2(e)}`),r}let E1=e=>(t,r,n)=>"literal"!==t.type||" "!==t.value||r<n.length-1&&"era"===n[r+1].type?t:{type:"literal",value:e};function E2(e){return e.toLocaleTimeString(Ec(),{hour:"2-digit",minute:"2-digit"})}function E4(e,t){return E0(e,{...t,time:!0})}function E3(e,t){let r=EJ("string"==typeof t?new Intl.Locale(t):t);return r?yl(e,vB(r)):e}function E6(e,t){return new Intl.DurationFormat(Ec(),t).format(e)}function E5(e,t){if(null==e)return null;if("string"==typeof e){let r=EA(e,Ec());return r.invalid?(console.warn(`Could not interpret '${e}' as a date`),null):(r.day&&!r.month&&(r={...nn(r,"day"),...{month:r.day}}),r.month&&(r.month-=1),r.day&&(r={...nn(r,"day"),...{date:r.day}}),d0(t).set(r))}return d0(e)}let E9=["years","months","days","hours","minutes","seconds"],E8={second:"seconds",minute:"minutes",hour:"hours",day:"days",month:"months",year:"years"},E7={seconds:45,minutes:45,hours:22,days:26,months:11,years:1/0};function xe(e,t=d0(),r){let n,o=d0(t),a=E5(e,o);if(null==a)return null;if("string"==typeof r){let e=E8[r]??r;return{[e]:o.diff(a,e)}}let{thresholds:i,largestUnit:s,smallestUnit:l}=r??{};if(void 0!==s||void 0!==l){let e,t=l?E8[l]??l:void 0;return e="auto"===s||void 0===s?function(e,t,r){let n=E9.indexOf(r);for(let o=0;o<E9.length;o++){let a=E9[o];if(t.diff(e,a)>0)return o<=n?a:r}return r}(a,o,t??"seconds"):E8[s]??s,function(e,t,r,n){let o=E9.indexOf(r),a=E9.indexOf(n),i=E9.slice(o,a+1),s={},l=e;for(let e of i){let r=t.diff(l,e);s[e]=r,l=l.add(r,e)}return s}(a,o,e,t??e)}let u=(n=function(e){let t={...E7};if(e)for(let[r,n]of Object.entries(e))void 0!==n&&(t[E8[r]??r]=n);return t}(i),o.diff(a,"seconds")<n.seconds?"seconds":o.diff(a,"minutes")<n.minutes?"minutes":o.diff(a,"hours")<n.hours?"hours":o.diff(a,"days")<n.days?"days":o.diff(a,"months")<n.months?"months":"years");return{[u]:o.diff(a,u)}}let xt={style:"short",localeMatcher:"lookup"};function xr(e,t=d0(),r){let n=xe(e,t,r);return null==n?null:E6(n,"object"==typeof r&&r.formatOptions?{...xt,...r.formatOptions}:xt)}let xn=(0,cc.createContext)(null);function xo(){let e=dc({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,t=(0,cc.useMemo)(()=>{let t=Ec();return e[t]&&(t=e[t]),t},[window.i18next.language]),r=(0,cc.useMemo)(()=>{let e=EJ(t);return void 0!==e?vB(e):void 0},[t]),n=(0,cc.useMemo)(()=>new Intl.Locale(t,{calendar:r?.identifier}),[t,r]),o=(0,cc.useMemo)(()=>r?yl(yg(yw()),r):yg(yw()),[r]);return{calendar:r,intlLocale:n,today_:o}}let xa=new g1(1793,1,1);var xi={};function xs(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}xi={"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 xl=r(137);function xu(e={}){let{locale:t}=gS();return(0,cc.useMemo)(()=>new(0,xl.K)(t,e),[t,e])}var xc={};function xd(e){var t;let r=(0,cc.useRef)(void 0),{value:n,textValue:o,minValue:a,maxValue:i,isDisabled:s,isReadOnly:l,isRequired:u,onIncrement:c,onIncrementPage:d,onDecrement:f,onDecrementPage:p,onDecrementToMin:m,onIncrementToMax:h}=e,g=y$((t=xc)&&t.__esModule?t.default:t,"@react-aria/spinbutton");(0,cc.useEffect)(()=>()=>clearTimeout(r.current),[]);let y=(0,cc.useRef)(!1),v=()=>{y.current=!0},b=()=>{y.current=!1},w=""===o?g.format("Empty"):(o||`${n}`).replace("-","−");(0,cc.useEffect)(()=>{y.current&&(mW&&mW.clear("assertive"),mH(w,"assertive"))},[w]);let E=mb(e=>{clearTimeout(r.current),null==c||c(),r.current=window.setTimeout(()=>{(void 0===i||isNaN(i)||void 0===n||isNaN(n)||n<i)&&E(60)},e)}),x=mb(e=>{clearTimeout(r.current),null==f||f(),r.current=window.setTimeout(()=>{(void 0===a||isNaN(a)||void 0===n||isNaN(n)||n>a)&&x(60)},e)}),D=e=>{e.preventDefault()},{addGlobalListener:_,removeAllGlobalListeners:S}=h_();return{spinButtonProps:{role:"spinbutton","aria-valuenow":void 0===n||isNaN(n)?void 0:n,"aria-valuetext":w,"aria-valuemin":a,"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)switch(e.key){case"PageUp":if(d){e.preventDefault(),null==d||d();break}case"ArrowUp":case"Up":c&&(e.preventDefault(),null==c||c());break;case"PageDown":if(p){e.preventDefault(),null==p||p();break}case"ArrowDown":case"Down":f&&(e.preventDefault(),null==f||f());break;case"Home":m&&(e.preventDefault(),null==m||m());break;case"End":h&&(e.preventDefault(),null==h||h())}},onFocus:v,onBlur:b},incrementButtonProps:{onPressStart:()=>{E(400),_(window,"contextmenu",D)},onPressEnd:()=>{clearTimeout(r.current),S()},onFocus:v,onBlur:b},decrementButtonProps:{onPressStart:()=>{x(400),_(window,"contextmenu",D)},onPressEnd:()=>{clearTimeout(r.current),S()},onFocus:v,onBlur:b}}}xc={"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:"空白"}};var xf=r(7120);function xp(e,t,r){let n="+"===e?t+r:t-r;if(t%1!=0||r%1!=0){let o=t.toString().split("."),a=r.toString().split("."),i=Math.pow(10,Math.max(o[1]&&o[1].length||0,a[1]&&a[1].length||0));t=Math.round(t*i),r=Math.round(r*i),n=("+"===e?t+r:t-r)/i}return n}let xm=(0,cc.createContext)(null),xh=(0,cc.createContext)(null),xg=(0,cc.forwardRef)(function(e,t){var r,n;[e,t]=mF(e,t,xm);let{validationBehavior:o}=mL(wg)||{},a=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",{locale:i}=gS(),s=function(e){let{minValue:t,maxValue:r,step:n,formatOptions:o,value:a,defaultValue:i=NaN,onChange:s,locale:l,isDisabled:u,isReadOnly:c}=e;null===a&&(a=NaN),void 0===a||isNaN(a)||(a=void 0===n||isNaN(n)?wx(a,t,r):w_(a,t,r,n)),isNaN(i)||(i=void 0===n||isNaN(n)?wx(i,t,r):w_(i,t,r,n));let[d,f]=vZ(a,isNaN(i)?NaN:i,s),[p,m]=(0,cc.useState)(()=>isNaN(d)?"":new(0,xl.K)(l,o).format(d)),h=(0,cc.useMemo)(()=>new(0,xf.d)(l,o),[l,o]),g=(0,cc.useMemo)(()=>h.getNumberingSystem(p),[h,p]),y=(0,cc.useMemo)(()=>new(0,xl.K)(l,{...o,numberingSystem:g}),[l,o,g]),v=(0,cc.useMemo)(()=>y.resolvedOptions(),[y]),b=(0,cc.useCallback)(e=>isNaN(e)||null===e?"":y.format(e),[y]),w=bV({...e,value:d}),E=void 0===n||isNaN(n)?1:n;"percent"===v.style&&(void 0===n||isNaN(n))&&(E=.01);let[x,D]=(0,cc.useState)(d),[_,S]=(0,cc.useState)(l),[C,k]=(0,cc.useState)(o);Object.is(d,x)&&l===_&&o===C||(m(b(d)),D(d),S(l),k(o));let P=(0,cc.useMemo)(()=>h.parse(p),[h,p]),O=(e,n=0)=>{if(isNaN(P))return w_(isNaN(n)?0:n,t,r,E);{let n=w_(P,t,r,E);return"+"===e&&n>P||"-"===e&&n<P?n:w_(xp(e,P,E),t,r,E)}},R=(0,cc.useMemo)(()=>!u&&!c&&(isNaN(P)||void 0===r||isNaN(r)||w_(P,t,r,E)>P||xp("+",P,E)<=r),[u,c,t,r,E,P]),T=(0,cc.useMemo)(()=>!u&&!c&&(isNaN(P)||void 0===t||isNaN(t)||w_(P,t,r,E)<P||xp("-",P,E)>=t),[u,c,t,r,E,P]);return{...w,validate:e=>h.isValidPartialNumber(e,t,r),increment:()=>{let e=O("+",t);e===d&&m(b(e)),f(e),w.commitValidation()},incrementToMax:()=>{null!=r&&(f(w_(r,t,r,E)),w.commitValidation())},decrement:()=>{let e=O("-",r);e===d&&m(b(e)),f(e),w.commitValidation()},decrementToMin:()=>{null!=t&&(f(t),w.commitValidation())},canIncrement:R,canDecrement:T,minValue:t,maxValue:r,numberValue:P,setNumberValue:f,setInputValue:m,inputValue:p,commit:()=>{let e;if(!p.length){f(NaN),m(void 0===a?"":b(d));return}isNaN(P)?m(b(d)):(e=void 0===n||isNaN(n)?wx(P,t,r):w_(P,t,r,n),f(e=h.parse(b(e))),m(b(void 0===a?e:d)))}}}({...e,locale:i,validationBehavior:a}),l=(0,cc.useRef)(null),[u,c]=mB(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:d,groupProps:f,inputProps:p,incrementButtonProps:m,decrementButtonProps:h,descriptionProps:g,errorMessageProps:y,...v}=function(e,t,r){var n,o;let a,{id:i,decrementAriaLabel:s,incrementAriaLabel:l,isDisabled:u,isReadOnly:c,isRequired:d,minValue:f,maxValue:p,autoFocus:m,label:h,formatOptions:g,onBlur:y=()=>{},onFocus:v,onFocusChange:b,onKeyDown:w,onKeyUp:E,description:x,errorMessage:D,isWheelDisabled:_,...S}=e,{increment:C,incrementToMax:k,decrement:P,decrementToMin:O,numberValue:R,inputValue:T,commit:N,commitValidation:j}=t,A=y$((o=xi)&&o.__esModule?o.default:o,"@react-aria/numberfield"),$=mT(i),{focusProps:I}=h3({onBlur(){N()}}),M=xu(g),L=(0,cc.useMemo)(()=>M.resolvedOptions(),[M]),F=xu({...g,currencySign:void 0}),B=(0,cc.useMemo)(()=>isNaN(R)?"":F.format(R),[F,R]),{spinButtonProps:U,incrementButtonProps:V,decrementButtonProps:W}=xd({isDisabled:u,isReadOnly:c,isRequired:d,maxValue:p,minValue:f,onIncrement:C,onIncrementToMax:k,onDecrement:P,onDecrementToMin:O,value:R,textValue:B}),[H,z]=(0,cc.useState)(!1),{focusWithinProps:K}=h7({isDisabled:u,onFocusWithinChange:z});!function(e,t){let{onScroll:r,isDisabled:n}=e,o=(0,cc.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),r&&r({deltaX:e.deltaX,deltaY:e.deltaY}))},[r]);y1(t,"wheel",n?void 0:o)}({onScroll:(0,cc.useCallback)(e=>{!(Math.abs(e.deltaY)<=Math.abs(e.deltaX))&&(e.deltaY>0?C():e.deltaY<0&&P())},[P,C]),isDisabled:_||u||c||!H},r);let G=(null!=(n=L.maximumFractionDigits)?n:0)>0,Z=void 0===t.minValue||isNaN(t.minValue)||t.minValue<0,Y="numeric";ho()?Z?Y="text":G&&(Y="decimal"):hu()&&(Z?Y="numeric":G&&(Y="decimal"));let q=mq(e),J=(0,cc.useCallback)(e=>{"Enter"===e.key?(N(),j()):e.continuePropagation()},[N,j]),{isInvalid:X,validationErrors:Q,validationDetails:ee}=t.displayValidation,{labelProps:et,inputProps:er,descriptionProps:en,errorMessageProps:eo}=function(e,t,r){let n=mb(e=>{let n=r.current;if(!n)return;let o=null;switch(e.inputType){case"historyUndo":case"historyRedo":case"insertLineBreak":return;case"deleteContent":case"deleteByCut":case"deleteByDrag":o=n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteContentForward":o=n.selectionEnd===n.selectionStart?n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd+1):n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteContentBackward":o=n.selectionEnd===n.selectionStart?n.value.slice(0,n.selectionStart-1)+n.value.slice(n.selectionStart):n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":o=n.value.slice(n.selectionStart);break;default:null!=e.data&&(o=n.value.slice(0,n.selectionStart)+e.data+n.value.slice(n.selectionEnd))}null!=o&&t.validate(o)||e.preventDefault()});(0,cc.useEffect)(()=>{if(!xs()||!r.current)return;let e=r.current;return e.addEventListener("beforeinput",n,!1),()=>{e.removeEventListener("beforeinput",n,!1)}},[r,n]);let o=xs()?null:e=>{let r=e.target.value.slice(0,e.target.selectionStart)+e.data+e.target.value.slice(e.target.selectionEnd);t.validate(r)||e.preventDefault()},{labelProps:a,inputProps:i,descriptionProps:s,errorMessageProps:l,...u}=function(e,t){let{inputElementType:r="input",isDisabled:n=!1,isRequired:o=!1,isReadOnly:a=!1,type:i="text",validationBehavior:s="aria"}=e,[l,u]=vZ(e.value,e.defaultValue||"",e.onChange),{focusableProps:c}=h8(e,t),d=bV({...e,value:l}),{isInvalid:f,validationErrors:p,validationDetails:m}=d.displayValidation,{labelProps:h,fieldProps:g,descriptionProps:y,errorMessageProps:v}=bR({...e,isInvalid:f,errorMessage:e.errorMessage||p}),b=mq(e,{labelable:!0}),w={type:i,pattern:e.pattern};return bO(t,l,u),bT(e,d,t),(0,cc.useEffect)(()=>{if(t.current instanceof m4(t.current).HTMLTextAreaElement){let e=t.current;Object.defineProperty(e,"defaultValue",{get:()=>e.value,set:()=>{},configurable:!0})}},[t]),{labelProps:h,inputProps:mA(b,"input"===r?w:void 0,{disabled:n,readOnly:a,required:o&&"native"===s,"aria-required":o&&"aria"===s||void 0,"aria-invalid":f||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(e.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(cd().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:f,validationErrors:p,validationDetails:m}}(e,r),c=(0,cc.useRef)(null);return{inputProps:mA(i,{onBeforeInput:o,onCompositionStart(){let{value:e,selectionStart:t,selectionEnd:n}=r.current;c.current={value:e,selectionStart:t,selectionEnd:n}},onCompositionEnd(){if(r.current&&!t.validate(r.current.value)){let{value:e,selectionStart:n,selectionEnd:o}=c.current;r.current.value=e,r.current.setSelectionRange(n,o),t.setInputValue(e)}}}),labelProps:a,descriptionProps:s,errorMessageProps:l,...u}}({...S,...q,name:void 0,label:h,autoFocus:m,isDisabled:u,isReadOnly:c,isRequired:d,validate:void 0,[bU]:t,value:T,defaultValue:void 0,autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:$,type:"text",inputMode:Y,onChange:e=>{t.validate(e)&&t.setInputValue(e)},onBlur:y,onFocus:v,onFocusChange:b,onKeyDown:(0,cc.useMemo)(()=>my(J,w),[J,w]),onKeyUp:E,description:x,errorMessage:D},t,r);bO(r,t.numberValue,t.setNumberValue);let ea=mA(U,I,er,{role:null,"aria-roledescription":hi()?null:A.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});"native"===e.validationBehavior&&(ea["aria-required"]=void 0);let ei=e=>{var t;document.activeElement!==r.current&&("mouse"===e.pointerType?null==(t=r.current)||t.focus():e.target.focus())},es=e["aria-label"]||("string"==typeof e.label?e.label:"");es||(a=null!=e.label?et.id:e["aria-labelledby"]);let el=mT(),eu=mT(),ec=mA(V,{"aria-label":l||A.format("increase",{fieldLabel:es}).trim(),id:a&&!l?el:null,"aria-labelledby":a&&!l?`${el} ${a}`:null,"aria-controls":$,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:ei}),ed=mA(W,{"aria-label":s||A.format("decrease",{fieldLabel:es}).trim(),id:a&&!s?eu:null,"aria-labelledby":a&&!s?`${eu} ${a}`:null,"aria-controls":$,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:ei});return{groupProps:{...K,role:"group","aria-disabled":u,"aria-invalid":X?"true":void 0},labelProps:et,inputProps:ea,incrementButtonProps:ec,decrementButtonProps:ed,errorMessageProps:eo,descriptionProps:en,isInvalid:X,validationErrors:Q,validationDetails:ee}}({...mU(e),label:c,validationBehavior:a},s,l),b=mM({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:v.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),w=mq(e);return delete w.id,cd().createElement(mI,{values:[[xh,s],[br,f],[bo,{...p,ref:l}],[wy,{...d,ref:u}],[gu,{slots:{increment:m,decrement:h}}],[gf,{slots:{description:g,errorMessage:y}}],[wp,v]]},cd().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&&cd().createElement("input",{type:"hidden",name:e.name,value:isNaN(s.numberValue)?"":s.numberValue}))});function xy(e,t){return Number.parseInt(E0(e,{calendar:t.calendar,locale:t.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}let xv=(0,cc.forwardRef)(function(e,t){let{className:r}=e,n=(0,cc.useContext)(v2),o=(0,cc.useContext)(v4),a=n??o,i=(0,cc.useContext)(xn),s=yw(),l=E0(a.visibleRange.start.toDate(s),{calendar:i.calendar,locale:i.baseName,day:!1,year:!1,noToday:!0}),u=xy(a.visibleRange.start.toDate(s),i),c=a.maxValue?xy(a.maxValue.toDate(s),i):void 0,d=a.minValue?xy(a.minValue.toDate(s),i):void 0,f=(0,cc.useCallback)(e=>{a.setFocusedDate(a.focusedDate.cycle("year",e-a.focusedDate.year))},[]);return a&&(0,ff.jsxs)("span",{ref:t,className:r,children:[(0,ff.jsx)("span",{children:l}),(0,ff.jsxs)(xg,{formatOptions:{useGrouping:!1},maxValue:c,minValue:d,onChange:f,value:u,children:[(0,ff.jsx)(ba,{}),(0,ff.jsxs)(bn,{children:[(0,ff.jsx)(gc,{slot:"increment",children:(0,ff.jsx)(f1,{size:8})}),(0,ff.jsx)(gc,{slot:"decrement",children:(0,ff.jsx)(fX,{size:8})})]})]})]})}),xb="-esm-cohort-builder__datepicker-module__inputGroup___-wpzr",xw="-esm-cohort-builder__datepicker-module__inputSegment___ocu7L",xE="-esm-cohort-builder__datepicker-module__dateInputWrapper___909Km",xx="-esm-cohort-builder__datepicker-module__invalidText___oHJHi",xD="-esm-cohort-builder__datepicker-module__flatButton___i9LDo",x_="-esm-cohort-builder__datepicker-module__flatButtonMd___VZMkc",xS="-esm-cohort-builder__datepicker-module__flatButtonSm___VA5wy",xC="-esm-cohort-builder__datepicker-module__flatButtonLg___MnYLl";function xk({children:e}){let t=(0,cc.useContext)(Et),r=(0,cc.useContext)(Er),n=t??r,o=dW(()=>n?.close());return(0,ff.jsx)(wf,{className:"-esm-cohort-builder__datepicker-module__dialog___2pADb",ref:o,children:e})}let xP=(0,cc.forwardRef)(function({variant:e,today_:t,minDate:r,maxDate:n},o){let a="range"===e;return(0,ff.jsx)(w5,{ref:o,className:"-esm-cohort-builder__datepicker-module__popover___pb58i",placement:"bottom start",offset:1,isNonModal:!0,children:(0,ff.jsx)(xk,{children:(0,ff.jsxs)(a?v6:v3,{...a?{minValue:r,maxValue:n,className:"cds--date-picker__calendar"}:{},children:[(0,ff.jsxs)("header",{className:"-esm-cohort-builder__datepicker-module__header___+fi16",children:[(0,ff.jsx)(gc,{className:fm()(xD,x_),slot:"previous",children:(0,ff.jsx)(f8,{size:16})}),(0,ff.jsx)(xv,{className:"-esm-cohort-builder__datepicker-module__monthYear___mGhot"}),(0,ff.jsx)(gc,{className:fm()(xD,x_),slot:"next",children:(0,ff.jsx)(f7,{size:16})})]}),(0,ff.jsx)(v9,{className:"-esm-cohort-builder__datepicker-module__calendarGrid___z07wV",children:e=>(0,ff.jsx)(bt,{className:fm()("cds--date-picker__day",{"-esm-cohort-builder__datepicker-module__today___dNc4M":0===t.compare(e)}),date:e},e.toString())})]})})})}),xO=(0,cc.forwardRef)(function(e,t){let r=(0,cc.useContext)(Et),[n,o]=mF({slot:e.slot},t,b7),{locale:a}=gS(),i=b9({...n,locale:a,createCalendar:vB}),s=(0,cc.useRef)(null),{fieldProps:l,inputProps:u}=b$({...n,inputRef:s},i,o),c=(0,cc.useCallback)(()=>{i.isDisabled||r.toggle()},[]);return(0,ff.jsxs)(mI,{values:[[we,i],[bo,{...u,ref:s}],[br,{...l,ref:o,isInvalid:i.isInvalid}]],children:[(0,ff.jsx)(bn,{...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,r)=>(0,cc.cloneElement)(e.children(t),{key:r}))}),(0,ff.jsx)(ba,{})]})}),xR=(0,cc.forwardRef)(function(e,t){let r=(0,cc.useContext)(Et),n=(0,cc.useContext)(Er);return(r??n).isInvalid?(0,ff.jsx)(mi,{ref:t,size:16,...e}):(0,ff.jsx)(fJ,{ref:t,size:16,...e})});class xT{of(e){return this.dictionary.getStringForLocale(e,this.locale)}constructor(e,t){this.locale=e,this.dictionary=t}}let xN=new Map,xj=(0,cc.forwardRef)(function({segment:e,...t},r){let n=(0,cc.useContext)(we),o=mg(r),{segmentProps:a}=function(e,t,r){let n,o,a,i,s=(0,cc.useRef)(""),{locale:l,direction:u}=gS(),c=function(){var e;let{locale:t}=gS(),r=yA((e=bi)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,cc.useMemo)(()=>{try{return new Intl.DisplayNames(t,{type:"dateTimeField"})}catch{return new xT(t,r)}},[t,r])}(),{ariaLabel:d,ariaLabelledBy:f,ariaDescribedBy:p,focusManager:m}=bN.get(t),h=e.isPlaceholder?"":e.text,g=(0,cc.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),y=yW({month:"long",timeZone:g.timeZone}),v=yW({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}=xd({value:e.value,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="",void 0!==e.maxValue&&t.setSegment(e.type,e.maxValue)},onDecrementToMin:()=>{s.current="",void 0!==e.minValue&&t.setSegment(e.type,e.minValue)}}),w=(0,cc.useMemo)(()=>new(0,xf.d)(l,{maximumFractionDigits:0}),[l]),E=()=>{if(e.text===e.placeholder&&m.focusPrevious(),!w.isValidPartialNumber(e.text)||t.isReadOnly||e.isPlaceholder)"dayPeriod"===e.type&&t.clearSegment(e.type);else{let r=e.text.slice(0,-1),n=w.parse(r);0===(r=0===n?"":r).length||0===n?t.clearSegment(e.type):t.setSegment(e.type,n),s.current=r}},{startsWith:x}=(n=function(e){let{locale:t}=gS(),r=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(xN.has(r))return xN.get(r);let n=new Intl.Collator(t,e);return xN.set(r,n),n}({usage:"search",sensitivity:"base"}),o=(0,cc.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===n.compare(e.slice(0,t.length),t)),[n]),a=(0,cc.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===n.compare(e.slice(-t.length),t)),[n]),i=(0,cc.useCallback)((e,t)=>{if(0===t.length)return!0;e=e.normalize("NFC");let r=0,o=(t=t.normalize("NFC")).length;for(;r+o<=e.length;r++){let a=e.slice(r,r+o);if(0===n.compare(t,a))return!0}return!1},[n]),(0,cc.useMemo)(()=>({startsWith:o,endsWith:a,contains:i}),[o,a,i])),D=yW({hour:"numeric",hour12:!0}),_=(0,cc.useMemo)(()=>{let e=new Date;return e.setHours(0),D.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[D]),S=(0,cc.useMemo)(()=>{let e=new Date;return e.setHours(12),D.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[D]),C=yW({year:"numeric",era:"narrow",timeZone:"UTC"}),k=(0,cc.useMemo)(()=>{if("era"!==e.type)return[];let r=yl(new g1(1,1,1),t.calendar),n=t.calendar.getEras().map(e=>{let t=r.set({year:1,month:1,day:1,era:e}).toDate("UTC");return{era:e,formatted:C.formatToParts(t).find(e=>"era"===e.type).value}}),o=function(e){e.sort();let t=e[0],r=e[e.length-1];for(let e=0;e<t.length;e++)if(t[e]!==r[e])return e;return 0}(n.map(e=>e.formatted));if(o)for(let e of n)e.formatted=e.formatted.slice(o);return n},[C,t.calendar,e.type]),P=r=>{if(t.isDisabled||t.isReadOnly)return;let n=s.current+r;switch(e.type){case"dayPeriod":if(x(_,r))t.setSegment("dayPeriod",0);else if(x(S,r))t.setSegment("dayPeriod",12);else break;m.focusNext();break;case"era":{let e=k.find(e=>x(e.formatted,r));e&&(t.setSegment("era",e.era),m.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!w.isValidPartialNumber(n))return;let o=w.parse(n),a=o,i=0===e.minValue;if("hour"===e.type&&t.dateFormatter.resolvedOptions().hour12){switch(t.dateFormatter.resolvedOptions().hourCycle){case"h11":o>11&&(a=w.parse(r));break;case"h12":i=!1,o>12&&(a=w.parse(r))}void 0!==e.value&&e.value>=12&&o>1&&(o+=12)}else void 0!==e.maxValue&&o>e.maxValue&&(a=w.parse(r));if(isNaN(o))return;let l=0!==a||i;l&&t.setSegment(e.type,a),void 0!==e.maxValue&&(Number(o+"0")>e.maxValue||n.length>=String(e.maxValue).length)?(s.current="",l&&m.focusNext()):s.current=n}}};y1((0,cc.useRef)("u">typeof document?document:null),"selectionchange",()=>{var e;let t=window.getSelection();(null==t?void 0:t.anchorNode)&&(null==(e=r.current)?void 0:e.contains(null==t?void 0:t.anchorNode))&&t.collapse(r.current)});let O=(0,cc.useRef)("");y1(r,"beforeinput",n=>{if(r.current)switch(n.preventDefault(),n.inputType){case"deleteContentBackward":case"deleteContentForward":w.isValidPartialNumber(e.text)&&!t.isReadOnly&&E();break;case"insertCompositionText":O.current=r.current.textContent,r.current.textContent=r.current.textContent;break;default:null!=n.data&&P(n.data)}}),y1(r,"input",e=>{let{inputType:t,data:n}=e;"insertCompositionText"===t&&(r.current&&(r.current.textContent=O.current),null!=n&&(x(_,n)||x(S,n))&&P(n))}),mv(()=>{let e=r.current;return()=>{document.activeElement===e&&(m.focusPrevious()||m.focusNext())}},[r,m]);let R=hi()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,cc.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])||t.isInvalid||(p=void 0);let T=mT(),N=!t.isDisabled&&!t.isReadOnly&&e.isEditable,j="literal"===e.type?"":c.of(e.type),A=yJ({"aria-label":`${j}${d?`, ${d}`:""}${f?", ":""}`,"aria-labelledby":f});if("literal"===e.type)return{segmentProps:{"aria-hidden":!0}};let $={caretColor:"transparent"};if("rtl"===u){$.unicodeBidi="embed";let t=g[e.type];("numeric"===t||"2-digit"===t)&&($.direction="ltr")}return{segmentProps:mA(b,A,{id:T,...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(cd().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&&(hn()?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(),E()}},onFocus:()=>{s.current="",r.current&&y9(r.current,{containingElement:y8(r.current)});let e=window.getSelection();null==e||e.collapse(r.current)},style:$,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}(e,n,o),{focusProps:i,isFocused:s,isFocusVisible:l}=ge(),{hoverProps:u,isHovered:c}=ga({...t,isDisabled:n.isDisabled||"literal"===e.type}),d=function(e){let{className:t,style:r,children:n,defaultClassName:o,defaultChildren:a,defaultStyle:i,values:s}=e;return(0,cc.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof r?r({...s,defaultStyle:i||{}}):r,u="function"==typeof n?n({...s,defaultChildren:a}):null==n?a:n,{className:e??o,style:l||i?{...i,...l}:void 0,children:u??a,"data-rac":""}},[t,r,n,o,a,i,s])}({...t,values:{...e,isReadOnly:!e.isEditable,isInvalid:n.isInvalid,isDisabled:n.isDisabled,isHovered:c,isFocused:s,isFocusVisible:l},defaultChildren:e.text}),f=(0,cc.useCallback)(e=>{e.stopPropagation()},[]);return(0,ff.jsx)("span",{...mA(mq(t),a,i,u),...d,ref:o,style:a.style,"data-placeholder":e.isPlaceholder||void 0,"data-invalid":n.isInvalid||void 0,"data-readonly":!e.isEditable||void 0,"data-disabled":n.isDisabled||void 0,"data-type":e.type,"data-hovered":c||void 0,"data-focused":s||void 0,"data-focus-visible":l||void 0,onClick:f})}),xA={short:!1,size:"md"},x$=(0,cc.forwardRef)(function(e,t){let{className:r,defaultValue:n,isDisabled:o,invalid:a,invalidText:i,isInvalid:s,label:l,labelText:u,light:c,maxDate:d,minDate:f,onChange:p,onChangeRaw:m,short:h,size:g,value:y,...v}={...xA,...e},{calendar:b,intlLocale:w,today_:E}=xo(),x=(0,cc.useId)(),D=!!(u??l),_=(0,cc.useMemo)(()=>Ei(n,b),[n,b]),S=(0,cc.useMemo)(()=>Ei(y,b,!0),[y,b]),C=(0,cc.useMemo)(()=>Ei(d,b),[d,b]),k=(0,cc.useMemo)(()=>Ei(f??xa,b),[f,b]),P=(0,cc.useMemo)(()=>a||s,[a,s]),O=(0,cc.useMemo)(()=>(m&&p&&console.error("An OpenmrsDatePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),m??(e=>p?.(Es(e)))),[m,p]);return(0,ff.jsx)(Ea,{locale:w.toString(),children:(0,ff.jsx)("div",{className:fm()("cds--form-item",r),children:(0,ff.jsx)(mI,{values:[[xn,w]],children:(0,ff.jsxs)(En,{className:fm()("cds--date-picker","cds--date-picker--single",{"cds--date-picker--short":h,"cds--date-picker--light":c}),defaultValue:_,isDisabled:o,isInvalid:P,maxValue:C,minValue:k,value:S,shouldForceLeadingZeros:"en"===w.language||void 0,...v,onChange:O,children:[(0,ff.jsxs)("div",{className:"cds--date-picker-container",children:[D&&(0,ff.jsx)(wv,{className:fm()("cds--label",{"cds--label--disabled":o}),htmlFor:x,children:u??l}),(0,ff.jsxs)(bn,{className:xb,children:[(0,ff.jsx)(xO,{id:D?x:void 0,ref:t,className:fm()("cds--date-picker-input__wrapper","-esm-cohort-builder__datepicker-module__inputWrapper___MHJAy",{"-esm-cohort-builder__datepicker-module__inputWrapperSm___esx4E":"sm"===g,"-esm-cohort-builder__datepicker-module__inputWrapperMd___VQbzP":"md"===g||!g||0===g.length,"-esm-cohort-builder__datepicker-module__inputWrapperLg___Rk9Ce":"lg"===g}),children:e=>"era"!==e.type?(0,ff.jsx)(xj,{className:xw,segment:e}):(0,ff.jsx)(cd().Fragment,{})}),(0,ff.jsx)(gc,{className:fm()(xD,{[xS]:"sm"===g,[x_]:"md"===g||!g||0===g.length,[xC]:"lg"===g}),children:(0,ff.jsx)(xR,{})})]}),(0,ff.jsx)(wm,{className:xx,children:i})]}),(0,ff.jsx)(xP,{variant:"single",today_:E})]})})})})}),xI=(0,cc.forwardRef)(function({className:e,defaultValue:t,invalid:r,invalidText:n,isDisabled:o,isInvalid:a,label:i,labelText:s,light:l,maxDate:u,minDate:c,onChange:d,onChangeRaw:f,size:p="md",value:m,...h},g){let{calendar:y,intlLocale:v,today_:b}=xo(),w=(0,cc.useId)(),E=!!(s??i),x=(0,cc.useMemo)(()=>{if(m)return{start:Ei(m[0],y,!1),end:Ei(m[1],y,!1)}},[m,y]),D=(0,cc.useMemo)(()=>{if(t)return{start:Ei(t[0],y,!1),end:Ei(t[1],y,!1)}},[t,y]),_=(0,cc.useMemo)(()=>Ei(c??xa,y,!0),[c,y]),S=(0,cc.useMemo)(()=>Ei(u,y,!0),[u,y]),C=(0,cc.useMemo)(()=>r||a,[r,a]),k=(0,cc.useMemo)(()=>(f&&d&&console.error("An OpenmrsDateRangePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),f??(e=>d?.([Es(e.start),Es(e.end)]))),[f,d]);return(0,ff.jsx)(Ea,{locale:v.toString(),children:(0,ff.jsx)("div",{className:fm()("cds--form-item",e),children:(0,ff.jsx)(mI,{values:[[xn,v]],children:(0,ff.jsx)(Eo,{id:E?w:void 0,className:fm()("cds--date-picker",{"cds--date-picker--light":l,"cds--date-picker--disabled":o}),isInvalid:C,shouldForceLeadingZeros:"en"===v.language||void 0,maxValue:S,minValue:_,value:x,defaultValue:D,ref:g,isDisabled:o,...h,onChange:k,children:(0,ff.jsxs)("div",{className:"cds--date-picker-container",children:[E&&(0,ff.jsx)(wv,{className:fm()("cds--label",{"cds--label--disabled":o}),htmlFor:w,children:s??i}),(0,ff.jsxs)(bn,{className:xb,children:[(0,ff.jsxs)("div",{className:fm()("-esm-cohort-builder__datepicker-module__inputsWrapper___UyGoG",{"-esm-cohort-builder__datepicker-module__inputsWrapperSm___qrGsA":"sm"===p,"-esm-cohort-builder__datepicker-module__inputsWrapperMd___pofu4":"md"===p||!p||0===p.length,"-esm-cohort-builder__datepicker-module__inputsWrapperLg___eF1Im":"lg"===p}),children:[(0,ff.jsx)(wr,{className:fm()("cds--date-picker-input__wrapper","-esm-cohort-builder__datepicker-module__startInput___C8vnM",xE),slot:"start",children:e=>(0,ff.jsx)(xj,{className:xw,segment:e})}),(0,ff.jsx)("div",{className:"-esm-cohort-builder__datepicker-module__separator___vHLFZ",children:(0,ff.jsx)("span",{"aria-hidden":"true","data-readonly":!0,children:"–"})}),(0,ff.jsx)(wr,{className:fm()("cds--date-picker-input__wrapper","-esm-cohort-builder__datepicker-module__endInput___25OF9",xE),slot:"end",children:e=>(0,ff.jsx)(xj,{className:xw,segment:e})})]}),(0,ff.jsx)(gc,{className:fm()(xD,{[xS]:"sm"===p,[x_]:"md"===p||!p||0===p.length,[xC]:"lg"===p}),children:(0,ff.jsx)(xR,{})})]}),(0,ff.jsx)(wm,{className:xx,children:n}),(0,ff.jsx)(xP,{variant:"range",today_:b,minDate:_,maxDate:S})]})})})})})}),xM=cd().createContext(null);function xL(e){let{children:t}=e,r=(0,cc.useContext)(xM),[n,o]=(0,cc.useState)(0),a=(0,cc.useMemo)(()=>({parent:r,modalCount:n,addModal(){o(e=>e+1),r&&r.addModal()},removeModal(){o(e=>e-1),r&&r.removeModal()}}),[r,n]);return cd().createElement(xM.Provider,{value:a},t)}function xF(e){let t,{modalProviderProps:r}={modalProviderProps:{"aria-hidden":!!(t=(0,cc.useContext)(xM))&&t.modalCount>0||void 0}};return cd().createElement("div",{"data-overlay-container":!0,...e,...r})}function xB(e){return cd().createElement(xL,null,cd().createElement(xF,e))}function xU(e){let t=mP(),{portalContainer:r=t?null:document.body,...n}=e,{getContainer:o}=wi();if(!e.portalContainer&&o&&(r=o()),cd().useEffect(()=>{if(null==r?void 0:r.closest("[data-overlay-container]"))throw Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.")},[r]),!r)return null;let a=cd().createElement(xB,n);return hR().createPortal(a,r)}let xV={},xW=0,xH=!1,xz=null,xK=null;function xG(e={}){let{delay:t=1500,closeDelay:r=500}=e,{isOpen:n,open:o,close:a}=w4(e),i=(0,cc.useMemo)(()=>`${++xW}`,[]),s=(0,cc.useRef)(null),l=(0,cc.useRef)(a),u=()=>{xV[i]=f},c=()=>{for(let e in xV)e!==i&&(xV[e](!0),delete xV[e])},d=()=>{s.current&&clearTimeout(s.current),s.current=null,c(),u(),xH=!0,o(),xz&&(clearTimeout(xz),xz=null),xK&&(clearTimeout(xK),xK=null)},f=e=>{e||r<=0?(s.current&&clearTimeout(s.current),s.current=null,l.current()):s.current||(s.current=setTimeout(()=>{s.current=null,l.current()},r)),xz&&(clearTimeout(xz),xz=null),xH&&(xK&&clearTimeout(xK),xK=setTimeout(()=>{delete xV[i],xK=null,xH=!1},Math.max(500,r)))};return(0,cc.useEffect)(()=>{l.current=a},[a]),(0,cc.useEffect)(()=>()=>{s.current&&clearTimeout(s.current),xV[i]&&delete xV[i]},[i]),{isOpen:n,open:e=>{e||!(t>0)||s.current?d():(c(),u(),n||xz||xH?n||d():xz=setTimeout(()=>{xz=null,xH=!0,d()},t))},close:f}}let xZ=(0,cc.createContext)(null),xY=(0,cc.createContext)(null);function xq(e){let t=xG(e),r=(0,cc.useRef)(null),{triggerProps:n,tooltipProps:o}=function(e,t,r){let{isDisabled:n,trigger:o}=e,a=mT(),i=(0,cc.useRef)(!1),s=(0,cc.useRef)(!1),l=()=>{(i.current||s.current)&&t.open(s.current)},u=e=>{i.current||s.current||t.close(e)};(0,cc.useEffect)(()=>{let e=e=>{r&&r.current&&"Escape"===e.key&&(e.stopPropagation(),t.close(!0))};if(t.isOpen)return document.addEventListener("keydown",e,!0),()=>{document.removeEventListener("keydown",e,!0)}},[r,t]);let c=()=>{s.current=!1,i.current=!1,u(!0)},{hoverProps:d}=ga({isDisabled:n,onHoverStart:()=>{"focus"!==o&&("pointer"===hU?i.current=!0:i.current=!1,l())},onHoverEnd:()=>{"focus"!==o&&(s.current=!1,i.current=!1,u())}}),{focusableProps:f}=h8({isDisabled:n,onFocus:()=>{h1()&&(s.current=!0,l())},onBlur:()=>{s.current=!1,i.current=!1,u(!0)}},r);return{triggerProps:{"aria-describedby":t.isOpen?a:void 0,...mA(f,d,{onPointerDown:c,onKeyDown:c,tabIndex:void 0})},tooltipProps:{id:a}}}(e,t,r);return cd().createElement(mI,{values:[[xZ,t],[xY,{...o,triggerRef:r}]]},cd().createElement(h9,{...n,ref:r},e.children))}let xJ=(0,cc.forwardRef)(function({UNSTABLE_portalContainer:e,...t},r){[t,r]=mF(t,r,xY);let n=(0,cc.useContext)(xZ),o=xG(t),a=null==t.isOpen&&null==t.defaultOpen&&n?n:o,i=w1(r,a.isOpen)||t.isExiting||!1;return a.isOpen||i?cd().createElement(xU,{portalContainer:e},cd().createElement(xX,{...t,tooltipRef:r,isExiting:i})):null});function xX(e){let t=(0,cc.useContext)(xZ),r=(0,cc.useRef)(null),[n,o]=(0,cc.useState)(0);mv(()=>{r.current&&t.isOpen&&o(r.current.getBoundingClientRect().width)},[t.isOpen,r]);let{overlayProps:a,arrowProps:i,placement:s}=wW({placement:e.placement||"top",targetRef:e.triggerRef,overlayRef:e.tooltipRef,offset:e.offset,crossOffset:e.crossOffset,isOpen:t.isOpen,arrowSize:n,arrowBoundaryOffset:e.arrowBoundaryOffset,shouldFlip:e.shouldFlip,onClose:()=>t.close(!0)}),l=w0(e.tooltipRef,!!s)||e.isEntering||!1,u=mM({...e,defaultClassName:"react-aria-Tooltip",values:{placement:s,isEntering:l,isExiting:e.isExiting,state:t}}),{tooltipProps:c}=function(e,t){let r=mq(e,{labelable:!0}),{hoverProps:n}=ga({onHoverStart:()=>null==t?void 0:t.open(!0),onHoverEnd:()=>null==t?void 0:t.close()});return{tooltipProps:mA(r,n,{role:"tooltip"})}}(e=mA(e,a),t);return cd().createElement("div",{...c,ref:e.tooltipRef,...u,style:{...a.style,...u.style},"data-placement":null!=s?s:void 0,"data-entering":l||void 0,"data-exiting":e.isExiting||void 0},cd().createElement(wb.Provider,{value:{...i,placement:s,ref:r}},u.children))}let xQ=({diagnoses:e,showCertainty:t=!1})=>{let{diagnosisTags:r}=dc({externalModuleName:"@openmrs/esm-styleguide"});return(0,ff.jsx)("div",{className:"-esm-cohort-builder__diagnosis-tags-module__container___l7XiW",children:e.map(e=>{let n=t&&"PROVISIONAL"===e.certainty,o=1===e.rank?r?.primaryColor??"blue":r?.secondaryColor??"gray";return(0,ff.jsx)(x0,{color:o,isProvisional:n,name:e.display},e.uuid)})})};function x0({color:e,isProvisional:t,name:r}){let[n,o]=(0,cc.useState)(!1),[a,i]=(0,cc.useState)(!1),[s,l]=(0,cc.useState)(!1),u=s||a,c=(0,cc.useRef)(null);(0,cc.useLayoutEffect)(()=>{let e=c.current;if(!e)return;let t=()=>{let t=e.scrollWidth>e.clientWidth;l(t),t||o(!1)};t();let r=new ResizeObserver(t);return r.observe(e),()=>r.disconnect()},[r,t,u]);let d=fm()("cds--tag","cds--tag--md","cds--layout--size-md",`cds--tag--${e}`,"-esm-cohort-builder__diagnosis-tags-module__diagnosisTag___ZEczs"),f=(0,ff.jsxs)(ff.Fragment,{children:[t&&(0,ff.jsxs)(ff.Fragment,{children:[(0,ff.jsx)("span",{"aria-hidden":"true",className:"-esm-cohort-builder__diagnosis-tags-module__provisionalMark___nSkIq",children:"?"}),(0,ff.jsxs)("span",{className:"cds--visually-hidden",children:[iG("provisional","Provisional")," "]})]}),(0,ff.jsx)("span",{ref:c,className:"cds--tag__label",children:r})]});return u?(0,ff.jsxs)(xq,{delay:0,closeDelay:150,isOpen:n,onOpenChange:o,children:[(0,ff.jsx)(gc,{className:d,"data-testid":"diagnosis-tag",onFocusChange:i,onPress:()=>o(!0),children:f}),(0,ff.jsx)(xJ,{className:"-esm-cohort-builder__diagnosis-tags-module__tagTooltip___5ARni",placement:"bottom",offset:4,containerPadding:8,children:r})]}):(0,ff.jsx)("span",{className:d,"data-testid":"diagnosis-tag",children:f})}let x1={action:"-esm-cohort-builder__empty-card-module__action___l4wUo",content:"-esm-cohort-builder__empty-card-module__content___XbsSJ",desktopHeading:"-esm-cohort-builder__empty-card-module__desktopHeading___0EPXX",tabletHeading:"-esm-cohort-builder__empty-card-module__tabletHeading___unl1F",tile:"-esm-cohort-builder__empty-card-module__tile___vS3Sj"},x2=({width:e="64",height:t="64"})=>(0,ff.jsx)("svg",{width:e,height:t,viewBox:"0 0 64 64",children:(0,ff.jsx)("use",{href:"#omrs-empty-data-illustration"})}),x4=e=>{let t="tablet"===dM(),r=e.launchForm;return(0,ff.jsx)(fb.Layer,{className:x1.layer,children:(0,ff.jsxs)(fb.Tile,{className:x1.tile,children:[(0,ff.jsx)("div",{className:t?x1.tabletHeading:x1.desktopHeading,children:(0,ff.jsx)("h4",{children:e.headerTitle})}),(0,ff.jsx)(x2,{}),(0,ff.jsx)("p",{className:x1.content,children:iG("emptyStateText","There are no {{displayText}} to display",{displayText:e.displayText})}),(0,ff.jsx)("p",{className:x1.action,children:r&&(0,ff.jsx)(fb.Button,{onClick:()=>r(),kind:"ghost",size:t?"lg":"sm",children:iG("recordNewEntry","Record {{ displayText }}",{displayText:e.displayText})})})]})})},x3=({error:e,headerTitle:t})=>{let r="tablet"===dM();return(0,ff.jsx)(fb.Layer,{children:(0,ff.jsxs)(fb.Tile,{className:"-esm-cohort-builder__error-state-module__tile___hHM56",children:[(0,ff.jsx)("div",{className:r?"-esm-cohort-builder__error-state-module__tabletHeading___W7a4U":"-esm-cohort-builder__error-state-module__desktopHeading___VL8Rv",children:(0,ff.jsx)("h4",{children:t})}),(0,ff.jsxs)("p",{className:"-esm-cohort-builder__error-state-module__errorMessage___IytZy",children:[iG("error","Error")," ",`${e?.response?.status}: `,e?.response?.statusText]}),(0,ff.jsx)("p",{className:"-esm-cohort-builder__error-state-module__errorCopy___E1yZO",children:iG("errorCopy")})]})})},x6=x3,x5=cd().forwardRef((e,t)=>{let{slotName:r,basePath:n,componentContext:o,state:a}=dB(),i=window.location??{pathname:""},s=cS(r??"");return e.isChildOfHeader&&r&&s.length>0?(0,ff.jsxs)(fb.SideNav,{"aria-label":iG("leftNavigation","Left navigation"),className:"-esm-cohort-builder__left-nav-module__leftNav___ZqLpw",expanded:!0,isFixedNav:!0,ref:t,...e,children:[(0,ff.jsx)(cP,{name:"global-nav-menu-slot"}),r?(0,ff.jsx)(c7,{value:o,fallback:(0,ff.jsx)(cP,{name:r,state:{basePath:n,currentPath:i,...a}}),children:(0,ff.jsx)(cf.Provider,{value:o,children:(0,ff.jsx)(cP,{name:r,state:{basePath:n,currentPath:i,...a}})})}):null]}):null}),x9=({selectedLocationUuid:e,defaultLocationUuid:t,locationTag:r,locationsPerRequest:n=50,onChange:o})=>{let[a,i]=(0,cc.useState)(""),s=(0,cc.useId)(),{location:l}=function(e){let t=e?`/ws/fhir2/R4/Location?_id=${e}`:null,{data:r,error:n,isLoading:o}=dm()(t,se,{shouldRetryOnError:e=>!!e?.response?.status&&e.response.status>=500});return(0,cc.useMemo)(()=>({location:r?.data?.entry?r.data.entry[0]:null,error:t?n:null,isLoading:!!t&&o}),[r,o,n,t])}(t),{locations:u,isLoading:c,hasMore:d,loadingNewData:f,error:p,setPage:m}=function(e,t=0,r=""){let n=df(r),{data:o,isLoading:a,isValidating:i,setSize:s,error:l}=dO()(function(r,o){if(o){let e=o.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 a=`${i9}/Location?`,i=new URLSearchParams;return i.append("_summary","data"),t&&i.append("_count",""+t),r&&i.append("_getpagesoffset",""+r*t),e&&i.append("_tag",e),"string"==typeof n&&""!==n&&i.append("name:contains",n),a+i.toString()},se);return(0,cc.useMemo)(()=>({locations:o?.length?o?.flatMap(e=>e?.data?.entry??[]):[],isLoading:a,totalResults:o?.[0]?.data?.total,hasMore:!!o?.length&&o?.[o.length-1]?.data?.link?.some(e=>"next"===e.relation),loadingNewData:i,error:l||null,setPage:s}),[a,o,i,s,l])}(r,n,a),h=(0,cc.useMemo)(()=>l&&!a&&t?[l,...u.filter(({resource:e})=>e.id!==t)]:u??[],[l,u,t,a]),g=(0,cc.useCallback)(e=>{o(),i(e.trim())},[o]),y=dH((0,cc.useCallback)(()=>{!f&&d&&m(e=>e+1)},[f,d,m])),v=d?Math.max(0,Math.floor(h.length-n/2)):-1;return(0,ff.jsxs)(ff.Fragment,{children:[(0,ff.jsx)(fb.Search,{"aria-describedby":p?`${s}-error`:void 0,labelText:iG("searchForLocation"),id:s,placeholder:iG("searchForLocation"),onChange:e=>g(e.target.value),size:"lg"}),p&&(0,ff.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__errorNotification___MBWvf",id:`${s}-error`,children:(0,ff.jsx)(fb.InlineNotification,{kind:"error",subtitle:iG("errorLoadingLoginLocations","Unable to load login locations. Please try again or contact support if the problem persists."),title:iG("error","Error")})}),(0,ff.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__searchResults___aCL93",children:c?(0,ff.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__loadingContainer___Vn1H0",children:Array.from({length:5}).map((e,t)=>(0,ff.jsx)(fb.RadioButtonSkeleton,{className:"-esm-cohort-builder__location-picker-module__radioButtonSkeleton___RKMHj",role:"progressbar"},t))}):(0,ff.jsxs)(ff.Fragment,{children:[(0,ff.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__locationResultsContainer___5yuvs",children:h.length>0?(0,ff.jsx)(fb.RadioButtonGroup,{name:"loginLocations",onChange:e=>{o(e?.toString())},orientation:"vertical",valueSelected:e,children:h.map((e,t)=>(0,ff.jsx)(fb.RadioButton,{className:"-esm-cohort-builder__location-picker-module__locationRadioButton___b52LI",id:e.resource.id,labelText:(0,ff.jsx)("span",{ref:t===v?y:null,children:e.resource.name}),name:e.resource.name,value:e.resource.id},e.resource.id))}):(0,ff.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__emptyState___qiPqQ",children:(0,ff.jsx)("p",{className:"-esm-cohort-builder__location-picker-module__locationNotFound___tKDOJ",children:iG("noResultsToDisplay")})})}),f&&(0,ff.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__loadingIcon___PGwvc",children:(0,ff.jsx)(fb.InlineLoading,{description:iG("loading")})})]})})]})},x8=B("modalState",{modalContainer:null,modalStack:[]}),x7=0;async function De(e,t,r={}){let n=u3(t),o=null;if(e){if(!n)throw Error(`No modal named '${t}' has been registered.`);let{load:a}=n,i=await a(),s=x7++;o=await ci({...i,name:`${t}-${s}`},{...r,domElement:e})}else k(`Failed to launch modal. Please notify your administrator. Modal name: ${t}`);return o}function Dt(e){return"TO_BE_DELETED"===e.state||"DELETED"===e.state}function Dr(e,t){t?.unmount&&(t.unmountPromise?.catch(()=>{}),t.unmount().catch(t=>{console.error(`The modal '${e}' failed to unmount`,t)}))}function Dn(e){return e.find(e=>!Dt(e))}function Do(e,t){e.container&&(e.container.style.visibility=t?"unset":"hidden")}let Da=window.getComputedStyle(document.body).overflow;function Di({modalStack:e,modalContainer:t}){if(t)if(e.length){t.style.visibility||(addEventListener("keydown",Dl),document.body.style.overflow="hidden",t.style.visibility="unset");let r=Dn(e);e.forEach(e=>{switch(e.state){case"NEW":{let r=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=r,e.state="MOUNTING",De(r,e.modalName,e.props).then(n=>{Dt(e)?Dr(e.modalName,n):n?(e.parcel=n,t.prepend(r),Do(e,Dn(x8.getState().modalStack)===e),n.mountPromise.then(()=>{Dt(e)||(e.state="MOUNTED")},t=>{k(t),e.parcel=null,Ds(e)})):Ds(e)},t=>{k(t),Ds(e)});break}case"MOUNTING":case"MOUNTED":Do(e,e===r);break;case"TO_BE_DELETED":e.state="DELETED",e.onClose(),Dr(e.modalName,e.parcel),e.container?.remove(),setTimeout(()=>{let t=x8.getState();x8.setState({...t,modalStack:t.modalStack.filter(t=>t!==e)})},0)}})}else t.style.removeProperty("visibility"),document.body.style.overflow=Da,removeEventListener("keydown",Dl)}function Ds(e){if(Dt(e))return;e.state="TO_BE_DELETED";let t=x8.getState();x8.setState({...t,modalStack:[...t.modalStack]})}function Dl(e){"Escape"===e.key&&function(){let[e]=x8.getState().modalStack;e&&Ds(e)}()}function Du(e){x8.subscribe(Di),x8.setState({...x8.getState(),modalContainer:e})}function Dc(e,t={},r=()=>{}){let n=()=>{let e=x8.getState().modalStack.find(e=>e.onClose===r);e&&Ds(e)};if(u3(e)){var o;let a,i;o={state:"NEW",onClose:r,modalName:e,props:{close:n,...t}},i=[o,...(a=x8.getState()).modalStack],x8.setState({...a,modalStack:i})}else k(`Failed to launch modal. Please notify your administrator. Modal name: "${e}"`);return n}var Dd=Object.prototype.hasOwnProperty;let Df=function(e){if(null==e)return!0;if(to(e)&&(tr(e)||"string"==typeof e||"function"==typeof e.splice||tl(e)||ty(e)||tt(e)))return!e.length;var t=rg(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(e6(e))return!t5(e).length;for(var r in e)if(Dd.call(e,r))return!1;return!0},Dp=({notification:e})=>{let{description:t,action:r,kind:n,critical:o,title:a,onAction:i}=e;return(0,ff.jsx)(fb.ActionableNotification,{actionButtonLabel:r,kind:n||"info",lowContrast:o,subtitle:t,title:a||"",inline:!0,onActionButtonClick:i})},Dm=({subject:e})=>{let[t,r]=(0,cc.useState)([]);return(0,cc.useEffect)(()=>{let t=e.subscribe(e=>r(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,ff.jsx)(ff.Fragment,{children:t.map(e=>(0,ff.jsx)(Dp,{notification:e},e.id))})},Dh=({notification:e})=>{let{actionButtonLabel:t,onActionButtonClick:r=()=>{},subtitle:n,kind:o,title:a,critical:i,progressActionLabel:s,id:l,...u}=e,[c,d]=(0,cc.useState)(t);return(0,ff.jsx)(fb.ActionableNotification,{kind:o||"info",actionButtonLabel:c,ariaLabel:iG("closesActionableNotification","Closes actionable notification"),onActionButtonClick:()=>{r(),s&&d(s)},statusIconDescription:iG("actionableNotification","Actionable notification"),subtitle:n,title:a,lowContrast:i,inline:!0,...u})},Dg=({subject:e})=>{let[t,r]=(0,cc.useState)([]);return(0,cc.useEffect)(()=>{let t=e.subscribe(e=>r(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,ff.jsx)(ff.Fragment,{children:t.map(e=>(0,ff.jsx)(Dh,{notification:e},e.id))})};class Dy{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,r){t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(this,"listeners",new Set)}}let Dv=new Dy,Db=0,Dw=new Dy,DE=0;function Dx(e){e&&(0,cO.createRoot)(e).render((0,ff.jsx)(Dm,{subject:Dv}))}function DD(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&(t instanceof Error||!Df(t)))?(e.description instanceof Error&&(e.description=e.description.toLocaleString()),setTimeout(()=>{Dv.next({...e,id:Db++})},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function D_(e){e&&(0,cO.createRoot)(e).render((0,ff.jsx)(Dg,{subject:Dw}))}function DS(e){var t;e&&("string"==typeof(t=e.actionButtonLabel)?t.trim().length>0:"object"==typeof t&&!Df(t))?setTimeout(()=>{Dw.next({...e,id:DE++})},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}let DC=["NORMAL","HIGH","CRITICALLY_HIGH","OFF_SCALE_HIGH","LOW","CRITICALLY_LOW","OFF_SCALE_LOW"],Dk=["critically_low","critically_high","high","low","normal","off_scale_low","off_scale_high"],DP={container:"-esm-cohort-builder__numeric-observation-module__container___+Kqi9",card:"-esm-cohort-builder__numeric-observation-module__card___Q-ECG","abnormal-value":"-esm-cohort-builder__numeric-observation-module__abnormal-value___bx1h9","critical-value":"-esm-cohort-builder__numeric-observation-module__critical-value___nSKSX",cell:"-esm-cohort-builder__numeric-observation-module__cell___wc90e","critically-high":"-esm-cohort-builder__numeric-observation-module__critically-high___fmZfJ","critically-low":"-esm-cohort-builder__numeric-observation-module__critically-low___h9797",high:"-esm-cohort-builder__numeric-observation-module__high___0-YpP",low:"-esm-cohort-builder__numeric-observation-module__low___TuqAk","label-container":"-esm-cohort-builder__numeric-observation-module__label-container___FtozC","value-container":"-esm-cohort-builder__numeric-observation-module__value-container___R9qoY",label:"-esm-cohort-builder__numeric-observation-module__label___0DGA5",value:"-esm-cohort-builder__numeric-observation-module__value___ohqoh",units:"-esm-cohort-builder__numeric-observation-module__units___xvMd3","pad-right":"-esm-cohort-builder__numeric-observation-module__pad-right___umcen","off-scale-low":"-esm-cohort-builder__numeric-observation-module__off-scale-low___my+0i","off-scale-high":"-esm-cohort-builder__numeric-observation-module__off-scale-high___so9dv",arrow:"-esm-cohort-builder__numeric-observation-module__arrow___Agoh9"},DO=({value:e,unit:t,label:r,interpretation:n,referenceRange:o,conceptUuid:a,variant:i="card",patientUuid:s})=>{let l=(0,cc.useId)(),{referenceRange:u,isLoading:c}=function(e,t){let r=null;e&&(r=t?`${i5}/conceptreferencerange/?patient=${t}&concept=${e}&v=full`:`${i5}/conceptreferencerange/?concept=${e}&v=full`);let{data:n,error:o,isLoading:a}=dm()(r,se),i=n?.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:o,isLoading:a}}(o||n?void 0:a,s),d=o??u,f=(0,cc.useMemo)(()=>{if(n)return n?"--"===n?"normal":DC.includes(n)?n.toLowerCase():Dk.includes(n)?n:"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"},[n,d,e,c])??"normal",p="critically_low"===f||"critically_high"===f||"off_scale_low"===f||"off_scale_high"===f,m="normal"!==f,h=r?`omrs-numeric-obs-label-${r.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:iG("notAvailable","Not available"),w=fm()({[DP["critically-low"]]:"critically_low"===f||"off_scale_low"===f,[DP["critically-high"]]:"critically_high"===f||"off_scale_high"===f,[DP.low]:"low"===f,[DP.high]:"high"===f,[DP["off-scale-low"]]:"off_scale_low"===f,[DP["off-scale-high"]]:"off_scale_high"===f}),E=fm()({[DP.container]:!0,[DP.card]:!0,[DP["critical-value"]]:p,[DP["abnormal-value"]]:m&&!p}),x=fm()({[DP.cell]:!0,[w]:!0});return"cell"===i?(0,ff.jsxs)("div",{className:x,children:[b,v&&t?` ${t}`:""]}):(0,ff.jsxs)("section",{className:E,"data-testid":"numeric-observation-card",children:[r&&(0,ff.jsxs)("div",{className:DP["label-container"],children:[(0,ff.jsx)("span",{id:h,className:DP.label,children:r}),m&&(0,ff.jsx)("span",{className:DP[f.replace("_","-")],title:iG("abnormalValue","Abnormal value")})]}),(0,ff.jsxs)("div",{className:DP["value-container"],children:[(0,ff.jsx)("span",{id:g,"aria-labelledby":h&&y?`${h} ${y}`:h||y||void 0,className:DP.value,children:b}),v&&t&&(0,ff.jsx)("span",{id:y,className:DP.units,children:t})]})]})},DR="-esm-cohort-builder__page-header-module__pageHeader___XNJYe",DT=e=>{if("children"in e){let{children:t,className:r,...n}=e;return(0,ff.jsx)("div",{className:fm()(DR,r),...n,children:t})}{let{title:t,illustration:r,className:n,...o}=e;return(0,ff.jsx)("div",{className:fm()(DR,n),...o,children:(0,ff.jsx)(DN,{title:t,illustration:r})})}},DN=({title:e,illustration:t,className:r})=>{let[n,o]=(0,cc.useState)(null);return(0,cc.useEffect)(()=>{nq("@openmrs/esm-styleguide").then(e=>{o(e)})},[]),(0,ff.jsxs)("div",{className:fm()("-esm-cohort-builder__page-header-module__pageHeaderContent___V-mTz",r),children:[t,(0,ff.jsxs)("div",{className:"-esm-cohort-builder__page-header-module__pageLabels___vGJvg",children:[n?.implementationName&&(0,ff.jsx)("p",{children:iG(n.implementationName)}),(0,ff.jsx)("h1",{className:"-esm-cohort-builder__page-header-module__pageName___+eYMc",children:e})]})]})},Dj=({totalItems:e,pageSize:t,onPageNumberChange:r,pageNumber:n,dashboardLinkUrl:o,currentItems:a,dashboardLinkLabel:i})=>{let{pageSizes:s,pageItemsCount:l}=dG(t,e,n,a),u="tablet"===dM(),c=iG("paginationItemsCount","{{pageItemsCount}} / {{totalItems}} items",{totalItems:e,pageItemsCount:l});return(0,ff.jsx)(ff.Fragment,{children:e>0&&(0,ff.jsxs)("div",{className:fm()({"-esm-cohort-builder__pagination-module__tablet___DdaYk":u,"-esm-cohort-builder__pagination-module__desktop___rSwlo":!u}),children:[(0,ff.jsxs)("div",{children:[c,o&&(0,ff.jsx)(cp,{to:o,className:"-esm-cohort-builder__pagination-module__configurableLink___cTCLf",children:i??iG("seeAll","See all")})]}),(0,ff.jsx)(fb.Pagination,{className:"-esm-cohort-builder__pagination-module__pagination___U6anZ",page:n,pageSize:t,pageSizes:s,totalItems:e,onChange:r,pageRangeText:(e,t)=>iG("paginationOfPages","of {{count}} pages",{count:t}),size:u?"lg":"sm"})]})})};function DA(e){return DI(DL(e,"usual","official"))}function D$(e){return DA(e)}function DI(e){var t;let r;return e?e.text??(r=(t=e).given??[],(t.family?r.concat(t.family):r).join(" ")):""}function DM(e){return DI(e)}function DL(e,...t){for(let r of(0==t.length&&(t=["usual"]),t)){let t=e.name?.find(e=>{var t,n;return t=e,n=r,t.use?t.use===n:"usual"===n});if(t)return t}}function DF(e,t=d0()){let r=d0(t),n=E5(e,r);if(null==n)return null;let o=r.diff(n,"hours"),a=r.diff(n,"days"),i=r.diff(n,"weeks"),s=r.diff(n,"months"),l=r.diff(n,"years"),u={};if(o<2)u.minutes=r.diff(n,"minutes");else if(a<2)u.hours=o;else if(i<4)u.days=a;else if(l<1){let e=r.subtract(i,"weeks").diff(n,"days");u.weeks=i,u.days=e}else if(l<2){let e=r.subtract(s,"months").diff(n,"days");u.months=s,u.days=e}else if(l<18){let e=r.subtract(l,"year").diff(n,"months");u.years=l,u.months=e}else u.years=l;return u}function DB(e,t=d0()){let r=DF(e,t);if(null==r)return null;let n={style:"short",localeMatcher:"lookup"};return"minutes"in r&&0===r.minutes&&(n.minutesDisplay="always"),E6(r,n)}let DU={container:"-esm-cohort-builder__patient-banner-patient-info-module__container___WV40g",activePatientContainer:"-esm-cohort-builder__patient-banner-patient-info-module__activePatientContainer___YBgYK",patientBanner:"-esm-cohort-builder__patient-banner-patient-info-module__patientBanner___o-DQc",patientName:"-esm-cohort-builder__patient-banner-patient-info-module__patientName___KWLAJ",patientAvatar:"-esm-cohort-builder__patient-banner-patient-info-module__patientAvatar___gG4I3",patientAvatarButton:"-esm-cohort-builder__patient-banner-patient-info-module__patientAvatarButton___by4L9",patientInfo:"-esm-cohort-builder__patient-banner-patient-info-module__patientInfo___VU1fL",demographics:"-esm-cohort-builder__patient-banner-patient-info-module__demographics___xDHsd",row:"-esm-cohort-builder__patient-banner-patient-info-module__row___MlVwp",flexRow:"-esm-cohort-builder__patient-banner-patient-info-module__flexRow___9Aj3s",tagsSlot:"-esm-cohort-builder__patient-banner-patient-info-module__tagsSlot___PqCHJ",identifiers:"-esm-cohort-builder__patient-banner-patient-info-module__identifiers___bbREn",identifier:"-esm-cohort-builder__patient-banner-patient-info-module__identifier___HQzz8",primaryIdentifier:"-esm-cohort-builder__patient-banner-patient-info-module__primaryIdentifier___ocKCs",secondaryIdentifier:"-esm-cohort-builder__patient-banner-patient-info-module__secondaryIdentifier___4MLDH",value:"-esm-cohort-builder__patient-banner-patient-info-module__value___tkQTC",tag:"-esm-cohort-builder__patient-banner-patient-info-module__tag___u7Kco",gender:"-esm-cohort-builder__patient-banner-patient-info-module__gender___7eQuO",separator:"-esm-cohort-builder__patient-banner-patient-info-module__separator___CZBA8",tooltipPadding:"-esm-cohort-builder__patient-banner-patient-info-module__tooltipPadding___UQr5s",tooltipSmallText:"-esm-cohort-builder__patient-banner-patient-info-module__tooltipSmallText___MRUhY",actionsButtonText:"-esm-cohort-builder__patient-banner-patient-info-module__actionsButtonText___8ZC1R"};function DV({showIdentifierLabel:e,type:t,value:r}){return(0,ff.jsx)("span",{className:DU.primaryIdentifier,children:(0,ff.jsxs)(fb.Tag,{className:DU.tag,type:"gray",children:[e&&t?.text&&(0,ff.jsxs)("span",{className:DU.label,children:[t.text,": "]}),(0,ff.jsx)("span",{className:DU.value,children:r})]})})}function DW({showIdentifierLabel:e,type:t,value:r}){return(0,ff.jsxs)(fb.FormLabel,{className:DU.secondaryIdentifier,id:`patient-banner-identifier-${r}`,children:[e&&(0,ff.jsxs)("span",{className:DU.label,children:[t?.text,": "]}),(0,ff.jsx)("span",{className:DU.value,children:r})]})}function DH({identifiers:e,showIdentifierLabel:t}){let{excludePatientIdentifierCodeTypes:r}=dc(),{primaryIdentifierCode:n}=dq(),o=e?.filter(e=>{let t=e.type?.coding?.[0]?.code;return t&&!r?.uuids.includes(t)})??[];return(0,ff.jsx)(ff.Fragment,{children:o?.length?o.map(({value:e,type:r},a)=>(0,ff.jsxs)(cd().Fragment,{children:[(0,ff.jsx)("span",{className:DU.identifier,children:r?.coding?.[0]?.code===n?(0,ff.jsx)(DV,{showIdentifierLabel:t,type:r,value:e}):(0,ff.jsx)(DW,{showIdentifierLabel:t,type:r,value:e})}),a<o.length-1&&(0,ff.jsx)("span",{className:DU.separator,children:"\xb7"})]},e)):""})}let Dz={Female:pd,Male:pf,Other:pp,Unknown:pm},DK=({gender:e})=>{let t=Dz[e];return t?(0,ff.jsx)(t,{fill:"#525252"}):null},DG={male:"Male",female:"Female",other:"Other",unknown:"Unknown"};function DZ({patient:e,renderedFrom:t}){var r;let n,o,a=DA(e),i=e?.gender&&(o=DG[n=(r=e.gender).toLowerCase()]??"Unknown",{displayText:iG(n,r),iconKey:o}),s=(0,cc.useMemo)(()=>({patientUuid:e.id,patient:e,renderedFrom:t}),[e.id,e,t]);return(0,ff.jsxs)("div",{className:DU.patientInfo,children:[(0,ff.jsx)("div",{className:fm()(DU.row,DU.patientNameRow),children:(0,ff.jsxs)("div",{className:DU.flexRow,children:[(0,ff.jsx)("span",{className:DU.patientName,children:a}),i&&(0,ff.jsxs)("div",{className:DU.gender,children:[(0,ff.jsx)(DK,{gender:i.iconKey}),(0,ff.jsx)("span",{children:i.displayText})]}),(0,ff.jsx)(cP,{className:DU.tagsSlot,name:"patient-banner-tags-slot",state:s})]})}),(0,ff.jsxs)("div",{className:DU.demographics,children:[e.birthDate&&(0,ff.jsxs)(ff.Fragment,{children:[(0,ff.jsx)("span",{children:DB(e.birthDate)}),(0,ff.jsx)("span",{className:DU.separator,children:"\xb7"}),(0,ff.jsx)("span",{children:EQ(e.birthDate,{time:!1})}),(0,ff.jsx)("span",{className:DU.separator,children:"\xb7"})]}),(0,ff.jsx)(DH,{identifiers:e.identifier,showIdentifierLabel:!0}),(0,ff.jsx)(cP,{className:DU.extensionSlot,name:"patient-banner-bottom-slot",state:s})]})]})}var DY=r(1673);function Dq({patient:e,patientUuid:t,actionsSlotName:r,additionalActionsSlotState:n}){let[o,a]=(0,cc.useState)(!1),{extensions:i}=cC(r),s="tablet"===dM(),l=dW(()=>a(!1),o),u=(0,cc.useRef)(null),c=(0,cc.useRef)(null),d=(0,cc.useId)(),f=`patient-actions-menu-trigger-${d}`,p=`patient-actions-menu-${d}`,m=(0,cc.useCallback)(()=>a(e=>!e),[]),h=(0,cc.useCallback)(()=>{a(!1),u.current?.focus()},[]),g=(0,cc.useCallback)(e=>{if("Escape"===e.key&&o){e.stopPropagation(),h();return}if(("ArrowDown"===e.key||"ArrowUp"===e.key)&&o){e.preventDefault();let t=c.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!t?.length)return;let r=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,n=Array.from(t).indexOf(r);if(-1===n)return void t["ArrowDown"===e.key?0:t.length-1]?.focus();let o=n+("ArrowDown"===e.key?1:-1),a=o<0?t.length-1:o>=t.length?0:o;t[a]?.focus()}},[h,o]);(0,cc.useEffect)(()=>{if(o&&c.current){let e=c.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[o]);let y=(0,cc.useMemo)(()=>({patientUuid:t,patient:e,closeMenu:h,...n}),[t,e,h,n]);return 0===i.length?null:(0,ff.jsx)("div",{className:"-esm-cohort-builder__patient-banner-actions-menu-module__overflowMenuContainer___7eCLh",children:(0,ff.jsxs)("div",{"data-overflow-menu":!0,className:fm()("cds--overflow-menu",fx),ref:l,children:[(0,ff.jsxs)("button",{className:fm()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":o},fS),"aria-controls":p,"aria-expanded":o,"aria-haspopup":"true",id:f,onClick:m,onKeyDown:g,ref:u,children:[(0,ff.jsx)("span",{className:"-esm-cohort-builder__patient-banner-actions-menu-module__actionsButtonText___TbM5a",children:iG("actions","Actions")})," ",(0,ff.jsx)(DY.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}})]}),(0,ff.jsxs)("div",{className:fm()("cds--overflow-menu-options","cds--overflow-menu--flip",fD,{[f_]:o}),"aria-labelledby":f,"data-floating-menu-direction":"bottom",id:p,onKeyDown:g,ref:c,role:"menu",tabIndex:-1,children:[(0,ff.jsx)("ul",{className:fm()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":s}),children:(0,ff.jsx)(cP,{name:r,state:y},r)}),(0,ff.jsx)("span",{})]})]})})}var DJ=r(6767),DX=r.n(DJ);function DQ(e){let{patientPhotoConceptUuid:t}=dc({externalModuleName:"@openmrs/esm-styleguide"}),r=t?`${i5}/obs?patient=${e}&concept=${t}&v=full`:null,{data:n,error:o,isLoading:a}=cz()(e?r:null,se),i=n?.data?.results[0];return{data:i?{dateTime:i?.obsDatetime,imageSrc:i?.value?.links?.uri}:null,error:o,isLoading:a}}let D0=({width:e=56,height:t=56,"aria-label":r})=>{let{t:n}=(0,cW.useTranslation)();return(0,ff.jsxs)("svg",{"aria-label":r??n("patientPhotoPlaceholder","Patient photo placeholder"),width:e,height:t,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ff.jsx)("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),(0,ff.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"})]})},D1="-esm-cohort-builder__patient-photo-module__avatar___R93LX";function D2({patientUuid:e,patientName:t,alt:r}){let{data:n,isLoading:o}=DQ(e),[a,i]=(0,cc.useState)(null),[s,l]=(0,cc.useState)(!1),u=(0,cc.useMemo)(()=>DX().generate(e),[e]);(0,cc.useEffect)(()=>{if(n?.imageSrc){let e=new URL(n.imageSrc,window.location.origin).pathname;l(!0);let t=!1,r=new Image;return r.onload=()=>{t||(i(e),l(!1))},r.onerror=()=>{t||(i(null),l(!1))},r.src=e,()=>{t=!0}}i(null),l(!1)},[n?.imageSrc]);let c=(0,cc.useMemo)(()=>r||(a?iG("patientPhotoAlt","Profile photo of {{patientName}}",{patientName:t}):iG("patientAvatarAlt","Avatar for {{patientName}}",{patientName:t})),[r,a,t]);return o||s?(0,ff.jsx)(fb.SkeletonIcon,{className:"-esm-cohort-builder__patient-photo-module__skeleton___I-6iq","data-testid":"skeleton-icon"}):n?.imageSrc&&!a?(0,ff.jsx)(D0,{"aria-label":iG("patientPhotoPlaceholder","Photo placeholder for {{patientName}}",{patientName:t})}):a?(0,ff.jsx)("div",{"aria-label":c,children:(0,ff.jsx)("img",{className:D1,src:a,alt:c,title:t})}):(0,ff.jsx)("div",{"aria-label":c,children:(0,ff.jsx)("div",{className:D1,title:t,style:{backgroundImage:u.toDataUrl(),backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:(0,ff.jsx)("span",{className:"-esm-cohort-builder__patient-photo-module__initials___JnUBD",children:function(e,t=3){return e.split(/\s+/).filter(Boolean).slice(0,t).map(e=>e[0]).join("")}(t)})})})}let D4=["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"],D3=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-appointments",pictogramProps:e})})),D6=D3,D5=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-assessment-1",pictogramProps:e})})),D9=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-assessment-2",pictogramProps:e})})),D8=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-blood-bank",pictogramProps:e})})),D7=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-cardiology",pictogramProps:e})})),_e=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-cohorts",pictogramProps:e})})),_t=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-concept-dictionary",pictogramProps:e})})),_r=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-ct-scan",pictogramProps:e})})),_n=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-data-entry",pictogramProps:e})})),_o=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-dentistry",pictogramProps:e})})),_a=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-digital-trust",pictogramProps:e})})),_i=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-emergency-department",pictogramProps:e})})),_s=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-facility",pictogramProps:e})})),_l=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-geriatrics",pictogramProps:e})})),_u=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-gynaecology",pictogramProps:e})})),_c=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),_d=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),_f=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-labs-2",pictogramProps:e})})),_p=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-metadata-export",pictogramProps:e})})),_m=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-obstetrics",pictogramProps:e})})),_h=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-patient-documents",pictogramProps:e})})),_g=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-patient-search",pictogramProps:e})})),_y=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-patients",pictogramProps:e})})),_v=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-payments-desk",pictogramProps:e})})),_b=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),_w=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-pharmacy-2",pictogramProps:e})})),_E=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-registration",pictogramProps:e})})),_x=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-reports",pictogramProps:e})})),_D=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),__=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),_S=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-system-administration",pictogramProps:e})})),_C=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-transfer",pictogramProps:e})})),_k=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-triage",pictogramProps:e})})),_P=(0,cc.memo)((0,cc.forwardRef)(function(e,t){return(0,ff.jsx)(_N,{ref:t,pictogram:"omrs-pict-x-ray",pictogramProps:e})})),_O=_s,_R=_y,_T=(0,cc.memo)((0,cc.forwardRef)(function({pictogram:e,fallback:t,...r},n){let o=(0,cc.useRef)(document.getElementById(e));return(0,cc.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),r=new MutationObserver(t=>{for(let r of t)"childList"===r.type&&(o.current=document.getElementById(e))});return t&&r.observe(t,{childList:!0}),()=>r.disconnect()},[e]),(0,ff.jsx)(c7,{value:o.current,fallback:t,children:(0,ff.jsx)(_N,{ref:n,pictogram:e,pictogramProps:r})})})),_N=(0,cc.memo)((0,cc.forwardRef)(function({pictogram:e,pictogramProps:t},r){let{className:n,size:o}=Object.assign({},{size:92},t);return(o<=26||o>144)&&(console.error(`Invalid size '${o}' specified for ${e}. Defaulting to 92.`),o=92),(0,ff.jsx)("svg",{ref:r,className:fm()("-esm-cohort-builder__pictograms-module__pictogram___LTPzD",n),height:o,width:o,children:(0,ff.jsx)("use",{href:`#${e}`})})})),_j=({children:e})=>"tablet"===dM()?(0,ff.jsx)(fb.Layer,{children:e}):(0,ff.jsx)(ff.Fragment,{children:e}),_A=({snackbar:e,closeSnackbar:t})=>{let{actionButtonLabel:r="",kind:n="success",onActionButtonClick:o=()=>{},isLowContrast:a="error"!==n,progressActionLabel:i,subtitle:s="",timeoutInMs:l=5e3,autoClose:u="error"!==n,title:c,id:d,...f}=e,[p,m]=(0,cc.useState)(r),[h,g]=(0,cc.useState)(!0),[y,v]=(0,cc.useState)(!1),b=(0,cc.useCallback)(()=>{setTimeout(t,250)},[t]),w=(0,cc.useCallback)(()=>{v(!0),b()},[b]);return(0,cc.useEffect)(()=>{if(u){let e=setTimeout(w,l);return()=>clearTimeout(e)}},[l,u,w]),(0,cc.useEffect)(()=>{g(!1),window.setTimeout(()=>{g(!0)},0)},[]),(0,ff.jsx)(fb.ActionableNotification,{actionButtonLabel:p,"aria-label":iG("closeSnackbar","Close snackbar"),className:fm()("-esm-cohort-builder__snackbar-module__slideIn___TqSN-",{"-esm-cohort-builder__snackbar-module__animated___+XPKT":h,"-esm-cohort-builder__snackbar-module__slideOut___1cFIY":y}),kind:n,lowContrast:a,onActionButtonClick:()=>{o(),w(),i&&m(i)},onClose:b,statusIconDescription:iG("snackbarNotification","Snackbar notification"),subtitle:s,title:c,...f})},_$=({subject:e})=>{let[t,r]=(0,cc.useState)([]),n=(0,cc.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]);return(0,cc.useEffect)(()=>{let t=e.subscribe(e=>r(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,ff.jsx)(ff.Fragment,{children:t.map(e=>(0,ff.jsx)(_A,{snackbar:e,closeSnackbar:()=>n(e)},e.id))})},_I=new Dy,_M=0;function _L(e){e&&(0,cO.createRoot)(e).render((0,ff.jsx)(_$,{subject:_I}))}function _F(e){var t;e&&"string"==typeof(t=e.title)&&t.trim().length>0?setTimeout(()=>{_I.next({...e,id:_M++})},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}let _B=({toast:e,closeToast:t})=>{let{description:r,kind:n,critical:o,title:a,actionButtonLabel:i,onActionButtonClick:s=()=>{}}=e,l=(0,cc.useCallback)(()=>{s(),t()},[t,s]);return(0,ff.jsx)("div",{children:(0,ff.jsx)(fb.ActionableNotification,{actionButtonLabel:i,kind:n||"info",lowContrast:o,subtitle:r,title:a||"",onActionButtonClick:l,onClose:t})})},_U=({subject:e})=>{let[t,r]=(0,cc.useState)([]),n=(0,cc.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]);return(0,cc.useEffect)(()=>{let t=e.subscribe(e=>r(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,ff.jsx)(ff.Fragment,{children:t.map(e=>(0,ff.jsx)(_B,{toast:e,closeToast:()=>n(e)},e.id))})},_V=new Dy,_W=0;function _H(e){e&&(0,cO.createRoot)(e).render((0,ff.jsx)(_U,{subject:_V}))}function _z(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!Df(t))?setTimeout(()=>{_V.next({...e,id:_W++})},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}let _K="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),_G=new Uint8Array(16),_Z=[];for(let e=0;e<256;++e)_Z.push((e+256).toString(16).slice(1));let _Y=function(e,t,r){if(_K&&!t&&!e)return _K();let n=(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(_G)}();if(n.length<16)throw Error("Random bytes length must be >= 16");if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){if((r=r||0)<0||r+16>t.length)throw RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return(_Z[e[t+0]]+_Z[e[t+1]]+_Z[e[t+2]]+_Z[e[t+3]]+"-"+_Z[e[t+4]]+_Z[e[t+5]]+"-"+_Z[e[t+6]]+_Z[e[t+7]]+"-"+_Z[e[t+8]]+_Z[e[t+9]]+"-"+_Z[e[t+10]]+_Z[e[t+11]]+_Z[e[t+12]]+_Z[e[t+13]]+_Z[e[t+14]]+_Z[e[t+15]]).toLowerCase()}(n)};async function _q(e,t){let{openedGroup:r}=u6.getState();if(r){if(r.groupName===e&&_Q(r.props,t))return!0;else if(!await _2({reason:"CLOSE_WORKSPACE_GROUP",explicit:!1}))return!1}return u6.setState(r=>({...r,openedGroup:{groupName:e,props:t},openedWindows:[]})),!0}async function _J(e){let{openedGroup:t,openedWindows:r}=u6.getState();if(t){if(r.length>0&&!(e||await _2({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})))return!1;u6.setState(e=>({...e,openedGroup:null,openedWindows:[]}))}return!0}async function _X(e,t=null,r=null,n=null){let o=u6.getState();if(!o.registeredWorkspacesByName[e])throw Error(`Unable to launch workspace ${e}. Workspace is not registered`);let a=u5(e);if(!a)throw Error(`Unable to launch workspace ${e}. Workspace is not registered to a workspace window`);let{openedGroup:i}=o,{name:s}=a,l=u9(s);if(!l)throw Error(`Unable to launch workspace ${e}. Workspace window ${a.name} is not registered to a workspace group`);let u=u8(e);if(i&&(i.groupName!==l.name||!_Q(i.props,n)))return!!await _2({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})&&(u6.setState({...o,openedGroup:{groupName:l.name,props:n},openedWindows:[{windowName:s,openedWorkspaces:[Sn(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0);if(u>=0){let n=o.openedWindows[u],a=o.openedGroup?.props??{},i=o.isMostRecentlyOpenedWindowHidden,{openedWorkspaces:c}=n;if(_Q(n.props,r)){let d=c.find(t=>t.workspaceName===e);return d&&_Q(d.props,t)?((i||u!==o.openedWindows.length-1)&&u6.setState(_8.restoreWindow(o,s)),!0):!!await _2({reason:"CLOSE_WORKSPACE",explicit:!1,windowName:s,workspaceName:e})&&(u6.setState({...o,openedGroup:{groupName:l.name,props:o?.openedGroup?.props??a},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[Sn(e,t)],props:n?.props??r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return!!await _2({reason:"CLOSE_WINDOW",explicit:!1,windowName:s})&&(u6.setState({...o,openedGroup:{groupName:l.name,props:a??o?.openedGroup?.props},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[Sn(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return"closable"!=l.persistence?(u6.setState({...o,openedGroup:{groupName:l.name,props:n??o?.openedGroup?.props??null},openedWindows:[...o.openedWindows,{windowName:s,openedWorkspaces:[Sn(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0):!!await _2({reason:"CLOSE_OTHER_WINDOWS",explicit:!1,windowNameToSpare:a.name})&&(u6.setState({...o,openedGroup:{groupName:l.name,props:n??o?.openedGroup?.props??null},openedWindows:[{windowName:s,openedWorkspaces:[Sn(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}function _Q(e,t){return null==e||null==t||R(e,t)}function _0(e,t){let r=[];for(let n=e.openedWorkspaces.length-1;n>=0;n--){let o=e.openedWorkspaces[n];if(o.hasUnsavedChanges&&r.push(o),t&&o.workspaceName===t)break}return r}function _1(e){return 0===e.length?Promise.resolve(!0):new Promise(t=>{let r=Dc("workspace2-close-prompt",{size:"sm",onConfirm:()=>{r(),t(!0)},onCancel:()=>{r(),t(!1)},affectedWorkspaceTitles:e.map(e=>e.title??"")})})}function _2(e){let{openedWindows:t}=u6.getState(),r=[];switch(e.reason){case"CLOSE_WORKSPACE_GROUP":r=t.flatMap(e=>_0(e));break;case"CLOSE_WINDOW":{let n=t.find(t=>t.windowName===e.windowName);if(!n)throw Error(`Window ${e.windowName} not found in opened windows.`);r=_0(n);break}case"CLOSE_WORKSPACE":{let n=t.find(t=>t.windowName===e.windowName);if(!n)throw Error(`Window ${e.windowName} not found in opened windows.`);r=_0(n,e.workspaceName);break}case"CLOSE_OTHER_WINDOWS":r=t.filter(t=>t.windowName!==e.windowNameToSpare).flatMap(e=>_0(e))}return _1(r)}function _4(e,t){return _1(_0(e,t))}function _3(e,t){let r=e.openedWorkspaces.findIndex(e=>e.workspaceName===t);return r<0?e:0===r?null:{...e,openedWorkspaces:e.openedWorkspaces.slice(0,r)}}function _6(e,t,r,n){let{registeredWorkspacesByName:o}=u6.getState(),a=o[r];if(!a)throw Error(`No workspace named "${r}" registered`);let i=o[t];if(!i)throw Error(`No workspace named "${t}" registered`);if(i.window!==a.window)throw Error(`Child workspace ${r} does not belong to the same workspace window as parent workspace ${t}`);if(a.window!==e.windowName)throw Error(`Cannot open child workspace ${r} as window ${a.window} is not opened`);let{openedWorkspaces:s}=e,l=s.findIndex(e=>e.workspaceName===t);if(-1===l)throw Error(`Cannot open child workspace ${r} 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,Sn(r,n)]}}function _5(e,t,r){let n=e.openedWorkspaces.findIndex(e=>e.uuid===t);if(n<0)return e;let o=e.openedWorkspaces[n];if(Object.keys(r).every(e=>o[e]===r[e]))return e;let a=[...e.openedWorkspaces];return a[n]={...o,...r},{...e,openedWorkspaces:a}}function _9(e,t,r){let n=e.openedWindows.findIndex(e=>e.openedWorkspaces.some(e=>e.uuid===t));if(n<0)return e;let o=e.openedWindows[n],a=_5(o,t,r);if(a===o)return e;let i=[...e.openedWindows];return i[n]=a,{...e,openedWindows:i}}let _8={setWindowMaximized(e,t,r){let n=e.openedWindows.findIndex(e=>e.windowName===t),o=[...e.openedWindows],a={...o[n],maximized:r};return o[n]=a,{...e,openedWindows:o}},hideWindow:e=>({...e,isMostRecentlyOpenedWindowHidden:!0}),restoreWindow(e,t){let r=e.openedWindows.findIndex(e=>e.windowName===t),n=e.openedWindows[r],o=[...e.openedWindows.filter((e,t)=>t!==r),n];return{...e,openedWindows:o,isMostRecentlyOpenedWindowHidden:!1}},closeWorkspace(e,t){let r=e.openedWindows.findIndex(e=>e.openedWorkspaces.some(e=>e.workspaceName===t));if(r<0)return e;let n=_3(e.openedWindows[r],t),o=[...e.openedWindows],a=e.isMostRecentlyOpenedWindowHidden;if(null===n){let t=r===e.openedWindows.length-1;o.splice(r,1),t&&o.length>0&&(a=!1)}else o[r]=n;return{...e,openedWindows:o,isMostRecentlyOpenedWindowHidden:a}},openChildWorkspace(e,t,r,n){let o=e.registeredWorkspacesByName[r];if(!o)throw Error(`No workspace named "${r}" registered`);let a=e.openedWindows.findIndex(e=>e.windowName===o.window);if(-1==a)throw Error(`Cannot open child workspace ${r} as window ${o.window} is not opened`);let i=[...e.openedWindows];return i[a]=_6(e.openedWindows[a],t,r,n),{...e,openedWindows:i}},setHasUnsavedChanges:(e,t,r)=>_9(e,t,{hasUnsavedChanges:r}),setWorkspaceTitle:(e,t,r)=>_9(e,t,{title:r})};function _7(){return cb(u6,_8)}let Se=()=>(0,cc.useContext)(c$),St=()=>Object.keys(u6.getState().registeredWorkspacesByName);function Sr(e,t,r){let n=e.openedWorkspaces[e.openedWorkspaces.length-1];return(n?t[n.workspaceName]?.width:void 0)??r[e.windowName]?.width??"narrow"}function Sn(e,t){return{workspaceName:e,props:t??{},hasUnsavedChanges:!1,uuid:_Y()}}function So(e,t,r){let n=u6.getState().registeredWorkspacesByName[e];return n?{windowName:n.window,openedWorkspaces:[Sn(e,t)],props:r??null,maximized:!1}:null}let Sa=({title:e,children:t,hasUnsavedChanges:r=!1})=>{let{setHasUnsavedChanges:n,setWorkspaceTitle:o}=Se();return(0,cc.useEffect)(()=>{n(r??!1)},[r,n]),(0,cc.useEffect)(()=>{o(e)},[e,o]),(0,ff.jsx)(ff.Fragment,{children:t})};function Si(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Ss(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Si(Object(r),!0).forEach(function(t){Su(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Si(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Sl(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Su(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sc(e){return(Sc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Sd(e,t){return(Sd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Sf(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Sp=function(e){var t=cc.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&&Sd(i,t);var r,n,o,a=(r=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=Sc(i);e=r?Reflect.construct(t,arguments,Sc(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 Sf(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),Su(Sf(t=a.call(this,e)),"handleRef",function(e){t.el=e}),Su(Sf(t),"addThingToDo",function(e,r){t.state.hasError&&"unmount"!==e||(t.nextThingToDo=(t.nextThingToDo||Promise.resolve()).then(function(){if(!t.unmounted||"unmount"===e)return r.apply(void 0,arguments)}).catch(function(r){throw t.nextThingToDo=Promise.resolve(),t.setState({hasError:!0}),r&&r.message&&(r.message="During '".concat(e,"', parcel threw an error: ").concat(r.message)),t.props.handleError?t.props.handleError(r):setTimeout(function(){throw r}),r}))}),Su(Sf(t),"getParcelProps",function(){var e=Ss(Ss({},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 n=[{key:"componentDidMount",value:function(){var e=this;this.unmounted=!1,this.addThingToDo("mount",function(){var t,r=e.props.mountParcel||e.mountParcel;if(!r)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(r){t.style[r]=e.props.wrapStyle[r]}),e.props.appendTo.appendChild(t)),e.parcel=r(e.props.config,Ss({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 c$&&c$.Consumer?cc.createElement(c$.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):null;var t=c$&&c$.Consumer?cc.createElement(c$.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):void 0;return cc.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},t)}}],Sl(i.prototype,n),o&&Sl(i,o),i}();Su(Sp,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});var Sm=r(4535),Sh=r(771);let Sg={workspaceOuterContainer:"-esm-cohort-builder__workspace2-module__workspaceOuterContainer___DLiCR",narrowWorkspace:"-esm-cohort-builder__workspace2-module__narrowWorkspace___VL0kF",widerWorkspace:"-esm-cohort-builder__workspace2-module__widerWorkspace___3QgrA",extraWideWorkspace:"-esm-cohort-builder__workspace2-module__extraWideWorkspace___s7nnh",workspaceMiddleContainer:"-esm-cohort-builder__workspace2-module__workspaceMiddleContainer___mTGNN",maximized:"-esm-cohort-builder__workspace2-module__maximized___-yo9l",hidden:"-esm-cohort-builder__workspace2-module__hidden___K2ryM",workspaceInnerContainer:"-esm-cohort-builder__workspace2-module__workspaceInnerContainer___o3zVl",workspaceSpacer:"-esm-cohort-builder__workspace2-module__workspaceSpacer___N6-ox",loader:"-esm-cohort-builder__workspace2-module__loader___29hpw",hiddenExtraWorkspace:"-esm-cohort-builder__workspace2-module__hiddenExtraWorkspace___-W7TY",header:"-esm-cohort-builder__workspace2-module__header___p0kuD",headerButtons:"-esm-cohort-builder__workspace2-module__headerButtons___hMydG",workspaceContent:"-esm-cohort-builder__workspace2-module__workspaceContent___uROr7",overlayHeaderSpacer:"-esm-cohort-builder__workspace2-module__overlayHeaderSpacer___zdrhx",isActionMenuOpened:"-esm-cohort-builder__workspace2-module__isActionMenuOpened___Wc1Il",showActionMenu:"-esm-cohort-builder__workspace2-module__showActionMenu___qCVQ-",marginWorkspaceContent:"-esm-cohort-builder__workspace2-module__marginWorkspaceContent___A+20C",workspaceContainerWithActionMenu:"-esm-cohort-builder__workspace2-module__workspaceContainerWithActionMenu___S98dq",workspaceFixedContainer:"-esm-cohort-builder__workspace2-module__workspaceFixedContainer___c9Uny",workspaceContainerWithoutActionMenu:"-esm-cohort-builder__workspace2-module__workspaceContainerWithoutActionMenu___u8FbT"},Sy=e=>e.registeredWorkspacesByName,Sv=({lifeCycle:e,openedWorkspace:t,openedWindow:r,groupProps:n,actions:o,renderChrome:a,isRootWorkspace:i,isLeafWorkspace:s,showActionMenu:l})=>{let u=(0,cc.useMemo)(()=>t&&{closeWorkspace:async(e={})=>{let{closeWindow:n=!1,discardUnsavedChanges:a=!1}=e;return n?!!(a||await o.promptForClosingWorkspaces())&&(o.closeWorkspace(r.openedWorkspaces[0].workspaceName),!0):!!(a||await o.promptForClosingWorkspaces(t.workspaceName))&&(o.closeWorkspace(t.workspaceName),!0)},launchChildWorkspace:async(e,n)=>{let a=t.workspaceName,{openedWorkspaces:i}=r,s=i.findIndex(e=>e.workspaceName===a);-1===s||s!==i.length-1&&i.slice(s+1).some(e=>e.hasUnsavedChanges)&&!await o.promptForClosingWorkspaces(i[s+1].workspaceName)||o.openChildWorkspace(a,e,n||{})},setWorkspaceTitle:e=>o.setWorkspaceTitle(t.uuid,e),setHasUnsavedChanges:e=>o.setHasUnsavedChanges(t.uuid,e),workspaceName:t.workspaceName,workspaceProps:t.props,windowProps:r.props,groupProps:n,workspaceMeta:u6.getState().registeredWorkspacesByName[t.workspaceName]?.meta??{},isRootWorkspace:i,isLeafWorkspace:s,windowName:r.windowName,showActionMenu:l},[t,r,n,o,i,s,l]),c=!a&&!s,d=(0,cc.useMemo)(()=>e?(0,ff.jsx)(Sp,{config:e,mountParcel:cl,wrapWith:"div",wrapClassName:fm()(Sg.workspaceContent,{[Sg.hiddenExtraWorkspace]:c}),...u},t.workspaceName):null,[e,t.workspaceName,u,c]);return a?(0,ff.jsx)(Sb,{openedWorkspace:t,openedWindow:r,isRootWorkspace:i,showActionMenu:l,closeWindow:()=>u.closeWorkspace({closeWindow:!0}),children:d}):d??(0,ff.jsx)(fb.InlineLoading,{className:fm()(Sg.loader,{[Sg.hiddenExtraWorkspace]:c}),description:`${iG("loading")}`})},Sb=({openedWorkspace:e,openedWindow:t,isRootWorkspace:r,showActionMenu:n,closeWindow:o,children:a})=>{let i=dM(),{openedGroup:s,openedWindows:l,registeredWindowsByName:u,registeredWorkspacesByName:c,registeredGroupsByName:d,isMostRecentlyOpenedWindowHidden:f,setWindowMaximized:p,hideWindow:m}=_7(),h=t.windowName,{maximized:g}=t,y=e.title??"",v=u[h],b=Sr(t,c,u),w=v?.icon,E=v?.canMaximize,x=!!s&&d[s.groupName]?.persistence==="closable",D=!!w&&!x,_=l.findIndex(e=>e.windowName===h)<l.length-1||f,S=Object.values(u).some(e=>e.group===s?.groupName&&void 0!==e.icon);return(0,ff.jsxs)("div",{className:fm()(Sg.workspaceOuterContainer,{[Sg.narrowWorkspace]:"narrow"===b,[Sg.widerWorkspace]:"wider"===b,[Sg.extraWideWorkspace]:"extra-wide"===b,[Sg.isActionMenuOpened]:S}),children:[(0,ff.jsx)("div",{className:fm()(Sg.workspaceSpacer,{[Sg.hidden]:_})}),(0,ff.jsx)("div",{className:fm()(Sg.workspaceMiddleContainer,{[Sg.maximized]:g,[Sg.hidden]:_,[Sg.isRootWorkspace]:r,[Sg.showActionMenu]:n}),children:(0,ff.jsx)("div",{className:fm()(Sg.workspaceInnerContainer,{[Sg.maximized]:g,[Sg.hidden]:_,[Sg.isRootWorkspace]:r}),children:a?(0,ff.jsxs)(ff.Fragment,{children:[(0,ff.jsxs)(fb.Header,{"aria-label":iG("workspaceHeader"),className:Sg.header,children:[(0,ff.jsx)(fb.HeaderName,{prefix:"",children:y}),(0,ff.jsx)("div",{className:Sg.overlayHeaderSpacer}),(0,ff.jsx)(fb.HeaderGlobalBar,{className:Sg.headerButtons,children:dL(i)?(0,ff.jsxs)(ff.Fragment,{children:[(E||g)&&(0,ff.jsx)(fb.HeaderGlobalAction,{"aria-label":g?iG("minimize"):iG("maximize"),onClick:()=>p(h,!g),children:g?(0,ff.jsx)(Sm.Xj,{}):(0,ff.jsx)(Sm.hz,{})}),D&&(0,ff.jsx)(fb.HeaderGlobalAction,{"aria-label":iG("hide"),onClick:()=>m(),children:(0,ff.jsx)(fG,{})}),!x&&(0,ff.jsx)(fb.HeaderGlobalAction,{"aria-label":iG("close"),onClick:o,children:(0,ff.jsx)(pt,{})})]}):(0,ff.jsxs)(ff.Fragment,{children:[D&&(0,ff.jsx)(fb.HeaderGlobalAction,{"aria-label":iG("hide"),onClick:()=>m(),children:(0,ff.jsx)(Sh.d3,{})}),(0,ff.jsx)(fb.HeaderGlobalAction,{"aria-label":iG("close"),onClick:()=>{x?_J():o()},children:(0,ff.jsx)(pt,{})})]})})]}),a]}):(0,ff.jsx)(fb.InlineLoading,{className:Sg.loader,description:`${iG("loading")} ...`})})})]})},Sw=({openedWindow:e,groupProps:t,actions:r,renderChrome:n,showActionMenu:o})=>{let{openedWorkspaces:a}=e,[i,s]=(0,cc.useState)({}),l=cv(u6,Sy);return(0,cc.useEffect)(()=>{let e=!1;return Promise.all(a.map(async e=>{let t=l[e.workspaceName];if(!t)return null;let{moduleName:r,component:n}=t;return[e.uuid,await ft(r,n)]})).then(t=>{e||s(Object.fromEntries(t.filter(e=>null!=e)))}),()=>{e=!0}},[a,l]),(0,ff.jsx)(ff.Fragment,{children:a.map((s,l)=>(0,ff.jsx)(Sv,{openedWorkspace:s,openedWindow:e,groupProps:t,actions:r,renderChrome:n,lifeCycle:i[s.uuid],isRootWorkspace:0===l,isLeafWorkspace:l===a.length-1,showActionMenu:o},s.uuid))})},SE=e=>e.registeredWorkspacesByName,Sx=({name:e,workspaceProps:t,windowProps:r,groupProps:n,onWindowChanged:o})=>{let a=cv(u6,SE),i=cv(u6,t=>{let r=t.registeredWorkspacesByName[e]?.window;return r?t.registeredWindowsByName[r]:void 0}),s={name:e,workspaceProps:t,windowProps:r,groupProps:n},l=(0,cc.useRef)(),u=(0,cc.useRef)(null);if(!l.current){let o=So(e,t,r);l.current=U({openedWindow:o,groupProps:n??null}),o&&(u.current=s)}let c=l.current;(0,cc.useEffect)(()=>{let o=u.current;if(o&&o.name===e&&R(o.workspaceProps,t)&&R(o.windowProps,r)&&R(o.groupProps,n))return;let a=So(e,t,r);c.setState({openedWindow:a,groupProps:n??null},!0),u.current=a?s:null},[e,t,r,n,a,c]);let d=(0,cc.useMemo)(()=>(function(e){function t(t){e.setState(e=>{if(!e.openedWindow)return e;let r=t(e.openedWindow);return r===e.openedWindow?e:{...e,openedWindow:r}})}return{closeWorkspace(e){t(t=>_3(t,e))},openChildWorkspace(e,r,n){t(t=>_6(t,e,r,n))},setWorkspaceTitle(e,r){t(t=>_5(t,e,{title:r}))},setHasUnsavedChanges(e,r){t(t=>_5(t,e,{hasUnsavedChanges:r}))},promptForClosingWorkspaces(t){let{openedWindow:r}=e.getState();return r?_4(r,t):Promise.resolve(!0)}}})(c),[c]),{openedWindow:f,groupProps:p}=cv(c),m=f?.openedWorkspaces[f.openedWorkspaces.length-1],h=m?.workspaceName??null,g=m?.title??"",y=f?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,v=i?.width??"narrow",b=(0,cc.useRef)(o);return(0,cc.useEffect)(()=>{b.current=o}),(0,cc.useEffect)(()=>{b.current?.({workspaceName:h,windowWidth:v,title:g,hasUnsavedChanges:y})},[h,v,g,y]),(0,ff.jsx)("div",{className:"-esm-cohort-builder__exported-workspace-module__exportedWorkspace___FZHbG",children:f?(0,ff.jsx)(Sw,{openedWindow:f,groupProps:p,actions:d,renderChrome:!1,showActionMenu:!1}):null})},SD="-esm-cohort-builder__action-menu-button2-module__container___gYRoa",S_="-esm-cohort-builder__action-menu-button2-module__elementContainer___vBViO",SS="-esm-cohort-builder__action-menu-button2-module__active___uRJRA",SC="-esm-cohort-builder__action-menu-button2-module__focused___D4VYB";function Sk({getIcon:e,hasUnsavedChanges:t,tagContent:r}){return(0,ff.jsxs)(ff.Fragment,{children:[e({size:16}),t?(0,ff.jsx)("span",{className:"-esm-cohort-builder__action-menu-button2-module__interruptedTag___35fO7",children:"!"}):(0,ff.jsx)("span",{className:"-esm-cohort-builder__action-menu-button2-module__countTag___l8lfc",children:r})]})}let SP=({icon:e,label:t,tagContent:r,workspaceToLaunch:n,onBeforeWorkspaceLaunch:o})=>{let a=dM(),{openedWindows:i,restoreWindow:s,hideWindow:l,isMostRecentlyOpenedWindowHidden:u}=_7(),{extension:c}=(0,cc.useContext)(cf),d=i.findIndex(e=>e.windowName===c?.extensionId),f=i[d],p=null!=f,m=p&&(d<i.length-1||u),h=p&&!m,g=f?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,y=async()=>{if(p)m?s(f.windowName):l();else if(await (o?.()??!0)){let{workspaceName:e,workspaceProps:t,windowProps:r}=n;_X(e,t,r)}};return"tablet"===a||"phone"===a?(0,ff.jsxs)(fb.Button,{className:fm()(SD,{[SS]:p&&!h,[SC]:h}),iconDescription:t,kind:"ghost",onClick:y,role:"button",tabIndex:0,size:"md",children:[(0,ff.jsx)("span",{className:S_,children:(0,ff.jsx)(Sk,{hasUnsavedChanges:g,getIcon:e,tagContent:r})}),(0,ff.jsx)("span",{children:t})]}):(0,ff.jsx)(fb.IconButton,{align:"left","aria-label":t,className:fm()(SD,{[SS]:p&&!h,[SC]:h}),enterDelayMs:300,kind:"ghost",label:t,onClick:y,size:"md",children:(0,ff.jsx)("div",{className:S_,children:(0,ff.jsx)(Sk,{hasUnsavedChanges:g,getIcon:e,tagContent:r})})})};function SO({showContactDetails:e,toggleContactDetails:t,className:r}){return(0,ff.jsx)(fb.Button,{className:r,iconDescription:"Toggle contact details",kind:"ghost",onClick:t,renderIcon:e?pe:f9,children:e?iG("showLess","Show less"):iG("showMore","Show more")})}let SR={contactDetails:"-esm-cohort-builder__patient-banner-contact-details-module__contactDetails___AvROu",deceased:"-esm-cohort-builder__patient-banner-contact-details-module__deceased___DDd39",heading:"-esm-cohort-builder__patient-banner-contact-details-module__heading___GGJyV",row:"-esm-cohort-builder__patient-banner-contact-details-module__row___8JcKK",col:"-esm-cohort-builder__patient-banner-contact-details-module__col___ct1O9",relationship:"-esm-cohort-builder__patient-banner-contact-details-module__relationship___GTTsg"},ST=({patientUuid:e})=>{let{cohorts:t=[],isLoading:r}=function(e){let t=e?`${i5}/cohortm/cohortmember?patient=${e}&v=custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))`:null,{data:r,isLoading:n}=cz()(t,se),o=r?.data?.results.map(e=>({uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}));return(0,cc.useMemo)(()=>({cohorts:o,isLoading:n}),[n,o])}(e);return(0,ff.jsxs)(ff.Fragment,{children:[(0,ff.jsxs)("p",{className:SR.heading,children:[iG("patientLists","Patient Lists")," (",t?.length??0,")"]}),r?(0,ff.jsx)(fb.InlineLoading,{description:`${iG("loading","Loading")} ...`,role:"progressbar"}):(0,ff.jsxs)("ul",{children:[(()=>{if(t?.length>0){let e=t.sort((e,t)=>EG(e?.startDate).getTime()-EG(t?.startDate).getTime()).slice(0,3);return e?.map(e=>(0,ff.jsx)("li",{children:(0,ff.jsx)(cp,{to:`${window.spaBase}/home/patient-lists/${e.uuid}`,children:e.name},e.uuid)},e.uuid))}return(0,ff.jsx)("li",{children:"--"})})(),t.length>3&&(0,ff.jsx)("li",{className:SR.link,children:(0,ff.jsx)(cp,{to:`${window.spaBase}/home/patient-lists`,children:iG("seeMoreLists","See {{count}} more lists",{count:t?.length-3})})})]})]})},SN=({patientId:e})=>{let{patient:t,isLoading:r}=dY(e),n=t?.address?.find(e=>"home"===e.use),o=e=>e.split("#")[1];return r?(0,ff.jsx)(fb.InlineLoading,{description:`${iG("loading","Loading")} ...`,role:"progressbar"}):(0,ff.jsxs)(ff.Fragment,{children:[(0,ff.jsx)("p",{className:SR.heading,children:iG("address","Address")}),(0,ff.jsx)("ul",{children:n?Object.entries(n).filter(([e])=>"id"!==e&&"use"!==e).map(([e,t])=>"extension"===e?n.extension?.[0]?.extension?.map((t,r)=>(0,ff.jsxs)("li",{children:[iG(o(t.url),o(t.url)),": ",t.valueString]},`address-${e}-${r}`)):(0,ff.jsxs)("li",{children:[iG(e,e),": ",t]},`address-${e}`)):(0,ff.jsx)("li",{children:"--"})})]})},Sj=({patientUuid:e})=>{let{isLoading:t,contactAttributes:r}=(e=>{let{contactAttributeTypes:t=[]}=dc({externalModuleName:"@openmrs/esm-patient-banner-app"}),{attributes:r,error:n,isLoading:o}=(e=>{let{data:t,error:r,isLoading:n}=dm()(`${i5}/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)))`,se);return{isLoading:n,attributes:t?.data.person.attributes??[],error:r}})(e);return{contactAttributes:(0,cc.useMemo)(()=>r.filter(({attributeType:e})=>t?.some(t=>e.uuid===t)),[r,t]),isLoading:o,error:n}})(e),n=(0,cc.useMemo)(()=>r?[...r?.map(e=>[e.attributeType.display?iG(e.attributeType.display,e.attributeType.display):"",e.value])]:[],[r]);return(0,ff.jsxs)(ff.Fragment,{children:[(0,ff.jsx)("p",{className:SR.heading,children:iG("contactDetails","Contact Details")}),t?(0,ff.jsx)(fb.InlineLoading,{description:`${iG("loading","Loading")} ...`,role:"progressbar"}):(0,ff.jsx)("ul",{children:n.length?n.map(([e,t],r)=>(0,ff.jsxs)("li",{children:[e,": ",t]},`${e}-${t}-${r}`)):(0,ff.jsx)("li",{children:"--"})})]})},SA=({patientId:e})=>{let{data:t,isLoading:r}=function(e){let t=`${i5}/relationship?v=custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))&person=${e}`,{data:r,error:n,isLoading:o,isValidating:a}=cz()(e?t:null,se),i=r?.data?.results?.length?function(e,t){let r=[];for(let n of t)e===n.personA.uuid?r.push({uuid:`${n.uuid}`,display:n.personB.display,relativeAge:n.personB.age,relativeUuid:n.personB.uuid,relationshipType:n.relationshipType.bIsToA}):r.push({uuid:`${n.uuid}`,display:n.personA.display,relativeAge:n.personA.age,relativeUuid:n.personA.uuid,relationshipType:n.relationshipType.aIsToB});return r}(e,r.data.results):null;return{data:r?i:null,error:n,isLoading:o,isValidating:a}}(e);return(0,ff.jsxs)(ff.Fragment,{children:[(0,ff.jsx)("p",{className:SR.heading,children:iG("relationships","Relationships")}),r?(0,ff.jsx)(fb.InlineLoading,{description:`${iG("loading","Loading")} ...`,role:"progressbar"}):(0,ff.jsx)("ul",{children:t&&t.length>0?(0,ff.jsx)(ff.Fragment,{children:t.map(e=>(0,ff.jsxs)("li",{className:SR.relationship,children:[(0,ff.jsx)("div",{children:(0,ff.jsx)(cp,{to:`${window.spaBase}/patient/${e.relativeUuid}/chart`,children:e.display})}),(0,ff.jsx)("div",{children:e.relationshipType}),(0,ff.jsx)("div",{children:`${e.relativeAge?e.relativeAge:"--"} ${e.relativeAge?1===e.relativeAge?iG("yearAbbreviation","yr"):iG("yearsAbbreviation","yrs"):""}`})]},e.uuid))}):(0,ff.jsx)("li",{children:"--"})})]})};function S$({patientId:e,deceased:t}){return(0,ff.jsxs)("div",{className:fm()(SR.contactDetails,{[SR.deceased]:t}),children:[(0,ff.jsxs)("div",{className:SR.row,children:[(0,ff.jsx)("div",{className:SR.col,children:(0,ff.jsx)(SN,{patientId:e})}),(0,ff.jsx)("div",{className:SR.col,children:(0,ff.jsx)(Sj,{patientUuid:e})})]}),(0,ff.jsxs)("div",{className:SR.row,children:[(0,ff.jsx)("div",{className:SR.col,children:(0,ff.jsx)(SA,{patientId:e})}),(0,ff.jsx)("div",{className:SR.col,children:(0,ff.jsx)(ST,{patientUuid:e})})]})]})}function SI(e){let t=document.querySelector("template#loading-spinner");if(t){let r=t.content.cloneNode(!0),n=Array.prototype.map.call(r.childNodes,e=>e);return e.appendChild(r),()=>n.forEach(e=>e.remove())}return()=>{}}let SM="-esm-cohort-builder__action-menu2-module__container___4aX3S";function SL({workspaceGroup:e,groupProps:t}){let r=dM(),{persistence:n}=e;return(0,ff.jsx)("aside",{className:"-esm-cohort-builder__action-menu2-module__sideRail___a7qg9",children:(0,ff.jsxs)("div",{className:SM,children:["closable"==n&&dL(r)&&(0,ff.jsx)(fb.IconButton,{align:"left",onClick:()=>_J(),label:iG("close"),kind:"ghost",children:(0,ff.jsx)(pt,{})}),(0,ff.jsx)(cf.Provider,{value:{moduleName:e.moduleName,featureName:e.name},children:(0,ff.jsx)(cP,{className:SM,name:e.name,state:{groupProps:t}})})]})})}function SF(e){let t=new URL(e,window.location.origin).pathname,r=new URL(window.getOpenmrsSpaBase?.()??"/",window.location.origin).pathname,n=r.endsWith("/")?r.slice(0,-1):r,o=null;return n?n===t?o="/":t.startsWith(`${n}/`)&&(o=t.slice(n.length)):o=t,{full:t,spaRelative:o}}function SB(e){e&&(0,cO.createRoot)(e).render((0,ff.jsx)(SU,{}))}function SU(){let{openedGroup:e,openedWindows:t,registeredGroupsByName:r,registeredWindowsByName:n}=_7();if((0,cc.useEffect)(()=>lg("before-page-changed",t=>{let{newPage:n,cancelNavigation:o,oldUrl:a,newUrl:i}=t;if(!e)return;if(n)return void o(_J().then(e=>!e));let s=r[e.groupName],l=s?.scopePattern;l&&function(e,t,r){try{let n=new RegExp(e),o=SF(t),a=SF(r);if(null===o.spaRelative||null===a.spaRelative)return!0;let i=n.exec(o.spaRelative),s=n.exec(a.spaRelative);if(i&&s||(i=n.exec(o.full),s=n.exec(a.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,a,i)&&o(_J().then(e=>!e))}),[e,r]),!e)return null;let o=r[e.groupName],a=t.some(e=>e.maximized),{name:i}=o,s=Object.values(n).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,ff.jsxs)("div",{className:fm()("-esm-cohort-builder__workspace-windows-and-menu-module__workspaceWindowsAndMenuContainer___crgqC",{"-esm-cohort-builder__workspace-windows-and-menu-module__overlay___FCMKG":o.overlay,"-esm-cohort-builder__workspace-windows-and-menu-module__hasMaximizedWindow___gk319":a}),children:[(0,ff.jsx)("div",{className:"-esm-cohort-builder__workspace-windows-and-menu-module__workspaceWindowsContainer___MrLlf",children:t.map(t=>(0,ff.jsx)(SV,{openedWindow:t,groupProps:e.props,showActionMenu:s},t.windowName))}),s&&(0,ff.jsx)(SL,{workspaceGroup:o,groupProps:e.props})]})}function SV({openedWindow:e,groupProps:t,showActionMenu:r}){let{windowName:n}=e,o=(0,cc.useMemo)(()=>({closeWorkspace(e){u6.setState(t=>_8.closeWorkspace(t,e))},openChildWorkspace(e,t,r){u6.setState(n=>_8.openChildWorkspace(n,e,t,r))},setWorkspaceTitle(e,t){u6.setState(r=>_8.setWorkspaceTitle(r,e,t))},setHasUnsavedChanges(e,t){u6.setState(r=>_8.setHasUnsavedChanges(r,e,t))},promptForClosingWorkspaces(e){let t=u6.getState().openedWindows.find(e=>e.windowName===n);return t?_4(t,e):Promise.resolve(!0)}}),[n]);return(0,ff.jsx)(Sw,{openedWindow:e,groupProps:t,actions:o,renderChrome:!0,showActionMenu:r})}function SW(e,t,r){if(null==e)return r;let n=El(e);if(!n)return console.warn(`matchLocale: invalid requested locale tag: ${JSON.stringify(e)}`),r;let o=[];for(let e of t){let t=El(e);if(!t){console.warn(`matchLocale: skipping invalid available locale tag: ${JSON.stringify(e)}`);continue}o.push({canonical:t,original:e})}let a=n;for(;a;){let e=o.find(e=>e.canonical===a);if(e)return e.original;let t=a+"-",r=o.find(e=>e.canonical.startsWith(t));if(r)return r.original;if("ht"===a){a="fr-HT";continue}let n=a.lastIndexOf("-");if(-1===n)break;let i=(a=a.slice(0,n)).lastIndexOf("-");-1!==i&&a.length-i==2&&(a=a.slice(0,i))}return r}function SH(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}function Sz(e){return!!e&&e.constructor===Object}var SK=r(7638);function SG(e){let[t,r,n]=e.split(".");return`${t}.${r}.${n}`}function SZ(e,t){return SK(function(e){let t=e.indexOf("-");if(t>=0){let r=SG(e.slice(0,t)),n=e.slice(t+1);return`${r}-${n}`}return SG(e)}(t),e,{includePrerelease:!0})}async function SY(e,t={}){let r,{shouldRetry:n,getDelay:o,onError:a}=t;n=n??(e=>e<=5),o=o??(e=>(function(e,t=!1){return 1e3*Math.pow(2,t?e+1:e)})(e));let i=0;do try{return await Sq(o(i)),await e()}catch(e){a?.(e,i),r=e}while(n(i++));throw r}async function Sq(e){if(!(e<=0))return new Promise(t=>setTimeout(t,e))}function SJ(e,t,r,n){}function SX(e){}function SQ(e){return Promise.resolve([])}function S0(e){return Promise.resolve([])}function S1(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 S2(e){return()=>{}}function S4(){return!0}}}]);
|
|
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 fi(){fo.sort((e,t)=>e.appName.localeCompare(t.appName,"en"));let e=new Map;for(let t of fo){e.has(t.appName)?e.set(t.appName,e.get(t.appName)+1):e.set(t.appName,0);let r=e.get(t.appName),n=`${t.appName}-page-${r}`,o=t.containerDomId??"omrs-apps-container",a=document.getElementById(o),i=`single-spa-application:${n}`;if(a){let e=document.createElement("div");e.id=i,a?.appendChild(e)}else throw Error(`${t.appName} ${t.component} cannot be mounted to "${o}"; DOM element does not exist.`);!function(e,t){let r=void 0!==t.route?t.route:void 0!==t.routeRegex&&new RegExp(t.routeRegex);!1===r?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?aR(e,()=>fe(t.appName,t.component),function(e,{featureFlag:t}){return t?r=>!!ur(t)&&e(r):e}(function e(t){if(Array.isArray(t)){let r=t.map(e);return e=>r.some(t=>t(e))}return"string"==typeof t?aI(window.getOpenmrsSpaBase()+t):t instanceof RegExp?e=>t.test(e.pathname.replace(window.getOpenmrsSpaBase(),"")):()=>t}(r),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)}(n,t)}}let fs={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 fl(){document.body.classList.toggle("omrs-breakpoint-lt-tablet",window.innerWidth<fs.TABLET_MIN),document.body.classList.toggle("omrs-breakpoint-gt-phone",window.innerWidth>fs.PHONE_MAX),document.body.classList.toggle("omrs-breakpoint-gt-tablet",window.innerWidth>fs.TABLET_MAX),document.body.classList.toggle("omrs-breakpoint-lt-desktop",window.innerWidth<fs.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-small-desktop",window.innerWidth<fs.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-large-desktop",window.innerWidth<fs.LARGE_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-gt-small-desktop",window.innerWidth>fs.SMALL_DESKTOP_MAX)}let fu=!1;function fc(){fu||(window.addEventListener("resize",fl),fl(),fu=!0)}var fd=r(4848),ff=r(6942),fp=r.n(ff);function fm({title:e,children:t}){let r="tablet"===dI();return(0,fd.jsxs)("div",{className:fp()({"-esm-cohort-builder__card-header-module__tabletHeader___rUYi0":r,"-esm-cohort-builder__card-header-module__desktopHeader___CDa37":!r}),children:[(0,fd.jsx)("h4",{children:e}),t]})}let fh=["red","magenta","purple","blue","teal","cyan","gray","green","warm-gray","cool-gray","high-contrast","outline"],fg={primaryColor:{_type:no.String,_description:"The color for displaying primary diagnoses tags",_default:"blue",_validators:[od.oneOf(fh)]},secondaryColor:{_type:no.String,_description:"The color for displaying secondary diagnoses tags",_default:"gray",_validators:[od.oneOf(fh)]}},fy={"Brand color #1":{_default:"#005d5d",_type:no.String},"Brand color #2":{_default:"#004144",_type:no.String},"Brand color #3":{_default:"#007d79",_type:no.String},excludePatientIdentifierCodeTypes:{uuids:{_type:no.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:no.UUID}}},implementationName:{_type:no.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},logo:{src:{_type:no.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:[od.isUrl]},alt:{_type:no.String,_default:"Logo",_description:"The alternative text for the logo image, displayed when the image cannot be loaded or on hover."}},patientPhotoConceptUuid:{_type:no.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:no.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:[od.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:no.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:no.String}},diagnosisTags:fg};var fv=r(9536);let fb={"carbon.table.batch.cancel":"cancel","carbon.table.batch.items.selected":"batchActionsItemsSelected","carbon.table.batch.item.selected":"batchActionItemSelected","carbon.table.batch.selectAll":"selectAll"},fw=e=>(0,fd.jsx)(fv.TableBatchActions,{translateWithId:(e,t)=>{let r=fb[e];return r?iz(r,e,t):e},...e}),fE="-esm-cohort-builder__custom-overflow-menu-module__container___lY3iq",fx="-esm-cohort-builder__custom-overflow-menu-module__menu___dReHr",fD="-esm-cohort-builder__custom-overflow-menu-module__show___48R0e",f_="-esm-cohort-builder__custom-overflow-menu-module__overflowMenuButton___tsY8r",fS=(0,cl.createContext)(null);function fC(){let e=(0,cl.useContext)(fS);if(!e)throw Error("useCustomOverflowMenu must be used within a CustomOverflowMenu");return e}function fk({menuTitle:e,children:t}){let[r,n]=cu().useState(!1),o=dV(()=>n(!1),r),a="tablet"===dI(),i=(0,cl.useCallback)(()=>n(e=>!e),[]),s=(0,cl.useRef)(null),l=(0,cl.useRef)(null),u=(0,cl.useId)(),c=`custom-overflow-menu-trigger-${u}`,d=`custom-overflow-menu-${u}`,f=(0,cl.useCallback)(()=>{n(!1),s.current?.focus()},[]),p=(0,cl.useMemo)(()=>({closeMenu:f}),[f]),m=(0,cl.useCallback)(e=>{"Escape"===e.key&&r&&(e.stopPropagation(),f())},[f,r]),h=cl.Children.toArray(t);(0,cl.useEffect)(()=>{if(r&&l.current){let e=l.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[r]);let g=(0,cl.useCallback)(({currentIndex:e,direction:t})=>{let r=l.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!r?.length)return;let n=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,o=Array.from(r).indexOf(n);if(-1===o)return void r[t>0?0:r.length-1]?.focus();let a=o+t,i=a<0?r.length-1:a>=r.length?0:a;r[i]?.focus()},[]),y=h.map((e,t)=>(0,cl.isValidElement)(e)?(0,cl.cloneElement)(e,{closeMenu:f,handleOverflowMenuItemFocus:g,index:t}):e);return(0,fd.jsxs)("div",{"data-overflow-menu":!0,className:fp()("cds--overflow-menu",fE),ref:o,children:[(0,fd.jsx)("button",{className:fp()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":r},f_),"aria-controls":d,"aria-expanded":r,"aria-haspopup":"true",id:c,onClick:i,onKeyDown:m,ref:s,children:e}),(0,fd.jsxs)("div",{className:fp()("cds--overflow-menu-options","cds--overflow-menu--flip",fx,{[fD]:r}),"aria-labelledby":c,"data-floating-menu-direction":"bottom",id:d,onKeyDown:m,ref:l,role:"menu",tabIndex:-1,children:[(0,fd.jsx)("ul",{className:fp()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":a}),children:(0,fd.jsx)(fS.Provider,{value:p,children:y})}),(0,fd.jsx)("span",{})]})]})}function fP(e){let t=(0,cl.useContext)(fS);return(0,fd.jsx)(fv.OverflowMenuItem,{...e,closeMenu:t?.closeMenu})}var fO=r(8168);(en=ea||(ea={})).Pop="POP",en.Push="PUSH",en.Replace="REPLACE";var fR=function(e){return e},fT="beforeunload";function fN(e){e.preventDefault(),e.returnValue=""}function fj(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter(function(e){return e!==t})}},call:function(t){e.forEach(function(e){return e&&e(t)})}}}function fA(e){var t={};if(e){var r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));var n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}let f$=(0,cl.createContext)(null),fI=(0,cl.createContext)(null);function fM(e,t){if(!e)throw Error(t)}function fL(){return null!=(0,cl.useContext)(fI)}function fF(e){let{basename:t="/",children:r=null,location:n,navigationType:o=ea.Pop,navigator:a,static:i=!1}=e;fL()&&fM(!1);let s=t.replace(/\/+$/,"").replace(/^\/*/,"/"),l=(0,cl.useMemo)(()=>({basename:s,navigator:a,static:i}),[s,a,i]);"string"==typeof n&&(n=fA(n));let{pathname:u="/",search:c="",hash:d="",state:f=null,key:p="default"}=n,m=(0,cl.useMemo)(()=>{let e=function(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=e.charAt(t.length);return r&&"/"!==r?null:e.slice(t.length)||"/"}(u,s);return null==e?null:{pathname:e,search:c,hash:d,state:f,key:p}},[s,u,c,d,f,p]);return null==m?null:(0,cl.createElement)(f$.Provider,{value:l},(0,cl.createElement)(fI.Provider,{children:r,value:{location:m,navigationType:o}}))}function fB(e){let{basename:t,children:r,window:n}=e,o=(0,cl.useRef)();null==o.current&&(o.current=function(e){void 0===e&&(e={});var t=e.window,r=void 0===t?document.defaultView:t,n=r.history;function o(){var e=r.location,t=e.pathname,o=e.search,a=e.hash,i=n.state||{};return[i.idx,fR({pathname:t,search:o,hash:a,state:i.usr||null,key:i.key||"default"})]}var a=null;r.addEventListener("popstate",function(){if(a)d.call(a),a=null;else{var e=ea.Pop,t=o(),r=t[0],n=t[1];if(d.length){if(null!=r){var i=l-r;i&&(a={action:e,location:n,retry:function(){y(-1*i)}},y(i))}}else g(e)}});var i=ea.Pop,s=o(),l=s[0],u=s[1],c=fj(),d=fj();function f(e){var t,r,n,o,a,i,s;return"string"==typeof e?e:(n=void 0===(r=(t=e).pathname)?"/":r,a=void 0===(o=t.search)?"":o,s=void 0===(i=t.hash)?"":i,a&&"?"!==a&&(n+="?"===a.charAt(0)?a:"?"+a),s&&"#"!==s&&(n+="#"===s.charAt(0)?s:"#"+s),n)}function p(e,t){return void 0===t&&(t=null),fR((0,fO.A)({pathname:u.pathname,hash:"",search:""},"string"==typeof e?fA(e):e,{state:t,key:Math.random().toString(36).substr(2,8)}))}function m(e,t){return[{usr:e.state,key:e.key,idx:t},f(e)]}function h(e,t,r){return!d.length||(d.call({action:e,location:t,retry:r}),!1)}function g(e){i=e;var t=o();l=t[0],u=t[1],c.call({action:i,location:u})}function y(e){n.go(e)}return null==l&&(l=0,n.replaceState((0,fO.A)({},n.state,{idx:l}),"")),{get action(){return i},get location(){return u},createHref:f,push:function e(t,o){var a=ea.Push,i=p(t,o);if(h(a,i,function(){e(t,o)})){var s=m(i,l+1),u=s[0],c=s[1];try{n.pushState(u,"",c)}catch(e){r.location.assign(c)}g(a)}},replace:function e(t,r){var o=ea.Replace,a=p(t,r);if(h(o,a,function(){e(t,r)})){var i=m(a,l),s=i[0],u=i[1];n.replaceState(s,"",u),g(o)}},go:y,back:function(){y(-1)},forward:function(){y(1)},listen:function(e){return c.push(e)},block:function(e){var t=d.push(e);return 1===d.length&&r.addEventListener(fT,fN),function(){t(),d.length||r.removeEventListener(fT,fN)}}}}({window:n}));let a=o.current,[i,s]=(0,cl.useState)({action:a.action,location:a.location});return(0,cl.useLayoutEffect)(()=>a.listen(s),[a]),(0,cl.createElement)(fF,{basename:t,children:r,location:i.location,navigationType:i.action,navigator:a})}let fU=["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"],fV=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-activity",iconProps:e})})),fW=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-add",iconProps:e})})),fH=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-arrow-down",iconProps:e})})),fz=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-arrow-left",iconProps:e})})),fK=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-arrow-right",iconProps:e})})),fG=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-arrow-up",iconProps:e})})),fZ=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-baby",iconProps:e})})),fY=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-calendar-heat-map",iconProps:e})})),fq=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-calendar",iconProps:e})})),fJ=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-caret-down",iconProps:e})})),fX=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-caret-left",iconProps:e})})),fQ=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-caret-right",iconProps:e})})),f0=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-caret-up",iconProps:e})})),f1=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-chart-average",iconProps:e})})),f2=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-chart-line",iconProps:e})})),f4=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-checkmark-filled",iconProps:e})})),f3=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-checkmark-outline",iconProps:e})})),f6=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-chemistry",iconProps:e})})),f5=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-chevron-down",iconProps:e})})),f9=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-chevron-left",iconProps:e})})),f8=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-chevron-right",iconProps:e})})),f7=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-chevron-up",iconProps:e})})),pe=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-close",iconProps:e})})),pt=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-close-filled",iconProps:e})})),pr=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-close-outline",iconProps:e})})),pn=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-document",iconProps:e})})),po=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-document-attachment",iconProps:e})})),pa=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-download",iconProps:e})})),pi=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-drug-order",iconProps:e})})),ps=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-edit",iconProps:e})})),pl=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-event-schedule",iconProps:e})})),pu=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-events",iconProps:e})})),pc=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-gender-female",iconProps:e})})),pd=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-gender-male",iconProps:e})})),pf=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-gender-other",iconProps:e})})),pp=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-gender-unknown",iconProps:e})})),pm=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-generic-order-type",iconProps:e})})),ph=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-group",iconProps:e})})),pg=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-group-access",iconProps:e})})),py=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-hospital-bed",iconProps:e})})),pv=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-image-medical",iconProps:e})})),pb=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-information",iconProps:e})})),pw=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-information-filled",iconProps:e})})),pE=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-information-square",iconProps:e})})),px=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-inventory-management",iconProps:e})})),pD=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-lab-order",iconProps:e})})),p_=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-list-checked",iconProps:e})})),pS=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-location",iconProps:e})})),pC=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-material-order",iconProps:e})})),pk=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-maximize",iconProps:e})})),pP=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-medication",iconProps:e})})),pO=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-message-queue",iconProps:e})})),pR=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-microscope",iconProps:e})})),pT=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-mobile-check",iconProps:e})})),pN=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-money",iconProps:e})})),pj=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-mother",iconProps:e})})),pA=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-movement",iconProps:e})})),p$=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),pI=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),pM=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-password",iconProps:e})})),pL=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-pedestrian-family",iconProps:e})})),pF=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-pen",iconProps:e})})),pB=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-printer",iconProps:e})})),pU=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-procedure-order",iconProps:e})})),pV=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-programs",iconProps:e})})),pW=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-referral-order",iconProps:e})})),pH=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-renew",iconProps:e})})),pz=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-report",iconProps:e})})),pK=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-reset",iconProps:e})})),pG=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-save",iconProps:e})})),pZ=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-search",iconProps:e})})),pY=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-settings",iconProps:e})})),pq=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-switcher",iconProps:e})})),pJ=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-shopping-cart",iconProps:e})})),pX=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-shopping-cart--arrow-down",iconProps:e})})),pQ=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-sticky-note-add",iconProps:e})})),p0=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-syringe",iconProps:e})})),p1=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-table-of-contents",iconProps:e})})),p2=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-table",iconProps:e})})),p4=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-time",iconProps:e})})),p3=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-tools",iconProps:e})})),p6=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-translate",iconProps:e})})),p5=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-trash-can",iconProps:e})})),p9=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-tree-view--alt",iconProps:e})})),p8=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-two-factor-authentication",iconProps:e})})),p7=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-user-avatar",iconProps:e})})),me=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-user-follow",iconProps:e})})),mt=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-user-xray",iconProps:e})})),mr=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-user",iconProps:e})})),mn=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-view-off",iconProps:e})})),mo=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-view",iconProps:e})})),ma=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-warning",iconProps:e})})),mi=ma,ms=po,ml=p_,mu=pv,mc=pX,md=(0,cl.memo)((0,cl.forwardRef)(function({icon:e,fallback:t,...r},n){let o=(0,cl.useRef)(e?document.getElementById(e):void 0);return(0,cl.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),r=new MutationObserver(t=>{for(let r of t)"childList"===r.type&&(o.current=e?document.getElementById(e):void 0)});return t&&r.observe(t,{childList:!0}),()=>r.disconnect()},[e]),(0,fd.jsx)(c9,{value:o.current,fallback:t,children:(0,fd.jsx)(mf,{ref:n,icon:e,iconProps:r})})})),mf=(0,cl.memo)((0,cl.forwardRef)(function({icon:e,iconProps:t},r){let{className:n,fill:o,size:a}=Object.assign({},{fill:"currentColor",size:20},t);(a<=0||a>72)&&(console.error(`Invalid size '${a}' specified for ${e}. Defaulting to 20.`),a=20);let i=(0,cl.useRef)(null);return(0,cl.useImperativeHandle)(r,()=>i.current),(0,cl.useEffect)(()=>{i.current&&"currentColor"!==o&&i.current.style.setProperty("--omrs-icon-fill",o)},[]),(0,fd.jsx)("svg",{ref:i,className:fp()("omrs-icon","-esm-cohort-builder__icons-module__icon___sq7Qp",n),height:a,width:a,viewBox:"0 0 16 16",children:(0,fd.jsx)("use",{href:`#${e}`})})})),mp=({path:e,title:t,basePath:r,icon:n})=>{let{t:o}=(0,cU.useTranslation)(),a=(fL()||fM(!1),(0,cl.useContext)(fI).location),i=(0,cl.useMemo)(()=>{if(!e)return!1;let t=e.startsWith("/")?e.slice(1):e;if(t.startsWith("http"))return t===window.location.href;let r=t.split("/").map(e=>decodeURIComponent(e)),n=(a.pathname??"").split("/").slice(1).map(e=>decodeURIComponent(e));return n.some((e,t)=>r.every((e,r)=>n[t+r]===e))},[a.pathname,e]);return(0,fd.jsx)("div",{children:(0,fd.jsx)(cd,{className:fp()("cds--side-nav__link",{"active-left-nav-link":i}),to:`${r}/${encodeURIComponent(e)}`,children:(0,fd.jsxs)("span",{className:"-esm-cohort-builder__dashboard-module__menu___Lg1M+",children:[(0,fd.jsx)(md,{icon:n,className:"-esm-cohort-builder__dashboard-module__icon___Y2DxK",size:16}),(0,fd.jsx)("span",{children:o(t)})]})})},e)};function mm(e){return function({basePath:t}){return(0,fd.jsx)(fB,{children:(0,fd.jsx)(mp,{basePath:t,...e})})}}function mh(e){let t=(0,cl.useRef)(null);return(0,cl.useMemo)(()=>({get current(){return t.current},set current(value){t.current=value,"function"==typeof e?e(value):e&&(e.current=value)}}),[e])}function mg(...e){return(...t)=>{for(let r of e)"function"==typeof r&&r(...t)}}let my="u">typeof document?cu().useLayoutEffect:()=>{};function mv(e){let t=(0,cl.useRef)(null);return my(()=>{t.current=e},[e]),(0,cl.useCallback)((...e)=>{let r=t.current;return null==r?void 0:r(...e)},[])}let mb={prefix:String(Math.round(1e10*Math.random())),current:0},mw=cu().createContext(mb),mE=cu().createContext(!1),mx=("u">typeof window&&window.document&&window.document.createElement,new WeakMap),mD="function"==typeof cu().useId?function(e){let t=cu().useId(),[r]=(0,cl.useState)(mk()),n=r?"react-aria":`react-aria${mb.prefix}`;return e||`${n}-${t}`}:function(e){let t=(0,cl.useContext)(mw),r=function(e=!1){let t=(0,cl.useContext)(mw),r=(0,cl.useRef)(null);if(null===r.current&&!e){var n,o;let e=null==(o=cu().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||null==(n=o.ReactCurrentOwner)?void 0:n.current;if(e){let r=mx.get(e);null==r?mx.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==r.state&&(t.current=r.id,mx.delete(e))}r.current=++t.current}return r.current}(!!e),n=`react-aria${t.prefix}`;return e||`${n}-${r}`};function m_(){return!1}function mS(){return!0}function mC(e){return()=>{}}function mk(){return"function"==typeof cu().useSyncExternalStore?cu().useSyncExternalStore(mC,m_,mS):(0,cl.useContext)(mE)}let mP=!!("u">typeof window&&window.document&&window.document.createElement),mO=new Map;function mR(e){let[t,r]=(0,cl.useState)(e),n=(0,cl.useRef)(null),o=mD(t),a=(0,cl.useRef)(null);if(s&&s.register(a,o),mP){let e=mO.get(o);e&&!e.includes(n)?e.push(n):mO.set(o,[n])}return my(()=>()=>{s&&s.unregister(a),mO.delete(o)},[o]),(0,cl.useEffect)(()=>{let e=n.current;return e&&r(e),()=>{e&&(n.current=null)}}),o}function mT(e=[]){let t=mR(),[r,n]=function(e){let[t,r]=(0,cl.useState)(e),n=(0,cl.useRef)(null),o=mv(()=>{if(!n.current)return;let e=n.current.next();if(e.done){n.current=null;return}t===e.value?o():r(e.value)});my(()=>{n.current&&o()});let a=mv(e=>{n.current=e(t),o()});return[t,a]}(t),o=(0,cl.useCallback)(()=>{n(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,n]);return my(o,[t,o,...e]),r}"u">typeof FinalizationRegistry&&(s=new FinalizationRegistry(e=>{mO.delete(e)}));let mN=function(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=function e(t){var r,n,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var a=t.length;for(r=0;r<a;r++)t[r]&&(n=e(t[r]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}(e))&&(n&&(n+=" "),n+=t);return n};function mj(...e){let t={...e[0]};for(let r=1;r<e.length;r++){let n=e[r];for(let e in n){let r=t[e],o=n[e];"function"==typeof r&&"function"==typeof o&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?t[e]=mg(r,o):("className"===e||"UNSAFE_className"===e)&&"string"==typeof r&&"string"==typeof o?t[e]=mN(r,o):"id"===e&&r&&o?t.id=function(e,t){if(e===t)return e;let r=mO.get(e);if(r)return r.forEach(e=>e.current=t),t;let n=mO.get(t);return n?(n.forEach(t=>t.current=e),e):t}(r,o):t[e]=void 0!==o?o:r}}return t}let mA=Symbol("default");function m$({values:e,children:t}){for(let[r,n]of e)t=cu().createElement(r.Provider,{value:n},t);return t}function mI(e){let{className:t,style:r,children:n,defaultClassName:o,defaultChildren:a,defaultStyle:i,values:s}=e;return(0,cl.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof r?r({...s,defaultStyle:i||{}}):r,u="function"==typeof n?n({...s,defaultChildren:a}):null==n?a:n,{className:null!=e?e:o,style:l||i?{...i,...l}:void 0,children:null!=u?u:a,"data-rac":""}},[t,r,n,o,a,i,s])}function mM(e,t){let r=(0,cl.useContext)(e);if(null===t)return null;if(r&&"object"==typeof r&&"slots"in r&&r.slots){let e=t||mA;if(!r.slots[e]){let e=new Intl.ListFormat().format(Object.keys(r.slots).map(e=>`"${e}"`)),n=t?`Invalid slot "${t}".`:"A slot prop is required.";throw Error(`${n} Valid slot names are ${e}.`)}return r.slots[e]}return r}function mL(e,t,r){let{ref:n,...o}=mM(r,e.slot)||{},a=mh((0,cl.useMemo)(()=>(function(...e){return 1===e.length&&e[0]?e[0]:t=>{for(let r of e)"function"==typeof r?r(t):null!=r&&(r.current=t)}})(t,n),[t,n])),i=mj(o,e);return"style"in o&&o.style&&"style"in e&&e.style&&("function"==typeof o.style||"function"==typeof e.style?i.style=t=>{let r="function"==typeof o.style?o.style(t):o.style,n={...t.defaultStyle,...r},a="function"==typeof e.style?e.style({...t,defaultStyle:n}):e.style;return{...n,...a}}:i.style={...o.style,...e.style}),[i,a]}function mF(e=!0){let[t,r]=(0,cl.useState)(e),n=(0,cl.useRef)(!1),o=(0,cl.useCallback)(e=>{n.current=!0,r(!!e)},[]);return my(()=>{n.current||r(!1)},[]),[o,t]}function mB(e){let t=/^(data-.*)$/,r={};for(let n in e)t.test(n)||(r[n]=e[n]);return r}let mU=(0,cl.createContext)(null),mV=null;function mW(e,t="assertive",r=7e3){mV?mV.announce(e,t,r):(mV=new mH,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?mV.announce(e,t,r):setTimeout(()=>{(null==mV?void 0:mV.isAttached())&&(null==mV||mV.announce(e,t,r))},100))}class mH{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",r=7e3){var n,o;if(!this.node)return;let a=document.createElement("div");"object"==typeof e?(a.setAttribute("role","img"),a.setAttribute("aria-labelledby",e["aria-labelledby"])):a.textContent=e,"assertive"===t?null==(n=this.assertiveLog)||n.appendChild(a):null==(o=this.politeLog)||o.appendChild(a),""!==e&&setTimeout(()=>{a.remove()},r)}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 mz=new Set(["id"]),mK=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),mG=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),mZ=/^(data-.*)$/;function mY(e,t={}){let{labelable:r,isLink:n,propNames:o}=t,a={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(mz.has(t)||r&&mK.has(t)||n&&mG.has(t)||(null==o?void 0:o.has(t))||mZ.test(t))&&(a[t]=e[t]);return a}let mq=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])'],mJ=mq.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";mq.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let mX=mq.join(':not([hidden]):not([tabindex="-1"]),');function mQ(e){return e.matches(mJ)}function m0(e){return e.matches(mX)}let m1=e=>{var t;return null!=(t=null==e?void 0:e.ownerDocument)?t:document},m2=e=>e&&"window"in e&&e.window===e?e:m1(e).defaultView||window;function m4(e){if(function(){if(null==m3){m3=!1;try{document.createElement("div").focus({get preventScroll(){return m3=!0,!0}})}catch{}}return m3}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==n;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}(e);e.focus(),function(e){for(let{element:t,scrollTop:r,scrollLeft:n}of e)t.scrollTop=r,t.scrollLeft=n}(t)}}let m3=null;function m6(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function m5(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function m9(e){let t=(0,cl.useRef)({isFocused:!1,observer:null});my(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let r=mv(t=>{null==e||e(t)});return(0,cl.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let n=e.target;n.addEventListener("focusout",e=>{t.current.isFocused=!1,n.disabled&&r(m6(e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&n.disabled){var e;null==(e=t.current.observer)||e.disconnect();let r=n===document.activeElement?null:document.activeElement;n.dispatchEvent(new FocusEvent("blur",{relatedTarget:r})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:r}))}}),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]})}},[r])}let m8=!1;function m7(e){var t;return!("u"<typeof window)&&null!=window.navigator&&((null==(t=window.navigator.userAgentData)?void 0:t.brands.some(t=>e.test(t.brand)))||e.test(window.navigator.userAgent))}function he(e){var t;return"u">typeof window&&null!=window.navigator&&e.test((null==(t=window.navigator.userAgentData)?void 0:t.platform)||window.navigator.platform)}function ht(e){let t=null;return()=>(null==t&&(t=e()),t)}let hr=ht(function(){return he(/^Mac/i)}),hn=ht(function(){return he(/^iPhone/i)}),ho=ht(function(){return he(/^iPad/i)||hr()&&navigator.maxTouchPoints>1}),ha=ht(function(){return hn()||ho()});ht(function(){return hr()||ha()});let hi=ht(function(){return m7(/AppleWebKit/i)&&!hs()}),hs=ht(function(){return m7(/Chrome/i)}),hl=ht(function(){return m7(/Android/i)}),hu=ht(function(){return m7(/Firefox/i)}),hc=new Map,hd=new Set;function hf(){if("u"<typeof window)return;function e(e){return"propertyName"in e}let t=r=>{if(!e(r)||!r.target)return;let n=hc.get(r.target);if(n&&(n.delete(r.propertyName),0===n.size&&(r.target.removeEventListener("transitioncancel",t),hc.delete(r.target)),0===hc.size)){for(let e of hd)e();hd.clear()}};document.body.addEventListener("transitionrun",r=>{if(!e(r)||!r.target)return;let n=hc.get(r.target);n||(n=new Set,hc.set(r.target,n),r.target.addEventListener("transitioncancel",t,{once:!0})),n.add(r.propertyName)}),document.body.addEventListener("transitionend",t)}function hp(e){requestAnimationFrame(()=>{0===hc.size?e():hd.add(e)})}"u">typeof document&&("loading"!==document.readyState?hf():document.addEventListener("DOMContentLoaded",hf));let hm="default",hh="",hg=new WeakMap;function hy(e){if(ha())"disabled"===hm&&(hm="restoring",setTimeout(()=>{hp(()=>{if("restoring"===hm){let t=m1(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=hh||""),hh="",hm="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&hg.has(e)){let t=hg.get(e),r="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[r]&&(e.style[r]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),hg.delete(e)}}let hv=cu().createContext({register:()=>{}});function hb(e,t,r){if(!t.has(e))throw TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function hw(e,t,r){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}function hE(e,t,r){var n=hb(e,t,"set");if(n.set)n.set.call(e,r);else{if(!n.writable)throw TypeError("attempted to set read only private field");n.value=r}return r}function hx(e,t){my(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function hD(){let e=(0,cl.useRef)(new Map),t=(0,cl.useCallback)((t,r,n,o)=>{let a=(null==o?void 0:o.once)?(...t)=>{e.current.delete(n),n(...t)}:n;e.current.set(n,{type:r,eventTarget:t,fn:a,options:o}),t.addEventListener(r,a,o)},[]),r=(0,cl.useCallback)((t,r,n,o)=>{var a;let i=(null==(a=e.current.get(n))?void 0:a.fn)||n;t.removeEventListener(r,i,o),e.current.delete(n)},[]),n=(0,cl.useCallback)(()=>{e.current.forEach((e,t)=>{r(e.eventTarget,e.type,t,e.options)})},[r]);return(0,cl.useEffect)(()=>n,[n]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:n}}hv.displayName="PressResponderContext";function h_(e,t){return!!t&&!!e&&e.contains(t)}function hS(e){return e.target}function hC(e,t,r=!0){var n,o;let{metaKey:a,ctrlKey:i,altKey:s,shiftKey:l}=t;hu()&&(null==(o=window.event)||null==(n=o.type)?void 0:n.startsWith("key"))&&"_blank"===e.target&&(hr()?a=!0:i=!0);let u=hi()&&hr()&&!ho()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:a,ctrlKey:i,altKey:s,shiftKey:l}):new MouseEvent("click",{metaKey:a,ctrlKey:i,altKey:s,shiftKey:l,bubbles:!0,cancelable:!0});hC.isOpening=r,m4(e),e.dispatchEvent(u),hC.isOpening=!1}function hk(e){return 0===e.mozInputSource&&!!e.isTrusted||(hl()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}hC.isOpening=!1;var hP=r(1779),hO=r.n(hP),hR=new WeakMap;class hT{continuePropagation(){hE(this,hR,!1)}get shouldStopPropagation(){var e;return e=hb(this,hR,"get"),e.get?e.get.call(this):e.value}constructor(e,t,r,n){var o;hw(this,hR,{writable:!0,value:void 0}),hE(this,hR,!0);let a=null!=(o=null==n?void 0:n.target)?o:r.currentTarget;const i=null==a?void 0:a.getBoundingClientRect();let s,l=0,u,c=null;null!=r.clientX&&null!=r.clientY&&(u=r.clientX,c=r.clientY),i&&(null!=u&&null!=c?(s=u-i.left,l=c-i.top):(s=i.width/2,l=i.height/2)),this.type=e,this.pointerType=t,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=s,this.y=l}}let hN=Symbol("linkClicked");function hj(e){let{onPress:t,onPressChange:r,onPressStart:n,onPressEnd:o,onPressUp:a,onClick:i,isDisabled:s,isPressed:l,preventFocusOnPress:u,shouldCancelOnPointerExit:c,allowTextSelectionOnPress:d,ref:f,...p}=function(e){let t=(0,cl.useContext)(hv);if(t){let{register:r,...n}=t;e=mj(n,e),r()}return hx(t,e.ref),e}(e),[m,h]=(0,cl.useState)(!1),g=(0,cl.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:y,removeAllGlobalListeners:v}=hD(),b=mv((e,t)=>{let o=g.current;if(s||o.didFirePressStart)return!1;let a=!0;if(o.isTriggeringEvent=!0,n){let r=new hT("pressstart",t,e);n(r),a=r.shouldStopPropagation}return r&&r(!0),o.isTriggeringEvent=!1,o.didFirePressStart=!0,h(!0),a}),w=mv((e,n,a=!0)=>{let i=g.current;if(!i.didFirePressStart)return!1;i.didFirePressStart=!1,i.isTriggeringEvent=!0;let l=!0;if(o){let t=new hT("pressend",n,e);o(t),l=t.shouldStopPropagation}if(r&&r(!1),h(!1),t&&a&&!s){let r=new hT("press",n,e);t(r),l&&(l=r.shouldStopPropagation)}return i.isTriggeringEvent=!1,l}),E=mv((e,t)=>{let r=g.current;if(s)return!1;if(a){r.isTriggeringEvent=!0;let n=new hT("pressup",t,e);return a(n),r.isTriggeringEvent=!1,n.shouldStopPropagation}return!0}),x=mv(e=>{let t=g.current;if(t.isPressed&&t.target){for(let r of(t.didFirePressStart&&null!=t.pointerType&&w(hI(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,v(),d||hy(t.target),t.disposables))r();t.disposables=[]}}),D=mv(e=>{c&&x(e)}),_=mv(e=>{null==i||i(e)}),S=mv((e,t)=>{if(i){let r=new MouseEvent("click",e);m5(r,t),i(m6(r))}}),C=(0,cl.useMemo)(()=>{let e=g.current,t={onKeyDown(t){if(h$(t.nativeEvent,t.currentTarget)&&h_(t.currentTarget,hS(t.nativeEvent))){var n;hM(hS(t.nativeEvent),t.key)&&t.preventDefault();let o=!0;if(!e.isPressed&&!t.repeat){e.target=t.currentTarget,e.isPressed=!0,e.pointerType="keyboard",o=b(t,"keyboard");let n=t.currentTarget;y(m1(t.currentTarget),"keyup",mg(t=>{h$(t,n)&&!t.repeat&&h_(n,hS(t))&&e.target&&E(hI(e.target,t),"keyboard")},r),!0)}o&&t.stopPropagation(),t.metaKey&&hr()&&(null==(n=e.metaKeyEvents)||n.set(t.key,t.nativeEvent))}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||h_(t.currentTarget,hS(t.nativeEvent)))&&t&&0===t.button&&!e.isTriggeringEvent&&!hC.isOpening){let r=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||hk(t.nativeEvent))){let e=b(t,"virtual"),n=E(t,"virtual"),o=w(t,"virtual");_(t),r=e&&n&&o}else if(e.isPressed&&"keyboard"!==e.pointerType){let n=e.pointerType||t.nativeEvent.pointerType||"virtual";r=w(hI(t.currentTarget,t),n,!0),e.isOverTarget=!1,_(t),x(t)}e.ignoreEmulatedMouseEvents=!1,r&&t.stopPropagation()}}},r=t=>{var r,n,o;if(e.isPressed&&e.target&&h$(t,e.target)){hM(hS(t),t.key)&&t.preventDefault();let r=hS(t),o=h_(e.target,hS(t));w(hI(e.target,t),"keyboard",o),o&&S(t,e.target),v(),"Enter"!==t.key&&hA(e.target)&&h_(e.target,r)&&!t[hN]&&(t[hN]=!0,hC(e.target,t,!1)),e.isPressed=!1,null==(n=e.metaKeyEvents)||n.delete(t.key)}else if("Meta"===t.key&&(null==(r=e.metaKeyEvents)?void 0:r.size)){let t=e.metaKeyEvents;for(let r of(e.metaKeyEvents=void 0,t.values()))null==(o=e.target)||o.dispatchEvent(new KeyboardEvent("keyup",r))}};if("u">typeof PointerEvent){t.onPointerDown=t=>{var o;if(0!==t.button||!h_(t.currentTarget,hS(t.nativeEvent)))return;if(o=t.nativeEvent,!hl()&&0===o.width&&0===o.height||1===o.width&&1===o.height&&0===o.pressure&&0===o.detail&&"mouse"===o.pointerType){e.pointerType="virtual";return}e.pointerType=t.pointerType;let a=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,d||function(e){if(ha()){if("default"===hm){let t=m1(e);hh=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}hm="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";hg.set(e,e.style[t]),e.style[t]="none"}}(e.target),a=b(t,e.pointerType);let o=hS(t.nativeEvent);"releasePointerCapture"in o&&o.releasePointerCapture(t.pointerId),y(m1(t.currentTarget),"pointerup",r,!1),y(m1(t.currentTarget),"pointercancel",n,!1)}a&&t.stopPropagation()},t.onMouseDown=t=>{if(h_(t.currentTarget,hS(t.nativeEvent))&&0===t.button){if(u){let r=function(e){for(;e&&!mQ(e);)e=e.parentElement;let t=m2(e),r=t.document.activeElement;if(!r||r===e)return;m8=!0;let n=!1,o=e=>{(e.target===r||n)&&e.stopImmediatePropagation()},a=t=>{(t.target===r||n)&&(t.stopImmediatePropagation(),e||n||(n=!0,m4(r),l()))},i=t=>{(t.target===e||n)&&t.stopImmediatePropagation()},s=t=>{(t.target===e||n)&&(t.stopImmediatePropagation(),n||(n=!0,m4(r),l()))};t.addEventListener("blur",o,!0),t.addEventListener("focusout",a,!0),t.addEventListener("focusin",s,!0),t.addEventListener("focus",i,!0);let l=()=>{cancelAnimationFrame(u),t.removeEventListener("blur",o,!0),t.removeEventListener("focusout",a,!0),t.removeEventListener("focusin",s,!0),t.removeEventListener("focus",i,!0),m8=!1,n=!1},u=requestAnimationFrame(l);return l}(t.target);r&&e.disposables.push(r)}t.stopPropagation()}},t.onPointerUp=t=>{h_(t.currentTarget,hS(t.nativeEvent))&&"virtual"!==e.pointerType&&0===t.button&&E(t,e.pointerType||t.pointerType)},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!0,b(hI(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,w(hI(e.target,t),e.pointerType,!1),D(t))};let r=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target){if(h_(e.target,hS(t))&&null!=e.pointerType){let r=!1,n=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(r?x(t):(m4(e.target),e.target.click()))},80);y(t.currentTarget,"click",()=>r=!0,!0),e.disposables.push(()=>clearTimeout(n))}else x(t);e.isOverTarget=!1}},n=e=>{x(e)};t.onDragStart=e=>{h_(e.currentTarget,hS(e.nativeEvent))&&x(e)}}return t},[y,s,u,v,d,x,D,w,b,E,_,S]);return(0,cl.useEffect)(()=>{let e=null==f?void 0:f.current;e&&e instanceof m2(e).Element&&"auto"===m2(e).getComputedStyle(e).touchAction&&(e.style.touchAction="pan-x pan-y pinch-zoom")},[f]),(0,cl.useEffect)(()=>{let e=g.current;return()=>{var t;for(let r of(d||hy(null!=(t=e.target)?t:void 0),e.disposables))r();e.disposables=[]}},[d]),{isPressed:l||m,pressProps:mj(p,C)}}function hA(e){return"A"===e.tagName&&e.hasAttribute("href")}function h$(e,t){let{key:r,code:n}=e,o=t.getAttribute("role");return("Enter"===r||" "===r||"Spacebar"===r||"Space"===n)&&!(t instanceof m2(t).HTMLInputElement&&!hF(t,r)||t instanceof m2(t).HTMLTextAreaElement||t.isContentEditable)&&!(("link"===o||!o&&hA(t))&&"Enter"!==r)}function hI(e,t){let r=t.clientX,n=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:r,clientY:n}}function hM(e,t){return e instanceof HTMLInputElement?!hF(e,t):!(e instanceof HTMLInputElement)&&(e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!hA(e))}let hL=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function hF(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:hL.has(e.type)}let hB=null,hU=new Set,hV=new Map,hW=!1,hH=!1,hz={Tab:!0,Escape:!0};function hK(e,t){for(let r of hU)r(e,t)}function hG(e){hW=!0,e.metaKey||!hr()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(hB="keyboard",hK("keyboard",e))}function hZ(e){hB="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(hW=!0,hK("pointer",e))}function hY(e){hk(e)&&(hW=!0,hB="virtual")}function hq(e){e.target!==window&&e.target!==document&&!m8&&e.isTrusted&&(hW||hH||(hB="virtual",hK("virtual",e)),hW=!1,hH=!1)}function hJ(){m8||(hW=!1,hH=!0)}function hX(e){if("u"<typeof window||hV.get(m2(e)))return;let t=m2(e),r=m1(e),n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){hW=!0,n.apply(this,arguments)},r.addEventListener("keydown",hG,!0),r.addEventListener("keyup",hG,!0),r.addEventListener("click",hY,!0),t.addEventListener("focus",hq,!0),t.addEventListener("blur",hJ,!1),"u">typeof PointerEvent&&(r.addEventListener("pointerdown",hZ,!0),r.addEventListener("pointermove",hZ,!0),r.addEventListener("pointerup",hZ,!0)),t.addEventListener("beforeunload",()=>{hQ(e)},{once:!0}),hV.set(t,{focus:n})}let hQ=(e,t)=>{let r=m2(e),n=m1(e);t&&n.removeEventListener("DOMContentLoaded",t),hV.has(r)&&(r.HTMLElement.prototype.focus=hV.get(r).focus,n.removeEventListener("keydown",hG,!0),n.removeEventListener("keyup",hG,!0),n.removeEventListener("click",hY,!0),r.removeEventListener("focus",hq,!0),r.removeEventListener("blur",hJ,!1),"u">typeof PointerEvent&&(n.removeEventListener("pointerdown",hZ,!0),n.removeEventListener("pointermove",hZ,!0),n.removeEventListener("pointerup",hZ,!0)),hV.delete(r))};function h0(){return"pointer"!==hB}"u">typeof document&&("loading"!==(f=m1(void 0)).readyState?hX(void 0):f.addEventListener("DOMContentLoaded",()=>{hX(void 0)}));let h1=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function h2(e){let t=m1(e),r=((e=document)=>e.activeElement)(t);"virtual"===hB?hp(()=>{((e=document)=>e.activeElement)(t)===r&&e.isConnected&&m4(e)}):m4(e)}function h4(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:o}=e,a=(0,cl.useCallback)(e=>{if(e.target===e.currentTarget)return n&&n(e),o&&o(!1),!0},[n,o]),i=m9(a),s=(0,cl.useCallback)(e=>{let t=m1(e.target),n=t?((e=document)=>e.activeElement)(t):((e=document)=>e.activeElement)();e.target===e.currentTarget&&n===hS(e.nativeEvent)&&(r&&r(e),o&&o(!0),i(e))},[o,r,i]);return{focusProps:{onFocus:!t&&(r||o||n)?s:void 0,onBlur:!t&&(n||o)?a:void 0}}}function h3(e){if(!e)return;let t=!0;return r=>{e({...r,preventDefault(){r.preventDefault()},isDefaultPrevented:()=>r.isDefaultPrevented(),stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped:()=>t}),t&&r.stopPropagation()}}let h6=cu().createContext(null),h5=cu().forwardRef(function(e,t){let{children:r,...n}=e,o=mh(t),a={...n,ref:o};return cu().createElement(h6.Provider,{value:a},r)});function h9(e,t){let{focusProps:r}=h4(e),{keyboardProps:n}={keyboardProps:e.isDisabled?{}:{onKeyDown:h3(e.onKeyDown),onKeyUp:h3(e.onKeyUp)}},o=mj(r,n),a=function(e){let t=(0,cl.useContext)(h6)||{};hx(t,e);let{ref:r,...n}=t;return n}(t),i=e.isDisabled?{}:a,s=(0,cl.useRef)(e.autoFocus);(0,cl.useEffect)(()=>{s.current&&t.current&&h2(t.current),s.current=!1},[t]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:mj({...o,tabIndex:l},i)}}function h8(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:o}=e,a=(0,cl.useRef)({isFocusWithin:!1}),{addGlobalListener:i,removeAllGlobalListeners:s}=hD(),l=(0,cl.useCallback)(e=>{e.currentTarget.contains(e.target)&&a.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(a.current.isFocusWithin=!1,s(),r&&r(e),o&&o(!1))},[r,o,a,s]),u=m9(l),c=(0,cl.useCallback)(e=>{if(!e.currentTarget.contains(e.target))return;let t=m1(e.target),r=((e=document)=>e.activeElement)(t);if(!a.current.isFocusWithin&&r===hS(e.nativeEvent)){n&&n(e),o&&o(!0),a.current.isFocusWithin=!0,u(e);let r=e.currentTarget;i(t,"focus",e=>{if(a.current.isFocusWithin&&!h_(r,e.target)){let n=new t.defaultView.FocusEvent("blur",{relatedTarget:e.target});m5(n,r),l(m6(n))}},{capture:!0})}},[n,o,u,i,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:l}}}function h7(e={}){var t;let{autoFocus:r=!1,isTextInput:n,within:o}=e,a=(0,cl.useRef)({isFocused:!1,isFocusVisible:r||h0()}),[i,s]=(0,cl.useState)(!1),[l,u]=(0,cl.useState)(()=>a.current.isFocused&&a.current.isFocusVisible),c=(0,cl.useCallback)(()=>u(a.current.isFocused&&a.current.isFocusVisible),[]),d=(0,cl.useCallback)(e=>{a.current.isFocused=e,s(e),c()},[c]);t={isTextInput:n},hX(),(0,cl.useEffect)(()=>{let e=(e,r)=>{var n;let o,i,s,l,u;n=!!(null==t?void 0:t.isTextInput),o=m1(null==r?void 0:r.target),i="u">typeof window?m2(null==r?void 0:r.target).HTMLInputElement:HTMLInputElement,s="u">typeof window?m2(null==r?void 0:r.target).HTMLTextAreaElement:HTMLTextAreaElement,l="u">typeof window?m2(null==r?void 0:r.target).HTMLElement:HTMLElement,u="u">typeof window?m2(null==r?void 0:r.target).KeyboardEvent:KeyboardEvent,(n=n||o.activeElement instanceof i&&!h1.has(o.activeElement.type)||o.activeElement instanceof s||o.activeElement instanceof l&&o.activeElement.isContentEditable)&&"keyboard"===e&&r instanceof u&&!hz[r.key]||(e=>{a.current.isFocusVisible=e,c()})(h0())};return hU.add(e),()=>{hU.delete(e)}},[]);let{focusProps:f}=h4({isDisabled:o,onFocusChange:d}),{focusWithinProps:p}=h8({isDisabled:!o,onFocusWithinChange:d});return{isFocused:i,isFocusVisible:l,focusProps:o?p:f}}let ge=!1,gt=0;function gr(e){"touch"===e.pointerType&&(ge=!0,setTimeout(()=>{ge=!1},50))}function gn(){if("u">typeof document)return"u">typeof PointerEvent&&document.addEventListener("pointerup",gr),gt++,()=>{!(--gt>0)&&"u">typeof PointerEvent&&document.removeEventListener("pointerup",gr)}}function go(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:o}=e,[a,i]=(0,cl.useState)(!1),s=(0,cl.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,cl.useEffect)(gn,[]);let{addGlobalListener:l,removeAllGlobalListeners:u}=hD(),{hoverProps:c,triggerHoverEnd:d}=(0,cl.useMemo)(()=>{let e=(e,t)=>{let o=s.target;s.pointerType="",s.target=null,"touch"!==t&&s.isHovered&&o&&(s.isHovered=!1,u(),n&&n({type:"hoverend",target:o,pointerType:t}),r&&r(!1),i(!1))},a={};return"u">typeof PointerEvent&&(a.onPointerEnter=n=>{ge&&"mouse"===n.pointerType||((n,a)=>{if(s.pointerType=a,o||"touch"===a||s.isHovered||!n.currentTarget.contains(n.target))return;s.isHovered=!0;let u=n.currentTarget;s.target=u,l(m1(n.target),"pointerover",t=>{s.isHovered&&s.target&&!h_(s.target,t.target)&&e(t,t.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:u,pointerType:a}),r&&r(!0),i(!0)})(n,n.pointerType)},a.onPointerLeave=t=>{!o&&t.currentTarget.contains(t.target)&&e(t,t.pointerType)}),{hoverProps:a,triggerHoverEnd:e}},[t,r,n,o,s,l,u]);return(0,cl.useEffect)(()=>{o&&d({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:c,isHovered:a}}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 ga=(0,cl.createContext)(!1);function gi(e){let t=(t,r)=>(0,cl.useContext)(ga)?null:e(t,r);return t.displayName=e.displayName||e.name,(0,cl.forwardRef)(t)}let gs=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),gl=(0,cl.createContext)({}),gu=gi(function(e,t){var r;[e,t]=mL(e,t,gl);let n=((r=e).isPending&&(r.onPress=void 0,r.onPressStart=void 0,r.onPressEnd=void 0,r.onPressChange=void 0,r.onPressUp=void 0,r.onKeyDown=void 0,r.onKeyUp=void 0,r.onClick=void 0,r.href=void 0),e=r),{isPending:o}=n,{buttonProps:a,isPressed:i}=function(e,t){let r,{elementType:n="button",isDisabled:o,onPress:a,onPressStart:i,onPressEnd:s,onPressUp:l,onPressChange:u,preventFocusOnPress:c,allowFocusWhenDisabled:d,onClick:f,href:p,target:m,rel:h,type:g="button"}=e;r="button"===n?{type:g,disabled:o}:{role:"button",href:"a"!==n||o?void 0:p,target:"a"===n?m:void 0,type:"input"===n?g:void 0,disabled:"input"===n?o:void 0,"aria-disabled":o&&"input"!==n?o:void 0,rel:"a"===n?h:void 0};let{pressProps:y,isPressed:v}=hj({onPressStart:i,onPressEnd:s,onPressChange:u,onPress:a,onPressUp:l,onClick:f,isDisabled:o,preventFocusOnPress:c,ref:t}),{focusableProps:b}=h9(e,t);d&&(b.tabIndex=o?-1:b.tabIndex);let w=mj(b,y,mY(e,{labelable:!0}));return{isPressed:v,buttonProps:mj(r,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"]})}}(e,t),{focusProps:s,isFocused:l,isFocusVisible:u}=h7(e),{hoverProps:c,isHovered:d}=go({...e,isDisabled:e.isDisabled||o}),f={isHovered:d,isPressed:(n.isPressed||i)&&!o,isFocused:l,isFocusVisible:u,isDisabled:e.isDisabled||!1,isPending:null!=o&&o},p=mI({...e,values:f,defaultClassName:"react-aria-Button"}),m=mR(a.id),h=mR(),g=a["aria-labelledby"];o&&(g?g=`${g} ${h}`:a["aria-label"]&&(g=`${m} ${h}`));let y=(0,cl.useRef)(o);return(0,cl.useEffect)(()=>{let e={"aria-labelledby":g||m};!y.current&&l&&o?mW(e,"assertive"):y.current&&l&&!o&&mW(e,"assertive"),y.current=o},[o,l,g,m]),cu().createElement("button",{...mY(e,{propNames:gs}),...mj(a,s,c),...p,type:"submit"===a.type&&o?"button":a.type,id:m,ref:t,"aria-labelledby":g,slot:e.slot||void 0,"aria-disabled":o?"true":a["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":f.isPressed||void 0,"data-hovered":d||void 0,"data-focused":l||void 0,"data-pending":o||void 0,"data-focus-visible":u||void 0},cu().createElement(mU.Provider,{value:{id:h}},p.children))});(0,cl.createContext)(null),(0,cl.createContext)(null),(0,cl.createContext)(null),(0,cl.createContext)(null),(0,cl.createContext)(null);let gc=(0,cl.createContext)({}),gd=(0,cl.createContext)({}),gf=(0,cl.forwardRef)(function(e,t){[e,t]=mL(e,t,gd);let{elementType:r="span",...n}=e;return cu().createElement(r,{className:"react-aria-Text",...n,ref:t})}),gp=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),gm=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function gh(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),r="function"==typeof t.getTextInfo?t.getTextInfo():t.textInfo;if(r)return"rtl"===r.direction;if(t.script)return gp.has(t.script)}let t=e.split("-")[0];return gm.has(t)}let gg=Symbol.for("react-aria.i18n.locale");function gy(){let e="u">typeof window&&window[gg]||"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:gh(e)?"rtl":"ltr"}}let gv=gy(),gb=new Set;function gw(){for(let e of(gv=gy(),gb))e(gv)}function gE(){let e=mk(),[t,r]=(0,cl.useState)(gv);return((0,cl.useEffect)(()=>(0===gb.size&&window.addEventListener("languagechange",gw),gb.add(r),()=>{gb.delete(r),0===gb.size&&window.removeEventListener("languagechange",gw)}),[]),e)?{locale:"en-US",direction:"ltr"}:t}let gx=cu().createContext(null);function gD(e){let{locale:t,children:r}=e,n=gE(),o=cu().useMemo(()=>t?{locale:t,direction:gh(t)?"rtl":"ltr"}:n,[n,t]);return cu().createElement(gx.Provider,{value:o},r)}function g_(){let e=gE();return(0,cl.useContext)(gx)||e}var gS={};function gC(e,t){return e-t*Math.floor(e/t)}function gk(e,t,r,n){let o=(t=gO(e,t))-1,a=-2;return r<=2?a=0:gP(t)&&(a=-1),1721425+365*o+Math.floor(o/4)-Math.floor(o/100)+Math.floor(o/400)+Math.floor((367*r-362)/12+a+n)}function gP(e){return e%4==0&&(e%100!=0||e%400==0)}function gO(e,t){return"BC"===e?1-t:t}function gR(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}gS={"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 gT={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 gN{fromJulianDay(e){let t=e-1721426,r=Math.floor(t/146097),n=gC(t,146097),o=Math.floor(n/36524),a=gC(n,36524),i=Math.floor(a/1461),s=Math.floor(gC(a,1461)/365),[l,u]=gR(400*r+100*o+4*i+s+ +(4!==o&&4!==s)),c=e-gk(l,u,1,1),d=2;e<gk(l,u,3,1)?d=0:gP(u)&&(d=1);let f=Math.floor(((c+d)*12+373)/367),p=e-gk(l,u,f,1)+1;return new g0(l,u,f,p)}toJulianDay(e){return gk(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return gT[gP(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return gP(e.year)?366:365}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 gj(e,t){let r=e.copy(),n="hour"in r?gW(r,t):0;gA(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,g$(r),gI(r),r.day+=7*(t.weeks||0),r.day+=t.days||0,r.day+=n,function(e){for(;e.day<1;)e.month--,g$(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,g$(e)}(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let o=r.calendar.getYearsInEra(r);if(r.year>o){var a,i;let e=null==(a=(i=r.calendar).isInverseEra)?void 0:a.call(i,r);r.year=o,r.month=e?1:r.calendar.getMonthsInYear(r),r.day=e?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let s=r.calendar.getMonthsInYear(r);return r.month>s&&(r.month=s,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function gA(e,t){var r,n;(null==(r=(n=e.calendar).isInverseEra)?void 0:r.call(n,e))&&(t=-t),e.year+=t}function g$(e){for(;e.month<1;)gA(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,gA(e,1)}function gI(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 gM(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),gI(e)}function gL(e){let t={};for(let r in e)"number"==typeof e[r]&&(t[r]=-e[r]);return t}function gF(e,t){let r=e.copy();return null!=t.era&&(r.era=t.era),null!=t.year&&(r.year=t.year),null!=t.month&&(r.month=t.month),null!=t.day&&(r.day=t.day),gM(r),r}function gB(e,t){let r=e.copy();return null!=t.hour&&(r.hour=t.hour),null!=t.minute&&(r.minute=t.minute),null!=t.second&&(r.second=t.second),null!=t.millisecond&&(r.millisecond=t.millisecond),gU(r),r}function gU(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 gV(e,t){let r=e%t;return r<0&&(r+=t),r}function gW(e,t){let r;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=gV(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=gV(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=gV(e.minute,60),r=Math.floor(e.hour/24),e.hour=gV(e.hour,24),r}function gH(e,t){let r=e.copy();return gW(r,t),r}function gz(e,t,r,n){let o=e.copy();switch(t){case"era":{let t=e.calendar.getEras(),a=t.indexOf(e.era);if(a<0)throw Error("Invalid era: "+e.era);a=gG(a,r,0,t.length-1,null==n?void 0:n.round),o.era=t[a],gM(o);break}case"year":var a,i;(null==(a=(i=o.calendar).isInverseEra)?void 0:a.call(i,o))&&(r=-r),o.year=gG(e.year,r,-1/0,9999,null==n?void 0:n.round),o.year===-1/0&&(o.year=1),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,e);break;case"month":o.month=gG(e.month,r,1,e.calendar.getMonthsInYear(e),null==n?void 0:n.round);break;case"day":o.day=gG(e.day,r,1,e.calendar.getDaysInMonth(e),null==n?void 0:n.round);break;default:throw Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(o),gM(o),o}function gK(e,t,r,n){let o=e.copy();switch(t){case"hour":{let t=e.hour,a=0,i=23;if((null==n?void 0:n.hourCycle)===12){let e=t>=12;a=12*!!e,i=e?23:11}o.hour=gG(t,r,a,i,null==n?void 0:n.round);break}case"minute":o.minute=gG(e.minute,r,0,59,null==n?void 0:n.round);break;case"second":o.second=gG(e.second,r,0,59,null==n?void 0:n.round);break;case"millisecond":o.millisecond=gG(e.millisecond,r,0,999,null==n?void 0:n.round);break;default:throw Error("Unsupported field "+t)}return o}function gG(e,t,r,n,o=!1){if(o){(e+=Math.sign(t))<r&&(e=n);let o=Math.abs(t);(e=t>0?Math.ceil(e/o)*o:Math.floor(e/o)*o)>n&&(e=r)}else(e+=t)<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function gZ(e,t){let r;return r=(null!=t.years&&0!==t.years||null!=t.months&&0!==t.months||null!=t.weeks&&0!==t.weeks||null!=t.days&&0!==t.days?yr(gj(yi(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):g9(e)-e.offset)+(t.milliseconds||0),r+=1e3*(t.seconds||0),r+=6e4*(t.minutes||0),ys(yo(r+=36e5*(t.hours||0),e.timeZone),e.calendar)}function gY(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 gq(e){let t,r=ys(e,new gN);return t="BC"===r.era?1===r.year?"0000":"-"+String(Math.abs(1-r.year)).padStart(6,"00"):String(r.year).padStart(4,"0"),`${t}-${String(r.month).padStart(2,"0")}-${String(r.day).padStart(2,"0")}`}function gJ(e){return`${gq(e)}T${gY(e)}`}function gX(e){let t,r="object"==typeof e[0]?e.shift():new gN;if("string"==typeof e[0])t=e.shift();else{let e=r.getEras();t=e[e.length-1]}return[r,t,e.shift(),e.shift(),e.shift()]}var gQ=new WeakMap;class g0{copy(){return this.era?new g0(this.calendar,this.era,this.year,this.month,this.day):new g0(this.calendar,this.year,this.month,this.day)}add(e){return gj(this,e)}subtract(e){return gj(this,gL(e))}set(e){return gF(this,e)}cycle(e,t,r){return gz(this,e,t,r)}toDate(e){return yn(this,e)}toString(){return gq(this)}compare(e){return yg(this,e)}constructor(...e){hw(this,gQ,{writable:!0,value:void 0});let[t,r,n,o,a]=gX(e);this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=a,gM(this)}}var g1=new WeakMap;class g2{copy(){return new g2(this.hour,this.minute,this.second,this.millisecond)}add(e){return gH(this,e)}subtract(e){return gH(this,gL(e))}set(e){return gB(this,e)}cycle(e,t,r){return gK(this,e,t,r)}toString(){return gY(this)}compare(e){var t,r;return t=this,r=e,yy(t)-yy(r)}constructor(e=0,t=0,r=0,n=0){hw(this,g1,{writable:!0,value:void 0}),this.hour=e,this.minute=t,this.second=r,this.millisecond=n,gU(this)}}var g4=new WeakMap;class g3{copy(){return this.era?new g3(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new g3(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return gj(this,e)}subtract(e){return gj(this,gL(e))}set(e){return gF(gB(this,e),e)}cycle(e,t,r){switch(e){case"era":case"year":case"month":case"day":return gz(this,e,t,r);default:return gK(this,e,t,r)}}toDate(e,t){return yn(this,e,t)}toString(){return gJ(this)}compare(e){var t,r;let n=yg(this,e);return 0===n?(t=this,r=yi(e),yy(t)-yy(r)):n}constructor(...e){hw(this,g4,{writable:!0,value:void 0});let[t,r,n,o,a]=gX(e);this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=a,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,gM(this)}}var g6=new WeakMap;class g5{copy(){return this.era?new g5(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new g5(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return gZ(this,e)}subtract(e){return gZ(this,gL(e))}set(e,t){let r,n;return 0===(n=gB(gF(r=yi(this),e),e)).compare(r)?this:ys(yo(yr(n,this.timeZone,t),this.timeZone),this.calendar)}cycle(e,t,r){return function(e,t,r,n){switch(t){case"hour":{let t=0,o=23;if((null==n?void 0:n.hourCycle)===12){let r=e.hour>=12;t=12*!!r,o=r?23:11}let a=yi(e),i=ys(gB(a,{hour:t}),new gN),s=[yr(i,e.timeZone,"earlier"),yr(i,e.timeZone,"later")].filter(t=>yo(t,e.timeZone).day===i.day)[0],l=ys(gB(a,{hour:o}),new gN),u=[yr(l,e.timeZone,"earlier"),yr(l,e.timeZone,"later")].filter(t=>yo(t,e.timeZone).day===l.day).pop(),c=g9(e)-e.offset,d=Math.floor(c/36e5),f=c%36e5;return ys(yo(c=36e5*gG(d,r,Math.floor(s/36e5),Math.floor(u/36e5),null==n?void 0:n.round)+f,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return gK(e,t,r,n);case"era":case"year":case"month":case"day":return ys(yo(yr(gz(yi(e),t,r,n),e.timeZone),e.timeZone),e.calendar);default:throw Error("Unsupported field "+t)}}(this,e,t,r)}toDate(){var e;return e=this,new Date(g9(e)-e.offset)}toString(){var e;let t,r,n;return`${gJ(this)}${t=0>Math.sign(e=this.offset)?"-":"+",r=Math.floor((e=Math.abs(e))/36e5),n=e%36e5/6e4,`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`}[${this.timeZone}]`}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-(function(e,t){if(e instanceof g5){var r,n;return e.timeZone===t?e:(r=e,n=t,ys(yo(g9(r)-r.offset,n),r.calendar))}return yo(yr(e,t,void 0),t)})(e,this.timeZone).toDate().getTime()}constructor(...e){hw(this,g6,{writable:!0,value:void 0});let[t,r,n,o,a]=gX(e),i=e.shift(),s=e.shift();this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=a,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,gM(this)}}function g9(e){return g8(gO((e=ys(e,new gN)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function g8(e,t,r,n,o,a,i){let s=new Date;return s.setUTCHours(n,o,a,i),s.setUTCFullYear(e,t-1,r),s.getTime()}function g7(e,t){if("UTC"===t)return 0;if(e>0&&t===yb())return -6e4*new Date(e).getTimezoneOffset();let{year:r,month:n,day:o,hour:a,minute:i,second:s}=yt(e,t);return g8(r,n,o,a,i,s,0)-1e3*Math.floor(e/1e3)}let ye=new Map;function yt(e,t){let r=ye.get(t);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),ye.set(t,r));let n=r.formatToParts(new Date(e)),o={};for(let e of n)"literal"!==e.type&&(o[e.type]=e.value);return{year:"BC"===o.era||"B"===o.era?-o.year+1:+o.year,month:+o.month,day:+o.day,hour:"24"===o.hour?0:+o.hour,minute:+o.minute,second:+o.second}}function yr(e,t,r="compatible"){var n,o,a;let i=yi(e);if("UTC"===t)return g9(i);if(t===yb()&&"compatible"===r){i=ys(i,new gN);let e=new Date,t=gO(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=g9(i),l=g7(s-864e5,t),u=g7(s+864e5,t),c=(n=i,((o=s-l)==(a=s-u)?[o]:[o,a]).filter(e=>{var r;let o;return r=n,o=yt(e,t),r.year===o.year&&r.month===o.month&&r.day===o.day&&r.hour===o.hour&&r.minute===o.minute&&r.second===o.second}));if(1===c.length)return c[0];if(c.length>1)switch(r){case"compatible":case"earlier":return c[0];case"later":return c[c.length-1];case"reject":throw RangeError("Multiple possible absolute times found")}switch(r){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 yn(e,t,r="compatible"){return new Date(yr(e,t,r))}function yo(e,t){let r=g7(e,t),n=new Date(e+r),o=n.getUTCFullYear();return new g5(o<1?"BC":"AD",o<1?-o+1:o,n.getUTCMonth()+1,n.getUTCDate(),t,r,n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),n.getUTCMilliseconds())}function ya(e){return new g0(e.calendar,e.era,e.year,e.month,e.day)}function yi(e,t){let r=0,n=0,o=0,a=0;if("timeZone"in e)({hour:r,minute:n,second:o,millisecond:a}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:o,millisecond:a}=t),new g3(e.calendar,e.era,e.year,e.month,e.day,r,n,o,a)}function ys(e,t){if(yd(e.calendar,t))return e;let r=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,gM(n),n}let yl={"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 yu(e,t){return t=ys(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function yc(e,t){return yd(e.calendar,t.calendar)&&yu(e,t)}function yd(e,t){var r,n,o,a;return null!=(a=null!=(o=null==(r=e.isEqual)?void 0:r.call(e,t))?o:null==(n=t.isEqual)?void 0:n.call(t,e))?a:e.identifier===t.identifier}let yf={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function yp(e,t,r){let n,o=Math.ceil(e.calendar.toJulianDay(e)+1-(r?yf[r]:(n=function(e){if(Intl.Locale){let t=yD.get(e);return!t&&(t=new Intl.Locale(e).maximize().region)&&yD.set(e,t),t}let t=e.split("-")[1];return"u"===t?void 0:t}(t))&&yl[n]||0))%7;return o<0&&(o+=7),o}function ym(e){return yo(Date.now(),e)}function yh(e){return ya(ym(e))}function yg(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function yy(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let yv=null;function yb(){return null==yv&&(yv=new Intl.DateTimeFormat().resolvedOptions().timeZone),yv}function yw(e){return e.subtract({days:e.day-1})}function yE(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function yx(e,t,r){let n=yp(e,t,r);return e.subtract({days:n})}let yD=new Map;function y_(e,t){return e&&t?0>=e.compare(t)?e:t:e||t}function yS(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}let yC=Symbol.for("react-aria.i18n.locale"),yk=Symbol.for("react-aria.i18n.strings");class yP{getStringForLocale(e,t){let r=this.getStringsForLocale(t)[e];if(!r)throw Error(`Could not find intl message ${e} in ${t} locale`);return r}getStringsForLocale(e){let t=this.strings[e];return t||(t=function(e,t,r="en-US"){var n;if(t[e])return t[e];let o=(n=e,Intl.Locale?new Intl.Locale(n).language:n.split("-")[0]);if(t[o])return t[o];for(let e in t)if(e.startsWith(o+"-"))return t[e];return t[r]}(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(e){if("u"<typeof window)return null;let t=window[yC];if(void 0===p){let e=window[yk];if(!e)return null;for(let r in p={},e)p[r]=new yP({[t]:e[r]},t)}let r=null==p?void 0:p[e];if(!r)throw Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(e,t="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,e])=>e)),this.defaultLocale=t}}let yO=new Map,yR=new Map;class yT{format(e,t){let r=this.strings.getStringForLocale(e,this.locale);return"function"==typeof r?r(t,this):r}plural(e,t,r="cardinal"){let n=t["="+e];if(n)return"function"==typeof n?n():n;let o=this.locale+":"+r,a=yO.get(o);return a||(a=new Intl.PluralRules(this.locale,{type:r}),yO.set(o,a)),"function"==typeof(n=t[a.select(e)]||t.other)?n():n}number(e){let t=yR.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),yR.set(this.locale,t)),t.format(e)}select(e,t){let r=e[t]||e.other;return"function"==typeof r?r():r}constructor(e,t){this.locale=e,this.strings=t}}let yN=new WeakMap;function yj(e,t){let r;return t&&yP.getGlobalDictionaryForPackage(t)||((r=yN.get(e))||(r=new yP(e),yN.set(e,r)),r)}function yA(e,t){let{locale:r}=g_(),n=yj(e,t);return(0,cl.useMemo)(()=>new yT(r,n),[r,n])}let y$=new Map;class yI{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 r=this.formatter.formatToParts(e),n=this.formatter.formatToParts(t);return[...r.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...n.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return null==yB&&(yB="h12"===new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle),yB&&(this.resolvedHourCycle||(this.resolvedHourCycle=function(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,"");let r=yL(e+=(e.includes("-u-")?"":"-u")+"-nu-latn",{...t,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(e=>"hour"===e.type).value,10),o=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(e=>"hour"===e.type).value,10);if(0===n&&23===o)return"h23";if(24===n&&23===o)return"h24";if(0===n&&11===o)return"h11";if(12===n&&11===o)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}constructor(e,t={}){this.formatter=yL(e,t),this.options=t}}let yM={true:{ja:"h11"},false:{}};function yL(e,t={}){if("boolean"==typeof t.hour12&&(null==yF&&(yF="24"===new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))),yF)){let r=yM[String((t={...t}).hour12)][e.split("-")[0]],n=t.hour12?"h12":"h23";t.hourCycle=null!=r?r:n,delete t.hour12}let r=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(y$.has(r))return y$.get(r);let n=new Intl.DateTimeFormat(e,t);return y$.set(r,n),n}let yF=null,yB=null;function yU(e,t){let r=(0,cl.useRef)(null);return e&&r.current&&t(e,r.current)&&(e=r.current),r.current=e,e}function yV(e){e=yU(null!=e?e:{},yW);let{locale:t}=g_();return(0,cl.useMemo)(()=>new yI(t,e),[t,e])}function yW(e,t){if(e===t)return!0;let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n of r)if(t[n]!==e[n])return!1;return!0}function yH(e){return e&&e.__esModule?e.default:e}let yz=new WeakMap;function yK(e){return(null==e?void 0:e.calendar.identifier)==="gregory"&&"BC"===e.era?"short":void 0}function yG(e,t,r,n){let o=yA(yH(gS),"@react-aria/calendar"),a=yK(e)||yK(t),i=yV({month:"long",year:"numeric",era:a,calendar:e.calendar.identifier,timeZone:r}),s=yV({month:"long",year:"numeric",day:"numeric",era:a,calendar:e.calendar.identifier,timeZone:r});return(0,cl.useMemo)(()=>{if(yu(e,yw(e))){let a=e,s=t;if(e.calendar.getFormattableMonth&&(a=e.calendar.getFormattableMonth(e)),t.calendar.getFormattableMonth&&(s=t.calendar.getFormattableMonth(t)),yu(t,yE(e)))return i.format(a.toDate(r));if(yu(t,yE(t)))return n?yZ(i,o,a,s,r):i.formatRange(a.toDate(r),s.toDate(r))}return n?yZ(s,o,e,t,r):s.formatRange(e.toDate(r),t.toDate(r))},[e,t,i,s,o,r,n])}function yZ(e,t,r,n,o){let a=e.formatRangeToParts(r.toDate(o),n.toDate(o)),i=-1;for(let e=0;e<a.length;e++){let t=a[e];if("shared"===t.source&&"literal"===t.type)i=e;else if("endRange"===t.source)break}let s="",l="";for(let e=0;e<a.length;e++)e<i?s+=a[e].value:e>i&&(l+=a[e].value);return t.format("dateRange",{startDate:s,endDate:l})}function yY(e,t){let r=(0,cl.useRef)(!0),n=(0,cl.useRef)(null);(0,cl.useEffect)(()=>(r.current=!0,()=>{r.current=!1}),[]),(0,cl.useEffect)(()=>{let o=n.current;r.current?r.current=!1:(!o||t.some((e,t)=>!Object.is(e,o[t])))&&e(),n.current=t},t)}function yq(e,t){let{id:r,"aria-label":n,"aria-labelledby":o}=e;return r=mR(r),o&&n?o=[...new Set([r,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),n||o||!t||(n=t),{id:r,"aria-label":n,"aria-labelledby":o}}function yJ(e,t){var r,n;let o,a,i,s,l,u=yA((r=gS)&&r.__esModule?r.default:r,"@react-aria/calendar"),c=mY(e),d=yG(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),f=yG(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);yY(()=>{t.isFocused||mW(f)},[f]);let p=(i=yA(yH(gS),"@react-aria/calendar"),"highlightedRange"in t?{start:o,end:a}=t.highlightedRange||{}:o=a=null!=(n=t.value)?n:void 0,s=yV({weekday:"long",month:"long",year:"numeric",day:"numeric",era:yK(o)||yK(a),timeZone:t.timeZone}),l="anchorDate"in t?t.anchorDate:null,(0,cl.useMemo)(()=>{if(!l&&o&&a)if(yu(o,a)){let e=s.format(o.toDate(t.timeZone));return i.format("selectedDateDescription",{date:e})}else{let e=yZ(s,i,o,a,t.timeZone);return i.format("selectedRangeDescription",{dateRange:e})}return""},[o,a,l,t.timeZone,i,s]));yY(()=>{p&&mW(p,"polite",4e3)},[p]);let m=mT([!!e.errorMessage,e.isInvalid,e.validationState]);yz.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:m,selectedDateDescription:p});let[h,g]=(0,cl.useState)(!1),y=e.isDisabled||t.isNextVisibleRangeInvalid();y&&h&&(g(!1),t.setFocused(!0));let[v,b]=(0,cl.useState)(!1),w=e.isDisabled||t.isPreviousVisibleRangeInvalid();return w&&v&&(b(!1),t.setFocused(!0)),{calendarProps:mj(c,yq({id:e.id,"aria-label":[e["aria-label"],f].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]}),{role:"application","aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":u.format("next"),isDisabled:y,onFocusChange:g},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":u.format("previous"),isDisabled:w,onFocusChange:b},errorMessageProps:{id:m},title:d}}let yX={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 yQ(e){let{children:t,elementType:r="div",isFocusable:n,style:o,...a}=e,{visuallyHiddenProps:i}=function(e={}){let{style:t,isFocusable:r}=e,[n,o]=(0,cl.useState)(!1),{focusWithinProps:a}=h8({isDisabled:!r,onFocusWithinChange:e=>o(e)}),i=(0,cl.useMemo)(()=>n?t:t?{...yX,...t}:yX,[n]);return{visuallyHiddenProps:{...a,style:i}}}(e);return cu().createElement(r,mj(a,i),t)}function y0(e,t,r,n){let o=mv(r),a=null==r;(0,cl.useEffect)(()=>{if(a||!e.current)return;let r=e.current;return r.addEventListener(t,o,n),()=>{r.removeEventListener(t,o,n)}},[e,t,n,a,o])}let y1=0,y2=new Map;function y4(e){let[t,r]=(0,cl.useState)();return my(()=>{if(!e)return;let t=y2.get(e);if(t)r(t.element.id);else{let n=`react-aria-description-${y1++}`;r(n);let o=document.createElement("div");o.id=n,o.style.display="none",o.textContent=e,document.body.appendChild(o),t={refCount:0,element:o},y2.set(e,t)}return t.refCount++,()=>{t&&0==--t.refCount&&(t.element.remove(),y2.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function y3(e,t){if(!e)return!1;let r=window.getComputedStyle(e),n=/(auto|scroll)/.test(r.overflow+r.overflowX+r.overflowY);return n&&t&&(n=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),n}function y6(e,t,r){let n="left"===r?"offsetLeft":"offsetTop",o=0;for(;t.offsetParent&&(o+=t[n],t.offsetParent!==e);){if(t.offsetParent.contains(e)){o-=e[n];break}t=t.offsetParent}return o}function y5(e,t){if(e&&document.contains(e)){let i=document.scrollingElement||document.documentElement;if("hidden"===window.getComputedStyle(i).overflow)for(let t of function(e){let t=[];for(;e&&e!==document.documentElement;)y3(e,void 0)&&t.push(e),e=e.parentElement;return t}(e))!function(e,t){let r=y6(e,t,"left"),n=y6(e,t,"top"),o=t.offsetWidth,a=t.offsetHeight,i=e.scrollLeft,s=e.scrollTop,{borderTopWidth:l,borderLeftWidth:u,scrollPaddingTop:c,scrollPaddingRight:d,scrollPaddingBottom:f,scrollPaddingLeft:p}=getComputedStyle(e),m=i+parseInt(u,10),h=s+parseInt(l,10),g=m+e.clientWidth,y=h+e.clientHeight,v=parseInt(c,10)||0,b=parseInt(f,10)||0,w=parseInt(d,10)||0,E=parseInt(p,10)||0;r<=i+E?i=r-parseInt(u,10)-E:r+o>g-w&&(i+=r+o-g+w),n<=h+v?s=n-parseInt(l,10)-v:n+a>y-b&&(s+=n+a-y+b),e.scrollLeft=i,e.scrollTop=s}(t,e);else{var r,n,o,a;let{left:i,top:s}=e.getBoundingClientRect();null==e||null==(r=e.scrollIntoView)||r.call(e,{block:"nearest"});let{left:l,top:u}=e.getBoundingClientRect();(Math.abs(i-l)>1||Math.abs(s-u)>1)&&(null==t||null==(o=t.containingElement)||null==(n=o.scrollIntoView)||n.call(o,{block:"center",inline:"center"}),null==(a=e.scrollIntoView)||a.call(e,{block:"nearest"}))}}}function y9(e,t){let r=e;for(y3(r,t)&&(r=r.parentElement);r&&!y3(r,t);)r=r.parentElement;return r||document.scrollingElement||document.documentElement}class y8 extends gN{fromJulianDay(e){let t=super.fromJulianDay(e);return new g0(this,gO(t.era,t.year)- -543,t.month,t.day)}toJulianDay(e){return super.toJulianDay(y7(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(y7(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function y7(e){let[t,r]=gR(e.year+-543);return new g0(t,r,e.month,e.day)}function ve(e,t,r,n){return e+365*t+Math.floor(t/4)+30*(r-1)+n-1}function vt(e,t){let r=Math.floor(4*(t-e)/1461),n=1+Math.floor((t-ve(e,r,1,1))/30),o=t+1-ve(e,r,n,1);return[r,n,o]}function vr(e){return Math.floor(e%4/3)}function vn(e,t){return t%13!=0?30:vr(e)+5}class vo{fromJulianDay(e){let[t,r,n]=vt(1723856,e),o="AM";return t<=0&&(o="AA",t+=5500),new g0(this,o,t,r,n)}toJulianDay(e){let t=e.year;return"AA"===e.era&&(t-=5500),ve(1723856,t,e.month,e.day)}getDaysInMonth(e){return vn(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+vr(e.year)}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class va extends vo{fromJulianDay(e){let[t,r,n]=vt(1723856,e);return new g0(this,"AA",t+=5500,r,n)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class vi extends vo{fromJulianDay(e){let[t,r,n]=vt(1824665,e),o="CE";return t<=0&&(o="BCE",t=1-t),new g0(this,o,t,r,n)}toJulianDay(e){let t=e.year;return"BCE"===e.era&&(t=1-t),ve(1824665,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return"BCE"===e.era&&(t=1-t),vn(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 vs=765433;function vl(e){return 7>gC(7*e+1,19)}function vu(e){let t=Math.floor((235*e-234)/19),r=29*t+Math.floor((12084+13753*t)/25920);return 3>gC(3*(r+1),7)&&(r+=1),r}function vc(e){let t,r;return vu(e)+(t=vu(e-1),r=vu(e),vu(e+1)-r==356?2:+(r-t==382))}function vd(e){return vc(e+1)-vc(e)}function vf(e,t){if(t>=6&&!vl(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;let r=function(e){let t=vd(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}(e);return 2===t?2===r?30:29:3===t?0===r?29:30:6===t?30*!!vl(e):30}class vp{fromJulianDay(e){let t=e-347997,r=Math.floor((25920*t/vs*19+234)/235)+1,n=vc(r),o=Math.floor(t-n);for(;o<1;)o=Math.floor(t-(n=vc(--r)));let a=1,i=0;for(;i<o;)i+=vf(r,a),a++;let s=o-(i-=vf(r,--a));return new g0(this,r,a,s)}toJulianDay(e){let t=vc(e.year);for(let r=1;r<e.month;r++)t+=vf(e.year,r);return t+e.day+347997}getDaysInMonth(e){return vf(e.year,e.month)}getMonthsInYear(e){return vl(e.year)?13:12}getDaysInYear(e){return vd(e.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,t){t.year!==e.year&&(vl(t.year)&&!vl(e.year)&&t.month>6?e.month--:!vl(t.year)&&vl(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class vm extends gN{fromJulianDay(e){let t,r,n,o=super.fromJulianDay(e),a=o.year-78,i=e-gk(o.era,o.year,1,1);if(i<80?(a--,i+=(t=gP(o.year-1)?31:30)+155+90+10):(t=gP(o.year)?31:30,i-=80),i<t)r=1,n=i+1;else{let e=i-t;e<155?(r=Math.floor(e/31)+2,n=e%31+1):(e-=155,r=Math.floor(e/30)+7,n=e%30+1)}return new g0(this,a,r,n)}toJulianDay(e){let t,r,[n,o]=gR(e.year+78);return(gP(o)?(t=31,r=gk(n,o,3,21)):(t=30,r=gk(n,o,3,22)),1===e.month)?r+e.day-1:(r+=t+31*Math.min(e.month-2,5),e.month>=8&&(r+=(e.month-7)*30),r+=e.day-1)}getDaysInMonth(e){return 1===e.month&&gP(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 vh(e,t,r,n){return n+Math.ceil(29.5*(r-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function vg(e,t,r){let n=Math.floor((30*(r-t)+10646)/10631),o=Math.min(12,Math.ceil((r-(29+vh(t,n,1,1)))/29.5)+1),a=r-vh(t,n,o,1)+1;return new g0(e,n,o,a)}function vy(e){return(14+11*e)%30<11}class vv{fromJulianDay(e){return vg(this,1948440,e)}toJulianDay(e){return vh(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return 12===e.month&&vy(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return vy(e.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class vb extends vv{fromJulianDay(e){return vg(this,1948439,e)}toJulianDay(e){return vh(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function vw(e){return 460322+u[e-1300]}function vE(e,t){return(l[e-1300]&1<<11-(t-1))==0?29:30}function vx(e,t){let r=vw(e);for(let n=1;n<t;n++)r+=vE(e,n);return r}function vD(e){return u[e+1-1300]-u[e-1300]}class v_ extends vv{fromJulianDay(e){let t=e-1948440,r=vw(1300),n=vw(1600);if(t<r||t>n)return super.fromJulianDay(e);{let e=1299,r=1,n=1;for(;n>0;){n=t-vw(++e)+1;let o=vD(e);if(n===o){r=12;break}if(n<o){let t=vE(e,r);for(r=1;n>t;)n-=t,t=vE(e,++r);break}}return new g0(this,e,r,t-vx(e,r)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+vx(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):vE(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):vD(e.year)}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 r=1;r<=12;r++)e+=vE(t,r)}}}}let vS=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],vC=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],vk=[1867,1911,1925,1988,2018],vP=["meiji","taisho","showa","heisei","reiwa"];function vO(e){let t=vS.findIndex(([t,r,n])=>!!(e.year<t)||e.year===t&&!!(e.month<r)||e.year===t&&e.month===r&&!!(e.day<n));return -1===t?vS.length-1:0===t?0:t-1}function vR(e){let t=vk[vP.indexOf(e.era)];if(!t)throw Error("Unknown era: "+e.era);return new g0(e.year+t,e.month,e.day)}class vT extends gN{fromJulianDay(e){let t=super.fromJulianDay(e),r=vO(t);return new g0(this,vP[r],t.year-vk[r],t.month,t.day)}toJulianDay(e){return super.toJulianDay(vR(e))}balanceDate(e){let t=vR(e),r=vO(t);vP[r]!==e.era&&(e.era=vP[r],e.year=t.year-vk[r]),this.constrainDate(e)}constrainDate(e){let t=vP.indexOf(e.era),r=vC[t];if(null!=r){let[n,o,a]=r,i=n-vk[t];e.year=Math.max(1,Math.min(i,e.year)),e.year===i&&(e.month=Math.min(o,e.month),e.month===o&&(e.day=Math.min(a,e.day)))}if(1===e.year&&t>=0){let[,r,n]=vS[t];e.month=Math.max(r,e.month),e.month===r&&(e.day=Math.max(n,e.day))}}getEras(){return vP}getYearsInEra(e){let t=vP.indexOf(e.era),r=vS[t],n=vS[t+1];if(null==n)return 9999-r[0]+1;let o=n[0]-r[0];return(e.month<n[1]||e.month===n[1]&&e.day<n[2])&&o++,o}getDaysInMonth(e){return super.getDaysInMonth(vR(e))}getMinimumMonthInYear(e){let t=vN(e);return t?t[1]:1}getMinimumDayInMonth(e){let t=vN(e);return t&&e.month===t[1]?t[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function vN(e){if(1===e.year)return vS[vP.indexOf(e.era)]}let vj=[0,31,62,93,124,155,186,216,246,276,306,336];class vA{fromJulianDay(e){let t=e-1948320,r=1+Math.floor((33*t+3)/12053),n=t-(365*(r-1)+Math.floor((8*r+21)/33)),o=n<216?Math.floor(n/31):Math.floor((n-6)/30),a=n-vj[o]+1;return new g0(this,r,o+1,a)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=vj[e.month-1],t+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>gC(25*e.year+11,33)?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function v$(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function vI(e){let t=e-1911;return t>0?["minguo",t]:["before_minguo",1-t]}class vM extends gN{fromJulianDay(e){let t=super.fromJulianDay(e),[r,n]=vI(gO(t.era,t.year));return new g0(this,r,n,t.month,t.day)}toJulianDay(e){return super.toJulianDay(vL(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[t,r]=vI(v$(e));e.era=t,e.year=r}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(vL(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function vL(e){let[t,r]=gR(v$(e));return new g0(t,r,e.month,e.day)}function vF(e){switch(e){case"buddhist":return new y8;case"ethiopic":return new vo;case"ethioaa":return new va;case"coptic":return new vi;case"hebrew":return new vp;case"indian":return new vm;case"islamic-civil":return new vv;case"islamic-tbla":return new vb;case"islamic-umalqura":return new v_;case"japanese":return new vT;case"persian":return new vA;case"roc":return new vM;default:return new gN}}function vB(e,t,r){return null!=t&&0>e.compare(t)||null!=r&&e.compare(r)>0}function vU(e,t,r,n,o){let a={};for(let e in t)a[e]=Math.floor(t[e]/2),a[e]>0&&t[e]%2==0&&a[e]--;let i=vV(e,t,r).subtract(a);return vH(e,i,t,r,n,o)}function vV(e,t,r,n,o){let a=e;if(t.years)a=yw(e.subtract({months:e.month-1}));else t.months?a=yw(e):t.weeks&&(a=yx(e,r));return vH(e,a,t,r,n,o)}function vW(e,t,r,n,o){let a={...t};a.days?a.days--:a.weeks?a.weeks--:a.months?a.months--:a.years&&a.years--;let i=vV(e,t,r).subtract(a);return vH(e,i,t,r,n,o)}function vH(e,t,r,n,o,a){if(o&&e.compare(o)>=0){let e=yS(t,vV(ya(o),r,n));e&&(t=e)}if(a&&0>=e.compare(a)){let e=y_(t,vW(ya(a),r,n));e&&(t=e)}return t}function vz(e,t,r){if(t){let r=yS(e,ya(t));r&&(e=r)}if(r){let t=y_(e,ya(r));t&&(e=t)}return e}function vK(e,t,r){if(!r)return e;for(;e.compare(t)>=0&&r(e);)e=e.subtract({days:1});return e.compare(t)>=0?e:null}function vG(e,t,r){let[n,o]=(0,cl.useState)(e||t),a=(0,cl.useRef)(void 0!==e),i=void 0!==e;(0,cl.useEffect)(()=>{a.current,a.current=i},[i]);let s=i?e:n,l=(0,cl.useCallback)((e,...t)=>{let n=(e,...t)=>{r&&!Object.is(s,e)&&r(e,...t),i||(s=e)};"function"==typeof e?o((r,...o)=>{let a=e(i?s:r,...o);return(n(a,...t),i)?r:a}):(i||o(e),n(e,...t))},[i,s,r]);return[s,l]}function vZ(e){var t,r,n;let o=(0,cl.useMemo)(()=>new yI(e.locale),[e.locale]),a=(0,cl.useMemo)(()=>o.resolvedOptions(),[o]),{locale:i,createCalendar:s,visibleDuration:l={months:1},minValue:u,maxValue:c,selectionAlignment:d,isDateUnavailable:f,pageBehavior:p="visible",firstDayOfWeek:m}=e,h=(0,cl.useMemo)(()=>s(a.calendar),[s,a.calendar]),[g,y]=vG(e.value,null!=(t=e.defaultValue)?t:null,e.onChange),v=(0,cl.useMemo)(()=>g?ys(ya(g),h):null,[g,h]),b=(0,cl.useMemo)(()=>g&&"timeZone"in g?g.timeZone:a.timeZone,[g,a.timeZone]),[w,E]=vG((0,cl.useMemo)(()=>e.focusedValue?vz(ys(ya(e.focusedValue),h),u,c):void 0,[e.focusedValue,h,u,c]),(0,cl.useMemo)(()=>vz(e.defaultFocusedValue?ys(ya(e.defaultFocusedValue),h):v||ys(yh(b),h),u,c),[e.defaultFocusedValue,v,b,h,u,c]),e.onFocusChange),[x,D]=(0,cl.useState)(()=>{switch(d){case"start":return vV(w,l,i,u,c);case"end":return vW(w,l,i,u,c);default:return vU(w,l,i,u,c)}}),[_,S]=(0,cl.useState)(e.autoFocus||!1),C=(0,cl.useMemo)(()=>{let e={...l};return e.days?e.days--:e.days=-1,x.add(e)},[x,l]),[k,P]=(0,cl.useState)(h);if(!yd(h,k)){let e=ys(w,h);D(vU(e,l,i,u,c)),E(e),P(h)}function O(e){E(e=vz(e,u,c))}function R(t){if(!e.isDisabled&&!e.isReadOnly){let e=t;if(null===e)return void y(null);(e=vK(e=vz(e,u,c),x,f))&&(e=ys(e,(null==g?void 0:g.calendar)||new gN),g&&"hour"in g?y(g.set(e)):y(e))}}vB(w,u,c)?E(vz(w,u,c)):0>w.compare(x)?D(vW(w,l,i,u,c)):w.compare(C)>0&&D(vV(w,l,i,u,c));let T=(0,cl.useMemo)(()=>!!v&&(!!(f&&f(v))||vB(v,u,c)),[v,f,u,c]),N=e.isInvalid||"invalid"===e.validationState||T,j=(0,cl.useMemo)(()=>"visible"===p?l:vY(l),[p,l]);return{isDisabled:null!=(r=e.isDisabled)&&r,isReadOnly:null!=(n=e.isReadOnly)&&n,value:v,setValue:R,visibleRange:{start:x,end:C},minValue:u,maxValue:c,focusedDate:w,timeZone:b,validationState:N?"invalid":null,isValueInvalid:N,setFocusedDate(e){O(e),S(!0)},focusNextDay(){O(w.add({days:1}))},focusPreviousDay(){O(w.subtract({days:1}))},focusNextRow(){l.days?this.focusNextPage():(l.weeks||l.months||l.years)&&O(w.add({weeks:1}))},focusPreviousRow(){l.days?this.focusPreviousPage():(l.weeks||l.months||l.years)&&O(w.subtract({weeks:1}))},focusNextPage(){let e=x.add(j);E(vz(w.add(j),u,c)),D(vV(vH(w,e,j,i,u,c),j,i))},focusPreviousPage(){let e=x.subtract(j);E(vz(w.subtract(j),u,c)),D(vV(vH(w,e,j,i,u,c),j,i))},focusSectionStart(){l.days?O(x):l.weeks?O(yx(w,i)):(l.months||l.years)&&O(yw(w))},focusSectionEnd(){l.days?O(C):l.weeks?O(yx(w,i,void 0).add({days:6})):(l.months||l.years)&&O(yE(w))},focusNextSection(e){e||l.days?l.days?this.focusNextPage():l.weeks?O(w.add({months:1})):(l.months||l.years)&&O(w.add({years:1})):O(w.add(vY(l)))},focusPreviousSection(e){e||l.days?l.days?this.focusPreviousPage():l.weeks?O(w.subtract({months:1})):(l.months||l.years)&&O(w.subtract({years:1})):O(w.subtract(vY(l)))},selectFocusedDate(){f&&f(w)||R(w)},selectDate(e){R(e)},isFocused:_,setFocused:S,isInvalid:e=>vB(e,u,c),isSelected(e){return null!=v&&yu(e,v)&&!this.isCellDisabled(e)&&!this.isCellUnavailable(e)},isCellFocused:e=>_&&w&&yu(e,w),isCellDisabled(t){return e.isDisabled||0>t.compare(x)||t.compare(C)>0||this.isInvalid(t)},isCellUnavailable:t=>!!e.isDateUnavailable&&e.isDateUnavailable(t),isPreviousVisibleRangeInvalid(){let e=x.subtract({days:1});return yu(e,x)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=C.add({days:1});return yu(e,C)||this.isInvalid(e)},getDatesInWeek(e,t=x){let r=t.add({weeks:e}),n=[],o=yp(r=yx(r,i,m),i,m);for(let e=0;e<o;e++)n.push(null);for(;n.length<7;){n.push(r);let e=r.add({days:1});if(yu(r,e))break;r=e}for(;n.length<7;)n.push(null);return n}}}function vY(e){let t={...e};for(let r in e)t[r]=1;return t}function vq(e,t){return e&&t?(0>t.compare(e)&&([e,t]=[t,e]),{start:ya(e),end:ya(t)}):null}function vJ(e,t){return(e=ys(e,(null==t?void 0:t.calendar)||new gN),t&&"hour"in t)?t.set(e):e}function vX(e,t,r){let n=e.add({days:r});for(;(r<0?n.compare(t.visibleRange.start)>=0:0>=n.compare(t.visibleRange.end))&&!t.isCellUnavailable(n);)n=n.add({days:r});if(t.isCellUnavailable(n))return n.add({days:-r})}let vQ=(0,cl.createContext)(null),v0=(0,cl.createContext)(null),v1=(0,cl.createContext)(null),v2=(0,cl.createContext)(null),v4=(0,cl.forwardRef)(function(e,t){[e,t]=mL(e,t,vQ);let{locale:r}=g_(),n=vZ({...e,locale:r,createCalendar:e.createCalendar||vF}),{calendarProps:o,prevButtonProps:a,nextButtonProps:i,errorMessageProps:s,title:l}=yJ(e,n),u=mI({...e,values:{state:n,isDisabled:e.isDisabled||!1,isInvalid:n.isValueInvalid},defaultClassName:"react-aria-Calendar"});return cu().createElement("div",{...u,...o,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":n.isValueInvalid||void 0},cu().createElement(m$,{values:[[gl,{slots:{previous:a,next:i}}],[gc,{"aria-hidden":!0,level:2,children:l}],[v1,n],[vQ,e],[gd,{slots:{errorMessage:s}}]]},cu().createElement(yQ,null,cu().createElement("h2",null,o["aria-label"])),u.children,cu().createElement(yQ,null,cu().createElement("button",{"aria-label":i["aria-label"],disabled:i.isDisabled,onClick:()=>n.focusNextPage(),tabIndex:-1}))))}),v3=(0,cl.forwardRef)(function(e,t){var r,n;let o,a,i;[e,t]=mL(e,t,v0);let{locale:s}=g_(),l=function(e){let{value:t,defaultValue:r,onChange:n,createCalendar:o,locale:a,visibleDuration:i={months:1},minValue:s,maxValue:l,...u}=e,[c,d]=vG(t,r||null,n),[f,p]=(0,cl.useState)(null),m="center";if(c&&c.start&&c.end){let e=vU(ya(c.start),i,a,s,l).add(i).subtract({days:1});c.end.compare(e)>0&&(m="start")}let h=(0,cl.useRef)(null),[g,y]=(0,cl.useState)(null),v=(0,cl.useMemo)(()=>yS(s,null==g?void 0:g.start),[s,g]),b=(0,cl.useMemo)(()=>y_(l,null==g?void 0:g.end),[l,g]),w=vZ({...u,value:c&&c.start,createCalendar:o,locale:a,visibleDuration:i,minValue:v,maxValue:b,selectionAlignment:m}),E=t=>{t&&e.isDateUnavailable&&!e.allowsNonContiguousRanges?(h.current={start:vX(t,w,-1),end:vX(t,w,1)},y(h.current)):(h.current=null,y(null))},[x,D]=(0,cl.useState)(w.visibleRange);yc(w.visibleRange.start,x.start)&&yc(w.visibleRange.end,x.end)||(E(f),D(w.visibleRange));let _=e=>{e?(p(e),E(e)):(p(null),E(null))},S=f?vq(f,w.focusedDate):c&&vq(c.start,c.end),C=t=>{if(e.isReadOnly)return;let r=vK(vz(t,v,b),w.visibleRange.start,e.isDateUnavailable);if(r)if(f){let e=vq(f,r);e&&d({start:vJ(e.start,null==c?void 0:c.start),end:vJ(e.end,null==c?void 0:c.end)}),_(null)}else _(r)},[k,P]=(0,cl.useState)(!1),{isDateUnavailable:O}=e,R=(0,cl.useMemo)(()=>!!c&&!f&&(!!(O&&(O(c.start)||O(c.end)))||vB(c.start,s,l)||vB(c.end,s,l)),[O,c,f,s,l]),T=e.isInvalid||"invalid"===e.validationState||R;return{...w,value:c,setValue:d,anchorDate:f,setAnchorDate:_,highlightedRange:S,validationState:T?"invalid":null,isValueInvalid:T,selectFocusedDate(){C(w.focusedDate)},selectDate:C,highlightDate(e){f&&w.setFocusedDate(e)},isSelected:e=>!!(S&&e.compare(S.start)>=0&&0>=e.compare(S.end)&&!w.isCellDisabled(e)&&!w.isCellUnavailable(e)),isInvalid(e){var t,r;return w.isInvalid(e)||vB(e,null==(t=h.current)?void 0:t.start,null==(r=h.current)?void 0:r.end)},isDragging:k,setDragging:P}}({...e,locale:s,createCalendar:e.createCalendar||vF}),{calendarProps:u,prevButtonProps:c,nextButtonProps:d,errorMessageProps:f,title:p}=(r=e,n=t,o=yJ(r,l),a=(0,cl.useRef)(!1),y0(i=(0,cl.useRef)("u">typeof window?window:null),"pointerdown",e=>{a.current=0===e.width&&0===e.height}),y0(i,"pointerup",e=>{if(a.current){a.current=!1;return}if(l.setDragging(!1),!l.anchorDate)return;let t=e.target;n.current&&n.current.contains(document.activeElement)&&(!n.current.contains(t)||!t.closest('button, [role="button"]'))&&l.selectFocusedDate()}),o.calendarProps.onBlur=e=>{n.current&&(e.relatedTarget&&n.current.contains(e.relatedTarget)||!l.anchorDate||l.selectFocusedDate())},y0(n,"touchmove",e=>{l.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),o),m=mI({...e,values:{state:l,isDisabled:e.isDisabled||!1,isInvalid:l.isValueInvalid},defaultClassName:"react-aria-RangeCalendar"});return cu().createElement("div",{...m,...u,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":l.isValueInvalid||void 0},cu().createElement(m$,{values:[[gl,{slots:{previous:c,next:d}}],[gc,{"aria-hidden":!0,level:2,children:p}],[v2,l],[v0,e],[gd,{slots:{errorMessage:f}}]]},cu().createElement(yQ,null,cu().createElement("h2",null,u["aria-label"])),m.children,cu().createElement(yQ,null,cu().createElement("button",{"aria-label":d["aria-label"],disabled:d.isDisabled,onClick:()=>l.focusNextPage(),tabIndex:-1}))))}),v6=(0,cl.createContext)(null),v5=(0,cl.forwardRef)(function(e,t){var r,n;let o=(0,cl.useContext)(v1),a=(0,cl.useContext)(v2),i=mM(vQ),s=mM(v0),l=null!=o?o:a,u=l.visibleRange.start;e.offset&&(u=u.add(e.offset));let c=null!=(r=null==i?void 0:i.firstDayOfWeek)?r:null==s?void 0:s.firstDayOfWeek,{gridProps:d,headerProps:f,weekDays:p,weeksInMonth:m}=function(e,t){let r,{startDate:n=t.visibleRange.start,endDate:o=t.visibleRange.end,firstDayOfWeek:a}=e,{direction:i}=g_(),s=yG(n,o,t.timeZone,!0),{ariaLabel:l,ariaLabelledBy:u}=yz.get(t),c=yq({"aria-label":[l,s].filter(Boolean).join(", "),"aria-labelledby":u}),d=yV({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:f}=g_(),p=(0,cl.useMemo)(()=>{let e=yx(yh(t.timeZone),f,a);return[...Array(7).keys()].map(r=>{let n=e.add({days:r}).toDate(t.timeZone);return d.format(n)})},[f,t.timeZone,d,a]),m=(r=n.calendar.getDaysInMonth(n),Math.ceil((yp(yw(n),f,a)+r)/7));return{gridProps:mj(c,{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"===i?t.focusNextDay():t.focusPreviousDay();break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),t.focusPreviousRow();break;case"ArrowRight":e.preventDefault(),e.stopPropagation(),"rtl"===i?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:p,weeksInMonth:m}}({startDate:u,endDate:yE(u),weekdayStyle:e.weekdayStyle,firstDayOfWeek:c},l);return cu().createElement(v6.Provider,{value:{headerProps:f,weekDays:p,startDate:u,weeksInMonth:m}},cu().createElement("table",{...mY(e),...d,ref:t,style:e.style,className:null!=(n=e.className)?n:"react-aria-CalendarGrid"},"function"!=typeof e.children?e.children:cu().createElement(cu().Fragment,null,cu().createElement(v9,null,e=>cu().createElement(v8,null,e)),cu().createElement(v7,null,e.children))))}),v9=(0,cl.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e,{headerProps:a,weekDays:i}=(0,cl.useContext)(v6);return cu().createElement("thead",{...mY(e),...a,ref:t,style:n,className:o||"react-aria-CalendarGridHeader"},cu().createElement("tr",null,i.map((e,t)=>cu().cloneElement(r(e),{key:t}))))}),v8=(0,cl.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e;return cu().createElement("th",{...mY(e),ref:t,style:n,className:o||"react-aria-CalendarHeaderCell"},r)}),v7=(0,cl.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e,a=(0,cl.useContext)(v1),i=(0,cl.useContext)(v2),s=null!=a?a:i,{startDate:l,weeksInMonth:u}=(0,cl.useContext)(v6);return cu().createElement("tbody",{...mY(e),ref:t,style:n,className:o||"react-aria-CalendarGridBody"},[...Array(u).keys()].map(e=>cu().createElement("tr",{key:e},s.getDatesInWeek(e,l).map((e,t)=>e?cu().cloneElement(r(e),{key:t}):cu().createElement("td",{key:t})))))}),be=(0,cl.forwardRef)(function({date:e,...t},r){var n,o,a;let i=(0,cl.useContext)(v1),s=(0,cl.useContext)(v2),l=null!=i?i:s,{startDate:u}=null!=(n=(0,cl.useContext)(v6))?n:{startDate:l.visibleRange.start},c=(0,cl.useRef)(null),{cellProps:d,buttonProps:f,...p}=function(e,t,r){var n;let o,{date:a,isDisabled:i}=e,{errorMessageId:s,selectedDateDescription:l}=yz.get(t),u=yA((n=gS)&&n.__esModule?n.default:n,"@react-aria/calendar"),c=yV({weekday:"long",day:"numeric",month:"long",year:"numeric",era:yK(a),timeZone:t.timeZone}),d=t.isSelected(a),f=t.isCellFocused(a);i=i||t.isCellDisabled(a);let p=t.isCellUnavailable(a),m=!i&&!p,h=t.isValueInvalid&&!!("highlightedRange"in t?!t.anchorDate&&t.highlightedRange&&a.compare(t.highlightedRange.start)>=0&&0>=a.compare(t.highlightedRange.end):t.value&&yu(t.value,a));h&&(d=!0),a=yU(a,yc);let g=(0,cl.useMemo)(()=>a.toDate(t.timeZone),[a,t.timeZone]),y=yu(a,yh(t.timeZone)),v=(0,cl.useMemo)(()=>{let e="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(yu(a,t.value.start)||yu(a,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&&yu(a,t.minValue)?e+=", "+u.format("minimumDate"):t.maxValue&&yu(a,t.maxValue)&&(e+=", "+u.format("maximumDate")),e},[c,g,u,d,y,a,t,l]),b="";"anchorDate"in t&&f&&!t.isReadOnly&&m&&(b=t.anchorDate?u.format("finishRangeSelectionPrompt"):u.format("startRangeSelectionPrompt"));let w=y4(b),E=(0,cl.useRef)(!1),x=(0,cl.useRef)(!1),D=(0,cl.useRef)(void 0),{pressProps:_,isPressed:S}=hj({shouldCancelOnPointerExit:"anchorDate"in t&&!!t.anchorDate,preventFocusOnPress:!0,isDisabled:!m||t.isReadOnly,onPressStart(e){if(t.isReadOnly)return void t.setFocusedDate(a);if("highlightedRange"in t&&!t.anchorDate&&("mouse"===e.pointerType||"touch"===e.pointerType)){if(t.highlightedRange&&!h){if(yu(a,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(a),t.setDragging(!0),x.current=!0;return}else if(yu(a,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(a),t.setDragging(!0),x.current=!0;return}}let r=()=>{t.setDragging(!0),D.current=void 0,t.selectDate(a),t.setFocusedDate(a),E.current=!0};"touch"===e.pointerType?D.current=setTimeout(r,200):r()}},onPressEnd(){x.current=!1,E.current=!1,clearTimeout(D.current),D.current=void 0},onPress(){"anchorDate"in t||t.isReadOnly||(t.selectDate(a),t.setFocusedDate(a))},onPressUp(e){if(!t.isReadOnly&&("anchorDate"in t&&D.current&&(t.selectDate(a),t.setFocusedDate(a)),"anchorDate"in t))if(x.current)t.setAnchorDate(a);else if(t.anchorDate&&!E.current)t.selectDate(a),t.setFocusedDate(a);else if("keyboard"!==e.pointerType||t.anchorDate)"virtual"===e.pointerType&&(t.selectDate(a),t.setFocusedDate(a));else{t.selectDate(a);let e=a.add({days:1});t.isInvalid(e)&&(e=a.subtract({days:1})),t.isInvalid(e)||t.setFocusedDate(e)}}});i||(o=yu(a,t.focusedDate)?0:-1),(0,cl.useEffect)(()=>{f&&r.current&&(m4(r.current),"pointer"!==hB&&document.activeElement===r.current&&y5(r.current,{containingElement:y9(r.current)}))},[f,r]);let C=yV({day:"numeric",timeZone:t.timeZone,calendar:a.calendar.identifier}),k=(0,cl.useMemo)(()=>C.formatToParts(g).find(e=>"day"===e.type).value,[C,g]);return{cellProps:{role:"gridcell","aria-disabled":!m||void 0,"aria-selected":d||void 0,"aria-invalid":h||void 0},buttonProps:mj(_,{onFocus(){i||t.setFocusedDate(a)},tabIndex:o,role:"button","aria-disabled":!m||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)&&m&&t.highlightDate(a)},onPointerDown(e){"releasePointerCapture"in e.target&&e.target.releasePointerCapture(e.pointerId)},onContextMenu(e){e.preventDefault()}}),isPressed:S,isFocused:f,isSelected:d,isDisabled:i,isUnavailable:p,isOutsideVisibleRange:0>a.compare(t.visibleRange.start)||a.compare(t.visibleRange.end)>0,isInvalid:h,formattedDate:k}}({date:e},l,c),{hoverProps:m,isHovered:h}=go({...t,isDisabled:p.isDisabled}),{focusProps:g,isFocusVisible:y}=h7();y&&(y=p.isFocused);let v=(o=u,a=ys(a=e,o.calendar),o=yw(o),a=yw(a),o.era!==a.era||o.year!==a.year||o.month!==a.month),b=!1,w=!1;"highlightedRange"in l&&l.highlightedRange&&(b=yu(e,l.highlightedRange.start),w=yu(e,l.highlightedRange.end));let E=mI({...t,defaultChildren:p.formattedDate,defaultClassName:"react-aria-CalendarCell",values:{date:e,isHovered:h,isOutsideMonth:v,isFocusVisible:y,isSelectionStart:b,isSelectionEnd:w,...p}}),x={"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 cu().createElement("td",{...d,ref:r},cu().createElement("div",{...mj(mY(t),f,g,m,x,E),ref:c}))}),bt=(0,cl.createContext)({}),br=(0,cl.forwardRef)(function(e,t){var r,n;[e,t]=mL(e,t,bt);let{isDisabled:o,isInvalid:a,onHoverStart:i,onHoverChange:s,onHoverEnd:l,...u}=e,{hoverProps:c,isHovered:d}=go({onHoverStart:i,onHoverChange:s,onHoverEnd:l,isDisabled:o}),{isFocused:f,isFocusVisible:p,focusProps:m}=h7({within:!0});null!=o||(o=!!e["aria-disabled"]&&"false"!==e["aria-disabled"]),null!=a||(a=!!e["aria-invalid"]&&"false"!==e["aria-invalid"]);let h=mI({...e,values:{isHovered:d,isFocusWithin:f,isFocusVisible:p,isDisabled:o,isInvalid:a},defaultClassName:"react-aria-Group"});return cu().createElement("div",{...mj(u,m,c),...h,ref:t,role:null!=(r=e.role)?r:"group",slot:null!=(n=e.slot)?n:void 0,"data-focus-within":f||void 0,"data-hovered":d||void 0,"data-focus-visible":p||void 0,"data-disabled":o||void 0,"data-invalid":a||void 0},h.children)}),bn=(0,cl.createContext)({}),bo=gi(function(e,t){[e,t]=mL(e,t,bn);let{hoverProps:r,isHovered:n}=go(e),{isFocused:o,isFocusVisible:a,focusProps:i}=h7({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e["aria-invalid"]&&"false"!==e["aria-invalid"],l=mI({...e,values:{isHovered:n,isFocused:o,isFocusVisible:a,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:"react-aria-Input"});return cu().createElement("input",{...mj((e=>{let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,...o}=e;return o})(e),i,r),...l,ref:t,"data-focused":o||void 0,"data-disabled":e.disabled||void 0,"data-hovered":n||void 0,"data-focus-visible":a||void 0,"data-invalid":s||void 0})});var ba={};ba={"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:"Anfangsdatum",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 bi=cu().createContext(null),bs="react-aria-focus-scope-restore",bl=null;function bu(e){var t,r,n,o,a,i,s,l,u,c;let d,f,p,m,{children:h,contain:g,restoreFocus:y,autoFocus:v}=e,b=(0,cl.useRef)(null),w=(0,cl.useRef)(null),E=(0,cl.useRef)([]),{parentNode:x}=(0,cl.useContext)(bi)||{},D=(0,cl.useMemo)(()=>new b_({scopeRef:E}),[E]);my(()=>{let e=x||bS.root;if(bS.getTreeNode(e.scopeRef)&&bl&&!bm(bl,e.scopeRef)){let t=bS.getTreeNode(bl);t&&(e=t)}e.addChild(D),bS.addNode(D)},[D,x]),my(()=>{let e=bS.getTreeNode(E);e&&(e.contain=!!g)},[g]),my(()=>{var e;let t=null==(e=b.current)?void 0:e.nextSibling,r=[],n=e=>e.stopPropagation();for(;t&&t!==w.current;)r.push(t),t.addEventListener(bs,n),t=t.nextSibling;return E.current=r,()=>{for(let e of r)e.removeEventListener(bs,n)}},[h]),my(()=>{if(r||n)return;let e=t.current,o=m1(e?e[0]:void 0),a=e=>{let r=hS(e);bf(r,t.current)?bl=t:bp(r)||(bl=null)};return o.addEventListener("focusin",a,!1),null==e||e.forEach(e=>e.addEventListener("focusin",a,!1)),()=>{o.removeEventListener("focusin",a,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",a,!1))}},[t=E,r=y,n=g]),o=E,a=g,d=(0,cl.useRef)(void 0),f=(0,cl.useRef)(void 0),my(()=>{let e=o.current;if(!a){f.current&&(cancelAnimationFrame(f.current),f.current=void 0);return}let t=m1(e?e[0]:void 0),r=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!bd(o)||e.isComposing)return;let r=((e=document)=>e.activeElement)(t),n=o.current;if(!n||!bf(r,n))return;let a=bw(bc(n),{tabbable:!0},n);if(!r)return;a.currentNode=r;let i=e.shiftKey?a.previousNode():a.nextNode();i||(a.currentNode=e.shiftKey?n[n.length-1].nextElementSibling:n[0].previousElementSibling,i=e.shiftKey?a.previousNode():a.nextNode()),e.preventDefault(),i&&bh(i,!0)},n=e=>{(!bl||bm(bl,o))&&bf(hS(e),o.current)?(bl=o,d.current=hS(e)):bd(o)&&!bp(hS(e),o)?d.current?d.current.focus():bl&&bl.current&&by(bl.current):bd(o)&&(d.current=hS(e))},i=e=>{f.current&&cancelAnimationFrame(f.current),f.current=requestAnimationFrame(()=>{let r=hB,n=("virtual"===r||null===r)&&hl()&&hs(),a=((e=document)=>e.activeElement)(t);if(!n&&a&&bd(o)&&!bp(a,o)){bl=o;let t=hS(e);if(t&&t.isConnected){var i;d.current=t,null==(i=d.current)||i.focus()}else bl.current&&by(bl.current)}})};return t.addEventListener("keydown",r,!1),t.addEventListener("focusin",n,!1),null==e||e.forEach(e=>e.addEventListener("focusin",n,!1)),null==e||e.forEach(e=>e.addEventListener("focusout",i,!1)),()=>{t.removeEventListener("keydown",r,!1),t.removeEventListener("focusin",n,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",n,!1)),null==e||e.forEach(e=>e.removeEventListener("focusout",i,!1))}},[o,a]),my(()=>()=>{f.current&&cancelAnimationFrame(f.current)},[f]),i=E,s=y,l=g,p=(0,cl.useRef)("u">typeof document?((e=document)=>e.activeElement)(m1(i.current?i.current[0]:void 0)):null),my(()=>{let e=i.current,t=m1(e?e[0]:void 0);if(!s||l)return;let r=()=>{(!bl||bm(bl,i))&&bf(((e=document)=>e.activeElement)(t),i.current)&&(bl=i)};return t.addEventListener("focusin",r,!1),null==e||e.forEach(e=>e.addEventListener("focusin",r,!1)),()=>{t.removeEventListener("focusin",r,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",r,!1))}},[i,l]),my(()=>{let e=m1(i.current?i.current[0]:void 0);if(!s)return;let t=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!bd(i)||t.isComposing)return;let r=e.activeElement;if(!bp(r,i)||!bv(i))return;let n=bS.getTreeNode(i);if(!n)return;let o=n.nodeToRestore,a=bw(e.body,{tabbable:!0});a.currentNode=r;let s=t.shiftKey?a.previousNode():a.nextNode();if(o&&o.isConnected&&o!==e.body||(o=void 0,n.nodeToRestore=void 0),(!s||!bp(s,i))&&o){a.currentNode=o;do s=t.shiftKey?a.previousNode():a.nextNode();while(bp(s,i));(t.preventDefault(),t.stopPropagation(),s)?bh(s,!0):bp(o)?bh(o,!0):r.blur()}};return l||e.addEventListener("keydown",t,!0),()=>{l||e.removeEventListener("keydown",t,!0)}},[i,s,l]),my(()=>{var e;let t=m1(i.current?i.current[0]:void 0);if(!s)return;let r=bS.getTreeNode(i);if(r)return r.nodeToRestore=null!=(e=p.current)?e:void 0,()=>{let e=bS.getTreeNode(i);if(!e)return;let r=e.nodeToRestore,n=((e=document)=>e.activeElement)(t);if(s&&r&&(n&&bp(n,i)||n===t.body&&bv(i))){let e=bS.clone();requestAnimationFrame(()=>{if(t.activeElement===t.body){let t=e.getTreeNode(i);for(;t;){if(t.nodeToRestore&&t.nodeToRestore.isConnected)return void bb(t.nodeToRestore);t=t.parent}for(t=e.getTreeNode(i);t;){if(t.scopeRef&&t.scopeRef.current&&bS.getTreeNode(t.scopeRef))return void bb(bg(t.scopeRef.current,!0));t=t.parent}}})}}},[i,s]),u=E,c=v,m=cu().useRef(c),(0,cl.useEffect)(()=>{m.current&&(bl=u,!bf(((e=document)=>e.activeElement)(m1(u.current?u.current[0]:void 0)),bl.current)&&u.current&&by(u.current)),m.current=!1},[u]),(0,cl.useEffect)(()=>{let e=((e=document)=>e.activeElement)(m1(E.current?E.current[0]:void 0)),t=null;if(bf(e,E.current)){for(let r of bS.traverse())r.scopeRef&&bf(e,r.scopeRef.current)&&(t=r);t===bS.getTreeNode(E)&&(bl=t.scopeRef)}},[E]),my(()=>()=>{var e,t,r;let n=null!=(r=null==(t=bS.getTreeNode(E))||null==(e=t.parent)?void 0:e.scopeRef)?r:null;(E===bl||bm(E,bl))&&(!n||bS.getTreeNode(n))&&(bl=n),bS.removeTreeNode(E)},[E]);let _=(0,cl.useMemo)(()=>{var e;return e=E,{focusNext(t={}){var r;let n=e.current,{from:o,tabbable:a,wrap:i,accept:s}=t,l=o||((e=document)=>e.activeElement)(m1(null!=(r=n[0])?r:void 0)),u=n[0].previousElementSibling,c=bw(bc(n),{tabbable:a,accept:s},n);c.currentNode=bf(l,n)?l:u;let d=c.nextNode();return!d&&i&&(c.currentNode=u,d=c.nextNode()),d&&bh(d,!0),d},focusPrevious(t={}){var r;let n=e.current,{from:o,tabbable:a,wrap:i,accept:s}=t,l=o||((e=document)=>e.activeElement)(m1(null!=(r=n[0])?r:void 0)),u=n[n.length-1].nextElementSibling,c=bw(bc(n),{tabbable:a,accept:s},n);c.currentNode=bf(l,n)?l:u;let d=c.previousNode();return!d&&i&&(c.currentNode=u,d=c.previousNode()),d&&bh(d,!0),d},focusFirst(t={}){let r=e.current,{tabbable:n,accept:o}=t,a=bw(bc(r),{tabbable:n,accept:o},r);a.currentNode=r[0].previousElementSibling;let i=a.nextNode();return i&&bh(i,!0),i},focusLast(t={}){let r=e.current,{tabbable:n,accept:o}=t,a=bw(bc(r),{tabbable:n,accept:o},r);a.currentNode=r[r.length-1].nextElementSibling;let i=a.previousNode();return i&&bh(i,!0),i}}},[]),S=(0,cl.useMemo)(()=>({focusManager:_,parentNode:D}),[D,_]);return cu().createElement(bi.Provider,{value:S},cu().createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:b}),h,cu().createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:w}))}function bc(e){return e[0].parentElement}function bd(e){let t=bS.getTreeNode(bl);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function bf(e,t){return!!e&&!!t&&t.some(t=>t.contains(e))}function bp(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:r}of bS.traverse(bS.getTreeNode(t)))if(r&&bf(e,r.current))return!0;return!1}function bm(e,t){var r;let n=null==(r=bS.getTreeNode(t))?void 0:r.parent;for(;n;){if(n.scopeRef===e)return!0;n=n.parent}return!1}function bh(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch{}}else try{h2(e)}catch{}}function bg(e,t=!0){let r=e[0].previousElementSibling,n=bc(e),o=bw(n,{tabbable:t},e);o.currentNode=r;let a=o.nextNode();return t&&!a&&((o=bw(n=bc(e),{tabbable:!1},e)).currentNode=r,a=o.nextNode()),a}function by(e,t=!0){bh(bg(e,t))}function bv(e){let t=bS.getTreeNode(bl);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(null==t?void 0:t.scopeRef)===e}function bb(e){e.dispatchEvent(new CustomEvent(bs,{bubbles:!0,cancelable:!0}))&&bh(e)}function bw(e,t,r){var n,o,a;let i=(null==t?void 0:t.tabbable)?m0:mQ,s=m1((null==e?void 0:e.nodeType)===Node.ELEMENT_NODE?e:null),l=(n=e||s,o=NodeFilter.SHOW_ELEMENT,a={acceptNode(e){var n;return(null==t||null==(n=t.from)?void 0:n.contains(e))?NodeFilter.FILTER_REJECT:i(e)&&function e(t,r){return"#comment"!==t.nodeName&&function(e){let t=m2(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:r,visibility:n}=e.style,o="none"!==r&&"hidden"!==n&&"collapse"!==n;if(o){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:r,visibility:n}=t(e);o="none"!==r&&"hidden"!==n&&"collapse"!==n}return o}(t)&&!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&("DETAILS"!==t.nodeName||!r||"SUMMARY"===r.nodeName||t.hasAttribute("open"))&&(!t.parentElement||e(t.parentElement,t))}(e)&&(!r||bf(e,r))&&(!(null==t?void 0:t.accept)||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}},s.createTreeWalker(n,o,a));return(null==t?void 0:t.from)&&(l.currentNode=t.from),l}function bE(e,t={}){return{focusNext(r={}){let n=e.current;if(!n)return null;let{from:o,tabbable:a=t.tabbable,wrap:i=t.wrap,accept:s=t.accept}=r,l=o||((e=document)=>e.activeElement)(m1(n)),u=bw(n,{tabbable:a,accept:s});n.contains(l)&&(u.currentNode=l);let c=u.nextNode();return!c&&i&&(u.currentNode=n,c=u.nextNode()),c&&bh(c,!0),c},focusPrevious(r=t){let n=e.current;if(!n)return null;let{from:o,tabbable:a=t.tabbable,wrap:i=t.wrap,accept:s=t.accept}=r,l=o||((e=document)=>e.activeElement)(m1(n)),u=bw(n,{tabbable:a,accept:s});if(n.contains(l))u.currentNode=l;else{let e=bx(u);return e&&bh(e,!0),null!=e?e:null}let c=u.previousNode();if(!c&&i){u.currentNode=n;let e=bx(u);if(!e)return null;c=e}return c&&bh(c,!0),null!=c?c:null},focusFirst(r=t){let n=e.current;if(!n)return null;let{tabbable:o=t.tabbable,accept:a=t.accept}=r,i=bw(n,{tabbable:o,accept:a}).nextNode();return i&&bh(i,!0),i},focusLast(r=t){let n=e.current;if(!n)return null;let{tabbable:o=t.tabbable,accept:a=t.accept}=r,i=bx(bw(n,{tabbable:o,accept:a}));return i&&bh(i,!0),null!=i?i:null}}}function bx(e){let t,r;do(t=e.lastChild())&&(r=t);while(t);return r}class bD{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,r){let n=this.fastMap.get(null!=t?t:null);if(!n)return;let o=new b_({scopeRef:e});n.addChild(o),o.parent=n,this.fastMap.set(e,o),r&&(o.nodeToRestore=r)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(null===e)return;let t=this.fastMap.get(e);if(!t)return;let r=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&bf(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let n=t.children;r&&(r.removeChild(t),n.size>0&&n.forEach(e=>r&&r.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(){var e,t;let r=new bD;for(let n of this.traverse())r.addTreeNode(n.scopeRef,null!=(t=null==(e=n.parent)?void 0:e.scopeRef)?t:null,n.nodeToRestore);return r}constructor(){this.fastMap=new Map,this.root=new b_({scopeRef:null}),this.fastMap.set(null,this.root)}}class b_{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}let bS=new bD;function bC(e,t,r){let{direction:n}=g_(),o=(0,cl.useMemo)(()=>bE(t),[t]),a=()=>{var e;if(!t.current)return;let r=null==(e=window.event)?void 0:e.target,n=bw(t.current,{tabbable:!0});if(r&&(n.currentNode=r,r=n.previousNode()),!r){let e;do(e=n.lastChild())&&(r=e);while(e)}for(;null==r?void 0:r.hasAttribute("data-placeholder");){let e=n.previousNode();if(e&&e.hasAttribute("data-placeholder"))r=e;else break}r&&r.focus()},{pressProps:i}=hj({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){"mouse"===e.pointerType&&a()},onPress(e){"mouse"!==e.pointerType&&a()}});return mj(i,{onKeyDown:a=>{if(a.currentTarget.contains(a.target)&&(a.altKey&&("ArrowDown"===a.key||"ArrowUp"===a.key)&&"setOpen"in e&&(a.preventDefault(),a.stopPropagation(),e.setOpen(!0)),!r))switch(a.key){case"ArrowLeft":if(a.preventDefault(),a.stopPropagation(),"rtl"===n){if(t.current){let e=a.target,r=bk(t.current,e.getBoundingClientRect().left,-1);r&&r.focus()}}else o.focusPrevious();break;case"ArrowRight":if(a.preventDefault(),a.stopPropagation(),"rtl"===n){if(t.current){let e=a.target,r=bk(t.current,e.getBoundingClientRect().left,1);r&&r.focus()}}else o.focusNext()}}})}function bk(e,t,r){let n=bw(e,{tabbable:!0}),o=n.nextNode(),a=null,i=1/0;for(;o;){let e=o.getBoundingClientRect().left-t,s=Math.abs(e);Math.sign(e)===r&&s<i&&(a=o,i=s),o=n.nextNode()}return a}function bP(e,t,r){let n=(0,cl.useRef)(t),o=mv(()=>{r&&r(n.current)});(0,cl.useEffect)(()=>{var t;let r=null==e||null==(t=e.current)?void 0:t.form;return null==r||r.addEventListener("reset",o),()=>{null==r||r.removeEventListener("reset",o)}},[e,o])}function bO(e){let{description:t,errorMessage:r,isInvalid:n,validationState:o}=e,{labelProps:a,fieldProps:i}=function(e){let{id:t,label:r,"aria-labelledby":n,"aria-label":o,labelElementType:a="label"}=e;t=mR(t);let i=mR(),s={};return r&&(n=n?`${i} ${n}`:i,s={id:i,htmlFor:"label"===a?t:void 0}),{labelProps:s,fieldProps:yq({id:t,"aria-label":o,"aria-labelledby":n})}}(e),s=mT([!!t,!!r,n,o]),l=mT([!!t,!!r,n,o]);return{labelProps:a,fieldProps:i=mj(i,{"aria-describedby":[s,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),descriptionProps:{id:s},errorMessageProps:{id:l}}}function bR(e,t,r){let{validationBehavior:n,focus:o}=e;my(()=>{if("native"===n&&(null==r?void 0:r.current)&&!r.current.disabled){var e;let n,o=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";r.current.setCustomValidity(o),r.current.hasAttribute("title")||(r.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation({isInvalid:!(e=r.current).validity.valid,validationDetails:{badInput:(n=e.validity).badInput,customError:n.customError,patternMismatch:n.patternMismatch,rangeOverflow:n.rangeOverflow,rangeUnderflow:n.rangeUnderflow,stepMismatch:n.stepMismatch,tooLong:n.tooLong,tooShort:n.tooShort,typeMismatch:n.typeMismatch,valueMissing:n.valueMissing,valid:n.valid},validationErrors:e.validationMessage?[e.validationMessage]:[]})}});let a=mv(()=>{t.resetValidation()}),i=mv(e=>{var n,a;t.displayValidation.isInvalid||t.commitValidation();let i=null==r||null==(n=r.current)?void 0:n.form;!e.defaultPrevented&&r&&i&&function(e){for(let t=0;t<e.elements.length;t++){let r=e.elements[t];if(!r.validity.valid)return r}return null}(i)===r.current&&(o?o():null==(a=r.current)||a.focus(),hB="keyboard",hK("keyboard",null)),e.preventDefault()}),s=mv(()=>{t.commitValidation()});(0,cl.useEffect)(()=>{let e=null==r?void 0:r.current;if(!e)return;let t=e.form;return e.addEventListener("invalid",i),e.addEventListener("change",s),null==t||t.addEventListener("reset",a),()=>{e.removeEventListener("invalid",i),e.removeEventListener("change",s),null==t||t.removeEventListener("reset",a)}},[r,i,s,a,n])}let bT=new WeakMap,bN="__role_"+Date.now(),bj="__focusManager_"+Date.now();function bA(e,t,r){var n,o;let a,{isInvalid:i,validationErrors:s,validationDetails:l}=t.displayValidation,{labelProps:u,fieldProps:c,descriptionProps:d,errorMessageProps:f}=bO({...e,labelElementType:"span",isInvalid:i,errorMessage:e.errorMessage||s}),p=(0,cl.useRef)(null),{focusWithinProps:m}=h8({...e,onFocusWithin(r){var n;p.current=t.value,null==(n=e.onFocus)||n.call(e,r)},onBlurWithin:r=>{var n;t.confirmPlaceholder(),t.value!==p.current&&t.commitValidation(),null==(n=e.onBlur)||n.call(e,r)},onFocusWithinChange:e.onFocusChange}),h=yA((o=ba)&&o.__esModule?o.default:o,"@react-aria/datepicker"),g="hour"===t.maxGranularity?"selectedTimeDescription":"selectedDateDescription",y="hour"===t.maxGranularity?"time":"date",v=y4(t.value?h.format(g,{[y]:t.formatValue({month:"long"})}):""),b="presentation"===e[bN]?c["aria-describedby"]:[v["aria-describedby"],c["aria-describedby"]].filter(Boolean).join(" ")||void 0,w=e[bj],E=(0,cl.useMemo)(()=>w||bE(r),[w,r]),x=bC(t,r,"presentation"===e[bN]);bT.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:[u.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:b,focusManager:E});let D=(0,cl.useRef)(e.autoFocus);a="presentation"===e[bN]?{role:"presentation"}:mj(c,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":b}),(0,cl.useEffect)(()=>{D.current&&E.focusFirst(),D.current=!1},[E]),bP(e.inputRef,t.value,t.setValue),bR({...e,focus(){E.focusFirst()}},t,e.inputRef);let _={type:"hidden",name:e.name,value:(null==(n=t.value)?void 0:n.toString())||"",disabled:e.isDisabled};"native"===e.validationBehavior&&(_.type="text",_.hidden=!0,_.required=e.isRequired,_.onChange=()=>{});let S=mY(e);return{labelProps:{...u,onClick:()=>{E.focusFirst()}},fieldProps:mj(S,a,x,m,{onKeyDown(t){e.onKeyDown&&e.onKeyDown(t)},onKeyUp(t){e.onKeyUp&&e.onKeyUp(t)},style:{unicodeBidi:"isolate"}}),inputProps:_,descriptionProps:d,errorMessageProps:f,isInvalid:i,validationErrors:s,validationDetails:l}}var b$={};b$={"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 Anfangsdatum 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{C0C1}\u{C774}\u{C5B4}\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 bI={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},bM={...bI,customError:!0,valid:!1},bL={isInvalid:!1,validationDetails:bI,validationErrors:[]},bF=(0,cl.createContext)({}),bB="__formValidationState"+Date.now();function bU(e){if(e[bB]){let{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:a}=e[bB];return{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:a}}return function(e){let{isInvalid:t,validationState:r,name:n,value:o,builtinValidation:a,validate:i,validationBehavior:s="aria"}=e;r&&(t||(t="invalid"===r));let l=void 0!==t?{isInvalid:t,validationErrors:[],validationDetails:bM}:null,u=(0,cl.useMemo)(()=>i&&null!=o?bW(function(e,t){if("function"==typeof e){let r=e(t);if(r&&"boolean"!=typeof r)return bV(r)}return[]}(i,o)):null,[i,o]);(null==a?void 0:a.validationDetails.valid)&&(a=void 0);let c=(0,cl.useContext)(bF),d=(0,cl.useMemo)(()=>n?Array.isArray(n)?n.flatMap(e=>bV(c[e])):bV(c[n]):[],[c,n]),[f,p]=(0,cl.useState)(c),[m,h]=(0,cl.useState)(!1);c!==f&&(p(c),h(!1));let g=(0,cl.useMemo)(()=>bW(m?[]:d),[m,d]),y=(0,cl.useRef)(bL),[v,b]=(0,cl.useState)(bL),w=(0,cl.useRef)(bL),[E,x]=(0,cl.useState)(!1);return(0,cl.useEffect)(()=>{if(!E)return;x(!1);let e=u||a||y.current;bH(e,w.current)||(w.current=e,b(e))}),{realtimeValidation:l||g||u||a||bL,displayValidation:"native"===s?l||g||v:l||g||u||a||v,updateValidation(e){"aria"!==s||bH(v,e)?y.current=e:b(e)},resetValidation(){bH(bL,w.current)||(w.current=bL,b(bL)),"native"===s&&x(!1),h(!0)},commitValidation(){"native"===s&&x(!0),h(!0)}}}(e)}function bV(e){return e?Array.isArray(e)?e:[e]:[]}function bW(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:bM}:null}function bH(e,t){return e===t||!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((e,r)=>e===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([e,r])=>t.validationDetails[e]===r)}function bz(...e){let t=new Set,r=!1,n={...bI};for(let o of e){for(let e of o.validationErrors)t.add(e);for(let e in r||(r=o.isInvalid),n)n[e]||(n[e]=o.validationDetails[e])}return n.valid=!r,{isInvalid:r,validationErrors:[...t],validationDetails:n}}let bK=new yP((eo=b$)&&eo.__esModule?eo.default:eo);function bG(){return"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US"}function bZ(e,t,r,n,o){let a=null!=e&&null!=r&&e.compare(r)>0,i=null!=e&&null!=t&&0>e.compare(t),s=null!=e&&(null==n?void 0:n(e))||!1,l=a||i||s,u=[];if(l){let e=bG(),n=new yT(e,yP.getGlobalDictionaryForPackage("@react-stately/datepicker")||bK),l=new yI(e,bJ({},o)),c=l.resolvedOptions().timeZone;i&&null!=t&&u.push(n.format("rangeUnderflow",{minValue:l.format(t.toDate(c))})),a&&null!=r&&u.push(n.format("rangeOverflow",{maxValue:l.format(r.toDate(c))})),s&&u.push(n.format("unavailableDate"))}return{isInvalid:l,validationErrors:u,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:a,rangeUnderflow:i,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!l}}}let bY={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},bq={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function bJ(e,t){var r;e={...t.shouldForceLeadingZeros?bq:bY,...e};let n=t.granularity||"minute",o=Object.keys(e),a=o.indexOf(null!=(r=t.maxGranularity)?r:"year");a<0&&(a=0);let i=o.indexOf(n);if(i<0&&(i=2),a>i)throw Error("maxGranularity must be greater than granularity");let s=o.slice(a,i+1).reduce((t,r)=>(t[r]=e[r],t),{});return null!=t.hourCycle&&(s.hour12=12===t.hourCycle),s.timeZone=t.timeZone||"UTC",("hour"===n||"minute"===n||"second"===n)&&t.timeZone&&!t.hideTimeZone&&(s.timeZoneName="short"),t.showEra&&0===a&&(s.era="short"),s}function bX(e){return e&&"hour"in e?e:new g2}function bQ(e,t){return null===e?null:e?ys(e,t):void 0}function b0(e,t,r,n){if(e)return bQ(e,r);let o=ys(ym(null!=n?n:yb()).set({hour:0,minute:0,second:0,millisecond:0}),r);return"year"===t||"month"===t||"day"===t?ya(o):n?o:yi(o)}function b1(e,t){let r=e&&"timeZone"in e?e.timeZone:void 0,n=e&&"minute"in e?"minute":"day";if(e&&t&&!(t in e))throw Error("Invalid granularity "+t+" for value "+e.toString());let[o,a]=(0,cl.useState)([n,r]);return e&&(o[0]!==n||o[1]!==r)&&a([n,r]),t||(t=e?n:o[0]),[t,e?r:o[1]]}let b2=new yP({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"},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"},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"),b4={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},b3={year:5,month:2,day:7,hour:2,minute:15,second:15},b6={dayperiod:"dayPeriod"};function b5(e){var t,r;let{locale:n,createCalendar:o,hideTimeZone:a,isDisabled:i=!1,isReadOnly:s=!1,isRequired:l=!1,minValue:u,maxValue:c,isDateUnavailable:d}=e,f=e.value||e.defaultValue||e.placeholderValue||null,[p,m]=b1(f,e.granularity),h=m||"UTC";if(f&&!(p in f))throw Error("Invalid granularity "+p+" for value "+f.toString());let g=(0,cl.useMemo)(()=>new yI(n),[n]),y=(0,cl.useMemo)(()=>o(g.resolvedOptions().calendar),[o,g]),[v,b]=vG(e.value,null!=(t=e.defaultValue)?t:null,e.onChange),w=(0,cl.useMemo)(()=>{var e;return null!=(e=bQ(v,y))?e:null},[v,y]),[E,x]=(0,cl.useState)(()=>b0(e.placeholderValue,p,y,m)),D="gregory"===y.identifier&&"BC"===(w||E).era,_=(0,cl.useMemo)(()=>{var t;return{granularity:p,maxGranularity:null!=(t=e.maxGranularity)?t:"year",timeZone:m,hideTimeZone:a,hourCycle:e.hourCycle,showEra:D,shouldForceLeadingZeros:e.shouldForceLeadingZeros}},[e.maxGranularity,p,e.hourCycle,e.shouldForceLeadingZeros,m,a,D]),S=(0,cl.useMemo)(()=>bJ({},_),[_]),C=(0,cl.useMemo)(()=>new yI(n,S),[n,S]),k=(0,cl.useMemo)(()=>C.resolvedOptions(),[C]),P=(0,cl.useMemo)(()=>C.formatToParts(new Date).filter(e=>b4[e.type]).reduce((e,t)=>(e[t.type]=!0,e),{}),[C]),[O,R]=(0,cl.useState)(()=>e.value||e.defaultValue?{...P}:{}),T=(0,cl.useRef)(null),N=(0,cl.useRef)(y);(0,cl.useEffect)(()=>{yd(y,N.current)||(N.current=y,x(t=>Object.keys(O).length>0?ys(t,y):b0(e.placeholderValue,p,y,m)))},[y,p,O,m,e.placeholderValue]),v&&Object.keys(O).length<Object.keys(P).length&&R(O={...P}),null==v&&Object.keys(O).length===Object.keys(P).length&&(R(O={}),x(b0(e.placeholderValue,p,y,m)));let j=w&&Object.keys(O).length>=Object.keys(P).length?w:E,A=t=>{if(e.isDisabled||e.isReadOnly)return;let r=Object.keys(O),n=Object.keys(P);null==t?(b(null),x(b0(e.placeholderValue,p,y,m)),R({})):r.length>=n.length||r.length===n.length-1&&P.dayPeriod&&!O.dayPeriod&&"dayPeriod"!==T.current?b(t=ys(t,(null==f?void 0:f.calendar)||new gN)):x(t),T.current=null},$=(0,cl.useMemo)(()=>j.toDate(h),[j,h]),I=(0,cl.useMemo)(()=>(function(e,t,r,n,o,a,i,s){let l=["hour","minute","second"],u=r.formatToParts(e),c=[];for(let e of u){var d,f;let r=b4[e.type];"era"===e.type&&1===a.getEras().length&&(r=!1);let u=b4[e.type]&&!t[e.type],p=b4[e.type]?(d=e.type,f=e.value,"era"===d||"dayPeriod"===d?f:"year"===d||"month"===d||"day"===d?b2.getStringForLocale(d,i):"––"):null,m={type:b6[e.type]||e.type,text:u?p:e.value,...b9(o,e.type,n),isPlaceholder:u,placeholder:p,isEditable:r};"hour"===e.type?(c.push({type:"literal",text:"",...b9(o,"literal",n),isPlaceholder:!1,placeholder:"",isEditable:!1}),c.push(m),e.type===s&&c.push({type:"literal",text:"",...b9(o,"literal",n),isPlaceholder:!1,placeholder:"",isEditable:!1})):l.includes(e.type)&&e.type===s?(c.push(m),c.push({type:"literal",text:"",...b9(o,"literal",n),isPlaceholder:!1,placeholder:"",isEditable:!1})):c.push(m)}return c})($,O,C,k,j,y,n,p),[$,O,C,k,j,y,n,p]);P.era&&O.year&&!O.era?(O.era=!0,R({...O})):!P.era&&O.era&&(delete O.era,R({...O}));let M=e=>{O[e]=!0,"year"===e&&P.era&&(O.era=!0),R({...O})},L=(e,t)=>{if(O[e])A(function(e,t,r,n){switch(t){case"era":case"year":case"month":case"day":return e.cycle(t,r,{round:"year"===t})}if("hour"in e)switch(t){case"dayPeriod":{let t=e.hour;return e.set({hour:t>=12?t-12:t+12})}case"hour":case"minute":case"second":return e.cycle(t,r,{round:"hour"!==t,hourCycle:n.hour12?12:24})}throw Error("Unknown segment: "+t)}(j,e,t,k));else{M(e);let t=Object.keys(O),r=Object.keys(P);(t.length>=r.length||t.length===r.length-1&&P.dayPeriod&&!O.dayPeriod)&&A(j)}},F=(0,cl.useMemo)(()=>bZ(v,u,c,d,_),[v,u,c,d,_]),B=bU({...e,value:v,builtinValidation:F}),U=B.displayValidation.isInvalid,V=e.validationState||(U?"invalid":null);return{...B,value:w,dateValue:$,calendar:y,setValue:A,segments:I,dateFormatter:C,validationState:V,isInvalid:U,granularity:p,maxGranularity:null!=(r=e.maxGranularity)?r:"year",isDisabled:i,isReadOnly:s,isRequired:l,increment(e){L(e,1)},decrement(e){L(e,-1)},incrementPage(e){L(e,b3[e]||1)},decrementPage(e){L(e,-(b3[e]||1))},setSegment(e,t){M(e),A(function(e,t,r,n){switch(t){case"day":case"month":case"year":case"era":return e.set({[t]:r})}if("hour"in e&&"number"==typeof r)switch(t){case"dayPeriod":{let t=e.hour,n=t>=12;if(r>=12===n)return e;return e.set({hour:n?t-12:t+12})}case"hour":if(n.hour12){let t=e.hour>=12;t||12!==r||(r=0),t&&r<12&&(r+=12)}case"minute":case"second":return e.set({[t]:r})}throw Error("Unknown segment: "+t)}(j,e,t,k))},confirmPlaceholder(){if(e.isDisabled||e.isReadOnly)return;let t=Object.keys(O),r=Object.keys(P);t.length===r.length-1&&P.dayPeriod&&!O.dayPeriod&&(R(O={...P}),A(j.copy()))},clearSegment(t){delete O[t],T.current=t,R({...O});let r=b0(e.placeholderValue,p,y,m),n=j;if("dayPeriod"===t&&"hour"in j&&"hour"in r){let e=j.hour>=12,t=r.hour>=12;e&&!t?n=j.set({hour:j.hour-12}):!e&&t&&(n=j.set({hour:j.hour+12}))}else"hour"===t&&"hour"in j&&j.hour>=12&&O.dayPeriod?n=j.set({hour:r.hour+12}):t in j&&(n=j.set({[t]:r[t]}));b(null),A(n)},formatValue:e=>w?new yI(n,bJ(e,_)).format($):"",getDateFormatter:(e,t)=>new yI(e,bJ({},{..._,...t}))}}function b9(e,t,r){switch(t){case"era":{let t=e.calendar.getEras();return{value:t.indexOf(e.era),minValue:0,maxValue:t.length-1}}case"year":return{value:e.year,minValue:1,maxValue:e.calendar.getYearsInEra(e)};case"month":return{value:e.month,minValue:e.calendar.getMinimumMonthInYear?e.calendar.getMinimumMonthInYear(e):1,maxValue:e.calendar.getMonthsInYear(e)};case"day":return{value:e.day,minValue:e.calendar.getMinimumDayInMonth?e.calendar.getMinimumDayInMonth(e):1,maxValue:e.calendar.getDaysInMonth(e)}}if("hour"in e)switch(t){case"dayPeriod":return{value:12*(e.hour>=12),minValue:0,maxValue:12};case"hour":if(r.hour12){let t=e.hour>=12;return{value:e.hour,minValue:12*!!t,maxValue:t?23:11}}return{value:e.hour,minValue:0,maxValue:23};case"minute":return{value:e.minute,minValue:0,maxValue:59};case"second":return{value:e.second,minValue:0,maxValue:59}}return{}}let b8=(0,cl.createContext)(null),b7=(0,cl.createContext)(null),we=(0,cl.createContext)(null),wt=(0,cl.forwardRef)(function(e,t){let r=(0,cl.useContext)(b7),n=(0,cl.useContext)(we);return r||n?cu().createElement(wn,{...e,ref:t}):cu().createElement(wr,{...e,ref:t})}),wr=(0,cl.forwardRef)((e,t)=>{let[r,n]=mL({slot:e.slot},t,b8),{locale:o}=g_(),a=b5({...r,locale:o,createCalendar:vF}),i=(0,cl.useRef)(null),{fieldProps:s,inputProps:l}=bA({...r,inputRef:i},a,n);return cu().createElement(m$,{values:[[b7,a],[bn,{...l,ref:i}],[bt,{...s,ref:n,isInvalid:a.isInvalid,isDisabled:a.isDisabled}]]},cu().createElement(wn,e))}),wn=(0,cl.forwardRef)((e,t)=>{let{className:r,children:n}=e,o=(0,cl.useContext)(b7),a=(0,cl.useContext)(we),i=null!=o?o:a;return cu().createElement(cu().Fragment,null,cu().createElement(br,{...e,ref:t,slot:e.slot||void 0,className:null!=r?r:"react-aria-DateInput",isInvalid:i.isInvalid,isDisabled:i.isDisabled},i.segments.map((e,t)=>(0,cl.cloneElement)(n(e),{key:t}))),cu().createElement(bo,null))}),wo=(0,cl.createContext)({});function wa(){var e;return null!=(e=(0,cl.useContext)(wo))?e:{}}function wi({children:e}){let t=(0,cl.useMemo)(()=>({register:()=>{}}),[]);return cu().createElement(hv.Provider,{value:t},e)}cu().forwardRef(({children:e,...t},r)=>{let n=(0,cl.useRef)(!1),o=(0,cl.useContext)(hv);r=mh(r||(null==o?void 0:o.ref));let a=mj(o||{},{...t,ref:r,register(){n.current=!0,o&&o.register()}});return hx(o,r),(0,cl.useEffect)(()=>{n.current||(n.current=!0)},[]),cu().createElement(hv.Provider,{value:a},e)});let ws=cu().createContext(null);function wl(e){let t=mk(),{portalContainer:r=t?null:document.body,isExiting:n}=e,[o,a]=(0,cl.useState)(!1),i=(0,cl.useMemo)(()=>({contain:o,setContain:a}),[o,a]),{getContainer:s}=wa();if(!e.portalContainer&&s&&(r=s()),!r)return null;let l=e.children;return e.disableFocusManagement||(l=cu().createElement(bu,{restoreFocus:!0,contain:(e.shouldContainFocus||o)&&!n},l)),l=cu().createElement(ws.Provider,{value:i},cu().createElement(wi,null,l)),hO().createPortal(l,r)}let wu=(0,cl.createContext)(null),wc=(0,cl.createContext)(null),wd=(0,cl.forwardRef)(function(e,t){let r=e["aria-labelledby"];[e,t]=mL(e,t,wu);let{dialogProps:n,titleProps:o}=function(e,t){let r,n,{role:o="dialog"}=e,a=mT();a=e["aria-label"]?void 0:a;let i=(0,cl.useRef)(!1);return(0,cl.useEffect)(()=>{if(t.current&&!t.current.contains(document.activeElement)){h2(t.current);let e=setTimeout(()=>{document.activeElement===t.current&&(i.current=!0,t.current&&(t.current.blur(),h2(t.current)),i.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),my(()=>{null==n||n(!0)},[n=null==(r=(0,cl.useContext)(ws))?void 0:r.setContain]),{dialogProps:{...mY(e,{labelable:!0}),role:o,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||a,onBlur:e=>{i.current&&e.stopPropagation()}},titleProps:{id:a}}}({...e,"aria-labelledby":r},t),a=(0,cl.useContext)(wc);n["aria-label"]||n["aria-labelledby"]||e["aria-labelledby"]&&(n["aria-labelledby"]=e["aria-labelledby"]);let i=mI({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(null==a?void 0:a.close)||(()=>{})}});return cu().createElement("section",{...mY(e),...n,...i,ref:t,slot:e.slot||void 0},cu().createElement(m$,{values:[[gc,{slots:{[mA]:{},title:{...o,level:2}}}],[gl,{slots:{[mA]:{},close:{onPress:()=>null==a?void 0:a.close()}}}]]},i.children))}),wf=(0,cl.createContext)(null),wp=(0,cl.forwardRef)(function(e,t){let r=(0,cl.useContext)(wf);return(null==r?void 0:r.isInvalid)?cu().createElement(wm,{...e,ref:t}):null}),wm=(0,cl.forwardRef)((e,t)=>{let r=(0,cl.useContext)(wf),n=mY(e),o=mI({...e,defaultClassName:"react-aria-FieldError",defaultChildren:0===r.validationErrors.length?void 0:r.validationErrors.join(" "),values:r});return null==o.children?null:cu().createElement(gf,{slot:"errorMessage",...n,...o,ref:t})}),wh=(0,cl.createContext)(null),wg=(0,cl.createContext)({}),wy=gi(function(e,t){[e,t]=mL(e,t,wg);let{elementType:r="label",...n}=e;return cu().createElement(r,{className:"react-aria-Label",...n,ref:t})}),wv=(0,cl.createContext)({placement:"bottom"}),wb=new WeakMap,ww=[];function wE(e,t=-1/0,r=1/0){return Math.min(Math.max(e,t),r)}function wx(e,t){let r=e,n=t.toString(),o=n.indexOf("."),a=o>=0?n.length-o:0;if(a>0){let e=Math.pow(10,a);r=Math.round(r*e)/e}return r}function wD(e,t,r,n){t=Number(t),r=Number(r);let o=(e-(isNaN(t)?0:t))%n,a=wx(2*Math.abs(o)>=n?e+Math.sign(o)*(n-Math.abs(o)):e-o,n);return isNaN(t)?!isNaN(r)&&a>r&&(a=Math.floor(wx(r/n,n))*n):a<t?a=t:!isNaN(r)&&a>r&&(a=t+Math.floor(wx((r-t)/n,n))*n),a=wx(a,n)}let w_={top:"top",bottom:"top",left:"left",right:"left"},wS={top:"bottom",bottom:"top",left:"right",right:"left"},wC={top:"left",left:"top"},wk={top:"height",left:"width"},wP={width:"totalWidth",height:"totalHeight"},wO={},wR="u">typeof document?window.visualViewport:null;function wT(e){var t,r,n,o,a;let i=0,s=0,l=0,u=0,c=0,d=0,f={},p=(null!=(t=null==wR?void 0:wR.scale)?t:1)>1;if("BODY"===e.tagName){let t=document.documentElement;l=t.clientWidth,u=t.clientHeight,i=null!=(r=null==wR?void 0:wR.width)?r:l,s=null!=(n=null==wR?void 0:wR.height)?n:u,f.top=t.scrollTop||e.scrollTop,f.left=t.scrollLeft||e.scrollLeft,wR&&(c=wR.offsetTop,d=wR.offsetLeft)}else({width:i,height:s,top:c,left:d}=wI(e)),f.top=e.scrollTop,f.left=e.scrollLeft,l=i,u=s;return hi()&&("BODY"===e.tagName||"HTML"===e.tagName)&&p&&(f.top=0,f.left=0,c=null!=(o=null==wR?void 0:wR.pageTop)?o:0,d=null!=(a=null==wR?void 0:wR.pageLeft)?a:0),{width:i,height:s,totalWidth:l,totalHeight:u,scroll:f,top:c,left:d}}function wN(e,t,r,n,o,a,i){var s;let l=null!=(s=o.scroll[e])?s:0,u=n[wk[e]],c=n.scroll[w_[e]]+a,d=u+n.scroll[w_[e]]-a,f=t-l+i[e]-n[w_[e]],p=t-l+r+i[e]-n[w_[e]];return f<c?c-f:p>d?Math.max(d-p,c-f):0}function wj(e){if(wO[e])return wO[e];let[t,r]=e.split(" "),n=w_[t]||"right",o=wC[n];w_[r]||(r="center");let a=wk[n],i=wk[o];return wO[e]={placement:t,crossPlacement:r,axis:n,crossAxis:o,size:a,crossSize:i},wO[e]}function wA(e,t,r,n,o,a,i,s,l,u){var c,d,f,p,m;let{placement:h,crossPlacement:g,axis:y,crossAxis:v,size:b,crossSize:w}=n,E={};E[v]=null!=(c=e[v])?c:0,"center"===g?E[v]+=((null!=(d=e[w])?d:0)-(null!=(f=r[w])?f:0))/2:g!==v&&(E[v]+=(null!=(p=e[w])?p:0)-(null!=(m=r[w])?m:0)),E[v]+=a;let x=e[v]-r[w]+l+u,D=e[v]+e[w]-l-u;if(E[v]=wE(E[v],x,D),h===y){let r=s?i[b]:t[wP[b]];E[wS[y]]=Math.floor(r-e[y]+o)}else E[y]=Math.floor(e[y]+e[b]+o);return E}function w$(e,t,r,n,o,a){var i,s,l;let{placement:u,axis:c,size:d}=a;return u===c?Math.max(0,r[c]-e[c]-(null!=(i=e.scroll[c])?i:0)+t[c]-(null!=(s=n[c])?s:0)-n[wS[c]]-o):Math.max(0,e[d]+e[c]+e.scroll[c]-t[c]-r[c]-r[d]-(null!=(l=n[c])?l:0)-n[wS[c]]-o)}function wI(e){let{top:t,left:r,width:n,height:o}=e.getBoundingClientRect(),{scrollTop:a,scrollLeft:i,clientTop:s,clientLeft:l}=document.documentElement;return{top:t+a-s,left:r+i-l,width:n,height:o}}function wM(e,t){let r,n=window.getComputedStyle(e);if("fixed"===n.position){let{top:t,left:n,width:o,height:a}=e.getBoundingClientRect();r={top:t,left:n,width:o,height:a}}else{r=wI(e);let n=wI(t),o=window.getComputedStyle(t);n.top+=(parseInt(o.borderTopWidth,10)||0)-t.scrollTop,n.left+=(parseInt(o.borderLeftWidth,10)||0)-t.scrollLeft,r.top-=n.top,r.left-=n.left}return r.top-=parseInt(n.marginTop,10)||0,r.left-=parseInt(n.marginLeft,10)||0,r}function wL(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 wF=new WeakMap;function wB(e){let{ref:t,box:r,onResize:n}=e;(0,cl.useEffect)(()=>{let e=null==t?void 0:t.current;if(e)if(void 0===window.ResizeObserver)return window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)};else{let t=new window.ResizeObserver(e=>{e.length&&n()});return t.observe(e,{box:r}),()=>{e&&t.unobserve(e)}}},[n,t,r])}let wU="u">typeof document?window.visualViewport:null;function wV(e){var t,r,n;let{direction:o}=g_(),{arrowSize:a=0,targetRef:i,overlayRef:s,scrollRef:l=s,placement:u="bottom",containerPadding:c=12,shouldFlip:d=!0,boundaryElement:f="u">typeof document?document.body:null,offset:p=0,crossOffset:m=0,shouldUpdatePosition:h=!0,isOpen:g=!0,onClose:y,maxHeight:v,arrowBoundaryOffset:b=0}=e,[w,E]=(0,cl.useState)(null),x=[h,u,s.current,i.current,l.current,c,d,f,p,m,g,o,v,b,a],D=(0,cl.useRef)(null==wU?void 0:wU.scale);(0,cl.useEffect)(()=>{g&&(D.current=null==wU?void 0:wU.scale)},[g]);let _=(0,cl.useCallback)(()=>{var e,t,r,n,y,w;if(!1===h||!g||!s.current||!i.current||!f||(null==wU?void 0:wU.scale)!==D.current)return;let x=null;if(l.current&&l.current.contains(document.activeElement)){let n=null==(e=document.activeElement)?void 0:e.getBoundingClientRect(),o=l.current.getBoundingClientRect();(x={type:"top",offset:(null!=(t=null==n?void 0:n.top)?t:0)-o.top}).offset>o.height/2&&(x.type="bottom",x.offset=(null!=(r=null==n?void 0:n.bottom)?r:0)-o.bottom)}let _=s.current;!v&&s.current&&(_.style.top="0px",_.style.bottom="",_.style.maxHeight=(null!=(y=null==(n=window.visualViewport)?void 0:n.height)?y:window.innerHeight)+"px");let S=function(e){var t,r,n,o;let a,{placement:i,targetNode:s,overlayNode:l,scrollNode:u,padding:c,shouldFlip:d,boundaryElement:f,offset:p,crossOffset:m,maxHeight:h,arrowSize:g=0,arrowBoundaryOffset:y=0}=e,v=l instanceof HTMLElement?function(e){let t=e.offsetParent;if(t&&t===document.body&&"static"===window.getComputedStyle(t).position&&!wL(t)&&(t=document.documentElement),null==t)for(t=e.parentElement;t&&!wL(t);)t=t.parentElement;return t||document.documentElement}(l):document.documentElement,b=v===document.documentElement,w=window.getComputedStyle(v).position,E=b?wI(s):wM(s,v);if(!b){let{marginTop:e,marginLeft:t}=window.getComputedStyle(s);E.top+=parseInt(e,10)||0,E.left+=parseInt(t,10)||0}let x=wI(l),D={top:parseInt((a=window.getComputedStyle(l)).marginTop,10)||0,bottom:parseInt(a.marginBottom,10)||0,left:parseInt(a.marginLeft,10)||0,right:parseInt(a.marginRight,10)||0};x.width+=(null!=(t=D.left)?t:0)+(null!=(r=D.right)?r:0),x.height+=(null!=(n=D.top)?n:0)+(null!=(o=D.bottom)?o:0);let _={top:u.scrollTop,left:u.scrollLeft,width:u.scrollWidth,height:u.scrollHeight},S=wT(f),C=wT(v),k="BODY"===f.tagName?wI(v):wM(v,f);return"HTML"===v.tagName&&"BODY"===f.tagName&&(C.scroll.top=0,C.scroll.left=0),function(e,t,r,n,o,a,i,s,l,u,c,d,f,p,m,h){var g,y,v,b,w,E,x,D,_,S,C,k,P,O;let R,T,N,j=wj(e),{size:A,crossAxis:$,crossSize:I,placement:M,crossPlacement:L}=j,F=wA(t,s,r,j,c,d,u,f,m,h),B=c,U=w$(s,u,t,o,a+c,j);if(i&&n[A]>U){let e=wj(`${wS[M]} ${L}`),n=wA(t,s,r,e,c,d,u,f,m,h);w$(s,u,t,o,a+c,e)>U&&(j=e,F=n,B=c)}let V="bottom";"top"===j.axis?"top"===j.placement?V="top":"bottom"===j.placement&&(V="bottom"):"top"===j.crossAxis&&("top"===j.crossPlacement?V="bottom":"bottom"===j.crossPlacement&&(V="top"));let W=wN($,F[$],r[I],s,l,a,u);F[$]+=W;let H=(w=F,E=r.height,x=V,R=f?u.height:s[wP.height],T=null!=w.top?u.top+w.top:u.top+(R-(null!=(D=w.bottom)?D:0)-E),N="top"!==x?Math.max(0,s.height+s.top+(null!=(_=s.scroll.top)?_:0)-T-((null!=(S=o.top)?S:0)+(null!=(C=o.bottom)?C:0)+a)):Math.max(0,T+E-(s.top+(null!=(k=s.scroll.top)?k:0))-((null!=(P=o.top)?P:0)+(null!=(O=o.bottom)?O:0)+a)),Math.min(s.height-2*a,N));p&&p<H&&(H=p),r.height=Math.min(r.height,H),W=wN($,(F=wA(t,s,r,j,B,d,u,f,m,h))[$],r[I],s,l,a,u),F[$]+=W;let z={},K=t[$]+.5*t[I]-F[$]-o[w_[$]],G=m/2+h,Z="left"===w_[$]?(null!=(g=o.left)?g:0)+(null!=(y=o.right)?y:0):(null!=(v=o.top)?v:0)+(null!=(b=o.bottom)?b:0),Y=r[I]-Z-m/2-h,q=wE(K,t[$]+m/2-(F[$]+o[w_[$]]),t[$]+t[I]-m/2-(F[$]+o[w_[$]]));return z[$]=wE(q,G,Y),{position:F,maxHeight:H,arrowOffsetLeft:z.left,arrowOffsetTop:z.top,placement:j.placement}}(i,E,x,_,D,c,d,S,C,k,p,m,!!w&&"static"!==w,h,g,y)}({placement:(w=u,"rtl"===o?w.replace("start","right").replace("end","left"):w.replace("start","left").replace("end","right")),overlayNode:s.current,targetNode:i.current,scrollNode:l.current||s.current,padding:c,shouldFlip:d,boundaryElement:f,offset:p,crossOffset:m,maxHeight:v,arrowSize:a,arrowBoundaryOffset:b});if(S.position){if(_.style.top="",_.style.bottom="",_.style.left="",_.style.right="",Object.keys(S.position).forEach(e=>_.style[e]=S.position[e]+"px"),_.style.maxHeight=null!=S.maxHeight?S.maxHeight+"px":"",x&&document.activeElement&&l.current){let e=document.activeElement.getBoundingClientRect(),t=l.current.getBoundingClientRect(),r=e[x.type]-t[x.type];l.current.scrollTop+=r-x.offset}E(S)}},x);my(_,x),my(()=>(window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)}),[n=_]),wB({ref:s,onResize:_}),wB({ref:i,onResize:_});let S=(0,cl.useRef)(!1);my(()=>{let e,t=()=>{S.current=!0,clearTimeout(e),e=setTimeout(()=>{S.current=!1},500),_()},r=()=>{S.current&&t()};return null==wU||wU.addEventListener("resize",t),null==wU||wU.addEventListener("scroll",r),()=>{null==wU||wU.removeEventListener("resize",t),null==wU||wU.removeEventListener("scroll",r)}},[_]);let C=(0,cl.useCallback)(()=>{S.current||null==y||y()},[y,S]);return!function(e){let{triggerRef:t,isOpen:r,onClose:n}=e;(0,cl.useEffect)(()=>{if(!r||null===n)return;let e=e=>{let r=e.target;if(!t.current||r instanceof Node&&!r.contains(t.current)||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)return;let o=n||wF.get(t.current);o&&o()};return window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("scroll",e,!0)}},[r,n,t])}({triggerRef:i,isOpen:g,onClose:y&&C}),{overlayProps:{style:{position:"absolute",zIndex:1e5,...null==w?void 0:w.position,maxHeight:null!=(t=null==w?void 0:w.maxHeight)?t:"100vh"}},placement:null!=(r=null==w?void 0:w.placement)?r:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:null==w?void 0:w.arrowOffsetLeft,top:null==w?void 0:w.arrowOffsetTop}},updatePosition:_}}function wW(e,t){if(e.button>0)return!1;if(e.target){let t=e.target.ownerDocument;if(!t||!t.documentElement.contains(e.target)||e.target.closest("[data-react-aria-top-layer]"))return!1}return!!t.current&&!e.composedPath().includes(t.current)}let wH=[],wz="u">typeof document&&window.visualViewport,wK=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),wG=0;function wZ(e,t,r){let n=e.style[t];return e.style[t]=r,()=>{e.style[t]=n}}function wY(e,t,r,n){return e.addEventListener(t,r,n),()=>{e.removeEventListener(t,r,n)}}function wq(e){let t=document.scrollingElement||document.documentElement,r=e;for(;r&&r!==t;){let e=y9(r);if(e!==document.documentElement&&e!==document.body&&e!==r){let t=e.getBoundingClientRect().top,n=r.getBoundingClientRect().top;n>t+r.clientHeight&&(e.scrollTop+=n-t)}r=e.parentElement}}var wJ={};function wX(e){var t;let{onDismiss:r,...n}=e,o=yq(n,yA((t=wJ)&&t.__esModule?t.default:t,"@react-aria/overlays").format("dismiss"));return cu().createElement(yQ,null,cu().createElement("button",{...o,tabIndex:-1,onClick:()=>{r&&r()},style:{width:1,height:1}}))}function wQ(e,t=!0){let[r,n]=(0,cl.useState)(!0),o=r&&t;return my(()=>{if(o&&e.current&&"getAnimations"in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,o]),w1(e,o,(0,cl.useCallback)(()=>n(!1),[])),o}function w0(e,t){let[r,n]=(0,cl.useState)(t?"open":"closed");switch(r){case"open":t||n("exiting");break;case"closed":case"exiting":t&&n("open")}let o="exiting"===r;return w1(e,o,(0,cl.useCallback)(()=>{n(e=>"exiting"===e?"closed":e)},[])),o}function w1(e,t,r){my(()=>{if(t&&e.current){if(!("getAnimations"in e.current))return void r();let t=e.current.getAnimations();if(0===t.length)return void r();let n=!1;return Promise.all(t.map(e=>e.finished)).then(()=>{n||(0,hP.flushSync)(()=>{r()})}).catch(()=>{}),()=>{n=!0}}},[e,t,r])}function w2(e){let[t,r]=vG(e.isOpen,e.defaultOpen||!1,e.onOpenChange),n=(0,cl.useCallback)(()=>{r(!0)},[r]),o=(0,cl.useCallback)(()=>{r(!1)},[r]),a=(0,cl.useCallback)(()=>{r(!t)},[r,t]);return{isOpen:t,setOpen:r,open:n,close:o,toggle:a}}wJ={"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 w4=(0,cl.createContext)(null),w3=(0,cl.createContext)(null),w6=(0,cl.forwardRef)(function(e,t){[e,t]=mL(e,t,w4);let r=(0,cl.useContext)(wc),n=w2(e),o=null==e.isOpen&&null==e.defaultOpen&&r?r:n,a=w0(t,o.isOpen)||e.isExiting||!1,i=(0,cl.useContext)(ga),{direction:s}=g_();if(i){let t=e.children;return"function"==typeof t&&(t=t({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),cu().createElement(cu().Fragment,null,t)}return!o||o.isOpen||a?cu().createElement(w5,{...e,triggerRef:e.triggerRef,state:o,popoverRef:t,isExiting:a,dir:s}):null});function w5({state:e,isExiting:t,UNSTABLE_portalContainer:r,...n}){var o,a;let i=(0,cl.useRef)(null),[s,l]=(0,cl.useState)(0),u=(0,cl.useRef)(null),d=(0,cl.useContext)(w3),f=d&&"SubmenuTrigger"===n.trigger;my(()=>{i.current&&e.isOpen&&l(i.current.getBoundingClientRect().width)},[e.isOpen,i]);let{popoverProps:p,underlayProps:m,arrowProps:h,placement:g}=function(e,t){let{triggerRef:r,popoverRef:n,groupRef:o,isNonModal:a,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:s,...l}=e,u="SubmenuTrigger"===l.trigger,{overlayProps:d,underlayProps:f}=function(e,t){let{onClose:r,shouldCloseOnBlur:n,isOpen:o,isDismissable:a=!1,isKeyboardDismissDisabled:i=!1,shouldCloseOnInteractOutside:s}=e;(0,cl.useEffect)(()=>{if(o&&!wH.includes(t))return wH.push(t),()=>{let e=wH.indexOf(t);e>=0&&wH.splice(e,1)}},[o,t]);let l=()=>{wH[wH.length-1]===t&&r&&r()};!function(e){let{ref:t,onInteractOutside:r,isDisabled:n,onInteractOutsideStart:o}=e,a=(0,cl.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),i=mv(e=>{r&&wW(e,t)&&(o&&o(e),a.current.isPointerDown=!0)}),s=mv(e=>{r&&r(e)});(0,cl.useEffect)(()=>{let e=a.current;if(n)return;let r=m1(t.current);if("u">typeof PointerEvent){let n=r=>{e.isPointerDown&&wW(r,t)&&s(r),e.isPointerDown=!1};return r.addEventListener("pointerdown",i,!0),r.addEventListener("pointerup",n,!0),()=>{r.removeEventListener("pointerdown",i,!0),r.removeEventListener("pointerup",n,!0)}}},[t,n,i,s])}({ref:t,onInteractOutside:a&&o?e=>{(!s||s(e.target))&&(wH[wH.length-1]===t&&(e.stopPropagation(),e.preventDefault()),l())}:void 0,onInteractOutsideStart:e=>{(!s||s(e.target))&&wH[wH.length-1]===t&&(e.stopPropagation(),e.preventDefault())}});let{focusWithinProps:u}=h8({isDisabled:!n,onBlurWithin:e=>{!(!e.relatedTarget||bp(e.relatedTarget,bl))&&(!s||s(e.relatedTarget))&&(null==r||r())}});return{overlayProps:{onKeyDown:e=>{"Escape"!==e.key||i||e.nativeEvent.isComposing||(e.stopPropagation(),e.preventDefault(),l())},...u},underlayProps:{onPointerDown:e=>{e.target===e.currentTarget&&e.preventDefault()}}}}({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!a||u,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:s},null!=o?o:n),{overlayProps:p,arrowProps:m,placement:h}=wV({...l,targetRef:r,overlayRef:n,isOpen:t.isOpen,onClose:a&&!u?t.close:null});return!function(e={}){let{isDisabled:t}=e;my(()=>{if(!t){let e,t,r,n;return 1==++wG&&(c=ha()?(r=null,n=mg(wY(document,"touchstart",r=>{((e=y9(r.target,!0))!==document.documentElement||e!==document.body)&&e instanceof HTMLElement&&"auto"===window.getComputedStyle(e).overscrollBehavior&&(t=wZ(e,"overscrollBehavior","contain"))},{passive:!1,capture:!0}),wY(document,"touchmove",t=>{e&&e!==document.documentElement&&e!==document.body?e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&t.preventDefault():t.preventDefault()},{passive:!1,capture:!0}),wY(document,"touchend",()=>{t&&t()},{passive:!1,capture:!0}),wY(document,"focus",e=>{var t;let n=e.target;((t=n)instanceof HTMLInputElement&&!wK.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable)&&((()=>{if(r)return;let e=window.pageXOffset,t=window.pageYOffset;r=mg(wY(window,"scroll",()=>{window.scrollTo(0,0)}),wZ(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),wZ(document.documentElement,"overflow","hidden"),wZ(document.body,"marginTop",`-${t}px`),()=>{window.scrollTo(e,t)}),window.scrollTo(0,0)})(),n.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{n.style.transform="",wz&&(wz.height<window.innerHeight?requestAnimationFrame(()=>{wq(n)}):wz.addEventListener("resize",()=>wq(n),{once:!0}))}))},!0)),()=>{null==t||t(),null==r||r(),n()}):mg(wZ(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),wZ(document.documentElement,"overflow","hidden"))),()=>{0==--wG&&c()}}},[t])}({isDisabled:a||!t.isOpen}),my(()=>{if(t.isOpen&&n.current){if(!a)return function(e,t=document.body){let r=new Set(e),n=new Set,o=e=>{for(let t of e.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))r.add(t);let t=e=>{if(r.has(e)||e.parentElement&&n.has(e.parentElement)&&"row"!==e.parentElement.getAttribute("role"))return NodeFilter.FILTER_REJECT;for(let t of r)if(e.contains(t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),i=t(e);if(i===NodeFilter.FILTER_ACCEPT&&a(e),i!==NodeFilter.FILTER_REJECT){let e=o.nextNode();for(;null!=e;)a(e),e=o.nextNode()}},a=e=>{var t;let r=null!=(t=wb.get(e))?t:0;("true"!==e.getAttribute("aria-hidden")||0!==r)&&(0===r&&e.setAttribute("aria-hidden","true"),n.add(e),wb.set(e,r+1))};ww.length&&ww[ww.length-1].disconnect(),o(t);let i=new MutationObserver(e=>{for(let t of e)if("childList"===t.type&&0!==t.addedNodes.length&&![...r,...n].some(e=>e.contains(t.target))){for(let e of t.removedNodes)e instanceof Element&&(r.delete(e),n.delete(e));for(let e of t.addedNodes)(e instanceof HTMLElement||e instanceof SVGElement)&&("true"===e.dataset.liveAnnouncer||"true"===e.dataset.reactAriaTopLayer)?r.add(e):e instanceof Element&&o(e)}});i.observe(t,{childList:!0,subtree:!0});let s={visibleNodes:r,hiddenNodes:n,observe(){i.observe(t,{childList:!0,subtree:!0})},disconnect(){i.disconnect()}};return ww.push(s),()=>{for(let e of(i.disconnect(),n)){let t=wb.get(e);null!=t&&(1===t?(e.removeAttribute("aria-hidden"),wb.delete(e)):wb.set(e,t-1))}s===ww[ww.length-1]?(ww.pop(),ww.length&&ww[ww.length-1].observe()):ww.splice(ww.indexOf(s),1)}}([null!=(r=null==o?void 0:o.current)?r:n.current]);var e,r,i=null!=(e=null==o?void 0:o.current)?e:n.current;let t=ww[ww.length-1];return t&&!t.visibleNodes.has(i)?(t.visibleNodes.add(i),()=>{t.visibleNodes.delete(i)}):void 0}},[a,t.isOpen,n,o]),{popoverProps:mj(d,p),arrowProps:m,underlayProps:f,placement:h}}({...n,offset:null!=(o=n.offset)?o:8,arrowSize:s,groupRef:f?d:u},e),y=n.popoverRef,v=wQ(y,!!g)||n.isEntering||!1,b=mI({...n,defaultClassName:"react-aria-Popover",values:{trigger:n.trigger||null,placement:g,isEntering:v,isExiting:t}}),w=!n.isNonModal||"SubmenuTrigger"===n.trigger,[E,x]=(0,cl.useState)(!1);my(()=>{y.current&&x(w&&!y.current.querySelector("[role=dialog]"))},[y,w]),(0,cl.useEffect)(()=>{E&&y.current&&!y.current.contains(document.activeElement)&&h2(y.current)},[E,y]);let D={...p.style,...b.style},_=cu().createElement("div",{...mj(mY(n),p),...b,role:E?"dialog":void 0,tabIndex:E?-1:void 0,"aria-label":n["aria-label"],"aria-labelledby":n["aria-labelledby"],ref:y,slot:n.slot||void 0,style:D,dir:n.dir,"data-trigger":n.trigger,"data-placement":g,"data-entering":v||void 0,"data-exiting":t||void 0},!n.isNonModal&&cu().createElement(wX,{onDismiss:e.close}),cu().createElement(wv.Provider,{value:{...h,placement:g,ref:i}},b.children),cu().createElement(wX,{onDismiss:e.close}));return f?cu().createElement(wl,{...n,shouldContainFocus:E,isExiting:t,portalContainer:null!=(a=null!=r?r:null==d?void 0:d.current)?a:void 0},_):cu().createElement(wl,{...n,shouldContainFocus:E,isExiting:t,portalContainer:r},!n.isNonModal&&e.isOpen&&cu().createElement("div",{"data-testid":"underlay",...m,style:{position:"fixed",inset:0}}),cu().createElement("div",{ref:u,style:{display:"contents"}},cu().createElement(w3.Provider,{value:u},_)))}function w9(e){return(null==e?void 0:e.start)!=null&&null!=e.end}let w8=(0,cl.createContext)(null),w7=(0,cl.createContext)(null),Ee=(0,cl.createContext)(null),Et=(0,cl.createContext)(null),Er=(0,cl.forwardRef)(function(e,t){var r,n;[e,t]=mL(e,t,w8);let{validationBehavior:o}=mM(wh)||{},a=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",i=function(e){var t;let r=w2(e),[n,o]=vG(e.value,e.defaultValue||null,e.onChange),a=n||e.placeholderValue||null,[i,s]=b1(a,e.granularity),l=null!=n?n.toDate(null!=s?s:"UTC"):null,u="hour"===i||"minute"===i||"second"===i,c=null==(t=e.shouldCloseOnSelect)||t,[d,f]=(0,cl.useState)(null),[p,m]=(0,cl.useState)(null);if(n&&(d=n,"hour"in n&&(p=n)),a&&!(i in a))throw Error("Invalid granularity "+i+" for value "+a.toString());let h=(null==n?void 0:n.calendar.identifier)==="gregory"&&"BC"===n.era,g=(0,cl.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,cl.useMemo)(()=>bZ(n,y,v,b,g),[n,y,v,b,g]),E=bU({...e,value:n,builtinValidation:w}),x=E.displayValidation.isInvalid,D=e.validationState||(x?"invalid":null),_=(e,t)=>{o("timeZone"in t?t.set(ya(e)):yi(e,t)),f(null),m(null),E.commitValidation()};return{...E,value:n,setValue:o,dateValue:d,timeValue:p,setDateValue:t=>{let n="function"==typeof c?c():c;u?p||n?_(t,p||bX(e.defaultValue||e.placeholderValue)):f(t):(o(t),E.commitValidation()),n&&r.setOpen(!1)},setTimeValue:e=>{d&&e?_(d,e):m(e)},granularity:i,hasTime:u,...r,setOpen(t){!t&&!n&&d&&u&&_(d,p||bX(e.defaultValue||e.placeholderValue)),r.setOpen(t)},validationState:D,isInvalid:x,formatValue:(e,t)=>l?new yI(e,bJ(t,g)).format(l):"",getDateFormatter:(e,t)=>new yI(e,bJ({},{...g,...t}))}}({...e,validationBehavior:a}),s=(0,cl.useRef)(null),[l,u]=mF(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,fieldProps:f,buttonProps:p,dialogProps:m,calendarProps:h,descriptionProps:g,errorMessageProps:y,...v}=function(e,t,r){var n;let o=mR(),a=mR(),i=mR(),s=yA((n=ba)&&n.__esModule?n.default:n,"@react-aria/datepicker"),{isInvalid:l,validationErrors:u,validationDetails:c}=t.displayValidation,{labelProps:d,fieldProps:f,descriptionProps:p,errorMessageProps:m}=bO({...e,labelElementType:"span",isInvalid:l,errorMessage:e.errorMessage||u}),h=bC(t,r),g=f["aria-labelledby"]||f.id,{locale:y}=g_(),v=t.formatValue(y,{month:"long"}),b=y4(v?s.format("selectedDateDescription",{date:v}):""),w=[b["aria-describedby"],f["aria-describedby"]].filter(Boolean).join(" ")||void 0,E=mY(e),x=(0,cl.useMemo)(()=>bE(r),[r]),D=(0,cl.useRef)(!1),{focusWithinProps:_}=h8({...e,isDisabled:t.isOpen,onBlurWithin:t=>{let r=document.getElementById(a);if(!(null==r?void 0:r.contains(t.relatedTarget))){var n,o;D.current=!1,null==(n=e.onBlur)||n.call(e,t),null==(o=e.onFocusChange)||o.call(e,!1)}},onFocusWithin:t=>{if(!D.current){var r,n;D.current=!0,null==(r=e.onFocus)||r.call(e,t),null==(n=e.onFocusChange)||n.call(e,!0)}}});return{groupProps:mj(E,h,f,b,_,{role:"group","aria-disabled":e.isDisabled||null,"aria-labelledby":g,"aria-describedby":w,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...d,onClick:()=>{x.focusFirst()}},fieldProps:{...f,id:i,[bN]:"presentation","aria-describedby":w,value:t.value,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,[bB]:t,autoFocus:e.autoFocus,name:e.name},descriptionProps:p,errorMessageProps:m,buttonProps:{...b,id:o,"aria-haspopup":"dialog","aria-label":s.format("calendar"),"aria-labelledby":`${o} ${g}`,"aria-describedby":w,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:a,"aria-labelledby":`${o} ${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(" ")},isInvalid:l,validationErrors:u,validationDetails:c}}({...mB(e),label:u,validationBehavior:a},i,s),[b,w]=(0,cl.useState)(null),E=(0,cl.useCallback)(()=>{s.current&&w(s.current.offsetWidth+"px")},[]);wB({ref:s,onResize:E});let{focusProps:x,isFocused:D,isFocusVisible:_}=h7({within:!0}),S=mI({...e,values:{state:i,isFocusWithin:D,isFocusVisible:_,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DatePicker"}),C=mY(e);return delete C.id,cu().createElement(m$,{values:[[Ee,i],[bt,{...c,ref:s,isInvalid:i.isInvalid}],[b8,f],[gl,{...p,isPressed:i.isOpen}],[wg,{...d,ref:l,elementType:"span"}],[vQ,h],[wc,i],[w4,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":b}}],[wu,m],[gd,{slots:{description:g,errorMessage:y}}],[wf,v]]},cu().createElement("div",{...x,...C,...S,ref:t,slot:e.slot||void 0,"data-focus-within":D||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}))}),En=(0,cl.forwardRef)(function(e,t){var r,n;[e,t]=mL(e,t,w7);let{validationBehavior:o}=mM(wh)||{},a=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",i=function(e){var t,r,n;let o=w2(e),[a,i]=vG(e.value,e.defaultValue||null,e.onChange),[s,l]=(0,cl.useState)(()=>a||{start:null,end:null});null==a&&s.start&&s.end&&l(s={start:null,end:null});let u=a||s,c=e=>{l(e||{start:null,end:null}),w9(e)?i(e):i(null)},[d,f]=b1((null==u?void 0:u.start)||(null==u?void 0:u.end)||e.placeholderValue||null,e.granularity),p="hour"===d||"minute"===d||"second"===d,m=null==(n=e.shouldCloseOnSelect)||n,[h,g]=(0,cl.useState)(null),[y,v]=(0,cl.useState)(null);u&&w9(u)&&(h=u,"hour"in u.start&&(y=u));let b=(e,t)=>{c({start:"timeZone"in t.start?t.start.set(ya(e.start)):yi(e.start,t.start),end:"timeZone"in t.end?t.end.set(ya(e.end)):yi(e.end,t.end)}),g(null),v(null),P.commitValidation()},w=t=>{let r="function"==typeof m?m():m;p?w9(t)&&(null==y?void 0:y.start)&&(null==y?void 0:y.end)?b(t,{start:(null==y?void 0:y.start)||bX(e.placeholderValue),end:(null==y?void 0:y.end)||bX(e.placeholderValue)}):g(t):w9(t)?(c(t),P.commitValidation()):g(t),r&&o.setOpen(!1)},E=e=>{w9(h)&&w9(e)?b(h,e):v(e)},x=(null==u||null==(t=u.start)?void 0:t.calendar.identifier)==="gregory"&&"BC"===u.start.era||(null==u||null==(r=u.end)?void 0:r.calendar.identifier)==="gregory"&&"BC"===u.end.era,D=(0,cl.useMemo)(()=>({granularity:d,timeZone:f,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:x}),[d,e.hourCycle,e.shouldForceLeadingZeros,f,e.hideTimeZone,x]),{minValue:_,maxValue:S,isDateUnavailable:C}=e,k=(0,cl.useMemo)(()=>{var e,t;let r;return r=bz(bZ(null!=(e=null==u?void 0:u.start)?e:null,_,S,C,D),bZ(null!=(t=null==u?void 0:u.end)?t:null,_,S,C,D)),(null==u?void 0:u.end)!=null&&null!=u.start&&0>u.end.compare(u.start)&&(r=bz(r,{isInvalid:!0,validationErrors:[(yP.getGlobalDictionaryForPackage("@react-stately/datepicker")||bK).getStringForLocale("rangeReversed",bG())],validationDetails:{...bI,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),r},[u,_,S,C,D]),P=bU({...e,value:a,name:(0,cl.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:k}),O=P.displayValidation.isInvalid,R=e.validationState||(O?"invalid":null);return{...P,value:u,setValue:c,dateRange:h,timeRange:y,granularity:d,hasTime:p,setDate(e,t){var r,n;"start"===e?w({start:t,end:null!=(r=null==h?void 0:h.end)?r:null}):w({start:null!=(n=null==h?void 0:h.start)?n:null,end:t})},setTime(e,t){var r,n;"start"===e?E({start:t,end:null!=(r=null==y?void 0:y.end)?r:null}):E({start:null!=(n=null==y?void 0:y.start)?n:null,end:t})},setDateTime(e,t){var r,n;"start"===e?c({start:t,end:null!=(r=null==u?void 0:u.end)?r:null}):c({start:null!=(n=null==u?void 0:u.start)?n:null,end:t})},setDateRange:w,setTimeRange:E,...o,setOpen(t){!t&&!((null==u?void 0:u.start)&&(null==u?void 0:u.end))&&w9(h)&&p&&b(h,{start:(null==y?void 0:y.start)||bX(e.placeholderValue),end:(null==y?void 0:y.end)||bX(e.placeholderValue)}),o.setOpen(t)},validationState:R,isInvalid:O,formatValue(t,r){let n;if(!u||!u.start||!u.end)return null;let o="timeZone"in u.start?u.start.timeZone:void 0,a=e.granularity||(u.start&&"minute"in u.start?"minute":"day"),i="timeZone"in u.end?u.end.timeZone:void 0,s=e.granularity||(u.end&&"minute"in u.end?"minute":"day"),l=bJ(r,{granularity:a,timeZone:o,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:"gregory"===u.start.calendar.identifier&&"BC"===u.start.era||"gregory"===u.end.calendar.identifier&&"BC"===u.end.era}),c=u.start.toDate(o||"UTC"),d=u.end.toDate(i||"UTC"),f=new yI(t,l);if(o===i&&a===s&&0!==u.start.compare(u.end)){try{let e=f.formatRangeToParts(c,d),t=-1;for(let r=0;r<e.length;r++){let n=e[r];if("shared"===n.source&&"literal"===n.type)t=r;else if("endRange"===n.source)break}let r="",n="";for(let o=0;o<e.length;o++)o<t?r+=e[o].value:o>t&&(n+=e[o].value);return{start:r,end:n}}catch{}n=f}else n=new yI(t,bJ(r,{granularity:s,timeZone:i,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:f.format(c),end:n.format(d)}},getDateFormatter:(e,t)=>new yI(e,bJ({},{...D,...t}))}}({...e,validationBehavior:a}),s=(0,cl.useRef)(null),[l,u]=mF(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,startFieldProps:f,endFieldProps:p,buttonProps:m,dialogProps:h,calendarProps:g,descriptionProps:y,errorMessageProps:v,...b}=function(e,t,r){var n,o,a,i,s,l;let u=yA((l=ba)&&l.__esModule?l.default:l,"@react-aria/datepicker"),{isInvalid:c,validationErrors:d,validationDetails:f}=t.displayValidation,{labelProps:p,fieldProps:m,descriptionProps:h,errorMessageProps:g}=bO({...e,labelElementType:"span",isInvalid:c,errorMessage:e.errorMessage||d}),y=m["aria-labelledby"]||m.id,{locale:v}=g_(),b=t.formatValue(v,{month:"long"}),w=y4(b?u.format("selectedRangeDescription",{startDate:b.start,endDate:b.end}):""),E={"aria-label":u.format("startDate"),"aria-labelledby":y},x={"aria-label":u.format("endDate"),"aria-labelledby":y},D=mR(),_=mR(),S=bC(t,r),C=[w["aria-describedby"],m["aria-describedby"]].filter(Boolean).join(" ")||void 0,k=(0,cl.useMemo)(()=>bE(r,{accept:e=>e.id!==D}),[r,D]),P={[bj]:k,[bN]:"presentation","aria-describedby":C,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},O=mY(e),R=(0,cl.useRef)(!1),{focusWithinProps:T}=h8({...e,isDisabled:t.isOpen,onBlurWithin:t=>{let r=document.getElementById(_);if(!(null==r?void 0:r.contains(t.relatedTarget))){var n,o;R.current=!1,null==(n=e.onBlur)||n.call(e,t),null==(o=e.onFocusChange)||o.call(e,!1)}},onFocusWithin:t=>{if(!R.current){var r,n;R.current=!0,null==(r=e.onFocus)||r.call(e,t),null==(n=e.onFocusChange)||n.call(e,!0)}}}),N=(0,cl.useRef)(bL),j=(0,cl.useRef)(bL);return{groupProps:mj(O,S,m,w,T,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":C,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...p,onClick:()=>{k.focusFirst()}},buttonProps:{...w,id:D,"aria-haspopup":"dialog","aria-label":u.format("calendar"),"aria-labelledby":`${D} ${y}`,"aria-describedby":C,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:_,"aria-labelledby":`${D} ${y}`},startFieldProps:{...E,...P,value:null!=(i=null==(n=t.value)?void 0:n.start)?i:null,onChange:e=>t.setDateTime("start",e),autoFocus:e.autoFocus,name:e.startName,[bB]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){N.current=e,t.updateValidation(bz(e,j.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...x,...P,value:null!=(s=null==(o=t.value)?void 0:o.end)?s:null,onChange:e=>t.setDateTime("end",e),name:e.endName,[bB]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){j.current=e,t.updateValidation(bz(N.current,e))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:h,errorMessageProps:g,calendarProps:{autoFocus:!0,value:(null==(a=t.dateRange)?void 0:a.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(" ")},isInvalid:c,validationErrors:d,validationDetails:f}}({...mB(e),label:u,validationBehavior:a},i,s),[w,E]=(0,cl.useState)(null),x=(0,cl.useCallback)(()=>{s.current&&E(s.current.offsetWidth+"px")},[]);wB({ref:s,onResize:x});let{focusProps:D,isFocused:_,isFocusVisible:S}=h7({within:!0}),C=mI({...e,values:{state:i,isFocusWithin:_,isFocusVisible:S,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DateRangePicker"}),k=mY(e);return delete k.id,cu().createElement(m$,{values:[[Et,i],[bt,{...c,ref:s,isInvalid:i.isInvalid}],[gl,{...m,isPressed:i.isOpen}],[wg,{...d,ref:l,elementType:"span"}],[v0,g],[wc,i],[w4,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":w}}],[wu,h],[b8,{slots:{start:f,end:p}}],[gd,{slots:{description:y,errorMessage:v}}],[wf,b]]},cu().createElement("div",{...D,...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 Eo(e){return cu().createElement(gD,e)}function Ea(e,t,r=!1){if(null==e)return r?e:void 0;if("string"==typeof e&&!e)return r?null:void 0;if(e instanceof g0||e instanceof g3||e instanceof g5)return t?ys(e,t):e;{let r=d0()(e).toDate(),n=new g0(r.getFullYear(),r.getMonth()+1,r.getDate());return t?ys(n,t):n}}function Ei(e){if(e)return e.toDate(yb())}function Es(e){if("string"==typeof e&&0!==e.trim().length)try{return new Intl.Locale(e.replace(/[_@]/g,"-")).toString()}catch{return}}function El(e){let t=e??"",r=Es(t);if(!r)return t;try{return new Intl.DisplayNames([r],{type:"language"}).of(r)??t}catch{return t}}function Eu(){let e=window.i18next.language,t=Es(e)??e;return"ht"===t&&(t="fr-HT"),t}if("u">typeof navigator){let e=navigator;ei=Array.isArray(e.languages)?e.languages[0]:e.language}else if("u">typeof process){let e=process.env;ei=e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}var Ec=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch(e){return"en-US"}}(ei||"en-US"),Ed=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},Ef={};for(let e=1;e<100;e++)Ef[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var Ep={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},Em="[1234567890一二三四五六七八九〇\\d]",Eh={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},Eg={},Ey={"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},Ev={zone:Ey,year:Ef,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:{}},Eb={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(Ey).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,}"},Ew={...Eb,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}"},EE={},Ex=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(t=Ec){return EE[t.toLowerCase()]||(EE[t.toLowerCase()]=new e(t)),EE[t.toLowerCase()]}constructor(e=Ec){this.locale=e,this.lookups={...Ev},this.vars={...Eb};const 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 r=0;r<e.length;r++)t+=String(this.lookups.digit[e[r]]);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 r=this.lookups.meridiem[t?.toLowerCase()]||0,n=this.toInt(e);return n<12&&12===r&&(n+=12),12===n&&0===r&&(n=0),n}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,r,n]=t;return("-"===e||"−"===e?-1:1)*(60*this.toInt(r)+this.toInt(n||0))}return 0}build(){"latn"===this.dateOptions.numberingSystem?this.lookups.digit=Eh: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(Eg[e])return Eg[e];if("fullwide"===e||"hanidec"===e)return{group:Em,lookup:{...Eh}};let t=Ep[e];if(!t)return{group:"\\d",lookup:{...Eh}};let r=String.fromCharCode(t),n=String.fromCharCode(t+9),o={};for(let e=0;e<10;e++)o[String.fromCharCode(t+e)]=e;return Eg[e]={group:`[${r}-${n}]`,lookup:o},Eg[e]}(this.numberingSystem);for(let r in this.lookups.digit=t,Ew)Ew.hasOwnProperty(r)&&(this.vars[r]=Ew[r].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((r,n)=>{["","k","kuu","kuuta"].forEach((o,a)=>{e[r+o+(a<2?"\\.?":"")]=!0,t[r+o]=n+1})});else{let r=[],n=e=>"month"===e.type;for(let e=0;e<12;e++)r.push(new Date(2017,e,1));for(let o of["full","long","medium"]){let a=Intl.DateTimeFormat(this.locale,{dateStyle:o});for(let i=0;i<12;i++){let s=a.formatToParts(r[i]).find(n).value.toLocaleLowerCase(this.locale);/^\d+$/.test(s)||(/^ko/i.test(this.locale)&&(s+="월"),"medium"===o?(s=s.replace(/\.$/,""),e[`${s}\\.?`]=!0):e[s]=!0,t[s]=i+1)}}let o=Intl.DateTimeFormat(this.locale,{month:"short"});for(let a=0;a<12;a++){let i=o.formatToParts(r[a]).find(n).value.toLocaleLowerCase(this.locale);i=i.replace(/\.$/,""),e[`${i}\\.?`]=!0,t[i]=a+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 r=[],n={};for(let o of["long","short"]){let a=Intl.DateTimeFormat(this.locale,{weekday:o});for(let i=0;i<7;i++){let s=a.formatToParts(e[i]).find(t).value.toLocaleLowerCase(this.locale);"short"===o?(s=s.replace(/\.$/,""),r.push(`${s}\\.?`)):r.push(s),n[s]=i}}this.vars.DAYNAME=r.join("|"),this.lookups.dayname=n}buildMeridiems(){let e=[new Date(2017,0,1),new Date(2017,0,1,23,0,0)],t=e=>"dayPeriod"===e.type,r=[],n={},o=Intl.DateTimeFormat(this.locale,{timeStyle:"long"});for(let a=0;a<2;a++){let i=o.formatToParts(e[a]).find(t);if(!i)return;let s=i.value.toLocaleLowerCase(this.locale);r.push(s),n[s]=12*a}this.vars.MERIDIEM=r.join("|"),this.lookups.meridiem=n}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")}},ED=["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"],E_={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},ES=()=>new Date;function EC(e){return function(t){let r={};for(let n=0,o=e.length;n<o;n++){let o=e[n];o&&(r[o]=t[n])}return r}}var Ek=class{doneChecker;fallback;patterns;formatter;constructor({doneChecker:e,fallback:t,patterns:r,formatter:n}){this.doneChecker=e,this.fallback=t,this.patterns=r,this.formatter=n}attempt(e){if("string"!=typeof e)return this.fallback(e);let t=e.trim(),r={},n=!1;for(let e of this.patterns){let o=t.match(e.regex);if(!o)continue;n=!0;let a=e.handler(o);if(a){for(let[e,t]of Object.entries(a))e in r||void 0===t||(r[e]=t);if(t=(t=t.slice(0,o.index)+t.slice(o.index+o[0].length+1)).trim(),this.doneChecker(r,t))break}}return n?this.formatter(r):this.fallback(e)}},EP=["year","month","day","hour","minute","second","millisecond","offset"],EO={};function ER(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 ET=[[/([^\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"]],EN={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," "],...ET],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:ET,id:ET,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function Ej(e,t=Ec){let r=function(e){if(!EO[e]){var t,r;let n,o,a=Ex.factory(e);EO[e]=new Ek({doneChecker:ER,fallback:(t=e,function(e){let r=String(e).slice(0,50);return""===r&&(r="(empty string)"),{invalid:`Unable to parse "${r}" with locale "${t}"`}}),patterns:(n=[{name:"timestampWithOffset",regex:a.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? ?(_OFFSET_|Z)?$"),handler:EC(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:a.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:EC(["","year","month","day","hour","minute","second","millisecond","zone"])},{name:"timestampWithOffsetAndZone",regex:a.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? (_OFFSET_|Z)\\s*(_ZONE_)$"),handler:EC(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:a.compile(`^(${Em}{2,4})\\s*\u5E74\\s*(${Em}{1,2})\\s*\u6708\\s*(${Em}{1,2})\\s*\u65E5$`),handler:EC(["","year","month","day"])},{name:"korean",regex:a.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:EC(["","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:EC(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let t=ES(),r=e[0].toLowerCase(),n={now:0,today:0,tomorrow:864e5,yesterday:-864e5}[r];0!==n&&t.setTime(t.getTime()+n);let o={year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()};return"now"===r?{...o,hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),millisecond:t.getMilliseconds()}:o}},{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,r,n]){t=parseFloat(t),"week"===(r=r.length<=2?E_[r]:(r=r.replace(/s$/,"")).toLowerCase())&&(r="day",t*=7),("-"===e||n)&&(t*=-1);let o=ES();return"millisecond"===r?o.setUTCMilliseconds(o.getUTCMilliseconds()+t):"second"===r?o.setUTCSeconds(o.getUTCSeconds()+t):"minute"===r?o.setUTCMinutes(o.getUTCMinutes()+t):"hour"===r?o.setUTCHours(o.getUTCHours()+t):"day"===r?o.setUTCDate(o.getUTCDate()+t):"month"===r?o.setUTCMonth(o.getUTCMonth()+t):"year"===r&&o.setUTCFullYear(o.getUTCFullYear()+t),{year:o.getUTCFullYear(),month:o.getUTCMonth()+1,day:o.getUTCDate(),hour:o.getUTCHours(),minute:o.getUTCMinutes(),second:o.getUTCSeconds(),millisecond:o.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:a.compile("(?:^|[\\sT])(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?(Z)?$"),handler:EC(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:a.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:EC(["","hour","minute","second","millisecond","zone"])},{name:"hms12WithOffset",regex:a.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)\\s*(_OFFSET_)"),handler:EC(["","hour","minute","second","meridiem","offset"])},{name:"hms12",regex:a.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:EC(["","hour","minute","second","meridiem"])},{name:"hms24",regex:a.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:EC(["","hour","minute","second","millisecond"])},{name:"hm12",regex:a.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:EC(["","hour","minute","meridiem"])},{name:"hm24",regex:a.compile("(_H24_):(_MIN_)"),handler:EC(["","hour","minute"])},{name:"h12",regex:a.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:EC(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:EC(["","year","month","day"])},{name:"yearMonthnameDay",regex:a.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:EC(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:a.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:EC(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:a.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:EC(["","monthname","day","","year"])},{name:"dayMonthname",regex:a.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:EC(["","day","","monthname"])},{name:"monthnameDay",regex:a.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:EC(["","monthname","day"])},{name:"hmsNoMeridiem",regex:a.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:EC(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:a.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:EC(["","hour","minute"])},{name:"ymd",regex:a.compile("(_YEAR4_)([.-])(_MONTH_)\\2+(_DAY_)"),handler:EC(["","year","","month","day"])},{name:"mdy",regex:a.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:EC(["","month","","day","year"])},{name:"dmy",regex:a.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:EC(["","day","month","year"])},{name:"yearLoose",regex:a.compile("_YEAR4_"),handler:EC(["year"])},{name:"dayMonthnameLoose",regex:a.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:EC(["","day","monthname"])},{name:"monthnameDayLoose",regex:a.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:EC(["","monthname","day"])},{name:"monthname",regex:a.compile("_MONTHNAME_"),handler:EC(["monthname"])},{name:"year4",regex:a.compile("_YEAR4_"),handler:EC(["year"])},{name:"md",regex:a.compile("(_MONTH_)[/-](_DAY_)"),handler:EC(["","month","day"])},{name:"dm",regex:a.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:EC(["","day","month"])},{name:"day",regex:a.compile("_DAY_"),handler:EC(["day"])},{name:"year2",regex:a.compile("_YEAR2_"),handler:EC(["year"])},{name:"onlyZone",regex:a.compile("_ZONE_"),handler:EC(["zone"])},{name:"onlyOffset",regex:a.compile("_OFFSET_"),handler:EC(["offset"])}],o=a.baseName.slice(0,5),ED.includes(o)?n:n.filter(e=>!["mdy","md"].includes(e.name))),formatter:(r=a,function(e){let t={};for(let[n,o]of Object.entries(e))if("monthname"===n){if(o){let e=r.monthNameToInt(o);void 0!==e&&(t.month=e)}}else if("hour"===n&&e.meridiem){let n=r.h12ToInt(o,e.meridiem);void 0!==n&&(t.hour=n)}else if("zone"===n){if(o){let e=r.zoneToOffset(o);void 0!==e&&(t.offset=e)}}else if("offset"===n){let e=r.offsetToMinutes(o);void 0!==e&&(t.offset=e)}else if("millisecond"===n){let e=r.millisecondToInt(o);"number"==typeof e&&(t.millisecond=e)}else if(EP.includes(n)){let e=r.toInt(o);"number"==typeof e&&(t[n]=e)}return t.year<100&&(t.year=Ef[t.year]),t.year&&"buddhist"===r.dateOptions.calendar&&(t.year-=543),t})})}return EO[e]}(t),n=function(e,t){let r=EN[t.slice(0,2).toLowerCase()];if(!r)return e;for(let[t,n]of r)e=e.replace(t,n);return e}(e,t);return r.attempt(n)}function EA(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let t=new Ed(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 Ed(t.valueOf()-60*e.offset*1e3):t}function E$(e,t=Ec){let r=Ej(e,t),n=r.invalid?new Ed(NaN):EA(r);return n.isValid()||(n.invalid=`Unable to parse date "${e}"`),n}function EI(e,t=Ec){return e instanceof Date?new Ed(e.valueOf()):"number"==typeof e?new Ed(e):E$(e,t)}Date.fromString=Ed.fromString=E$,Date.fromAny=Ed.fromAny=EI,"u">typeof window&&(window.anyDateParser={fromString:E$,fromAny:EI,fromObject:EA,attempt:Ej});var EM=r(5238),EL=r(3826);let EF=function(e){return null==e};function EB(e,t){var r=function(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}(e,t);return r.get?r.get.call(e):r.value}dQ.extend(d1),dQ.extend(EL),dQ.extend(EM);let EU="YYYY-MM-DDTHH:mm:ss.SSSZZ";function EV(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&dQ(e,EU).isValid()}function EW(e){return dQ(e).isToday()}function EH(e){return EV(e)?dQ(e,EU).toDate():null}function Ez(e,t=!1){let r=dQ(e);return t&&(r=r.utc()),r.format(EU)}function EK(e){return dQ(e).toDate()}var EG=new WeakMap;let EZ=new class{register(e,t){EB(this,EG).set(e,t)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let t=`${e.language}-${e.region}`;if(EB(this,EG).has(t))return EB(this,EG).get(t)}if(e.language&&EB(this,EG).has(e.language))return EB(this,EG).get(e.language);let t=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return EB(this,EG).set(`${e.language}${e.region?`-${e.region}`:""}`,t),t}constructor(){!function(e,t,r){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}(this,EG,{writable:!0,value:new Map})}};function EY(e,t){EZ.register(e,t)}function Eq(e){let t=e??Eu();return EZ.getCalendar(t instanceof Intl.Locale?t:new Intl.Locale(t))}let EJ={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function EX(e,t={}){let r=Ej(e,Eu());if(r.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!EF(r.day)&&EF(r.month)&&(r=Object.assign({},nn(r,"day"),{month:r.day})),r.month&&(r.month-=1),r.day&&(r=Object.assign({},nn(r,"day"),{date:r.day}));let n=dQ().set(r).toDate();return EF(r.year)&&(t.year=!1),EF(r.month)&&(t.month=!1),EF(r.date)&&(t.day=!1),EQ(n,t)}function EQ(e,t){let r,n=t?.locale??Eu(),o=new Intl.Locale(n),{calendar:a,mode:i,time:s,day:l,month:u,year:c,noToday:d,numberingSystem:f}={...EJ,...{noToday:"am"===o.language},...t},p={calendar:a??Eq(o),year:c?"numeric":void 0,month:u?"short":void 0,day:l?"2-digit":void 0,numberingSystem:f},m=dQ(e).isToday();if(m&&!d)r=(r=new Intl.RelativeTimeFormat(n,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(n)+r.slice(1);else{"en"===o.language&&(n="en-GB");let t=new Intl.DateTimeFormat(n,p).formatToParts(e);("en"===o.language||"am"===o.language)&&"standard"==i&&c&&l&&(t=t.map(E0("-"))),"wide"==i&&(t=t.map(E0(" — "))),"ethiopic"===p.calendar&&(t=t.filter((e,t,r)=>"era"!==e.type&&("literal"!==e.type||!(t<r.length-1)||"era"!==r[t+1].type))),r=t.map(e=>e.value).join("")}return(!0===s||m&&"for today"===s)&&(r+=`, ${E1(e)}`),r}let E0=e=>(t,r,n)=>"literal"!==t.type||" "!==t.value||r<n.length-1&&"era"===n[r+1].type?t:{type:"literal",value:e};function E1(e){return e.toLocaleTimeString(Eu(),{hour:"2-digit",minute:"2-digit"})}function E2(e,t){return EQ(e,{...t,time:!0})}function E4(e,t){let r=Eq("string"==typeof t?new Intl.Locale(t):t);return r?ys(e,vF(r)):e}function E3(e,t){return new Intl.DurationFormat(Eu(),t).format(e)}function E6(e,t){if(null==e)return null;if("string"==typeof e){let r=Ej(e,Eu());return r.invalid?(console.warn(`Could not interpret '${e}' as a date`),null):(r.day&&!r.month&&(r={...nn(r,"day"),...{month:r.day}}),r.month&&(r.month-=1),r.day&&(r={...nn(r,"day"),...{date:r.day}}),dQ(t).set(r))}return dQ(e)}let E5=["years","months","days","hours","minutes","seconds"],E9={second:"seconds",minute:"minutes",hour:"hours",day:"days",month:"months",year:"years"},E8={seconds:45,minutes:45,hours:22,days:26,months:11,years:1/0};function E7(e,t=dQ(),r){let n,o=dQ(t),a=E6(e,o);if(null==a)return null;if("string"==typeof r){let e=E9[r]??r;return{[e]:o.diff(a,e)}}let{thresholds:i,largestUnit:s,smallestUnit:l}=r??{};if(void 0!==s||void 0!==l){let e,t=l?E9[l]??l:void 0;return e="auto"===s||void 0===s?function(e,t,r){let n=E5.indexOf(r);for(let o=0;o<E5.length;o++){let a=E5[o];if(t.diff(e,a)>0)return o<=n?a:r}return r}(a,o,t??"seconds"):E9[s]??s,function(e,t,r,n){let o=E5.indexOf(r),a=E5.indexOf(n),i=E5.slice(o,a+1),s={},l=e;for(let e of i){let r=t.diff(l,e);s[e]=r,l=l.add(r,e)}return s}(a,o,e,t??e)}let u=(n=function(e){let t={...E8};if(e)for(let[r,n]of Object.entries(e))void 0!==n&&(t[E9[r]??r]=n);return t}(i),o.diff(a,"seconds")<n.seconds?"seconds":o.diff(a,"minutes")<n.minutes?"minutes":o.diff(a,"hours")<n.hours?"hours":o.diff(a,"days")<n.days?"days":o.diff(a,"months")<n.months?"months":"years");return{[u]:o.diff(a,u)}}let xe={style:"short",localeMatcher:"lookup"};function xt(e,t=dQ(),r){let n=E7(e,t,r);return null==n?null:E3(n,"object"==typeof r&&r.formatOptions?{...xe,...r.formatOptions}:xe)}let xr=(0,cl.createContext)(null);function xn(){let e=du({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,t=(0,cl.useMemo)(()=>{let t=Eu();return e[t]&&(t=e[t]),t},[window.i18next.language]),r=(0,cl.useMemo)(()=>{let e=Eq(t);return void 0!==e?vF(e):void 0},[t]),n=(0,cl.useMemo)(()=>new Intl.Locale(t,{calendar:r?.identifier}),[t,r]),o=(0,cl.useMemo)(()=>r?ys(yh(yb()),r):yh(yb()),[r]);return{calendar:r,intlLocale:n,today_:o}}let xo=new g0(1793,1,1);var xa={};function xi(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}xa={"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 xs=r(137);function xl(e={}){let{locale:t}=g_();return(0,cl.useMemo)(()=>new(0,xs.K)(t,e),[t,e])}var xu={};function xc(e){var t;let r=(0,cl.useRef)(void 0),{value:n,textValue:o,minValue:a,maxValue:i,isDisabled:s,isReadOnly:l,isRequired:u,onIncrement:c,onIncrementPage:d,onDecrement:f,onDecrementPage:p,onDecrementToMin:m,onIncrementToMax:h}=e,g=yA((t=xu)&&t.__esModule?t.default:t,"@react-aria/spinbutton");(0,cl.useEffect)(()=>()=>clearTimeout(r.current),[]);let y=(0,cl.useRef)(!1),v=()=>{y.current=!0},b=()=>{y.current=!1},w=""===o?g.format("Empty"):(o||`${n}`).replace("-","−");(0,cl.useEffect)(()=>{y.current&&(mV&&mV.clear("assertive"),mW(w,"assertive"))},[w]);let E=mv(e=>{clearTimeout(r.current),null==c||c(),r.current=window.setTimeout(()=>{(void 0===i||isNaN(i)||void 0===n||isNaN(n)||n<i)&&E(60)},e)}),x=mv(e=>{clearTimeout(r.current),null==f||f(),r.current=window.setTimeout(()=>{(void 0===a||isNaN(a)||void 0===n||isNaN(n)||n>a)&&x(60)},e)}),D=e=>{e.preventDefault()},{addGlobalListener:_,removeAllGlobalListeners:S}=hD();return{spinButtonProps:{role:"spinbutton","aria-valuenow":void 0===n||isNaN(n)?void 0:n,"aria-valuetext":w,"aria-valuemin":a,"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)switch(e.key){case"PageUp":if(d){e.preventDefault(),null==d||d();break}case"ArrowUp":case"Up":c&&(e.preventDefault(),null==c||c());break;case"PageDown":if(p){e.preventDefault(),null==p||p();break}case"ArrowDown":case"Down":f&&(e.preventDefault(),null==f||f());break;case"Home":m&&(e.preventDefault(),null==m||m());break;case"End":h&&(e.preventDefault(),null==h||h())}},onFocus:v,onBlur:b},incrementButtonProps:{onPressStart:()=>{E(400),_(window,"contextmenu",D)},onPressEnd:()=>{clearTimeout(r.current),S()},onFocus:v,onBlur:b},decrementButtonProps:{onPressStart:()=>{x(400),_(window,"contextmenu",D)},onPressEnd:()=>{clearTimeout(r.current),S()},onFocus:v,onBlur:b}}}xu={"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:"空白"}};var xd=r(7120);function xf(e,t,r){let n="+"===e?t+r:t-r;if(t%1!=0||r%1!=0){let o=t.toString().split("."),a=r.toString().split("."),i=Math.pow(10,Math.max(o[1]&&o[1].length||0,a[1]&&a[1].length||0));t=Math.round(t*i),r=Math.round(r*i),n=("+"===e?t+r:t-r)/i}return n}let xp=(0,cl.createContext)(null),xm=(0,cl.createContext)(null),xh=(0,cl.forwardRef)(function(e,t){var r,n;[e,t]=mL(e,t,xp);let{validationBehavior:o}=mM(wh)||{},a=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",{locale:i}=g_(),s=function(e){let{minValue:t,maxValue:r,step:n,formatOptions:o,value:a,defaultValue:i=NaN,onChange:s,locale:l,isDisabled:u,isReadOnly:c}=e;null===a&&(a=NaN),void 0===a||isNaN(a)||(a=void 0===n||isNaN(n)?wE(a,t,r):wD(a,t,r,n)),isNaN(i)||(i=void 0===n||isNaN(n)?wE(i,t,r):wD(i,t,r,n));let[d,f]=vG(a,isNaN(i)?NaN:i,s),[p,m]=(0,cl.useState)(()=>isNaN(d)?"":new(0,xs.K)(l,o).format(d)),h=(0,cl.useMemo)(()=>new(0,xd.d)(l,o),[l,o]),g=(0,cl.useMemo)(()=>h.getNumberingSystem(p),[h,p]),y=(0,cl.useMemo)(()=>new(0,xs.K)(l,{...o,numberingSystem:g}),[l,o,g]),v=(0,cl.useMemo)(()=>y.resolvedOptions(),[y]),b=(0,cl.useCallback)(e=>isNaN(e)||null===e?"":y.format(e),[y]),w=bU({...e,value:d}),E=void 0===n||isNaN(n)?1:n;"percent"===v.style&&(void 0===n||isNaN(n))&&(E=.01);let[x,D]=(0,cl.useState)(d),[_,S]=(0,cl.useState)(l),[C,k]=(0,cl.useState)(o);Object.is(d,x)&&l===_&&o===C||(m(b(d)),D(d),S(l),k(o));let P=(0,cl.useMemo)(()=>h.parse(p),[h,p]),O=(e,n=0)=>{if(isNaN(P))return wD(isNaN(n)?0:n,t,r,E);{let n=wD(P,t,r,E);return"+"===e&&n>P||"-"===e&&n<P?n:wD(xf(e,P,E),t,r,E)}},R=(0,cl.useMemo)(()=>!u&&!c&&(isNaN(P)||void 0===r||isNaN(r)||wD(P,t,r,E)>P||xf("+",P,E)<=r),[u,c,t,r,E,P]),T=(0,cl.useMemo)(()=>!u&&!c&&(isNaN(P)||void 0===t||isNaN(t)||wD(P,t,r,E)<P||xf("-",P,E)>=t),[u,c,t,r,E,P]);return{...w,validate:e=>h.isValidPartialNumber(e,t,r),increment:()=>{let e=O("+",t);e===d&&m(b(e)),f(e),w.commitValidation()},incrementToMax:()=>{null!=r&&(f(wD(r,t,r,E)),w.commitValidation())},decrement:()=>{let e=O("-",r);e===d&&m(b(e)),f(e),w.commitValidation()},decrementToMin:()=>{null!=t&&(f(t),w.commitValidation())},canIncrement:R,canDecrement:T,minValue:t,maxValue:r,numberValue:P,setNumberValue:f,setInputValue:m,inputValue:p,commit:()=>{let e;if(!p.length){f(NaN),m(void 0===a?"":b(d));return}isNaN(P)?m(b(d)):(e=void 0===n||isNaN(n)?wE(P,t,r):wD(P,t,r,n),f(e=h.parse(b(e))),m(b(void 0===a?e:d)))}}}({...e,locale:i,validationBehavior:a}),l=(0,cl.useRef)(null),[u,c]=mF(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:d,groupProps:f,inputProps:p,incrementButtonProps:m,decrementButtonProps:h,descriptionProps:g,errorMessageProps:y,...v}=function(e,t,r){var n,o;let a,{id:i,decrementAriaLabel:s,incrementAriaLabel:l,isDisabled:u,isReadOnly:c,isRequired:d,minValue:f,maxValue:p,autoFocus:m,label:h,formatOptions:g,onBlur:y=()=>{},onFocus:v,onFocusChange:b,onKeyDown:w,onKeyUp:E,description:x,errorMessage:D,isWheelDisabled:_,...S}=e,{increment:C,incrementToMax:k,decrement:P,decrementToMin:O,numberValue:R,inputValue:T,commit:N,commitValidation:j}=t,A=yA((o=xa)&&o.__esModule?o.default:o,"@react-aria/numberfield"),$=mR(i),{focusProps:I}=h4({onBlur(){N()}}),M=xl(g),L=(0,cl.useMemo)(()=>M.resolvedOptions(),[M]),F=xl({...g,currencySign:void 0}),B=(0,cl.useMemo)(()=>isNaN(R)?"":F.format(R),[F,R]),{spinButtonProps:U,incrementButtonProps:V,decrementButtonProps:W}=xc({isDisabled:u,isReadOnly:c,isRequired:d,maxValue:p,minValue:f,onIncrement:C,onIncrementToMax:k,onDecrement:P,onDecrementToMin:O,value:R,textValue:B}),[H,z]=(0,cl.useState)(!1),{focusWithinProps:K}=h8({isDisabled:u,onFocusWithinChange:z});!function(e,t){let{onScroll:r,isDisabled:n}=e,o=(0,cl.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),r&&r({deltaX:e.deltaX,deltaY:e.deltaY}))},[r]);y0(t,"wheel",n?void 0:o)}({onScroll:(0,cl.useCallback)(e=>{!(Math.abs(e.deltaY)<=Math.abs(e.deltaX))&&(e.deltaY>0?C():e.deltaY<0&&P())},[P,C]),isDisabled:_||u||c||!H},r);let G=(null!=(n=L.maximumFractionDigits)?n:0)>0,Z=void 0===t.minValue||isNaN(t.minValue)||t.minValue<0,Y="numeric";hn()?Z?Y="text":G&&(Y="decimal"):hl()&&(Z?Y="numeric":G&&(Y="decimal"));let q=mY(e),J=(0,cl.useCallback)(e=>{"Enter"===e.key?(N(),j()):e.continuePropagation()},[N,j]),{isInvalid:X,validationErrors:Q,validationDetails:ee}=t.displayValidation,{labelProps:et,inputProps:er,descriptionProps:en,errorMessageProps:eo}=function(e,t,r){let n=mv(e=>{let n=r.current;if(!n)return;let o=null;switch(e.inputType){case"historyUndo":case"historyRedo":case"insertLineBreak":return;case"deleteContent":case"deleteByCut":case"deleteByDrag":o=n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteContentForward":o=n.selectionEnd===n.selectionStart?n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd+1):n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteContentBackward":o=n.selectionEnd===n.selectionStart?n.value.slice(0,n.selectionStart-1)+n.value.slice(n.selectionStart):n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":o=n.value.slice(n.selectionStart);break;default:null!=e.data&&(o=n.value.slice(0,n.selectionStart)+e.data+n.value.slice(n.selectionEnd))}null!=o&&t.validate(o)||e.preventDefault()});(0,cl.useEffect)(()=>{if(!xi()||!r.current)return;let e=r.current;return e.addEventListener("beforeinput",n,!1),()=>{e.removeEventListener("beforeinput",n,!1)}},[r,n]);let o=xi()?null:e=>{let r=e.target.value.slice(0,e.target.selectionStart)+e.data+e.target.value.slice(e.target.selectionEnd);t.validate(r)||e.preventDefault()},{labelProps:a,inputProps:i,descriptionProps:s,errorMessageProps:l,...u}=function(e,t){let{inputElementType:r="input",isDisabled:n=!1,isRequired:o=!1,isReadOnly:a=!1,type:i="text",validationBehavior:s="aria"}=e,[l,u]=vG(e.value,e.defaultValue||"",e.onChange),{focusableProps:c}=h9(e,t),d=bU({...e,value:l}),{isInvalid:f,validationErrors:p,validationDetails:m}=d.displayValidation,{labelProps:h,fieldProps:g,descriptionProps:y,errorMessageProps:v}=bO({...e,isInvalid:f,errorMessage:e.errorMessage||p}),b=mY(e,{labelable:!0}),w={type:i,pattern:e.pattern};return bP(t,l,u),bR(e,d,t),(0,cl.useEffect)(()=>{if(t.current instanceof m2(t.current).HTMLTextAreaElement){let e=t.current;Object.defineProperty(e,"defaultValue",{get:()=>e.value,set:()=>{},configurable:!0})}},[t]),{labelProps:h,inputProps:mj(b,"input"===r?w:void 0,{disabled:n,readOnly:a,required:o&&"native"===s,"aria-required":o&&"aria"===s||void 0,"aria-invalid":f||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(e.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(cu().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:f,validationErrors:p,validationDetails:m}}(e,r),c=(0,cl.useRef)(null);return{inputProps:mj(i,{onBeforeInput:o,onCompositionStart(){let{value:e,selectionStart:t,selectionEnd:n}=r.current;c.current={value:e,selectionStart:t,selectionEnd:n}},onCompositionEnd(){if(r.current&&!t.validate(r.current.value)){let{value:e,selectionStart:n,selectionEnd:o}=c.current;r.current.value=e,r.current.setSelectionRange(n,o),t.setInputValue(e)}}}),labelProps:a,descriptionProps:s,errorMessageProps:l,...u}}({...S,...q,name:void 0,label:h,autoFocus:m,isDisabled:u,isReadOnly:c,isRequired:d,validate:void 0,[bB]:t,value:T,defaultValue:void 0,autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:$,type:"text",inputMode:Y,onChange:e=>{t.validate(e)&&t.setInputValue(e)},onBlur:y,onFocus:v,onFocusChange:b,onKeyDown:(0,cl.useMemo)(()=>mg(J,w),[J,w]),onKeyUp:E,description:x,errorMessage:D},t,r);bP(r,t.numberValue,t.setNumberValue);let ea=mj(U,I,er,{role:null,"aria-roledescription":ha()?null:A.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});"native"===e.validationBehavior&&(ea["aria-required"]=void 0);let ei=e=>{var t;document.activeElement!==r.current&&("mouse"===e.pointerType?null==(t=r.current)||t.focus():e.target.focus())},es=e["aria-label"]||("string"==typeof e.label?e.label:"");es||(a=null!=e.label?et.id:e["aria-labelledby"]);let el=mR(),eu=mR(),ec=mj(V,{"aria-label":l||A.format("increase",{fieldLabel:es}).trim(),id:a&&!l?el:null,"aria-labelledby":a&&!l?`${el} ${a}`:null,"aria-controls":$,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:ei}),ed=mj(W,{"aria-label":s||A.format("decrease",{fieldLabel:es}).trim(),id:a&&!s?eu:null,"aria-labelledby":a&&!s?`${eu} ${a}`:null,"aria-controls":$,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:ei});return{groupProps:{...K,role:"group","aria-disabled":u,"aria-invalid":X?"true":void 0},labelProps:et,inputProps:ea,incrementButtonProps:ec,decrementButtonProps:ed,errorMessageProps:eo,descriptionProps:en,isInvalid:X,validationErrors:Q,validationDetails:ee}}({...mB(e),label:c,validationBehavior:a},s,l),b=mI({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:v.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),w=mY(e);return delete w.id,cu().createElement(m$,{values:[[xm,s],[bt,f],[bn,{...p,ref:l}],[wg,{...d,ref:u}],[gl,{slots:{increment:m,decrement:h}}],[gd,{slots:{description:g,errorMessage:y}}],[wf,v]]},cu().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&&cu().createElement("input",{type:"hidden",name:e.name,value:isNaN(s.numberValue)?"":s.numberValue}))});function xg(e,t){return Number.parseInt(EQ(e,{calendar:t.calendar,locale:t.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}let xy=(0,cl.forwardRef)(function(e,t){let{className:r}=e,n=(0,cl.useContext)(v1),o=(0,cl.useContext)(v2),a=n??o,i=(0,cl.useContext)(xr),s=yb(),l=EQ(a.visibleRange.start.toDate(s),{calendar:i.calendar,locale:i.baseName,day:!1,year:!1,noToday:!0}),u=xg(a.visibleRange.start.toDate(s),i),c=a.maxValue?xg(a.maxValue.toDate(s),i):void 0,d=a.minValue?xg(a.minValue.toDate(s),i):void 0,f=(0,cl.useCallback)(e=>{a.setFocusedDate(a.focusedDate.cycle("year",e-a.focusedDate.year))},[]);return a&&(0,fd.jsxs)("span",{ref:t,className:r,children:[(0,fd.jsx)("span",{children:l}),(0,fd.jsxs)(xh,{formatOptions:{useGrouping:!1},maxValue:c,minValue:d,onChange:f,value:u,children:[(0,fd.jsx)(bo,{}),(0,fd.jsxs)(br,{children:[(0,fd.jsx)(gu,{slot:"increment",children:(0,fd.jsx)(f0,{size:8})}),(0,fd.jsx)(gu,{slot:"decrement",children:(0,fd.jsx)(fJ,{size:8})})]})]})]})}),xv="-esm-cohort-builder__datepicker-module__inputGroup___-wpzr",xb="-esm-cohort-builder__datepicker-module__inputSegment___ocu7L",xw="-esm-cohort-builder__datepicker-module__dateInputWrapper___909Km",xE="-esm-cohort-builder__datepicker-module__invalidText___oHJHi",xx="-esm-cohort-builder__datepicker-module__flatButton___i9LDo",xD="-esm-cohort-builder__datepicker-module__flatButtonMd___VZMkc",x_="-esm-cohort-builder__datepicker-module__flatButtonSm___VA5wy",xS="-esm-cohort-builder__datepicker-module__flatButtonLg___MnYLl";function xC({children:e}){let t=(0,cl.useContext)(Ee),r=(0,cl.useContext)(Et),n=t??r,o=dV(()=>n?.close());return(0,fd.jsx)(wd,{className:"-esm-cohort-builder__datepicker-module__dialog___2pADb",ref:o,children:e})}let xk=(0,cl.forwardRef)(function({variant:e,today_:t,minDate:r,maxDate:n},o){let a="range"===e;return(0,fd.jsx)(w6,{ref:o,className:"-esm-cohort-builder__datepicker-module__popover___pb58i",placement:"bottom start",offset:1,isNonModal:!0,children:(0,fd.jsx)(xC,{children:(0,fd.jsxs)(a?v3:v4,{...a?{minValue:r,maxValue:n,className:"cds--date-picker__calendar"}:{},children:[(0,fd.jsxs)("header",{className:"-esm-cohort-builder__datepicker-module__header___+fi16",children:[(0,fd.jsx)(gu,{className:fp()(xx,xD),slot:"previous",children:(0,fd.jsx)(f9,{size:16})}),(0,fd.jsx)(xy,{className:"-esm-cohort-builder__datepicker-module__monthYear___mGhot"}),(0,fd.jsx)(gu,{className:fp()(xx,xD),slot:"next",children:(0,fd.jsx)(f8,{size:16})})]}),(0,fd.jsx)(v5,{className:"-esm-cohort-builder__datepicker-module__calendarGrid___z07wV",children:e=>(0,fd.jsx)(be,{className:fp()("cds--date-picker__day",{"-esm-cohort-builder__datepicker-module__today___dNc4M":0===t.compare(e)}),date:e},e.toString())})]})})})}),xP=(0,cl.forwardRef)(function(e,t){let r=(0,cl.useContext)(Ee),[n,o]=mL({slot:e.slot},t,b8),{locale:a}=g_(),i=b5({...n,locale:a,createCalendar:vF}),s=(0,cl.useRef)(null),{fieldProps:l,inputProps:u}=bA({...n,inputRef:s},i,o),c=(0,cl.useCallback)(()=>{i.isDisabled||r.toggle()},[]);return(0,fd.jsxs)(m$,{values:[[b7,i],[bn,{...u,ref:s}],[bt,{...l,ref:o,isInvalid:i.isInvalid}]],children:[(0,fd.jsx)(br,{...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,r)=>(0,cl.cloneElement)(e.children(t),{key:r}))}),(0,fd.jsx)(bo,{})]})}),xO=(0,cl.forwardRef)(function(e,t){let r=(0,cl.useContext)(Ee),n=(0,cl.useContext)(Et);return(r??n).isInvalid?(0,fd.jsx)(ma,{ref:t,size:16,...e}):(0,fd.jsx)(fq,{ref:t,size:16,...e})});class xR{of(e){return this.dictionary.getStringForLocale(e,this.locale)}constructor(e,t){this.locale=e,this.dictionary=t}}let xT=new Map,xN=(0,cl.forwardRef)(function({segment:e,...t},r){let n=(0,cl.useContext)(b7),o=mh(r),{segmentProps:a}=function(e,t,r){let n,o,a,i,s=(0,cl.useRef)(""),{locale:l,direction:u}=g_(),c=function(){var e;let{locale:t}=g_(),r=yj((e=ba)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,cl.useMemo)(()=>{try{return new Intl.DisplayNames(t,{type:"dateTimeField"})}catch{return new xR(t,r)}},[t,r])}(),{ariaLabel:d,ariaLabelledBy:f,ariaDescribedBy:p,focusManager:m}=bT.get(t),h=e.isPlaceholder?"":e.text,g=(0,cl.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),y=yV({month:"long",timeZone:g.timeZone}),v=yV({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}=xc({value:e.value,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="",void 0!==e.maxValue&&t.setSegment(e.type,e.maxValue)},onDecrementToMin:()=>{s.current="",void 0!==e.minValue&&t.setSegment(e.type,e.minValue)}}),w=(0,cl.useMemo)(()=>new(0,xd.d)(l,{maximumFractionDigits:0}),[l]),E=()=>{if(e.text===e.placeholder&&m.focusPrevious(),!w.isValidPartialNumber(e.text)||t.isReadOnly||e.isPlaceholder)"dayPeriod"===e.type&&t.clearSegment(e.type);else{let r=e.text.slice(0,-1),n=w.parse(r);0===(r=0===n?"":r).length||0===n?t.clearSegment(e.type):t.setSegment(e.type,n),s.current=r}},{startsWith:x}=(n=function(e){let{locale:t}=g_(),r=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(xT.has(r))return xT.get(r);let n=new Intl.Collator(t,e);return xT.set(r,n),n}({usage:"search",sensitivity:"base"}),o=(0,cl.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===n.compare(e.slice(0,t.length),t)),[n]),a=(0,cl.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===n.compare(e.slice(-t.length),t)),[n]),i=(0,cl.useCallback)((e,t)=>{if(0===t.length)return!0;e=e.normalize("NFC");let r=0,o=(t=t.normalize("NFC")).length;for(;r+o<=e.length;r++){let a=e.slice(r,r+o);if(0===n.compare(t,a))return!0}return!1},[n]),(0,cl.useMemo)(()=>({startsWith:o,endsWith:a,contains:i}),[o,a,i])),D=yV({hour:"numeric",hour12:!0}),_=(0,cl.useMemo)(()=>{let e=new Date;return e.setHours(0),D.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[D]),S=(0,cl.useMemo)(()=>{let e=new Date;return e.setHours(12),D.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[D]),C=yV({year:"numeric",era:"narrow",timeZone:"UTC"}),k=(0,cl.useMemo)(()=>{if("era"!==e.type)return[];let r=ys(new g0(1,1,1),t.calendar),n=t.calendar.getEras().map(e=>{let t=r.set({year:1,month:1,day:1,era:e}).toDate("UTC");return{era:e,formatted:C.formatToParts(t).find(e=>"era"===e.type).value}}),o=function(e){e.sort();let t=e[0],r=e[e.length-1];for(let e=0;e<t.length;e++)if(t[e]!==r[e])return e;return 0}(n.map(e=>e.formatted));if(o)for(let e of n)e.formatted=e.formatted.slice(o);return n},[C,t.calendar,e.type]),P=r=>{if(t.isDisabled||t.isReadOnly)return;let n=s.current+r;switch(e.type){case"dayPeriod":if(x(_,r))t.setSegment("dayPeriod",0);else if(x(S,r))t.setSegment("dayPeriod",12);else break;m.focusNext();break;case"era":{let e=k.find(e=>x(e.formatted,r));e&&(t.setSegment("era",e.era),m.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!w.isValidPartialNumber(n))return;let o=w.parse(n),a=o,i=0===e.minValue;if("hour"===e.type&&t.dateFormatter.resolvedOptions().hour12){switch(t.dateFormatter.resolvedOptions().hourCycle){case"h11":o>11&&(a=w.parse(r));break;case"h12":i=!1,o>12&&(a=w.parse(r))}void 0!==e.value&&e.value>=12&&o>1&&(o+=12)}else void 0!==e.maxValue&&o>e.maxValue&&(a=w.parse(r));if(isNaN(o))return;let l=0!==a||i;l&&t.setSegment(e.type,a),void 0!==e.maxValue&&(Number(o+"0")>e.maxValue||n.length>=String(e.maxValue).length)?(s.current="",l&&m.focusNext()):s.current=n}}};y0((0,cl.useRef)("u">typeof document?document:null),"selectionchange",()=>{var e;let t=window.getSelection();(null==t?void 0:t.anchorNode)&&(null==(e=r.current)?void 0:e.contains(null==t?void 0:t.anchorNode))&&t.collapse(r.current)});let O=(0,cl.useRef)("");y0(r,"beforeinput",n=>{if(r.current)switch(n.preventDefault(),n.inputType){case"deleteContentBackward":case"deleteContentForward":w.isValidPartialNumber(e.text)&&!t.isReadOnly&&E();break;case"insertCompositionText":O.current=r.current.textContent,r.current.textContent=r.current.textContent;break;default:null!=n.data&&P(n.data)}}),y0(r,"input",e=>{let{inputType:t,data:n}=e;"insertCompositionText"===t&&(r.current&&(r.current.textContent=O.current),null!=n&&(x(_,n)||x(S,n))&&P(n))}),my(()=>{let e=r.current;return()=>{document.activeElement===e&&(m.focusPrevious()||m.focusNext())}},[r,m]);let R=ha()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,cl.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])||t.isInvalid||(p=void 0);let T=mR(),N=!t.isDisabled&&!t.isReadOnly&&e.isEditable,j="literal"===e.type?"":c.of(e.type),A=yq({"aria-label":`${j}${d?`, ${d}`:""}${f?", ":""}`,"aria-labelledby":f});if("literal"===e.type)return{segmentProps:{"aria-hidden":!0}};let $={caretColor:"transparent"};if("rtl"===u){$.unicodeBidi="embed";let t=g[e.type];("numeric"===t||"2-digit"===t)&&($.direction="ltr")}return{segmentProps:mj(b,A,{id:T,...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(cu().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&&(hr()?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(),E()}},onFocus:()=>{s.current="",r.current&&y5(r.current,{containingElement:y9(r.current)});let e=window.getSelection();null==e||e.collapse(r.current)},style:$,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}(e,n,o),{focusProps:i,isFocused:s,isFocusVisible:l}=h7(),{hoverProps:u,isHovered:c}=go({...t,isDisabled:n.isDisabled||"literal"===e.type}),d=function(e){let{className:t,style:r,children:n,defaultClassName:o,defaultChildren:a,defaultStyle:i,values:s}=e;return(0,cl.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof r?r({...s,defaultStyle:i||{}}):r,u="function"==typeof n?n({...s,defaultChildren:a}):null==n?a:n,{className:e??o,style:l||i?{...i,...l}:void 0,children:u??a,"data-rac":""}},[t,r,n,o,a,i,s])}({...t,values:{...e,isReadOnly:!e.isEditable,isInvalid:n.isInvalid,isDisabled:n.isDisabled,isHovered:c,isFocused:s,isFocusVisible:l},defaultChildren:e.text}),f=(0,cl.useCallback)(e=>{e.stopPropagation()},[]);return(0,fd.jsx)("span",{...mj(mY(t),a,i,u),...d,ref:o,style:a.style,"data-placeholder":e.isPlaceholder||void 0,"data-invalid":n.isInvalid||void 0,"data-readonly":!e.isEditable||void 0,"data-disabled":n.isDisabled||void 0,"data-type":e.type,"data-hovered":c||void 0,"data-focused":s||void 0,"data-focus-visible":l||void 0,onClick:f})}),xj={short:!1,size:"md"},xA=(0,cl.forwardRef)(function(e,t){let{className:r,defaultValue:n,isDisabled:o,invalid:a,invalidText:i,isInvalid:s,label:l,labelText:u,light:c,maxDate:d,minDate:f,onChange:p,onChangeRaw:m,short:h,size:g,value:y,...v}={...xj,...e},{calendar:b,intlLocale:w,today_:E}=xn(),x=(0,cl.useId)(),D=!!(u??l),_=(0,cl.useMemo)(()=>Ea(n,b),[n,b]),S=(0,cl.useMemo)(()=>Ea(y,b,!0),[y,b]),C=(0,cl.useMemo)(()=>Ea(d,b),[d,b]),k=(0,cl.useMemo)(()=>Ea(f??xo,b),[f,b]),P=(0,cl.useMemo)(()=>a||s,[a,s]),O=(0,cl.useMemo)(()=>(m&&p&&console.error("An OpenmrsDatePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),m??(e=>p?.(Ei(e)))),[m,p]);return(0,fd.jsx)(Eo,{locale:w.toString(),children:(0,fd.jsx)("div",{className:fp()("cds--form-item",r),children:(0,fd.jsx)(m$,{values:[[xr,w]],children:(0,fd.jsxs)(Er,{className:fp()("cds--date-picker","cds--date-picker--single",{"cds--date-picker--short":h,"cds--date-picker--light":c}),defaultValue:_,isDisabled:o,isInvalid:P,maxValue:C,minValue:k,value:S,shouldForceLeadingZeros:"en"===w.language||void 0,...v,onChange:O,children:[(0,fd.jsxs)("div",{className:"cds--date-picker-container",children:[D&&(0,fd.jsx)(wy,{className:fp()("cds--label",{"cds--label--disabled":o}),htmlFor:x,children:u??l}),(0,fd.jsxs)(br,{className:xv,children:[(0,fd.jsx)(xP,{id:D?x:void 0,ref:t,className:fp()("cds--date-picker-input__wrapper","-esm-cohort-builder__datepicker-module__inputWrapper___MHJAy",{"-esm-cohort-builder__datepicker-module__inputWrapperSm___esx4E":"sm"===g,"-esm-cohort-builder__datepicker-module__inputWrapperMd___VQbzP":"md"===g||!g||0===g.length,"-esm-cohort-builder__datepicker-module__inputWrapperLg___Rk9Ce":"lg"===g}),children:e=>"era"!==e.type?(0,fd.jsx)(xN,{className:xb,segment:e}):(0,fd.jsx)(cu().Fragment,{})}),(0,fd.jsx)(gu,{className:fp()(xx,{[x_]:"sm"===g,[xD]:"md"===g||!g||0===g.length,[xS]:"lg"===g}),children:(0,fd.jsx)(xO,{})})]}),(0,fd.jsx)(wp,{className:xE,children:i})]}),(0,fd.jsx)(xk,{variant:"single",today_:E})]})})})})}),x$=(0,cl.forwardRef)(function({className:e,defaultValue:t,invalid:r,invalidText:n,isDisabled:o,isInvalid:a,label:i,labelText:s,light:l,maxDate:u,minDate:c,onChange:d,onChangeRaw:f,size:p="md",value:m,...h},g){let{calendar:y,intlLocale:v,today_:b}=xn(),w=(0,cl.useId)(),E=!!(s??i),x=(0,cl.useMemo)(()=>{if(m)return{start:Ea(m[0],y,!1),end:Ea(m[1],y,!1)}},[m,y]),D=(0,cl.useMemo)(()=>{if(t)return{start:Ea(t[0],y,!1),end:Ea(t[1],y,!1)}},[t,y]),_=(0,cl.useMemo)(()=>Ea(c??xo,y,!0),[c,y]),S=(0,cl.useMemo)(()=>Ea(u,y,!0),[u,y]),C=(0,cl.useMemo)(()=>r||a,[r,a]),k=(0,cl.useMemo)(()=>(f&&d&&console.error("An OpenmrsDateRangePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),f??(e=>d?.([Ei(e.start),Ei(e.end)]))),[f,d]);return(0,fd.jsx)(Eo,{locale:v.toString(),children:(0,fd.jsx)("div",{className:fp()("cds--form-item",e),children:(0,fd.jsx)(m$,{values:[[xr,v]],children:(0,fd.jsx)(En,{id:E?w:void 0,className:fp()("cds--date-picker",{"cds--date-picker--light":l,"cds--date-picker--disabled":o}),isInvalid:C,shouldForceLeadingZeros:"en"===v.language||void 0,maxValue:S,minValue:_,value:x,defaultValue:D,ref:g,isDisabled:o,...h,onChange:k,children:(0,fd.jsxs)("div",{className:"cds--date-picker-container",children:[E&&(0,fd.jsx)(wy,{className:fp()("cds--label",{"cds--label--disabled":o}),htmlFor:w,children:s??i}),(0,fd.jsxs)(br,{className:xv,children:[(0,fd.jsxs)("div",{className:fp()("-esm-cohort-builder__datepicker-module__inputsWrapper___UyGoG",{"-esm-cohort-builder__datepicker-module__inputsWrapperSm___qrGsA":"sm"===p,"-esm-cohort-builder__datepicker-module__inputsWrapperMd___pofu4":"md"===p||!p||0===p.length,"-esm-cohort-builder__datepicker-module__inputsWrapperLg___eF1Im":"lg"===p}),children:[(0,fd.jsx)(wt,{className:fp()("cds--date-picker-input__wrapper","-esm-cohort-builder__datepicker-module__startInput___C8vnM",xw),slot:"start",children:e=>(0,fd.jsx)(xN,{className:xb,segment:e})}),(0,fd.jsx)("div",{className:"-esm-cohort-builder__datepicker-module__separator___vHLFZ",children:(0,fd.jsx)("span",{"aria-hidden":"true","data-readonly":!0,children:"–"})}),(0,fd.jsx)(wt,{className:fp()("cds--date-picker-input__wrapper","-esm-cohort-builder__datepicker-module__endInput___25OF9",xw),slot:"end",children:e=>(0,fd.jsx)(xN,{className:xb,segment:e})})]}),(0,fd.jsx)(gu,{className:fp()(xx,{[x_]:"sm"===p,[xD]:"md"===p||!p||0===p.length,[xS]:"lg"===p}),children:(0,fd.jsx)(xO,{})})]}),(0,fd.jsx)(wp,{className:xE,children:n}),(0,fd.jsx)(xk,{variant:"range",today_:b,minDate:_,maxDate:S})]})})})})})}),xI=cu().createContext(null);function xM(e){let{children:t}=e,r=(0,cl.useContext)(xI),[n,o]=(0,cl.useState)(0),a=(0,cl.useMemo)(()=>({parent:r,modalCount:n,addModal(){o(e=>e+1),r&&r.addModal()},removeModal(){o(e=>e-1),r&&r.removeModal()}}),[r,n]);return cu().createElement(xI.Provider,{value:a},t)}function xL(e){let t,{modalProviderProps:r}={modalProviderProps:{"aria-hidden":!!(t=(0,cl.useContext)(xI))&&t.modalCount>0||void 0}};return cu().createElement("div",{"data-overlay-container":!0,...e,...r})}function xF(e){return cu().createElement(xM,null,cu().createElement(xL,e))}function xB(e){let t=mk(),{portalContainer:r=t?null:document.body,...n}=e,{getContainer:o}=wa();if(!e.portalContainer&&o&&(r=o()),cu().useEffect(()=>{if(null==r?void 0:r.closest("[data-overlay-container]"))throw Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.")},[r]),!r)return null;let a=cu().createElement(xF,n);return hO().createPortal(a,r)}let xU={},xV=0,xW=!1,xH=null,xz=null;function xK(e={}){let{delay:t=1500,closeDelay:r=500}=e,{isOpen:n,open:o,close:a}=w2(e),i=(0,cl.useMemo)(()=>`${++xV}`,[]),s=(0,cl.useRef)(null),l=(0,cl.useRef)(a),u=()=>{xU[i]=f},c=()=>{for(let e in xU)e!==i&&(xU[e](!0),delete xU[e])},d=()=>{s.current&&clearTimeout(s.current),s.current=null,c(),u(),xW=!0,o(),xH&&(clearTimeout(xH),xH=null),xz&&(clearTimeout(xz),xz=null)},f=e=>{e||r<=0?(s.current&&clearTimeout(s.current),s.current=null,l.current()):s.current||(s.current=setTimeout(()=>{s.current=null,l.current()},r)),xH&&(clearTimeout(xH),xH=null),xW&&(xz&&clearTimeout(xz),xz=setTimeout(()=>{delete xU[i],xz=null,xW=!1},Math.max(500,r)))};return(0,cl.useEffect)(()=>{l.current=a},[a]),(0,cl.useEffect)(()=>()=>{s.current&&clearTimeout(s.current),xU[i]&&delete xU[i]},[i]),{isOpen:n,open:e=>{e||!(t>0)||s.current?d():(c(),u(),n||xH||xW?n||d():xH=setTimeout(()=>{xH=null,xW=!0,d()},t))},close:f}}let xG=(0,cl.createContext)(null),xZ=(0,cl.createContext)(null);function xY(e){let t=xK(e),r=(0,cl.useRef)(null),{triggerProps:n,tooltipProps:o}=function(e,t,r){let{isDisabled:n,trigger:o}=e,a=mR(),i=(0,cl.useRef)(!1),s=(0,cl.useRef)(!1),l=()=>{(i.current||s.current)&&t.open(s.current)},u=e=>{i.current||s.current||t.close(e)};(0,cl.useEffect)(()=>{let e=e=>{r&&r.current&&"Escape"===e.key&&(e.stopPropagation(),t.close(!0))};if(t.isOpen)return document.addEventListener("keydown",e,!0),()=>{document.removeEventListener("keydown",e,!0)}},[r,t]);let c=()=>{s.current=!1,i.current=!1,u(!0)},{hoverProps:d}=go({isDisabled:n,onHoverStart:()=>{"focus"!==o&&("pointer"===hB?i.current=!0:i.current=!1,l())},onHoverEnd:()=>{"focus"!==o&&(s.current=!1,i.current=!1,u())}}),{focusableProps:f}=h9({isDisabled:n,onFocus:()=>{h0()&&(s.current=!0,l())},onBlur:()=>{s.current=!1,i.current=!1,u(!0)}},r);return{triggerProps:{"aria-describedby":t.isOpen?a:void 0,...mj(f,d,{onPointerDown:c,onKeyDown:c,tabIndex:void 0})},tooltipProps:{id:a}}}(e,t,r);return cu().createElement(m$,{values:[[xG,t],[xZ,{...o,triggerRef:r}]]},cu().createElement(h5,{...n,ref:r},e.children))}let xq=(0,cl.forwardRef)(function({UNSTABLE_portalContainer:e,...t},r){[t,r]=mL(t,r,xZ);let n=(0,cl.useContext)(xG),o=xK(t),a=null==t.isOpen&&null==t.defaultOpen&&n?n:o,i=w0(r,a.isOpen)||t.isExiting||!1;return a.isOpen||i?cu().createElement(xB,{portalContainer:e},cu().createElement(xJ,{...t,tooltipRef:r,isExiting:i})):null});function xJ(e){let t=(0,cl.useContext)(xG),r=(0,cl.useRef)(null),[n,o]=(0,cl.useState)(0);my(()=>{r.current&&t.isOpen&&o(r.current.getBoundingClientRect().width)},[t.isOpen,r]);let{overlayProps:a,arrowProps:i,placement:s}=wV({placement:e.placement||"top",targetRef:e.triggerRef,overlayRef:e.tooltipRef,offset:e.offset,crossOffset:e.crossOffset,isOpen:t.isOpen,arrowSize:n,arrowBoundaryOffset:e.arrowBoundaryOffset,shouldFlip:e.shouldFlip,onClose:()=>t.close(!0)}),l=wQ(e.tooltipRef,!!s)||e.isEntering||!1,u=mI({...e,defaultClassName:"react-aria-Tooltip",values:{placement:s,isEntering:l,isExiting:e.isExiting,state:t}}),{tooltipProps:c}=function(e,t){let r=mY(e,{labelable:!0}),{hoverProps:n}=go({onHoverStart:()=>null==t?void 0:t.open(!0),onHoverEnd:()=>null==t?void 0:t.close()});return{tooltipProps:mj(r,n,{role:"tooltip"})}}(e=mj(e,a),t);return cu().createElement("div",{...c,ref:e.tooltipRef,...u,style:{...a.style,...u.style},"data-placement":null!=s?s:void 0,"data-entering":l||void 0,"data-exiting":e.isExiting||void 0},cu().createElement(wv.Provider,{value:{...i,placement:s,ref:r}},u.children))}let xX=({diagnoses:e,showCertainty:t=!1})=>{let{diagnosisTags:r}=du({externalModuleName:"@openmrs/esm-styleguide"});return(0,fd.jsx)("div",{className:"-esm-cohort-builder__diagnosis-tags-module__container___l7XiW",children:e.map(e=>{let n=t&&"PROVISIONAL"===e.certainty,o=1===e.rank?r?.primaryColor??"blue":r?.secondaryColor??"gray";return(0,fd.jsx)(xQ,{color:o,isProvisional:n,name:e.display},e.uuid)})})};function xQ({color:e,isProvisional:t,name:r}){let[n,o]=(0,cl.useState)(!1),[a,i]=(0,cl.useState)(!1),[s,l]=(0,cl.useState)(!1),u=s||a,c=(0,cl.useRef)(null);(0,cl.useLayoutEffect)(()=>{let e=c.current;if(!e)return;let t=()=>{let t=e.scrollWidth>e.clientWidth;l(t),t||o(!1)};t();let r=new ResizeObserver(t);return r.observe(e),()=>r.disconnect()},[r,t,u]);let d=fp()("cds--tag","cds--tag--md","cds--layout--size-md",`cds--tag--${e}`,"-esm-cohort-builder__diagnosis-tags-module__diagnosisTag___ZEczs"),f=(0,fd.jsxs)(fd.Fragment,{children:[t&&(0,fd.jsxs)(fd.Fragment,{children:[(0,fd.jsx)("span",{"aria-hidden":"true",className:"-esm-cohort-builder__diagnosis-tags-module__provisionalMark___nSkIq",children:"?"}),(0,fd.jsxs)("span",{className:"cds--visually-hidden",children:[iz("provisional","Provisional")," "]})]}),(0,fd.jsx)("span",{ref:c,className:"cds--tag__label",children:r})]});return u?(0,fd.jsxs)(xY,{delay:0,closeDelay:150,isOpen:n,onOpenChange:o,children:[(0,fd.jsx)(gu,{className:d,"data-testid":"diagnosis-tag",onFocusChange:i,onPress:()=>o(!0),children:f}),(0,fd.jsx)(xq,{className:"-esm-cohort-builder__diagnosis-tags-module__tagTooltip___5ARni",placement:"bottom",offset:4,containerPadding:8,children:r})]}):(0,fd.jsx)("span",{className:d,"data-testid":"diagnosis-tag",children:f})}let x0={action:"-esm-cohort-builder__empty-card-module__action___l4wUo",content:"-esm-cohort-builder__empty-card-module__content___XbsSJ",desktopHeading:"-esm-cohort-builder__empty-card-module__desktopHeading___0EPXX",tabletHeading:"-esm-cohort-builder__empty-card-module__tabletHeading___unl1F",tile:"-esm-cohort-builder__empty-card-module__tile___vS3Sj"},x1=({width:e="64",height:t="64"})=>(0,fd.jsx)("svg",{width:e,height:t,viewBox:"0 0 64 64",children:(0,fd.jsx)("use",{href:"#omrs-empty-data-illustration"})}),x2=e=>{let t="tablet"===dI(),r=e.launchForm;return(0,fd.jsx)(fv.Layer,{className:x0.layer,children:(0,fd.jsxs)(fv.Tile,{className:x0.tile,children:[(0,fd.jsx)("div",{className:t?x0.tabletHeading:x0.desktopHeading,children:(0,fd.jsx)("h4",{children:e.headerTitle})}),(0,fd.jsx)(x1,{}),(0,fd.jsx)("p",{className:x0.content,children:iz("emptyStateText","There are no {{displayText}} to display",{displayText:e.displayText})}),(0,fd.jsx)("p",{className:x0.action,children:r&&(0,fd.jsx)(fv.Button,{onClick:()=>r(),kind:"ghost",size:t?"lg":"sm",children:iz("recordNewEntry","Record {{ displayText }}",{displayText:e.displayText})})})]})})},x4=({error:e,headerTitle:t})=>{let r="tablet"===dI();return(0,fd.jsx)(fv.Layer,{children:(0,fd.jsxs)(fv.Tile,{className:"-esm-cohort-builder__error-state-module__tile___hHM56",children:[(0,fd.jsx)("div",{className:r?"-esm-cohort-builder__error-state-module__tabletHeading___W7a4U":"-esm-cohort-builder__error-state-module__desktopHeading___VL8Rv",children:(0,fd.jsx)("h4",{children:t})}),(0,fd.jsxs)("p",{className:"-esm-cohort-builder__error-state-module__errorMessage___IytZy",children:[iz("error","Error")," ",`${e?.response?.status}: `,e?.response?.statusText]}),(0,fd.jsx)("p",{className:"-esm-cohort-builder__error-state-module__errorCopy___E1yZO",children:iz("errorCopy")})]})})},x3=x4,x6=cu().forwardRef((e,t)=>{let{slotName:r,basePath:n,componentContext:o,state:a}=dF(),i=window.location??{pathname:""},s=cD(r??"");return e.isChildOfHeader&&r&&s.length>0?(0,fd.jsxs)(fv.SideNav,{"aria-label":iz("leftNavigation","Left navigation"),className:"-esm-cohort-builder__left-nav-module__leftNav___ZqLpw",expanded:!0,isFixedNav:!0,ref:t,...e,children:[(0,fd.jsx)(cC,{name:"global-nav-menu-slot"}),r?(0,fd.jsx)(c9,{value:o,fallback:(0,fd.jsx)(cC,{name:r,state:{basePath:n,currentPath:i,...a}}),children:(0,fd.jsx)(cc.Provider,{value:o,children:(0,fd.jsx)(cC,{name:r,state:{basePath:n,currentPath:i,...a}})})}):null]}):null}),x5=({selectedLocationUuid:e,defaultLocationUuid:t,locationTag:r,locationsPerRequest:n=50,onChange:o})=>{let[a,i]=(0,cl.useState)(""),s=(0,cl.useId)(),{location:l}=function(e){let t=e?`/ws/fhir2/R4/Location?_id=${e}`:null,{data:r,error:n,isLoading:o}=dp()(t,i8,{shouldRetryOnError:e=>!!e?.response?.status&&e.response.status>=500});return(0,cl.useMemo)(()=>({location:r?.data?.entry?r.data.entry[0]:null,error:t?n:null,isLoading:!!t&&o}),[r,o,n,t])}(t),{locations:u,isLoading:c,hasMore:d,loadingNewData:f,error:p,setPage:m}=function(e,t=0,r=""){let n=dd(r),{data:o,isLoading:a,isValidating:i,setSize:s,error:l}=dP()(function(r,o){if(o){let e=o.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 a=`${i6}/Location?`,i=new URLSearchParams;return i.append("_summary","data"),t&&i.append("_count",""+t),r&&i.append("_getpagesoffset",""+r*t),e&&i.append("_tag",e),"string"==typeof n&&""!==n&&i.append("name:contains",n),a+i.toString()},i8);return(0,cl.useMemo)(()=>({locations:o?.length?o?.flatMap(e=>e?.data?.entry??[]):[],isLoading:a,totalResults:o?.[0]?.data?.total,hasMore:!!o?.length&&o?.[o.length-1]?.data?.link?.some(e=>"next"===e.relation),loadingNewData:i,error:l||null,setPage:s}),[a,o,i,s,l])}(r,n,a),h=(0,cl.useMemo)(()=>l&&!a&&t?[l,...u.filter(({resource:e})=>e.id!==t)]:u??[],[l,u,t,a]),g=(0,cl.useCallback)(e=>{o(),i(e.trim())},[o]),y=dW((0,cl.useCallback)(()=>{!f&&d&&m(e=>e+1)},[f,d,m])),v=d?Math.max(0,Math.floor(h.length-n/2)):-1;return(0,fd.jsxs)(fd.Fragment,{children:[(0,fd.jsx)(fv.Search,{"aria-describedby":p?`${s}-error`:void 0,labelText:iz("searchForLocation"),id:s,placeholder:iz("searchForLocation"),onChange:e=>g(e.target.value),size:"lg"}),p&&(0,fd.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__errorNotification___MBWvf",id:`${s}-error`,children:(0,fd.jsx)(fv.InlineNotification,{kind:"error",subtitle:iz("errorLoadingLoginLocations","Unable to load login locations. Please try again or contact support if the problem persists."),title:iz("error","Error")})}),(0,fd.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__searchResults___aCL93",children:c?(0,fd.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__loadingContainer___Vn1H0",children:Array.from({length:5}).map((e,t)=>(0,fd.jsx)(fv.RadioButtonSkeleton,{className:"-esm-cohort-builder__location-picker-module__radioButtonSkeleton___RKMHj",role:"progressbar"},t))}):(0,fd.jsxs)(fd.Fragment,{children:[(0,fd.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__locationResultsContainer___5yuvs",children:h.length>0?(0,fd.jsx)(fv.RadioButtonGroup,{name:"loginLocations",onChange:e=>{o(e?.toString())},orientation:"vertical",valueSelected:e,children:h.map((e,t)=>(0,fd.jsx)(fv.RadioButton,{className:"-esm-cohort-builder__location-picker-module__locationRadioButton___b52LI",id:e.resource.id,labelText:(0,fd.jsx)("span",{ref:t===v?y:null,children:e.resource.name}),name:e.resource.name,value:e.resource.id},e.resource.id))}):(0,fd.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__emptyState___qiPqQ",children:(0,fd.jsx)("p",{className:"-esm-cohort-builder__location-picker-module__locationNotFound___tKDOJ",children:iz("noResultsToDisplay")})})}),f&&(0,fd.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__loadingIcon___PGwvc",children:(0,fd.jsx)(fv.InlineLoading,{description:iz("loading")})})]})})]})},x9=B("modalState",{modalContainer:null,modalStack:[]}),x8=0;async function x7(e,t,r={}){let n=u2(t),o=null;if(e){if(!n)throw Error(`No modal named '${t}' has been registered.`);let{load:a}=n,i=await a(),s=x8++;o=await co({...i,name:`${t}-${s}`},{...r,domElement:e})}else k(`Failed to launch modal. Please notify your administrator. Modal name: ${t}`);return o}function De(e){return"TO_BE_DELETED"===e.state||"DELETED"===e.state}function Dt(e,t){t?.unmount&&(t.unmountPromise?.catch(()=>{}),t.unmount().catch(t=>{console.error(`The modal '${e}' failed to unmount`,t)}))}function Dr(e){return e.find(e=>!De(e))}function Dn(e,t){e.container&&(e.container.style.visibility=t?"unset":"hidden")}let Do=window.getComputedStyle(document.body).overflow;function Da({modalStack:e,modalContainer:t}){if(t)if(e.length){t.style.visibility||(addEventListener("keydown",Ds),document.body.style.overflow="hidden",t.style.visibility="unset");let r=Dr(e);e.forEach(e=>{switch(e.state){case"NEW":{let r=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=r,e.state="MOUNTING",x7(r,e.modalName,e.props).then(n=>{De(e)?Dt(e.modalName,n):n?(e.parcel=n,t.prepend(r),Dn(e,Dr(x9.getState().modalStack)===e),n.mountPromise.then(()=>{De(e)||(e.state="MOUNTED")},t=>{k(t),e.parcel=null,Di(e)})):Di(e)},t=>{k(t),Di(e)});break}case"MOUNTING":case"MOUNTED":Dn(e,e===r);break;case"TO_BE_DELETED":e.state="DELETED",e.onClose(),Dt(e.modalName,e.parcel),e.container?.remove(),setTimeout(()=>{let t=x9.getState();x9.setState({...t,modalStack:t.modalStack.filter(t=>t!==e)})},0)}})}else t.style.removeProperty("visibility"),document.body.style.overflow=Do,removeEventListener("keydown",Ds)}function Di(e){if(De(e))return;e.state="TO_BE_DELETED";let t=x9.getState();x9.setState({...t,modalStack:[...t.modalStack]})}function Ds(e){"Escape"===e.key&&function(){let[e]=x9.getState().modalStack;e&&Di(e)}()}function Dl(e){x9.subscribe(Da),x9.setState({...x9.getState(),modalContainer:e})}function Du(e,t={},r=()=>{}){let n=()=>{let e=x9.getState().modalStack.find(e=>e.onClose===r);e&&Di(e)};if(u2(e)){var o;let a,i;o={state:"NEW",onClose:r,modalName:e,props:{close:n,...t}},i=[o,...(a=x9.getState()).modalStack],x9.setState({...a,modalStack:i})}else k(`Failed to launch modal. Please notify your administrator. Modal name: "${e}"`);return n}var Dc=Object.prototype.hasOwnProperty;let Dd=function(e){if(null==e)return!0;if(to(e)&&(tr(e)||"string"==typeof e||"function"==typeof e.splice||tl(e)||ty(e)||tt(e)))return!e.length;var t=rg(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(e6(e))return!t5(e).length;for(var r in e)if(Dc.call(e,r))return!1;return!0},Df=({notification:e})=>{let{description:t,action:r,kind:n,critical:o,title:a,onAction:i}=e;return(0,fd.jsx)(fv.ActionableNotification,{actionButtonLabel:r,kind:n||"info",lowContrast:o,subtitle:t,title:a||"",inline:!0,onActionButtonClick:i})},Dp=({subject:e})=>{let[t,r]=(0,cl.useState)([]);return(0,cl.useEffect)(()=>{let t=e.subscribe(e=>r(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,fd.jsx)(fd.Fragment,{children:t.map(e=>(0,fd.jsx)(Df,{notification:e},e.id))})},Dm=({notification:e})=>{let{actionButtonLabel:t,onActionButtonClick:r=()=>{},subtitle:n,kind:o,title:a,critical:i,progressActionLabel:s,id:l,...u}=e,[c,d]=(0,cl.useState)(t);return(0,fd.jsx)(fv.ActionableNotification,{kind:o||"info",actionButtonLabel:c,ariaLabel:iz("closesActionableNotification","Closes actionable notification"),onActionButtonClick:()=>{r(),s&&d(s)},statusIconDescription:iz("actionableNotification","Actionable notification"),subtitle:n,title:a,lowContrast:i,inline:!0,...u})},Dh=({subject:e})=>{let[t,r]=(0,cl.useState)([]);return(0,cl.useEffect)(()=>{let t=e.subscribe(e=>r(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,fd.jsx)(fd.Fragment,{children:t.map(e=>(0,fd.jsx)(Dm,{notification:e},e.id))})};class Dg{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,r){t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(this,"listeners",new Set)}}let Dy=new Dg,Dv=0,Db=new Dg,Dw=0;function DE(e){e&&(0,ck.createRoot)(e).render((0,fd.jsx)(Dp,{subject:Dy}))}function Dx(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&(t instanceof Error||!Dd(t)))?(e.description instanceof Error&&(e.description=e.description.toLocaleString()),setTimeout(()=>{Dy.next({...e,id:Dv++})},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function DD(e){e&&(0,ck.createRoot)(e).render((0,fd.jsx)(Dh,{subject:Db}))}function D_(e){var t;e&&("string"==typeof(t=e.actionButtonLabel)?t.trim().length>0:"object"==typeof t&&!Dd(t))?setTimeout(()=>{Db.next({...e,id:Dw++})},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}let DS=["NORMAL","HIGH","CRITICALLY_HIGH","OFF_SCALE_HIGH","LOW","CRITICALLY_LOW","OFF_SCALE_LOW"],DC=["critically_low","critically_high","high","low","normal","off_scale_low","off_scale_high"],Dk={container:"-esm-cohort-builder__numeric-observation-module__container___+Kqi9",card:"-esm-cohort-builder__numeric-observation-module__card___Q-ECG","abnormal-value":"-esm-cohort-builder__numeric-observation-module__abnormal-value___bx1h9","critical-value":"-esm-cohort-builder__numeric-observation-module__critical-value___nSKSX",cell:"-esm-cohort-builder__numeric-observation-module__cell___wc90e","critically-high":"-esm-cohort-builder__numeric-observation-module__critically-high___fmZfJ","critically-low":"-esm-cohort-builder__numeric-observation-module__critically-low___h9797",high:"-esm-cohort-builder__numeric-observation-module__high___0-YpP",low:"-esm-cohort-builder__numeric-observation-module__low___TuqAk","label-container":"-esm-cohort-builder__numeric-observation-module__label-container___FtozC","value-container":"-esm-cohort-builder__numeric-observation-module__value-container___R9qoY",label:"-esm-cohort-builder__numeric-observation-module__label___0DGA5",value:"-esm-cohort-builder__numeric-observation-module__value___ohqoh",units:"-esm-cohort-builder__numeric-observation-module__units___xvMd3","pad-right":"-esm-cohort-builder__numeric-observation-module__pad-right___umcen","off-scale-low":"-esm-cohort-builder__numeric-observation-module__off-scale-low___my+0i","off-scale-high":"-esm-cohort-builder__numeric-observation-module__off-scale-high___so9dv",arrow:"-esm-cohort-builder__numeric-observation-module__arrow___Agoh9"},DP=({value:e,unit:t,label:r,interpretation:n,referenceRange:o,conceptUuid:a,variant:i="card",patientUuid:s})=>{let l=(0,cl.useId)(),{referenceRange:u,isLoading:c}=function(e,t){let r=null;e&&(r=t?`${i3}/conceptreferencerange/?patient=${t}&concept=${e}&v=full`:`${i3}/conceptreferencerange/?concept=${e}&v=full`);let{data:n,error:o,isLoading:a}=dp()(r,i8),i=n?.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:o,isLoading:a}}(o||n?void 0:a,s),d=o??u,f=(0,cl.useMemo)(()=>{if(n)return n?"--"===n?"normal":DS.includes(n)?n.toLowerCase():DC.includes(n)?n:"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"},[n,d,e,c])??"normal",p="critically_low"===f||"critically_high"===f||"off_scale_low"===f||"off_scale_high"===f,m="normal"!==f,h=r?`omrs-numeric-obs-label-${r.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:iz("notAvailable","Not available"),w=fp()({[Dk["critically-low"]]:"critically_low"===f||"off_scale_low"===f,[Dk["critically-high"]]:"critically_high"===f||"off_scale_high"===f,[Dk.low]:"low"===f,[Dk.high]:"high"===f,[Dk["off-scale-low"]]:"off_scale_low"===f,[Dk["off-scale-high"]]:"off_scale_high"===f}),E=fp()({[Dk.container]:!0,[Dk.card]:!0,[Dk["critical-value"]]:p,[Dk["abnormal-value"]]:m&&!p}),x=fp()({[Dk.cell]:!0,[w]:!0});return"cell"===i?(0,fd.jsxs)("div",{className:x,children:[b,v&&t?` ${t}`:""]}):(0,fd.jsxs)("section",{className:E,"data-testid":"numeric-observation-card",children:[r&&(0,fd.jsxs)("div",{className:Dk["label-container"],children:[(0,fd.jsx)("span",{id:h,className:Dk.label,children:r}),m&&(0,fd.jsx)("span",{className:Dk[f.replace("_","-")],title:iz("abnormalValue","Abnormal value")})]}),(0,fd.jsxs)("div",{className:Dk["value-container"],children:[(0,fd.jsx)("span",{id:g,"aria-labelledby":h&&y?`${h} ${y}`:h||y||void 0,className:Dk.value,children:b}),v&&t&&(0,fd.jsx)("span",{id:y,className:Dk.units,children:t})]})]})},DO="-esm-cohort-builder__page-header-module__pageHeader___XNJYe",DR=e=>{if("children"in e){let{children:t,className:r,...n}=e;return(0,fd.jsx)("div",{className:fp()(DO,r),...n,children:t})}{let{title:t,illustration:r,className:n,...o}=e;return(0,fd.jsx)("div",{className:fp()(DO,n),...o,children:(0,fd.jsx)(DT,{title:t,illustration:r})})}},DT=({title:e,illustration:t,className:r})=>{let[n,o]=(0,cl.useState)(null);return(0,cl.useEffect)(()=>{nY("@openmrs/esm-styleguide").then(e=>{o(e)})},[]),(0,fd.jsxs)("div",{className:fp()("-esm-cohort-builder__page-header-module__pageHeaderContent___V-mTz",r),children:[t,(0,fd.jsxs)("div",{className:"-esm-cohort-builder__page-header-module__pageLabels___vGJvg",children:[n?.implementationName&&(0,fd.jsx)("p",{children:iz(n.implementationName)}),(0,fd.jsx)("h1",{className:"-esm-cohort-builder__page-header-module__pageName___+eYMc",children:e})]})]})},DN=({totalItems:e,pageSize:t,onPageNumberChange:r,pageNumber:n,dashboardLinkUrl:o,currentItems:a,dashboardLinkLabel:i})=>{let{pageSizes:s,pageItemsCount:l}=dK(t,e,n,a),u="tablet"===dI(),c=iz("paginationItemsCount","{{pageItemsCount}} / {{totalItems}} items",{totalItems:e,pageItemsCount:l});return(0,fd.jsx)(fd.Fragment,{children:e>0&&(0,fd.jsxs)("div",{className:fp()({"-esm-cohort-builder__pagination-module__tablet___DdaYk":u,"-esm-cohort-builder__pagination-module__desktop___rSwlo":!u}),children:[(0,fd.jsxs)("div",{children:[c,o&&(0,fd.jsx)(cd,{to:o,className:"-esm-cohort-builder__pagination-module__configurableLink___cTCLf",children:i??iz("seeAll","See all")})]}),(0,fd.jsx)(fv.Pagination,{className:"-esm-cohort-builder__pagination-module__pagination___U6anZ",page:n,pageSize:t,pageSizes:s,totalItems:e,onChange:r,pageRangeText:(e,t)=>iz("paginationOfPages","of {{count}} pages",{count:t}),size:u?"lg":"sm"})]})})};function Dj(e){return D$(DM(e,"usual","official"))}function DA(e){return Dj(e)}function D$(e){var t;let r;return e?e.text??(r=(t=e).given??[],(t.family?r.concat(t.family):r).join(" ")):""}function DI(e){return D$(e)}function DM(e,...t){for(let r of(0==t.length&&(t=["usual"]),t)){let t=e.name?.find(e=>{var t,n;return t=e,n=r,t.use?t.use===n:"usual"===n});if(t)return t}}function DL(e,t=dQ()){let r=dQ(t),n=E6(e,r);if(null==n)return null;let o=r.diff(n,"hours"),a=r.diff(n,"days"),i=r.diff(n,"weeks"),s=r.diff(n,"months"),l=r.diff(n,"years"),u={};if(o<2)u.minutes=r.diff(n,"minutes");else if(a<2)u.hours=o;else if(i<4)u.days=a;else if(l<1){let e=r.subtract(i,"weeks").diff(n,"days");u.weeks=i,u.days=e}else if(l<2){let e=r.subtract(s,"months").diff(n,"days");u.months=s,u.days=e}else if(l<18){let e=r.subtract(l,"year").diff(n,"months");u.years=l,u.months=e}else u.years=l;return u}function DF(e,t=dQ()){let r=DL(e,t);if(null==r)return null;let n={style:"short",localeMatcher:"lookup"};return"minutes"in r&&0===r.minutes&&(n.minutesDisplay="always"),E3(r,n)}let DB={container:"-esm-cohort-builder__patient-banner-patient-info-module__container___WV40g",activePatientContainer:"-esm-cohort-builder__patient-banner-patient-info-module__activePatientContainer___YBgYK",patientBanner:"-esm-cohort-builder__patient-banner-patient-info-module__patientBanner___o-DQc",patientName:"-esm-cohort-builder__patient-banner-patient-info-module__patientName___KWLAJ",patientAvatar:"-esm-cohort-builder__patient-banner-patient-info-module__patientAvatar___gG4I3",patientAvatarButton:"-esm-cohort-builder__patient-banner-patient-info-module__patientAvatarButton___by4L9",patientInfo:"-esm-cohort-builder__patient-banner-patient-info-module__patientInfo___VU1fL",demographics:"-esm-cohort-builder__patient-banner-patient-info-module__demographics___xDHsd",row:"-esm-cohort-builder__patient-banner-patient-info-module__row___MlVwp",flexRow:"-esm-cohort-builder__patient-banner-patient-info-module__flexRow___9Aj3s",tagsSlot:"-esm-cohort-builder__patient-banner-patient-info-module__tagsSlot___PqCHJ",identifiers:"-esm-cohort-builder__patient-banner-patient-info-module__identifiers___bbREn",identifier:"-esm-cohort-builder__patient-banner-patient-info-module__identifier___HQzz8",primaryIdentifier:"-esm-cohort-builder__patient-banner-patient-info-module__primaryIdentifier___ocKCs",secondaryIdentifier:"-esm-cohort-builder__patient-banner-patient-info-module__secondaryIdentifier___4MLDH",value:"-esm-cohort-builder__patient-banner-patient-info-module__value___tkQTC",tag:"-esm-cohort-builder__patient-banner-patient-info-module__tag___u7Kco",gender:"-esm-cohort-builder__patient-banner-patient-info-module__gender___7eQuO",separator:"-esm-cohort-builder__patient-banner-patient-info-module__separator___CZBA8",tooltipPadding:"-esm-cohort-builder__patient-banner-patient-info-module__tooltipPadding___UQr5s",tooltipSmallText:"-esm-cohort-builder__patient-banner-patient-info-module__tooltipSmallText___MRUhY",actionsButtonText:"-esm-cohort-builder__patient-banner-patient-info-module__actionsButtonText___8ZC1R"};function DU({showIdentifierLabel:e,type:t,value:r}){return(0,fd.jsx)("span",{className:DB.primaryIdentifier,children:(0,fd.jsxs)(fv.Tag,{className:DB.tag,type:"gray",children:[e&&t?.text&&(0,fd.jsxs)("span",{className:DB.label,children:[t.text,": "]}),(0,fd.jsx)("span",{className:DB.value,children:r})]})})}function DV({showIdentifierLabel:e,type:t,value:r}){return(0,fd.jsxs)(fv.FormLabel,{className:DB.secondaryIdentifier,id:`patient-banner-identifier-${r}`,children:[e&&(0,fd.jsxs)("span",{className:DB.label,children:[t?.text,": "]}),(0,fd.jsx)("span",{className:DB.value,children:r})]})}function DW({identifiers:e,showIdentifierLabel:t}){let{excludePatientIdentifierCodeTypes:r}=du(),{primaryIdentifierCode:n}=dY(),o=e?.filter(e=>{let t=e.type?.coding?.[0]?.code;return t&&!r?.uuids.includes(t)})??[];return(0,fd.jsx)(fd.Fragment,{children:o?.length?o.map(({value:e,type:r},a)=>(0,fd.jsxs)(cu().Fragment,{children:[(0,fd.jsx)("span",{className:DB.identifier,children:r?.coding?.[0]?.code===n?(0,fd.jsx)(DU,{showIdentifierLabel:t,type:r,value:e}):(0,fd.jsx)(DV,{showIdentifierLabel:t,type:r,value:e})}),a<o.length-1&&(0,fd.jsx)("span",{className:DB.separator,children:"\xb7"})]},e)):""})}let DH={Female:pc,Male:pd,Other:pf,Unknown:pp},Dz=({gender:e})=>{let t=DH[e];return t?(0,fd.jsx)(t,{fill:"#525252"}):null},DK={male:"Male",female:"Female",other:"Other",unknown:"Unknown"};function DG({patient:e,renderedFrom:t}){var r;let n,o,a=Dj(e),i=e?.gender&&(o=DK[n=(r=e.gender).toLowerCase()]??"Unknown",{displayText:iz(n,r),iconKey:o}),s=(0,cl.useMemo)(()=>({patientUuid:e.id,patient:e,renderedFrom:t}),[e.id,e,t]);return(0,fd.jsxs)("div",{className:DB.patientInfo,children:[(0,fd.jsx)("div",{className:fp()(DB.row,DB.patientNameRow),children:(0,fd.jsxs)("div",{className:DB.flexRow,children:[(0,fd.jsx)("span",{className:DB.patientName,children:a}),i&&(0,fd.jsxs)("div",{className:DB.gender,children:[(0,fd.jsx)(Dz,{gender:i.iconKey}),(0,fd.jsx)("span",{children:i.displayText})]}),(0,fd.jsx)(cC,{className:DB.tagsSlot,name:"patient-banner-tags-slot",state:s})]})}),(0,fd.jsxs)("div",{className:DB.demographics,children:[e.birthDate&&(0,fd.jsxs)(fd.Fragment,{children:[(0,fd.jsx)("span",{children:DF(e.birthDate)}),(0,fd.jsx)("span",{className:DB.separator,children:"\xb7"}),(0,fd.jsx)("span",{children:EX(e.birthDate,{time:!1})}),(0,fd.jsx)("span",{className:DB.separator,children:"\xb7"})]}),(0,fd.jsx)(DW,{identifiers:e.identifier,showIdentifierLabel:!0}),(0,fd.jsx)(cC,{className:DB.extensionSlot,name:"patient-banner-bottom-slot",state:s})]})]})}var DZ=r(1673);function DY({patient:e,patientUuid:t,actionsSlotName:r,additionalActionsSlotState:n}){let[o,a]=(0,cl.useState)(!1),{extensions:i}=c_(r),s="tablet"===dI(),l=dV(()=>a(!1),o),u=(0,cl.useRef)(null),c=(0,cl.useRef)(null),d=(0,cl.useId)(),f=`patient-actions-menu-trigger-${d}`,p=`patient-actions-menu-${d}`,m=(0,cl.useCallback)(()=>a(e=>!e),[]),h=(0,cl.useCallback)(()=>{a(!1),u.current?.focus()},[]),g=(0,cl.useCallback)(e=>{if("Escape"===e.key&&o){e.stopPropagation(),h();return}if(("ArrowDown"===e.key||"ArrowUp"===e.key)&&o){e.preventDefault();let t=c.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!t?.length)return;let r=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,n=Array.from(t).indexOf(r);if(-1===n)return void t["ArrowDown"===e.key?0:t.length-1]?.focus();let o=n+("ArrowDown"===e.key?1:-1),a=o<0?t.length-1:o>=t.length?0:o;t[a]?.focus()}},[h,o]);(0,cl.useEffect)(()=>{if(o&&c.current){let e=c.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[o]);let y=(0,cl.useMemo)(()=>({patientUuid:t,patient:e,closeMenu:h,...n}),[t,e,h,n]);return 0===i.length?null:(0,fd.jsx)("div",{className:"-esm-cohort-builder__patient-banner-actions-menu-module__overflowMenuContainer___7eCLh",children:(0,fd.jsxs)("div",{"data-overflow-menu":!0,className:fp()("cds--overflow-menu",fE),ref:l,children:[(0,fd.jsxs)("button",{className:fp()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":o},f_),"aria-controls":p,"aria-expanded":o,"aria-haspopup":"true",id:f,onClick:m,onKeyDown:g,ref:u,children:[(0,fd.jsx)("span",{className:"-esm-cohort-builder__patient-banner-actions-menu-module__actionsButtonText___TbM5a",children:iz("actions","Actions")})," ",(0,fd.jsx)(DZ.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}})]}),(0,fd.jsxs)("div",{className:fp()("cds--overflow-menu-options","cds--overflow-menu--flip",fx,{[fD]:o}),"aria-labelledby":f,"data-floating-menu-direction":"bottom",id:p,onKeyDown:g,ref:c,role:"menu",tabIndex:-1,children:[(0,fd.jsx)("ul",{className:fp()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":s}),children:(0,fd.jsx)(cC,{name:r,state:y},r)}),(0,fd.jsx)("span",{})]})]})})}var Dq=r(6767),DJ=r.n(Dq);function DX(e){let{patientPhotoConceptUuid:t}=du({externalModuleName:"@openmrs/esm-styleguide"}),r=t?`${i3}/obs?patient=${e}&concept=${t}&v=full`:null,{data:n,error:o,isLoading:a}=cW()(e?r:null,i8),i=n?.data?.results[0];return{data:i?{dateTime:i?.obsDatetime,imageSrc:i?.value?.links?.uri}:null,error:o,isLoading:a}}let DQ=({width:e=56,height:t=56,"aria-label":r})=>{let{t:n}=(0,cU.useTranslation)();return(0,fd.jsxs)("svg",{"aria-label":r??n("patientPhotoPlaceholder","Patient photo placeholder"),width:e,height:t,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,fd.jsx)("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),(0,fd.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"})]})},D0="-esm-cohort-builder__patient-photo-module__avatar___R93LX";function D1({patientUuid:e,patientName:t,alt:r}){let{data:n,isLoading:o}=DX(e),[a,i]=(0,cl.useState)(null),[s,l]=(0,cl.useState)(!1),u=(0,cl.useMemo)(()=>DJ().generate(e),[e]);(0,cl.useEffect)(()=>{if(n?.imageSrc){let e=new URL(n.imageSrc,window.location.origin).pathname;l(!0);let t=!1,r=new Image;return r.onload=()=>{t||(i(e),l(!1))},r.onerror=()=>{t||(i(null),l(!1))},r.src=e,()=>{t=!0}}i(null),l(!1)},[n?.imageSrc]);let c=(0,cl.useMemo)(()=>r||(a?iz("patientPhotoAlt","Profile photo of {{patientName}}",{patientName:t}):iz("patientAvatarAlt","Avatar for {{patientName}}",{patientName:t})),[r,a,t]);return o||s?(0,fd.jsx)(fv.SkeletonIcon,{className:"-esm-cohort-builder__patient-photo-module__skeleton___I-6iq","data-testid":"skeleton-icon"}):n?.imageSrc&&!a?(0,fd.jsx)(DQ,{"aria-label":iz("patientPhotoPlaceholder","Photo placeholder for {{patientName}}",{patientName:t})}):a?(0,fd.jsx)("div",{"aria-label":c,children:(0,fd.jsx)("img",{className:D0,src:a,alt:c,title:t})}):(0,fd.jsx)("div",{"aria-label":c,children:(0,fd.jsx)("div",{className:D0,title:t,style:{backgroundImage:u.toDataUrl(),backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:(0,fd.jsx)("span",{className:"-esm-cohort-builder__patient-photo-module__initials___JnUBD",children:function(e,t=3){return e.split(/\s+/).filter(Boolean).slice(0,t).map(e=>e[0]).join("")}(t)})})})}let D2=["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"],D4=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-appointments",pictogramProps:e})})),D3=D4,D6=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-assessment-1",pictogramProps:e})})),D5=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-assessment-2",pictogramProps:e})})),D9=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-blood-bank",pictogramProps:e})})),D8=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-cardiology",pictogramProps:e})})),D7=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-cohorts",pictogramProps:e})})),_e=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-concept-dictionary",pictogramProps:e})})),_t=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-ct-scan",pictogramProps:e})})),_r=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-data-entry",pictogramProps:e})})),_n=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-dentistry",pictogramProps:e})})),_o=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-digital-trust",pictogramProps:e})})),_a=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-emergency-department",pictogramProps:e})})),_i=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-facility",pictogramProps:e})})),_s=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-geriatrics",pictogramProps:e})})),_l=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-gynaecology",pictogramProps:e})})),_u=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),_c=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),_d=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-labs-2",pictogramProps:e})})),_f=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-metadata-export",pictogramProps:e})})),_p=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-obstetrics",pictogramProps:e})})),_m=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-patient-documents",pictogramProps:e})})),_h=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-patient-search",pictogramProps:e})})),_g=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-patients",pictogramProps:e})})),_y=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-payments-desk",pictogramProps:e})})),_v=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),_b=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-pharmacy-2",pictogramProps:e})})),_w=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-registration",pictogramProps:e})})),_E=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-reports",pictogramProps:e})})),_x=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),_D=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),__=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-system-administration",pictogramProps:e})})),_S=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-transfer",pictogramProps:e})})),_C=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-triage",pictogramProps:e})})),_k=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-x-ray",pictogramProps:e})})),_P=_i,_O=_g,_R=(0,cl.memo)((0,cl.forwardRef)(function({pictogram:e,fallback:t,...r},n){let o=(0,cl.useRef)(document.getElementById(e));return(0,cl.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),r=new MutationObserver(t=>{for(let r of t)"childList"===r.type&&(o.current=document.getElementById(e))});return t&&r.observe(t,{childList:!0}),()=>r.disconnect()},[e]),(0,fd.jsx)(c9,{value:o.current,fallback:t,children:(0,fd.jsx)(_T,{ref:n,pictogram:e,pictogramProps:r})})})),_T=(0,cl.memo)((0,cl.forwardRef)(function({pictogram:e,pictogramProps:t},r){let{className:n,size:o}=Object.assign({},{size:92},t);return(o<=26||o>144)&&(console.error(`Invalid size '${o}' specified for ${e}. Defaulting to 92.`),o=92),(0,fd.jsx)("svg",{ref:r,className:fp()("-esm-cohort-builder__pictograms-module__pictogram___LTPzD",n),height:o,width:o,children:(0,fd.jsx)("use",{href:`#${e}`})})})),_N=({children:e})=>"tablet"===dI()?(0,fd.jsx)(fv.Layer,{children:e}):(0,fd.jsx)(fd.Fragment,{children:e}),_j=({snackbar:e,closeSnackbar:t})=>{let{actionButtonLabel:r="",kind:n="success",onActionButtonClick:o=()=>{},isLowContrast:a="error"!==n,progressActionLabel:i,subtitle:s="",timeoutInMs:l=5e3,autoClose:u="error"!==n,title:c,id:d,...f}=e,[p,m]=(0,cl.useState)(r),[h,g]=(0,cl.useState)(!0),[y,v]=(0,cl.useState)(!1),b=(0,cl.useCallback)(()=>{setTimeout(t,250)},[t]),w=(0,cl.useCallback)(()=>{v(!0),b()},[b]);return(0,cl.useEffect)(()=>{if(u){let e=setTimeout(w,l);return()=>clearTimeout(e)}},[l,u,w]),(0,cl.useEffect)(()=>{g(!1),window.setTimeout(()=>{g(!0)},0)},[]),(0,fd.jsx)(fv.ActionableNotification,{actionButtonLabel:p,"aria-label":iz("closeSnackbar","Close snackbar"),className:fp()("-esm-cohort-builder__snackbar-module__slideIn___TqSN-",{"-esm-cohort-builder__snackbar-module__animated___+XPKT":h,"-esm-cohort-builder__snackbar-module__slideOut___1cFIY":y}),kind:n,lowContrast:a,onActionButtonClick:()=>{o(),w(),i&&m(i)},onClose:b,statusIconDescription:iz("snackbarNotification","Snackbar notification"),subtitle:s,title:c,...f})},_A=({subject:e})=>{let[t,r]=(0,cl.useState)([]),n=(0,cl.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]);return(0,cl.useEffect)(()=>{let t=e.subscribe(e=>r(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,fd.jsx)(fd.Fragment,{children:t.map(e=>(0,fd.jsx)(_j,{snackbar:e,closeSnackbar:()=>n(e)},e.id))})},_$=new Dg,_I=0;function _M(e){e&&(0,ck.createRoot)(e).render((0,fd.jsx)(_A,{subject:_$}))}function _L(e){var t;e&&"string"==typeof(t=e.title)&&t.trim().length>0?setTimeout(()=>{_$.next({...e,id:_I++})},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}let _F=({toast:e,closeToast:t})=>{let{description:r,kind:n,critical:o,title:a,actionButtonLabel:i,onActionButtonClick:s=()=>{}}=e,l=(0,cl.useCallback)(()=>{s(),t()},[t,s]);return(0,fd.jsx)("div",{children:(0,fd.jsx)(fv.ActionableNotification,{actionButtonLabel:i,kind:n||"info",lowContrast:o,subtitle:r,title:a||"",onActionButtonClick:l,onClose:t})})},_B=({subject:e})=>{let[t,r]=(0,cl.useState)([]),n=(0,cl.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]);return(0,cl.useEffect)(()=>{let t=e.subscribe(e=>r(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,fd.jsx)(fd.Fragment,{children:t.map(e=>(0,fd.jsx)(_F,{toast:e,closeToast:()=>n(e)},e.id))})},_U=new Dg,_V=0;function _W(e){e&&(0,ck.createRoot)(e).render((0,fd.jsx)(_B,{subject:_U}))}function _H(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!Dd(t))?setTimeout(()=>{_U.next({...e,id:_V++})},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}let _z="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),_K=new Uint8Array(16),_G=[];for(let e=0;e<256;++e)_G.push((e+256).toString(16).slice(1));let _Z=function(e,t,r){if(_z&&!t&&!e)return _z();let n=(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(_K)}();if(n.length<16)throw Error("Random bytes length must be >= 16");if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){if((r=r||0)<0||r+16>t.length)throw RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return(_G[e[t+0]]+_G[e[t+1]]+_G[e[t+2]]+_G[e[t+3]]+"-"+_G[e[t+4]]+_G[e[t+5]]+"-"+_G[e[t+6]]+_G[e[t+7]]+"-"+_G[e[t+8]]+_G[e[t+9]]+"-"+_G[e[t+10]]+_G[e[t+11]]+_G[e[t+12]]+_G[e[t+13]]+_G[e[t+14]]+_G[e[t+15]]).toLowerCase()}(n)};async function _Y(e,t){let{openedGroup:r}=u4.getState();if(r){if(r.groupName===e&&_X(r.props,t))return!0;else if(!await _1({reason:"CLOSE_WORKSPACE_GROUP",explicit:!1}))return!1}return u4.setState(r=>({...r,openedGroup:{groupName:e,props:t},openedWindows:[]})),!0}async function _q(e){let{openedGroup:t,openedWindows:r}=u4.getState();if(t){if(r.length>0&&!(e||await _1({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})))return!1;u4.setState(e=>({...e,openedGroup:null,openedWindows:[]}))}return!0}async function _J(e,t=null,r=null,n=null){let o=u4.getState();if(!o.registeredWorkspacesByName[e])throw Error(`Unable to launch workspace ${e}. Workspace is not registered`);let a=u3(e);if(!a)throw Error(`Unable to launch workspace ${e}. Workspace is not registered to a workspace window`);let{openedGroup:i}=o,{name:s}=a,l=u6(s);if(!l)throw Error(`Unable to launch workspace ${e}. Workspace window ${a.name} is not registered to a workspace group`);let u=u5(e);if(i&&(i.groupName!==l.name||!_X(i.props,n)))return!!await _1({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})&&(u4.setState({...o,openedGroup:{groupName:l.name,props:n},openedWindows:[{windowName:s,openedWorkspaces:[Sr(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0);if(u>=0){let n=o.openedWindows[u],a=o.openedGroup?.props??{},i=o.isMostRecentlyOpenedWindowHidden,{openedWorkspaces:c}=n;if(_X(n.props,r)){let d=c.find(t=>t.workspaceName===e);return d&&_X(d.props,t)?((i||u!==o.openedWindows.length-1)&&u4.setState(_9.restoreWindow(o,s)),!0):!!await _1({reason:"CLOSE_WORKSPACE",explicit:!1,windowName:s,workspaceName:e})&&(u4.setState({...o,openedGroup:{groupName:l.name,props:o?.openedGroup?.props??a},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[Sr(e,t)],props:n?.props??r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return!!await _1({reason:"CLOSE_WINDOW",explicit:!1,windowName:s})&&(u4.setState({...o,openedGroup:{groupName:l.name,props:a??o?.openedGroup?.props},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[Sr(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return"closable"!=l.persistence?(u4.setState({...o,openedGroup:{groupName:l.name,props:n??o?.openedGroup?.props??null},openedWindows:[...o.openedWindows,{windowName:s,openedWorkspaces:[Sr(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0):!!await _1({reason:"CLOSE_OTHER_WINDOWS",explicit:!1,windowNameToSpare:a.name})&&(u4.setState({...o,openedGroup:{groupName:l.name,props:n??o?.openedGroup?.props??null},openedWindows:[{windowName:s,openedWorkspaces:[Sr(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}function _X(e,t){return null==e||null==t||R(e,t)}function _Q(e,t){let r=[];for(let n=e.openedWorkspaces.length-1;n>=0;n--){let o=e.openedWorkspaces[n];if(o.hasUnsavedChanges&&r.push(o),t&&o.workspaceName===t)break}return r}function _0(e){return 0===e.length?Promise.resolve(!0):new Promise(t=>{let r=Du("workspace2-close-prompt",{size:"sm",onConfirm:()=>{r(),t(!0)},onCancel:()=>{r(),t(!1)},affectedWorkspaceTitles:e.map(e=>e.title??"")})})}function _1(e){let{openedWindows:t}=u4.getState(),r=[];switch(e.reason){case"CLOSE_WORKSPACE_GROUP":r=t.flatMap(e=>_Q(e));break;case"CLOSE_WINDOW":{let n=t.find(t=>t.windowName===e.windowName);if(!n)throw Error(`Window ${e.windowName} not found in opened windows.`);r=_Q(n);break}case"CLOSE_WORKSPACE":{let n=t.find(t=>t.windowName===e.windowName);if(!n)throw Error(`Window ${e.windowName} not found in opened windows.`);r=_Q(n,e.workspaceName);break}case"CLOSE_OTHER_WINDOWS":r=t.filter(t=>t.windowName!==e.windowNameToSpare).flatMap(e=>_Q(e))}return _0(r)}function _2(e,t){return _0(_Q(e,t))}function _4(e,t){let r=e.openedWorkspaces.findIndex(e=>e.workspaceName===t);return r<0?e:0===r?null:{...e,openedWorkspaces:e.openedWorkspaces.slice(0,r)}}function _3(e,t,r,n){let{registeredWorkspacesByName:o}=u4.getState(),a=o[r];if(!a)throw Error(`No workspace named "${r}" registered`);let i=o[t];if(!i)throw Error(`No workspace named "${t}" registered`);if(i.window!==a.window)throw Error(`Child workspace ${r} does not belong to the same workspace window as parent workspace ${t}`);if(a.window!==e.windowName)throw Error(`Cannot open child workspace ${r} as window ${a.window} is not opened`);let{openedWorkspaces:s}=e,l=s.findIndex(e=>e.workspaceName===t);if(-1===l)throw Error(`Cannot open child workspace ${r} 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,Sr(r,n)]}}function _6(e,t,r){let n=e.openedWorkspaces.findIndex(e=>e.uuid===t);if(n<0)return e;let o=e.openedWorkspaces[n];if(Object.keys(r).every(e=>o[e]===r[e]))return e;let a=[...e.openedWorkspaces];return a[n]={...o,...r},{...e,openedWorkspaces:a}}function _5(e,t,r){let n=e.openedWindows.findIndex(e=>e.openedWorkspaces.some(e=>e.uuid===t));if(n<0)return e;let o=e.openedWindows[n],a=_6(o,t,r);if(a===o)return e;let i=[...e.openedWindows];return i[n]=a,{...e,openedWindows:i}}let _9={setWindowMaximized(e,t,r){let n=e.openedWindows.findIndex(e=>e.windowName===t),o=[...e.openedWindows],a={...o[n],maximized:r};return o[n]=a,{...e,openedWindows:o}},hideWindow:e=>({...e,isMostRecentlyOpenedWindowHidden:!0}),restoreWindow(e,t){let r=e.openedWindows.findIndex(e=>e.windowName===t),n=e.openedWindows[r],o=[...e.openedWindows.filter((e,t)=>t!==r),n];return{...e,openedWindows:o,isMostRecentlyOpenedWindowHidden:!1}},closeWorkspace(e,t){let r=e.openedWindows.findIndex(e=>e.openedWorkspaces.some(e=>e.workspaceName===t));if(r<0)return e;let n=_4(e.openedWindows[r],t),o=[...e.openedWindows],a=e.isMostRecentlyOpenedWindowHidden;if(null===n){let t=r===e.openedWindows.length-1;o.splice(r,1),t&&o.length>0&&(a=!1)}else o[r]=n;return{...e,openedWindows:o,isMostRecentlyOpenedWindowHidden:a}},openChildWorkspace(e,t,r,n){let o=e.registeredWorkspacesByName[r];if(!o)throw Error(`No workspace named "${r}" registered`);let a=e.openedWindows.findIndex(e=>e.windowName===o.window);if(-1==a)throw Error(`Cannot open child workspace ${r} as window ${o.window} is not opened`);let i=[...e.openedWindows];return i[a]=_3(e.openedWindows[a],t,r,n),{...e,openedWindows:i}},setHasUnsavedChanges:(e,t,r)=>_5(e,t,{hasUnsavedChanges:r}),setWorkspaceTitle:(e,t,r)=>_5(e,t,{title:r})};function _8(){return cy(u4,_9)}let _7=()=>(0,cl.useContext)(cj),Se=()=>Object.keys(u4.getState().registeredWorkspacesByName);function St(e,t,r){let n=e.openedWorkspaces[e.openedWorkspaces.length-1];return(n?t[n.workspaceName]?.width:void 0)??r[e.windowName]?.width??"narrow"}function Sr(e,t){return{workspaceName:e,props:t??{},hasUnsavedChanges:!1,uuid:_Z()}}function Sn(e,t,r){let n=u4.getState().registeredWorkspacesByName[e];return n?{windowName:n.window,openedWorkspaces:[Sr(e,t)],props:r??null,maximized:!1}:null}let So=({title:e,children:t,hasUnsavedChanges:r=!1})=>{let{setHasUnsavedChanges:n,setWorkspaceTitle:o}=_7();return(0,cl.useEffect)(()=>{n(r??!1)},[r,n]),(0,cl.useEffect)(()=>{o(e)},[e,o]),(0,fd.jsx)(fd.Fragment,{children:t})};function Sa(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Si(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Sa(Object(r),!0).forEach(function(t){Sl(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sa(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Ss(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Sl(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Su(e){return(Su=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Sc(e,t){return(Sc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Sd(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Sf=function(e){var t=cl.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&&Sc(i,t);var r,n,o,a=(r=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=Su(i);e=r?Reflect.construct(t,arguments,Su(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 Sd(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),Sl(Sd(t=a.call(this,e)),"handleRef",function(e){t.el=e}),Sl(Sd(t),"addThingToDo",function(e,r){t.state.hasError&&"unmount"!==e||(t.nextThingToDo=(t.nextThingToDo||Promise.resolve()).then(function(){if(!t.unmounted||"unmount"===e)return r.apply(void 0,arguments)}).catch(function(r){throw t.nextThingToDo=Promise.resolve(),t.setState({hasError:!0}),r&&r.message&&(r.message="During '".concat(e,"', parcel threw an error: ").concat(r.message)),t.props.handleError?t.props.handleError(r):setTimeout(function(){throw r}),r}))}),Sl(Sd(t),"getParcelProps",function(){var e=Si(Si({},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 n=[{key:"componentDidMount",value:function(){var e=this;this.unmounted=!1,this.addThingToDo("mount",function(){var t,r=e.props.mountParcel||e.mountParcel;if(!r)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(r){t.style[r]=e.props.wrapStyle[r]}),e.props.appendTo.appendChild(t)),e.parcel=r(e.props.config,Si({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 cj&&cj.Consumer?cl.createElement(cj.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):null;var t=cj&&cj.Consumer?cl.createElement(cj.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):void 0;return cl.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},t)}}],Ss(i.prototype,n),o&&Ss(i,o),i}();Sl(Sf,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});var Sp=r(4535),Sm=r(771);let Sh={workspaceOuterContainer:"-esm-cohort-builder__workspace2-module__workspaceOuterContainer___DLiCR",narrowWorkspace:"-esm-cohort-builder__workspace2-module__narrowWorkspace___VL0kF",widerWorkspace:"-esm-cohort-builder__workspace2-module__widerWorkspace___3QgrA",extraWideWorkspace:"-esm-cohort-builder__workspace2-module__extraWideWorkspace___s7nnh",workspaceMiddleContainer:"-esm-cohort-builder__workspace2-module__workspaceMiddleContainer___mTGNN",maximized:"-esm-cohort-builder__workspace2-module__maximized___-yo9l",hidden:"-esm-cohort-builder__workspace2-module__hidden___K2ryM",workspaceInnerContainer:"-esm-cohort-builder__workspace2-module__workspaceInnerContainer___o3zVl",workspaceSpacer:"-esm-cohort-builder__workspace2-module__workspaceSpacer___N6-ox",loader:"-esm-cohort-builder__workspace2-module__loader___29hpw",hiddenExtraWorkspace:"-esm-cohort-builder__workspace2-module__hiddenExtraWorkspace___-W7TY",header:"-esm-cohort-builder__workspace2-module__header___p0kuD",headerButtons:"-esm-cohort-builder__workspace2-module__headerButtons___hMydG",workspaceContent:"-esm-cohort-builder__workspace2-module__workspaceContent___uROr7",overlayHeaderSpacer:"-esm-cohort-builder__workspace2-module__overlayHeaderSpacer___zdrhx",isActionMenuOpened:"-esm-cohort-builder__workspace2-module__isActionMenuOpened___Wc1Il",showActionMenu:"-esm-cohort-builder__workspace2-module__showActionMenu___qCVQ-",marginWorkspaceContent:"-esm-cohort-builder__workspace2-module__marginWorkspaceContent___A+20C",workspaceContainerWithActionMenu:"-esm-cohort-builder__workspace2-module__workspaceContainerWithActionMenu___S98dq",workspaceFixedContainer:"-esm-cohort-builder__workspace2-module__workspaceFixedContainer___c9Uny",workspaceContainerWithoutActionMenu:"-esm-cohort-builder__workspace2-module__workspaceContainerWithoutActionMenu___u8FbT"},Sg=e=>e.registeredWorkspacesByName,Sy=({lifeCycle:e,openedWorkspace:t,openedWindow:r,groupProps:n,actions:o,renderChrome:a,isRootWorkspace:i,isLeafWorkspace:s,showActionMenu:l})=>{let u=(0,cl.useMemo)(()=>t&&{closeWorkspace:async(e={})=>{let{closeWindow:n=!1,discardUnsavedChanges:a=!1}=e;return n?!!(a||await o.promptForClosingWorkspaces())&&(o.closeWorkspace(r.openedWorkspaces[0].workspaceName),!0):!!(a||await o.promptForClosingWorkspaces(t.workspaceName))&&(o.closeWorkspace(t.workspaceName),!0)},launchChildWorkspace:async(e,n)=>{let a=t.workspaceName,{openedWorkspaces:i}=r,s=i.findIndex(e=>e.workspaceName===a);-1===s||s!==i.length-1&&i.slice(s+1).some(e=>e.hasUnsavedChanges)&&!await o.promptForClosingWorkspaces(i[s+1].workspaceName)||o.openChildWorkspace(a,e,n||{})},setWorkspaceTitle:e=>o.setWorkspaceTitle(t.uuid,e),setHasUnsavedChanges:e=>o.setHasUnsavedChanges(t.uuid,e),workspaceName:t.workspaceName,workspaceProps:t.props,windowProps:r.props,groupProps:n,workspaceMeta:u4.getState().registeredWorkspacesByName[t.workspaceName]?.meta??{},isRootWorkspace:i,isLeafWorkspace:s,windowName:r.windowName,showActionMenu:l},[t,r,n,o,i,s,l]),c=!a&&!s,d=(0,cl.useMemo)(()=>e?(0,fd.jsx)(Sf,{config:e,mountParcel:ci,wrapWith:"div",wrapClassName:fp()(Sh.workspaceContent,{[Sh.hiddenExtraWorkspace]:c}),...u},t.workspaceName):null,[e,t.workspaceName,u,c]);return a?(0,fd.jsx)(Sv,{openedWorkspace:t,openedWindow:r,isRootWorkspace:i,showActionMenu:l,closeWindow:()=>u.closeWorkspace({closeWindow:!0}),children:d}):d??(0,fd.jsx)(fv.InlineLoading,{className:fp()(Sh.loader,{[Sh.hiddenExtraWorkspace]:c}),description:`${iz("loading")}`})},Sv=({openedWorkspace:e,openedWindow:t,isRootWorkspace:r,showActionMenu:n,closeWindow:o,children:a})=>{let i=dI(),{openedGroup:s,openedWindows:l,registeredWindowsByName:u,registeredWorkspacesByName:c,registeredGroupsByName:d,isMostRecentlyOpenedWindowHidden:f,setWindowMaximized:p,hideWindow:m}=_8(),h=t.windowName,{maximized:g}=t,y=e.title??"",v=u[h],b=St(t,c,u),w=v?.icon,E=v?.canMaximize,x=!!s&&d[s.groupName]?.persistence==="closable",D=!!w&&!x,_=l.findIndex(e=>e.windowName===h)<l.length-1||f,S=Object.values(u).some(e=>e.group===s?.groupName&&void 0!==e.icon);return(0,fd.jsxs)("div",{className:fp()(Sh.workspaceOuterContainer,{[Sh.narrowWorkspace]:"narrow"===b,[Sh.widerWorkspace]:"wider"===b,[Sh.extraWideWorkspace]:"extra-wide"===b,[Sh.isActionMenuOpened]:S}),children:[(0,fd.jsx)("div",{className:fp()(Sh.workspaceSpacer,{[Sh.hidden]:_})}),(0,fd.jsx)("div",{className:fp()(Sh.workspaceMiddleContainer,{[Sh.maximized]:g,[Sh.hidden]:_,[Sh.isRootWorkspace]:r,[Sh.showActionMenu]:n}),children:(0,fd.jsx)("div",{className:fp()(Sh.workspaceInnerContainer,{[Sh.maximized]:g,[Sh.hidden]:_,[Sh.isRootWorkspace]:r}),children:a?(0,fd.jsxs)(fd.Fragment,{children:[(0,fd.jsxs)(fv.Header,{"aria-label":iz("workspaceHeader"),className:Sh.header,children:[(0,fd.jsx)(fv.HeaderName,{prefix:"",children:y}),(0,fd.jsx)("div",{className:Sh.overlayHeaderSpacer}),(0,fd.jsx)(fv.HeaderGlobalBar,{className:Sh.headerButtons,children:dM(i)?(0,fd.jsxs)(fd.Fragment,{children:[(E||g)&&(0,fd.jsx)(fv.HeaderGlobalAction,{"aria-label":g?iz("minimize"):iz("maximize"),onClick:()=>p(h,!g),children:g?(0,fd.jsx)(Sp.Xj,{}):(0,fd.jsx)(Sp.hz,{})}),D&&(0,fd.jsx)(fv.HeaderGlobalAction,{"aria-label":iz("hide"),onClick:()=>m(),children:(0,fd.jsx)(fK,{})}),!x&&(0,fd.jsx)(fv.HeaderGlobalAction,{"aria-label":iz("close"),onClick:o,children:(0,fd.jsx)(pe,{})})]}):(0,fd.jsxs)(fd.Fragment,{children:[D&&(0,fd.jsx)(fv.HeaderGlobalAction,{"aria-label":iz("hide"),onClick:()=>m(),children:(0,fd.jsx)(Sm.d3,{})}),(0,fd.jsx)(fv.HeaderGlobalAction,{"aria-label":iz("close"),onClick:()=>{x?_q():o()},children:(0,fd.jsx)(pe,{})})]})})]}),a]}):(0,fd.jsx)(fv.InlineLoading,{className:Sh.loader,description:`${iz("loading")} ...`})})})]})},Sb=({openedWindow:e,groupProps:t,actions:r,renderChrome:n,showActionMenu:o})=>{let{openedWorkspaces:a}=e,[i,s]=(0,cl.useState)({}),l=cg(u4,Sg);return(0,cl.useEffect)(()=>{let e=!1;return Promise.all(a.map(async e=>{let t=l[e.workspaceName];if(!t)return null;let{moduleName:r,component:n}=t;return[e.uuid,await fe(r,n)]})).then(t=>{e||s(Object.fromEntries(t.filter(e=>null!=e)))}),()=>{e=!0}},[a,l]),(0,fd.jsx)(fd.Fragment,{children:a.map((s,l)=>(0,fd.jsx)(Sy,{openedWorkspace:s,openedWindow:e,groupProps:t,actions:r,renderChrome:n,lifeCycle:i[s.uuid],isRootWorkspace:0===l,isLeafWorkspace:l===a.length-1,showActionMenu:o},s.uuid))})},Sw=e=>e.registeredWorkspacesByName,SE=({name:e,workspaceProps:t,windowProps:r,groupProps:n,onWindowChanged:o})=>{let a=cg(u4,Sw),i=cg(u4,t=>{let r=t.registeredWorkspacesByName[e]?.window;return r?t.registeredWindowsByName[r]:void 0}),s={name:e,workspaceProps:t,windowProps:r,groupProps:n},l=(0,cl.useRef)(),u=(0,cl.useRef)(null);if(!l.current){let o=Sn(e,t,r);l.current=U({openedWindow:o,groupProps:n??null}),o&&(u.current=s)}let c=l.current;(0,cl.useEffect)(()=>{let o=u.current;if(o&&o.name===e&&R(o.workspaceProps,t)&&R(o.windowProps,r)&&R(o.groupProps,n))return;let a=Sn(e,t,r);c.setState({openedWindow:a,groupProps:n??null},!0),u.current=a?s:null},[e,t,r,n,a,c]);let d=(0,cl.useMemo)(()=>(function(e){function t(t){e.setState(e=>{if(!e.openedWindow)return e;let r=t(e.openedWindow);return r===e.openedWindow?e:{...e,openedWindow:r}})}return{closeWorkspace(e){t(t=>_4(t,e))},openChildWorkspace(e,r,n){t(t=>_3(t,e,r,n))},setWorkspaceTitle(e,r){t(t=>_6(t,e,{title:r}))},setHasUnsavedChanges(e,r){t(t=>_6(t,e,{hasUnsavedChanges:r}))},promptForClosingWorkspaces(t){let{openedWindow:r}=e.getState();return r?_2(r,t):Promise.resolve(!0)}}})(c),[c]),{openedWindow:f,groupProps:p}=cg(c),m=f?.openedWorkspaces[f.openedWorkspaces.length-1],h=m?.workspaceName??null,g=m?.title??"",y=f?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,v=i?.width??"narrow",b=(0,cl.useRef)(o);return(0,cl.useEffect)(()=>{b.current=o}),(0,cl.useEffect)(()=>{b.current?.({workspaceName:h,windowWidth:v,title:g,hasUnsavedChanges:y})},[h,v,g,y]),(0,fd.jsx)("div",{className:"-esm-cohort-builder__exported-workspace-module__exportedWorkspace___FZHbG",children:f?(0,fd.jsx)(Sb,{openedWindow:f,groupProps:p,actions:d,renderChrome:!1,showActionMenu:!1}):null})},Sx="-esm-cohort-builder__action-menu-button2-module__container___gYRoa",SD="-esm-cohort-builder__action-menu-button2-module__elementContainer___vBViO",S_="-esm-cohort-builder__action-menu-button2-module__active___uRJRA",SS="-esm-cohort-builder__action-menu-button2-module__focused___D4VYB";function SC({getIcon:e,hasUnsavedChanges:t,tagContent:r}){return(0,fd.jsxs)(fd.Fragment,{children:[e({size:16}),t?(0,fd.jsx)("span",{className:"-esm-cohort-builder__action-menu-button2-module__interruptedTag___35fO7",children:"!"}):(0,fd.jsx)("span",{className:"-esm-cohort-builder__action-menu-button2-module__countTag___l8lfc",children:r})]})}let Sk=({icon:e,label:t,tagContent:r,workspaceToLaunch:n,onBeforeWorkspaceLaunch:o})=>{let a=dI(),{openedWindows:i,restoreWindow:s,hideWindow:l,isMostRecentlyOpenedWindowHidden:u}=_8(),{extension:c}=(0,cl.useContext)(cc),d=i.findIndex(e=>e.windowName===c?.extensionId),f=i[d],p=null!=f,m=p&&(d<i.length-1||u),h=p&&!m,g=f?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,y=async()=>{if(p)m?s(f.windowName):l();else if(await (o?.()??!0)){let{workspaceName:e,workspaceProps:t,windowProps:r}=n;_J(e,t,r)}};return"tablet"===a||"phone"===a?(0,fd.jsxs)(fv.Button,{className:fp()(Sx,{[S_]:p&&!h,[SS]:h}),iconDescription:t,kind:"ghost",onClick:y,role:"button",tabIndex:0,size:"md",children:[(0,fd.jsx)("span",{className:SD,children:(0,fd.jsx)(SC,{hasUnsavedChanges:g,getIcon:e,tagContent:r})}),(0,fd.jsx)("span",{children:t})]}):(0,fd.jsx)(fv.IconButton,{align:"left","aria-label":t,className:fp()(Sx,{[S_]:p&&!h,[SS]:h}),enterDelayMs:300,kind:"ghost",label:t,onClick:y,size:"md",children:(0,fd.jsx)("div",{className:SD,children:(0,fd.jsx)(SC,{hasUnsavedChanges:g,getIcon:e,tagContent:r})})})};function SP({showContactDetails:e,toggleContactDetails:t,className:r}){return(0,fd.jsx)(fv.Button,{className:r,iconDescription:"Toggle contact details",kind:"ghost",onClick:t,renderIcon:e?f7:f5,children:e?iz("showLess","Show less"):iz("showMore","Show more")})}let SO={contactDetails:"-esm-cohort-builder__patient-banner-contact-details-module__contactDetails___AvROu",deceased:"-esm-cohort-builder__patient-banner-contact-details-module__deceased___DDd39",heading:"-esm-cohort-builder__patient-banner-contact-details-module__heading___GGJyV",row:"-esm-cohort-builder__patient-banner-contact-details-module__row___8JcKK",col:"-esm-cohort-builder__patient-banner-contact-details-module__col___ct1O9",relationship:"-esm-cohort-builder__patient-banner-contact-details-module__relationship___GTTsg"},SR=({patientUuid:e})=>{let{cohorts:t=[],isLoading:r}=function(e){let t=e?`${i3}/cohortm/cohortmember?patient=${e}&v=custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))`:null,{data:r,isLoading:n}=cW()(t,i8),o=r?.data?.results.map(e=>({uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}));return(0,cl.useMemo)(()=>({cohorts:o,isLoading:n}),[n,o])}(e);return(0,fd.jsxs)(fd.Fragment,{children:[(0,fd.jsxs)("p",{className:SO.heading,children:[iz("patientLists","Patient Lists")," (",t?.length??0,")"]}),r?(0,fd.jsx)(fv.InlineLoading,{description:`${iz("loading","Loading")} ...`,role:"progressbar"}):(0,fd.jsxs)("ul",{children:[(()=>{if(t?.length>0){let e=t.sort((e,t)=>EK(e?.startDate).getTime()-EK(t?.startDate).getTime()).slice(0,3);return e?.map(e=>(0,fd.jsx)("li",{children:(0,fd.jsx)(cd,{to:`${window.spaBase}/home/patient-lists/${e.uuid}`,children:e.name},e.uuid)},e.uuid))}return(0,fd.jsx)("li",{children:"--"})})(),t.length>3&&(0,fd.jsx)("li",{className:SO.link,children:(0,fd.jsx)(cd,{to:`${window.spaBase}/home/patient-lists`,children:iz("seeMoreLists","See {{count}} more lists",{count:t?.length-3})})})]})]})},ST=({patientId:e})=>{let{patient:t,isLoading:r}=dZ(e),n=t?.address?.find(e=>"home"===e.use),o=e=>e.split("#")[1];return r?(0,fd.jsx)(fv.InlineLoading,{description:`${iz("loading","Loading")} ...`,role:"progressbar"}):(0,fd.jsxs)(fd.Fragment,{children:[(0,fd.jsx)("p",{className:SO.heading,children:iz("address","Address")}),(0,fd.jsx)("ul",{children:n?Object.entries(n).filter(([e])=>"id"!==e&&"use"!==e).map(([e,t])=>"extension"===e?n.extension?.[0]?.extension?.map((t,r)=>(0,fd.jsxs)("li",{children:[iz(o(t.url),o(t.url)),": ",t.valueString]},`address-${e}-${r}`)):(0,fd.jsxs)("li",{children:[iz(e,e),": ",t]},`address-${e}`)):(0,fd.jsx)("li",{children:"--"})})]})},SN=({patientUuid:e})=>{let{isLoading:t,contactAttributes:r}=(e=>{let{contactAttributeTypes:t=[]}=du({externalModuleName:"@openmrs/esm-patient-banner-app"}),{attributes:r,error:n,isLoading:o}=(e=>{let{data:t,error:r,isLoading:n}=dp()(`${i3}/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)))`,i8);return{isLoading:n,attributes:t?.data.person.attributes??[],error:r}})(e);return{contactAttributes:(0,cl.useMemo)(()=>r.filter(({attributeType:e})=>t?.some(t=>e.uuid===t)),[r,t]),isLoading:o,error:n}})(e),n=(0,cl.useMemo)(()=>r?[...r?.map(e=>[e.attributeType.display?iz(e.attributeType.display,e.attributeType.display):"",e.value])]:[],[r]);return(0,fd.jsxs)(fd.Fragment,{children:[(0,fd.jsx)("p",{className:SO.heading,children:iz("contactDetails","Contact Details")}),t?(0,fd.jsx)(fv.InlineLoading,{description:`${iz("loading","Loading")} ...`,role:"progressbar"}):(0,fd.jsx)("ul",{children:n.length?n.map(([e,t],r)=>(0,fd.jsxs)("li",{children:[e,": ",t]},`${e}-${t}-${r}`)):(0,fd.jsx)("li",{children:"--"})})]})},Sj=({patientId:e})=>{let{data:t,isLoading:r}=function(e){let t=`${i3}/relationship?v=custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))&person=${e}`,{data:r,error:n,isLoading:o,isValidating:a}=cW()(e?t:null,i8),i=r?.data?.results?.length?function(e,t){let r=[];for(let n of t)e===n.personA.uuid?r.push({uuid:`${n.uuid}`,display:n.personB.display,relativeAge:n.personB.age,relativeUuid:n.personB.uuid,relationshipType:n.relationshipType.bIsToA}):r.push({uuid:`${n.uuid}`,display:n.personA.display,relativeAge:n.personA.age,relativeUuid:n.personA.uuid,relationshipType:n.relationshipType.aIsToB});return r}(e,r.data.results):null;return{data:r?i:null,error:n,isLoading:o,isValidating:a}}(e);return(0,fd.jsxs)(fd.Fragment,{children:[(0,fd.jsx)("p",{className:SO.heading,children:iz("relationships","Relationships")}),r?(0,fd.jsx)(fv.InlineLoading,{description:`${iz("loading","Loading")} ...`,role:"progressbar"}):(0,fd.jsx)("ul",{children:t&&t.length>0?(0,fd.jsx)(fd.Fragment,{children:t.map(e=>(0,fd.jsxs)("li",{className:SO.relationship,children:[(0,fd.jsx)("div",{children:(0,fd.jsx)(cd,{to:`${window.spaBase}/patient/${e.relativeUuid}/chart`,children:e.display})}),(0,fd.jsx)("div",{children:e.relationshipType}),(0,fd.jsx)("div",{children:`${e.relativeAge?e.relativeAge:"--"} ${e.relativeAge?1===e.relativeAge?iz("yearAbbreviation","yr"):iz("yearsAbbreviation","yrs"):""}`})]},e.uuid))}):(0,fd.jsx)("li",{children:"--"})})]})};function SA({patientId:e,deceased:t}){return(0,fd.jsxs)("div",{className:fp()(SO.contactDetails,{[SO.deceased]:t}),children:[(0,fd.jsxs)("div",{className:SO.row,children:[(0,fd.jsx)("div",{className:SO.col,children:(0,fd.jsx)(ST,{patientId:e})}),(0,fd.jsx)("div",{className:SO.col,children:(0,fd.jsx)(SN,{patientUuid:e})})]}),(0,fd.jsxs)("div",{className:SO.row,children:[(0,fd.jsx)("div",{className:SO.col,children:(0,fd.jsx)(Sj,{patientId:e})}),(0,fd.jsx)("div",{className:SO.col,children:(0,fd.jsx)(SR,{patientUuid:e})})]})]})}function S$(e){let t=document.querySelector("template#loading-spinner");if(t){let r=t.content.cloneNode(!0),n=Array.prototype.map.call(r.childNodes,e=>e);return e.appendChild(r),()=>n.forEach(e=>e.remove())}return()=>{}}let SI="-esm-cohort-builder__action-menu2-module__container___4aX3S";function SM({workspaceGroup:e,groupProps:t}){let r=dI(),{persistence:n}=e;return(0,fd.jsx)("aside",{className:"-esm-cohort-builder__action-menu2-module__sideRail___a7qg9",children:(0,fd.jsxs)("div",{className:SI,children:["closable"==n&&dM(r)&&(0,fd.jsx)(fv.IconButton,{align:"left",onClick:()=>_q(),label:iz("close"),kind:"ghost",children:(0,fd.jsx)(pe,{})}),(0,fd.jsx)(cc.Provider,{value:{moduleName:e.moduleName,featureName:e.name},children:(0,fd.jsx)(cC,{className:SI,name:e.name,state:{groupProps:t}})})]})})}function SL(e){let t=new URL(e,window.location.origin).pathname,r=new URL(window.getOpenmrsSpaBase?.()??"/",window.location.origin).pathname,n=r.endsWith("/")?r.slice(0,-1):r,o=null;return n?n===t?o="/":t.startsWith(`${n}/`)&&(o=t.slice(n.length)):o=t,{full:t,spaRelative:o}}function SF(e){e&&(0,ck.createRoot)(e).render((0,fd.jsx)(SB,{}))}function SB(){let{openedGroup:e,openedWindows:t,registeredGroupsByName:r,registeredWindowsByName:n}=_8();if((0,cl.useEffect)(()=>lm("before-page-changed",t=>{let{newPage:n,cancelNavigation:o,oldUrl:a,newUrl:i}=t;if(!e)return;if(n)return void o(_q().then(e=>!e));let s=r[e.groupName],l=s?.scopePattern;l&&function(e,t,r){try{let n=new RegExp(e),o=SL(t),a=SL(r);if(null===o.spaRelative||null===a.spaRelative)return!0;let i=n.exec(o.spaRelative),s=n.exec(a.spaRelative);if(i&&s||(i=n.exec(o.full),s=n.exec(a.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,a,i)&&o(_q().then(e=>!e))}),[e,r]),!e)return null;let o=r[e.groupName],a=t.some(e=>e.maximized),{name:i}=o,s=Object.values(n).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,fd.jsxs)("div",{className:fp()("-esm-cohort-builder__workspace-windows-and-menu-module__workspaceWindowsAndMenuContainer___crgqC",{"-esm-cohort-builder__workspace-windows-and-menu-module__overlay___FCMKG":o.overlay,"-esm-cohort-builder__workspace-windows-and-menu-module__hasMaximizedWindow___gk319":a}),children:[(0,fd.jsx)("div",{className:"-esm-cohort-builder__workspace-windows-and-menu-module__workspaceWindowsContainer___MrLlf",children:t.map(t=>(0,fd.jsx)(SU,{openedWindow:t,groupProps:e.props,showActionMenu:s},t.windowName))}),s&&(0,fd.jsx)(SM,{workspaceGroup:o,groupProps:e.props})]})}function SU({openedWindow:e,groupProps:t,showActionMenu:r}){let{windowName:n}=e,o=(0,cl.useMemo)(()=>({closeWorkspace(e){u4.setState(t=>_9.closeWorkspace(t,e))},openChildWorkspace(e,t,r){u4.setState(n=>_9.openChildWorkspace(n,e,t,r))},setWorkspaceTitle(e,t){u4.setState(r=>_9.setWorkspaceTitle(r,e,t))},setHasUnsavedChanges(e,t){u4.setState(r=>_9.setHasUnsavedChanges(r,e,t))},promptForClosingWorkspaces(e){let t=u4.getState().openedWindows.find(e=>e.windowName===n);return t?_2(t,e):Promise.resolve(!0)}}),[n]);return(0,fd.jsx)(Sb,{openedWindow:e,groupProps:t,actions:o,renderChrome:!0,showActionMenu:r})}function SV(e,t,r){if(null==e)return r;let n=Es(e);if(!n)return console.warn(`matchLocale: invalid requested locale tag: ${JSON.stringify(e)}`),r;let o=[];for(let e of t){let t=Es(e);if(!t){console.warn(`matchLocale: skipping invalid available locale tag: ${JSON.stringify(e)}`);continue}o.push({canonical:t,original:e})}let a=n;for(;a;){let e=o.find(e=>e.canonical===a);if(e)return e.original;let t=a+"-",r=o.find(e=>e.canonical.startsWith(t));if(r)return r.original;if("ht"===a){a="fr-HT";continue}let n=a.lastIndexOf("-");if(-1===n)break;let i=(a=a.slice(0,n)).lastIndexOf("-");-1!==i&&a.length-i==2&&(a=a.slice(0,i))}return r}function SW(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}function SH(e){return!!e&&e.constructor===Object}var Sz=r(7638);function SK(e){let[t,r,n]=e.split(".");return`${t}.${r}.${n}`}function SG(e,t){return Sz(function(e){let t=e.indexOf("-");if(t>=0){let r=SK(e.slice(0,t)),n=e.slice(t+1);return`${r}-${n}`}return SK(e)}(t),e,{includePrerelease:!0})}async function SZ(e,t={}){let r,{shouldRetry:n,getDelay:o,onError:a}=t;n=n??(e=>e<=5),o=o??(e=>(function(e,t=!1){return 1e3*Math.pow(2,t?e+1:e)})(e));let i=0;do try{return await SY(o(i)),await e()}catch(e){a?.(e,i),r=e}while(n(i++));throw r}async function SY(e){if(!(e<=0))return new Promise(t=>setTimeout(t,e))}function Sq(e,t,r,n){}function SJ(e){}function SX(e){return Promise.resolve([])}function SQ(e){return Promise.resolve([])}function S0(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 S1(e){return()=>{}}function S2(){return!0}}}]);
|