@openmrs/esm-openconceptlab-app 4.4.1-pre.778 → 4.4.1-pre.782
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +2 -2
- package/dist/1442.js +1 -0
- package/dist/1442.js.map +1 -0
- package/dist/2152.js +1 -0
- package/dist/2152.js.map +1 -0
- package/dist/2638.js +9 -9
- package/dist/2638.js.map +1 -1
- package/dist/3378.js +1 -1
- package/dist/3799.js +1 -1
- package/dist/3989.js +1 -1
- package/dist/3989.js.map +1 -1
- package/dist/4560.js +1 -0
- package/dist/4560.js.map +1 -0
- package/dist/7209.js +1 -0
- package/dist/7209.js.map +1 -0
- package/dist/9061.js +1 -1
- package/dist/9061.js.map +1 -1
- package/dist/9590.js +1 -0
- package/dist/9590.js.map +1 -0
- package/dist/9771.js +1 -1
- package/dist/9771.js.map +1 -1
- package/dist/openmrs-esm-openconceptlab-app.js +2 -2
- package/dist/openmrs-esm-openconceptlab-app.js.buildmanifest.json +168 -101
- package/dist/openmrs-esm-openconceptlab-app.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +2 -2
- package/dist/1744.js +0 -1
- package/dist/1744.js.map +0 -1
package/dist/2638.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(globalThis.webpackChunk_openmrs_esm_openconceptlab_app=globalThis.webpackChunk_openmrs_esm_openconceptlab_app||[]).push([["2638"],{5602(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)}}},4397(e){e.exports=function(e,t,r){var n=t.prototype,o=function(e){var t=e.date,o=e.utc,i={};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 a=o?r.utc():r();Object.keys(t).forEach(function(e){var r;i["date"===(r=n.$utils().p(e))?"day":r]=t[e]});var s=i.day||(i.year||i.month>=0?1:a.date()),l=i.year||a.year(),u=i.month>=0?i.month:i.year||i.day?0:a.month(),c=i.hour||0,d=i.minute||0,p=i.second||0,f=i.millisecond||0;return o?new Date(Date.UTC(l,u,s,c,d,p,f)):new Date(l,u,s,c,d,p,f)}return t},i=n.parse;n.parse=function(e){e.date=o.bind(this)(e),i.bind(this)(e)};var a=n.set,s=n.add,l=n.subtract,u=function(e,t,r,n){void 0===n&&(n=1);var o=Object.keys(t),i=this;return o.forEach(function(r){i=e.bind(i)(t[r]*n,r)}),i};n.set=function(e,t){return t=void 0===t?e:t,"Object"===e.constructor.name?u.bind(this)(function(e,t){return a.bind(this)(t,e)},t,e):a.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)}}},7657(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,o,i){var a=o.prototype;i.utc=function(e){var t={date:e,utc:!0,args:arguments};return new o(t)},a.utc=function(t){var r=i(this.toDate(),{locale:this.$L,utc:!0});return t?r.add(this.utcOffset(),e):r},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var s=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var l=a.init;a.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=a.utcOffset;a.utcOffset=function(n,o){var i=this.$utils().u;if(i(n))return this.$u?0:i(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],i=o[0],a=60*o[1]+ +o[2];return 0===a?0:"+"===i?a:-a}(n)))return this;var a=16>=Math.abs(n)?60*n:n,s=this;if(o)return s.$offset=a,s.$u=0===n,s;if(0!==n){var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(a+l,e)).$offset=a,s.$x.$localOffset=l}else s=this.utc();return s};var c=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var d=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var p=a.diff;a.diff=function(e,t,r){if(e&&this.$u===e.$u)return p.call(this,e,t,r);var n=this.local(),o=i(e).local();return p.call(n,o,t,r)}}}()},5570(e,t,r){!function(t){"use strict";var n=r(9109);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 i=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=i.generate(e,r);t(this).css("background-image",o.toDataUrl())})}))}("u">typeof jQuery?jQuery:null)},1812(e){"use strict";e.exports={hex2rgb:function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,t,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,i=e.b,a=Math.max(n/=255,o/=255,i/=255),s=Math.min(n,o,i),l=(a+s)/2;if(a===s)t=r=0;else{var u=a-s;switch(r=l>.5?u/(2-a-s):u/(a+s),a){case n:t=(o-i)/u+6*(o<i);break;case o:t=(i-n)/u+2;break;case i: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,i=e.h,a=e.s,s=e.l;if(0===a)r=n=o=s;else{var l=s<.5?s*(1+a):s+a-s*a,u=2*s-l;r=t(u,l,i+1/3),n=t(u,l,i),o=t(u,l,i-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(",")+")"}}},9109(e,t,r){"use strict";var n=r(4751),o=r(1812),i=r(2742),a=r(3153),s={baseColor:"#933c3c"},l=["octogons","overlappingCircles","plusSigns","xes","sineWaves","hexagons","overlappingRings","plaid","triangles","squares","concentricCircles","diamonds","tessellation","nestedSquares","mosaicSquares","chevrons"],u="#000";function c(e,t,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 p(e){return e%2==0?"#ddd":"#222"}function f(e){return d(e,0,15,.02,.15)}var h=e.exports=function(e,t){return this.opts=n({},s,t),this.hash=t.hash||i(e),this.svg=new a,this.generateBackground(),this.generatePattern(),this};function m(e){return[[e,0,e,3*e],[0,e,3*e,e]]}function y(e){return[0,0,e,e,0,e,0,0].join(",")}function g(e,t,r,n,o){var i=y(n),a=f(o[0]),s=p(o[0]),l={stroke:u,"stroke-opacity":.02,"fill-opacity":a,fill:s};e.polyline(i,l).transform({translate:[t+n,r],scale:[-1,1]}),e.polyline(i,l).transform({translate:[t+n,r+2*n],scale:[1,-1]}),l={stroke:u,"stroke-opacity":.02,"fill-opacity":a=f(o[1]),fill:s=p(o[1])},e.polyline(i,l).transform({translate:[t+n,r+2*n],scale:[-1,-1]}),e.polyline(i,l).transform({translate:[t+n,r],scale:[1,1]})}function b(e,t,r,n,o){var i=f(o),a=p(o),s=y(n),l={stroke:u,"stroke-opacity":.02,"fill-opacity":i,fill:a};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]})}h.prototype.toSvg=function(){return this.svg.toString()},h.prototype.toString=function(){return this.toSvg()},h.prototype.toBase64=function(){var e=this.toSvg();return"u">typeof window&&"function"==typeof window.btoa?window.btoa(e):new Buffer(e).toString("base64")},h.prototype.toDataUri=function(){return"data:image/svg+xml;base64,"+this.toBase64()},h.prototype.toDataUrl=function(){return'url("'+this.toDataUri()+'")'},h.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)})},h.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)]()},h.prototype.geoHexagons=function(){var e,t,r,n,o,i,a,s,l,h=d(c(this.hash,0),0,15,8,60),m=h*Math.sqrt(3),y=2*h,g=(s=h/2,[0,l=Math.sin(60*Math.PI/180)*h,s,0,s+h,0,2*h,l,s+h,2*l,s,2*l,0,l].join(","));for(this.svg.setWidth(3*y+3*h),this.svg.setHeight(6*m),t=0,a=0;a<6;a++)for(i=0;i<6;i++)o=c(this.hash,t),e=i%2==0?a*m:a*m+m/2,r=f(o),n={fill:p(o),"fill-opacity":r,stroke:u,"stroke-opacity":.02},this.svg.polyline(g,n).transform({translate:[i*h*1.5-y/2,e-m/2]}),0===i&&this.svg.polyline(g,n).transform({translate:[6*h*1.5-y/2,e-m/2]}),0===a&&(e=i%2==0?6*m:6*m+m/2,this.svg.polyline(g,n).transform({translate:[i*h*1.5-y/2,e-m/2]})),0===i&&0===a&&this.svg.polyline(g,n).transform({translate:[6*h*1.5-y/2,5*m+m/2]}),t++},h.prototype.geoSineWaves=function(){var e,t,r,n,o,i,a,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=f(i=c(this.hash,t)),e=p(i),a=s/4*.7,o={fill:"none",stroke:e,opacity:r,"stroke-width":""+u+"px"},n="M0 "+l+" C "+a+" 0, "+(s/2-a)+" 0, "+s/2+" "+l+" S "+(s-a)+" "+2*l+", "+s+" "+l+" S "+(1.5*s-a)+" 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]})},h.prototype.geoChevrons=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,30,80),l=d(c(this.hash,0),0,15,30,80),h=(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,a=0;a<6;a++)for(i=0;i<6;i++)r=f(o=c(this.hash,t)),n={stroke:u,"stroke-opacity":.02,fill:p(o),"fill-opacity":r,"stroke-width":1},this.svg.group(n).transform({translate:[i*s,a*l*.66-l/2]}).polyline(h).end(),0===a&&this.svg.group(n).transform({translate:[i*s,6*l*.66-l/2]}).polyline(h).end(),t+=1},h.prototype.geoPlusSigns=function(){var e,t,r,n,o,i,a,s,l=d(c(this.hash,0),0,15,10,25),h=3*l,y=m(l);for(this.svg.setWidth(12*l),this.svg.setHeight(12*l),r=0,s=0;s<6;s++)for(a=0;a<6;a++)n=f(i=c(this.hash,r)),t=p(i),e=+(s%2!=0),o={fill:t,stroke:u,"stroke-opacity":.02,"fill-opacity":n},this.svg.group(o).transform({translate:[a*h-a*l+e*l-l,s*h-s*l-h/2]}).rect(y).end(),0===a&&this.svg.group(o).transform({translate:[4*h-a*l+e*l-l,s*h-s*l-h/2]}).rect(y).end(),0===s&&this.svg.group(o).transform({translate:[a*h-a*l+e*l-l,4*h-s*l-h/2]}).rect(y).end(),0===a&&0===s&&this.svg.group(o).transform({translate:[4*h-a*l+e*l-l,4*h-s*l-h/2]}).rect(y).end(),r++},h.prototype.geoXes=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,10,25),l=m(s),u=3*s*.943;for(this.svg.setWidth(3*u),this.svg.setHeight(3*u),t=0,a=0;a<6;a++)for(i=0;i<6;i++)r=f(o=c(this.hash,t)),e=i%2==0?a*u-.5*u:a*u-.5*u+u/4,n={fill:p(o),opacity:r},this.svg.group(n).transform({translate:[i*u/2-u/2,e-a*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===i&&this.svg.group(n).transform({translate:[6*u/2-u/2,e-a*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===a&&(e=i%2==0?6*u-u/2:6*u-u/2+u/4,this.svg.group(n).transform({translate:[i*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end()),5===a&&this.svg.group(n).transform({translate:[i*u/2-u/2,e-11*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===i&&0===a&&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++},h.prototype.geoOverlappingCircles=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,25,200)/2;for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=f(n=c(this.hash,e)),r={fill:p(n),opacity:t},this.svg.circle(o*a,i*a,a,r),0===o&&this.svg.circle(6*a,i*a,a,r),0===i&&this.svg.circle(o*a,6*a,a,r),0===o&&0===i&&this.svg.circle(6*a,6*a,a,r),e++},h.prototype.geoOctogons=function(){var e,t,r,n,o,i,a,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,a=0;a<6;a++)for(i=0;i<6;i++)n=f(o=c(this.hash,r)),t=p(o),this.svg.polyline(l,{fill:t,"fill-opacity":n,stroke:u,"stroke-opacity":.02}).transform({translate:[i*s,a*s]}),r+=1},h.prototype.geoSquares=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,10,60);for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),t=0,i=0;i<6;i++)for(o=0;o<6;o++)r=f(n=c(this.hash,t)),e=p(n),this.svg.rect(o*a,i*a,a,a,{fill:e,"fill-opacity":r,stroke:u,"stroke-opacity":.02}),t+=1},h.prototype.geoConcentricCircles=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,10,60),s=a/5;for(this.svg.setWidth((a+s)*6),this.svg.setHeight((a+s)*6),t=0,i=0;i<6;i++)for(o=0;o<6;o++)r=f(n=c(this.hash,t)),e=p(n),this.svg.circle(o*a+o*s+(a+s)/2,i*a+i*s+(a+s)/2,a/2,{fill:"none",stroke:e,opacity:r,"stroke-width":s+"px"}),r=f(n=c(this.hash,39-t)),e=p(n),this.svg.circle(o*a+o*s+(a+s)/2,i*a+i*s+(a+s)/2,a/4,{fill:e,"fill-opacity":r}),t+=1},h.prototype.geoOverlappingRings=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,10,60),s=a/4;for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=f(n=c(this.hash,e)),r={fill:"none",stroke:p(n),opacity:t,"stroke-width":s+"px"},this.svg.circle(o*a,i*a,a-s/2,r),0===o&&this.svg.circle(6*a,i*a,a-s/2,r),0===i&&this.svg.circle(o*a,6*a,a-s/2,r),0===o&&0===i&&this.svg.circle(6*a,6*a,a-s/2,r),e+=1},h.prototype.geoTriangles=function(){var e,t,r,n,o,i,a,s,l=d(c(this.hash,0),0,15,15,80),h=l/2*Math.sqrt(3),m=[s=l/2,0,l,h,0,h,s,0].join(",");for(this.svg.setWidth(3*l),this.svg.setHeight(6*h),e=0,a=0;a<6;a++)for(i=0;i<6;i++)t=f(o=c(this.hash,e)),n={fill:p(o),"fill-opacity":t,stroke:u,"stroke-opacity":.02},r=a%2==0?180*(i%2==0):180*(i%2!=0),this.svg.polyline(m,n).transform({translate:[i*l*.5-l/2,h*a],rotate:[r,l/2,h/2]}),0===i&&this.svg.polyline(m,n).transform({translate:[6*l*.5-l/2,h*a],rotate:[r,l/2,h/2]}),e+=1},h.prototype.geoDiamonds=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,10,50),l=d(c(this.hash,1),0,15,10,50),h=[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,a=0;a<6;a++)for(i=0;i<6;i++)r=f(o=c(this.hash,t)),n={fill:p(o),"fill-opacity":r,stroke:u,"stroke-opacity":.02},e=a%2==0?0:s/2,this.svg.polyline(h,n).transform({translate:[i*s-s/2+e,l/2*a-l/2]}),0===i&&this.svg.polyline(h,n).transform({translate:[6*s-s/2+e,l/2*a-l/2]}),0===a&&this.svg.polyline(h,n).transform({translate:[i*s-s/2+e,l/2*6-l/2]}),0===i&&0===a&&this.svg.polyline(h,n).transform({translate:[6*s-s/2+e,l/2*6-l/2]}),t+=1},h.prototype.geoNestedSquares=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,4,12),s=7*a;for(this.svg.setWidth((s+a)*6+6*a),this.svg.setHeight((s+a)*6+6*a),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=f(n=c(this.hash,e)),r={fill:"none",stroke:p(n),opacity:t,"stroke-width":a+"px"},this.svg.rect(o*s+o*a*2+a/2,i*s+i*a*2+a/2,s,s,r),t=f(n=c(this.hash,39-e)),r={fill:"none",stroke:p(n),opacity:t,"stroke-width":a+"px"},this.svg.rect(o*s+o*a*2+a/2+2*a,i*s+i*a*2+a/2+2*a,3*a,3*a,r),e+=1},h.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?b(this.svg,t*n*2,r*n*2,n,c(this.hash,e)):g(this.svg,t*n*2,r*n*2,n,[c(this.hash,e),c(this.hash,e+1)]):r%2==0?g(this.svg,t*n*2,r*n*2,n,[c(this.hash,e),c(this.hash,e+1)]):b(this.svg,t*n*2,r*n*2,n,c(this.hash,e)),e+=1},h.prototype.geoPlaid=function(){var e,t,r,n,o,i,a=0,s=0;for(t=0;t<36;)a+=c(this.hash,t)+5,r=f(i=c(this.hash,t+1)),e=p(i),n=i+5,this.svg.rect(0,a,"100%",n,{opacity:r,fill:e}),a+=n,t+=2;for(t=0;t<36;)s+=c(this.hash,t)+5,r=f(i=c(this.hash,t+1)),e=p(i),o=i+5,this.svg.rect(s,0,o,"100%",{opacity:r,fill:e}),s+=o,t+=2;this.svg.setWidth(s),this.svg.setHeight(a)},h.prototype.geoTessellation=function(){var e,t,r,n,o=d(c(this.hash,0),0,15,5,40),i=o*Math.sqrt(3),a=2*o,s=o/2*Math.sqrt(3),l=[0,0,s,o/2,0,o,0,0].join(","),h=3*o+2*s,m=2*i+2*o;for(this.svg.setWidth(h),this.svg.setHeight(m),e=0;e<20;e++)switch(t=f(n=c(this.hash,e)),r={stroke:u,"stroke-opacity":.02,fill:p(n),"fill-opacity":t,"stroke-width":1},e){case 0:this.svg.rect(-o/2,-o/2,o,o,r),this.svg.rect(h-o/2,-o/2,o,o,r),this.svg.rect(-o/2,m-o/2,o,o,r),this.svg.rect(h-o/2,m-o/2,o,o,r);break;case 1:this.svg.rect(a/2+s,i/2,o,o,r);break;case 2:this.svg.rect(-o/2,m/2-o/2,o,o,r),this.svg.rect(h-o/2,m/2-o/2,o,o,r);break;case 3:this.svg.rect(a/2+s,1.5*i+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,m- -o/2],rotate:[0,o/2,s/2],scale:[1,-1]});break;case 5:this.svg.polyline(l,r).transform({translate:[h-o/2,-o/2],rotate:[0,o/2,s/2],scale:[-1,1]}),this.svg.polyline(l,r).transform({translate:[h-o/2,m+o/2],rotate:[0,o/2,s/2],scale:[-1,-1]});break;case 6:this.svg.polyline(l,r).transform({translate:[h/2+o/2,i/2]});break;case 7:this.svg.polyline(l,r).transform({translate:[h-h/2-o/2,i/2],scale:[-1,1]});break;case 8:this.svg.polyline(l,r).transform({translate:[h/2+o/2,m-i/2],scale:[1,-1]});break;case 9:this.svg.polyline(l,r).transform({translate:[h-h/2-o/2,m-i/2],scale:[-1,-1]});break;case 10:this.svg.polyline(l,r).transform({translate:[o/2,m/2-o/2]});break;case 11:this.svg.polyline(l,r).transform({translate:[h-o/2,m/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:[-h+o/2,o/2],rotate:[-30,0,0]});break;case 14:this.svg.rect(0,0,o,o,r).transform({translate:[o/2,m/2-o/2-o],rotate:[30,0,o]});break;case 15:this.svg.rect(0,0,o,o,r).transform({scale:[-1,1],translate:[-h+o/2,m/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,-m+m/2-o/2-o],rotate:[30,0,o]});break;case 17:this.svg.rect(0,0,o,o,r).transform({scale:[-1,-1],translate:[-h+o/2,-m+m/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,-m+o/2],rotate:[-30,0,0]});break;case 19:this.svg.rect(0,0,o,o,r).transform({scale:[-1,-1],translate:[-h+o/2,-m+o/2],rotate:[-30,0,0]})}}},2742(e){"use strict";function t(){var e=0x67452301,t=0xefcdab89,r=0x98badcfe,n=0x10325476,o=0xc3d2e1f0,i=new Uint32Array(80),a=0,s=24,l=0;function u(){for(var s,l,u=16;u<80;u++){var c=i[u-3]^i[u-8]^i[u-14]^i[u-16];i[u]=c<<1|c>>>31}var d=e,p=t,f=r,h=n,m=o;for(u=0;u<80;u++){u<20?(s=h^p&(f^h),l=0x5a827999):u<40?(s=p^f^h,l=0x6ed9eba1):u<60?(s=p&f|h&(p|f),l=0x8f1bbcdc):(s=p^f^h,l=0xca62c1d6);var y=(d<<5|d>>>27)+s+m+l+(0|i[u]);m=h,h=f,f=p<<30|p>>>2,p=d,d=y}for(u=0,e=e+d|0,t=t+p|0,r=r+f|0,n=n+h|0,o=o+m|0,a=0;u<16;u++)i[u]=0}function c(e){i[a]|=(255&e)<<s,s?s-=8:(a++,s=24),16===a&&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),(a>14||14===a&&s<24)&&u(),a=14,s=24,c(0),c(0),c(l>0xffffffffff?l/0x10000000000:0),c(l>0xffffffff?l/0x100000000:0);for(var i=24;i>=0;i-=8)c(l>>i);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()}},3153(e,t,r){"use strict";var n=r(4751),o=r(7338);function i(){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=i,i.prototype.currentContext=function(){return this.context[this.context.length-1]||this.svg},i.prototype.end=function(){return this.context.pop(),this},i.prototype.currentNode=function(){var e=this.currentContext();return e.lastChild||e},i.prototype.transform=function(e){return this.currentNode().setAttribute("transform",Object.keys(e).map(function(t){return t+"("+e[t].join(",")+")"}).join(" ")),this},i.prototype.setAttributes=function(e,t){Object.keys(t).forEach(function(r){e.setAttribute(r,t[r])})},i.prototype.setWidth=function(e){this.svg.setAttribute("width",Math.floor(e))},i.prototype.setHeight=function(e){this.svg.setAttribute("height",Math.floor(e))},i.prototype.toString=function(){return this.svg.toString()},i.prototype.rect=function(e,t,r,i,a){var s=this;if(Array.isArray(e))return e.forEach(function(e){s.rect.apply(s,e.concat(a))}),this;var l=o("rect");return this.currentContext().appendChild(l),this.setAttributes(l,n({x:e,y:t,width:r,height:i},a)),this},i.prototype.circle=function(e,t,r,i){var a=o("circle");return this.currentContext().appendChild(a),this.setAttributes(a,n({cx:e,cy:t,r:r},i)),this},i.prototype.path=function(e,t){var r=o("path");return this.currentContext().appendChild(r),this.setAttributes(r,n({d:e},t)),this},i.prototype.polyline=function(e,t){var r=this;if(Array.isArray(e))return e.forEach(function(e){r.polyline(e,t)}),this;var i=o("polyline");return this.currentContext().appendChild(i),this.setAttributes(i,n({points:e},t)),this},i.prototype.group=function(e){var t=o("g");return this.currentContext().appendChild(t),this.context.push(t),this.setAttributes(t,n({},e)),this}},7338(e){"use strict";var t=e.exports=function(e){return this instanceof t?(this.tagName=e,this.attributes=Object.create(null),this.children=[],this.lastChild=null,this):new t(e)};t.prototype.appendChild=function(e){return this.children.push(e),this.lastChild=e,this},t.prototype.setAttribute=function(e,t){return this.attributes[e]=t,this},t.prototype.toString=function(){var e=this;return["<",e.tagName,Object.keys(e.attributes).map(function(t){return[" ",t,'="',e.attributes[t],'"'].join("")}).join(""),">",e.children.map(function(e){return e.toString()}).join(""),"</",e.tagName,">"].join("")}},4751(e){var t=Object.prototype.hasOwnProperty,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"),i=t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(n in e);return void 0===n||t.call(e,n)}e.exports=function e(){var t,r,o,i,a,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!==(i=t[r])&&(d&&i&&(n(i)||(a=Array.isArray(i)))?(a?(a=!1,s=o&&Array.isArray(o)?o:[]):s=o&&n(o)?o:{},l[r]=e(d,s,i)):void 0!==i&&(l[r]=i));return l}},2034(e,t){"use strict";t.pathToRegexp=function(e,t={}){let{delimiter:u="/",end:c=!0,sensitive:d=!1,trailing:p=!0}=t,f=[],h=[];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:a=r}=t,u=[...e],c=[],d=0,p=0;function f(){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=i[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:f()}):"*"===e?c.push({type:"wildcard",index:d++,value:f()}):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[p++];if(o.type===r)break;if("char"===o.type||"escape"===o.type){let e=o.value,t=c[p];for(;"char"===t.type||"escape"===t.type;)e+=t.value,t=c[++p];n.push({type:"text",value:a(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 i of e(o.tokens,0,n.slice()))yield*e(t,r+1,i);else n.push(o);yield*e(t,r+1,n)}(e.tokens,0,[]))h.push(function(e,t,r,n){let o="",i="",s=!0;for(let d of e){if("text"===d.type){o+=a(d.value),i+=d.value,s||(s=d.value.includes(t));continue}if("param"===d.type||"wildcard"===d.type){var u,c;if(!s&&!i)throw new l(`Missing text before "${d.name}" ${d.type}`,n);"param"===d.type?o+=`(${u=t,(c=s?"":i).length<2?u.length<2?`[^${a(u+c)}]`:`(?:(?!${a(u)})[^${a(c)}])`:u.length<2?`(?:(?!${a(c)})[^${a(u)}])`:`(?:(?!${a(c)}|${a(u)})[\\s\\S])`}+)`:o+="([\\s\\S]+)",r.push(d),i="",s=!1;continue}}return o}(t,u,f,e.originalPath))}let m=`^(?:${h.join("|")})`;return p&&(m+=`(?:${a(u)}$)?`),{regexp:new RegExp(m+=c?"$":`(?=${a(u)}|$)`,d?"":"i"),keys:f}};let r=e=>e,n=/^[$_\p{ID_Start}]$/u,o=/^[$\u200c\u200d\p{ID_Continue}]$/u,i={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function a(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}}},5873(e,t,r){"use strict";var n=r(5427);t.createRoot=n.createRoot,t.hydrateRoot=n.hydrateRoot},8513(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1077),a=r(1016);t.AsyncSubject=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.value=null,t.hasNext=!1,t.hasCompleted=!1,t}return o(t,e),t.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),a.Subscription.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),a.Subscription.EMPTY):e.prototype._subscribe.call(this,t)},t.prototype.next=function(e){this.hasCompleted||(this.value=e,this.hasNext=!0)},t.prototype.error=function(t){this.hasCompleted||e.prototype.error.call(this,t)},t.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&e.prototype.next.call(this,this.value),e.prototype.complete.call(this)},t}(i.Subject)},8791(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1077),a=r(8860);t.BehaviorSubject=function(e){function t(t){var r=e.call(this)||this;return r._value=t,r}return o(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return r&&!r.closed&&t.next(this._value),r},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(!this.closed)return this._value;throw new a.ObjectUnsubscribedError},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(i.Subject)},1359(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.InnerSubscriber=function(e){function t(t,r,n){var o=e.call(this)||this;return o.parent=t,o.outerValue=r,o.outerIndex=n,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)},t.prototype._error=function(e){this.parent.notifyError(e,this),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(r(7759).Subscriber)},4942(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(4914),i=r(7986),a=r(1673);(n=t.NotificationKind||(t.NotificationKind={})).NEXT="N",n.ERROR="E",n.COMPLETE="C",t.Notification=function(){function e(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}return e.prototype.observe=function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}},e.prototype.do=function(e,t,r){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return r&&r()}},e.prototype.accept=function(e,t,r){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,r)},e.prototype.toObservable=function(){switch(this.kind){case"N":return i.of(this.value);case"E":return a.throwError(this.error);case"C":return o.empty()}throw Error("unexpected notification kind value")},e.createNext=function(t){return void 0!==t?new e("N",t):e.undefinedValueNotification},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e.undefinedValueNotification=new e("N",void 0),e}()},5092(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1226),o=r(7595),i=r(6713),a=r(7928),s=r(5319);function l(e){if(e||(e=s.config.Promise||Promise),!e)throw Error("no Promise impl found");return e}t.Observable=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n=this.operator,i=o.toSubscriber(e,t,r);if(n?i.add(n.call(i,this.source)):i.add(this.source||s.config.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),s.config.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){s.config.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),n.canReportError(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=l(t))(function(t,n){var o;o=r.subscribe(function(t){try{e(t)}catch(e){n(e),o&&o.unsubscribe()}},n,t)})},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[i.observable]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:a.pipeFromArray(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=l(e))(function(e,r){var n;t.subscribe(function(e){return n=e},function(e){return r(e)},function(){return e(n)})})},e.create=function(t){return new e(t)},e}()},4143(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5319),o=r(9468);t.empty={closed:!0,next:function(e){},error:function(e){if(n.config.useDeprecatedSynchronousErrorHandling)throw e;o.hostReportError(e)},complete:function(){}}},6771(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.OuterSubscriber=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.notifyNext=function(e,t,r,n,o){this.destination.next(t)},t.prototype.notifyError=function(e,t){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(r(7759).Subscriber)},328(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1077),a=r(3792),s=r(1016),l=r(4654),u=r(8860),c=r(3716);t.ReplaySubject=function(e){function t(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0);var o=e.call(this)||this;return o.scheduler=n,o._events=[],o._infiniteTimeWindow=!1,o._bufferSize=t<1?1:t,o._windowTime=r<1?1:r,r===1/0?(o._infiniteTimeWindow=!0,o.next=o.nextInfiniteTimeWindow):o.next=o.nextTimeWindow,o}return o(t,e),t.prototype.nextInfiniteTimeWindow=function(t){if(!this.isStopped){var r=this._events;r.push(t),r.length>this._bufferSize&&r.shift()}e.prototype.next.call(this,t)},t.prototype.nextTimeWindow=function(t){this.isStopped||(this._events.push(new d(this._getNow(),t)),this._trimBufferThenGetEvents()),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){var t,r=this._infiniteTimeWindow,n=r?this._events:this._trimBufferThenGetEvents(),o=this.scheduler,i=n.length;if(this.closed)throw new u.ObjectUnsubscribedError;if(this.isStopped||this.hasError?t=s.Subscription.EMPTY:(this.observers.push(e),t=new c.SubjectSubscription(this,e)),o&&e.add(e=new l.ObserveOnSubscriber(e,o)),r)for(var a=0;a<i&&!e.closed;a++)e.next(n[a]);else for(var a=0;a<i&&!e.closed;a++)e.next(n[a].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),t},t.prototype._getNow=function(){return(this.scheduler||a.queue).now()},t.prototype._trimBufferThenGetEvents=function(){for(var e=this._getNow(),t=this._bufferSize,r=this._windowTime,n=this._events,o=n.length,i=0;i<o&&!(e-n[i].time<r);)i++;return o>t&&(i=Math.max(i,o-t)),i>0&&n.splice(0,i),n},t}(i.Subject);var d=function(e,t){this.time=e,this.value=t}},4688(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scheduler=function(){function e(t,r){void 0===r&&(r=e.now),this.SchedulerAction=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.SchedulerAction(this,e).schedule(r,t)},e.now=function(){return Date.now()},e}()},1077(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5092),a=r(7759),s=r(1016),l=r(8860),u=r(3716),c=r(8636),d=function(e){function t(t){var r=e.call(this,t)||this;return r.destination=t,r}return o(t,e),t}(a.Subscriber);t.SubjectSubscriber=d;var p=function(e){function t(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return o(t,e),t.prototype[c.rxSubscriber]=function(){return new d(this)},t.prototype.lift=function(e){var t=new f(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new l.ObjectUnsubscribedError;if(!this.isStopped)for(var t=this.observers,r=t.length,n=t.slice(),o=0;o<r;o++)n[o].next(e)},t.prototype.error=function(e){if(this.closed)throw new l.ObjectUnsubscribedError;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,r=t.length,n=t.slice(),o=0;o<r;o++)n[o].error(e);this.observers.length=0},t.prototype.complete=function(){if(this.closed)throw new l.ObjectUnsubscribedError;this.isStopped=!0;for(var e=this.observers,t=e.length,r=e.slice(),n=0;n<t;n++)r[n].complete();this.observers.length=0},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(t){if(!this.closed)return e.prototype._trySubscribe.call(this,t);throw new l.ObjectUnsubscribedError},t.prototype._subscribe=function(e){if(this.closed)throw new l.ObjectUnsubscribedError;return this.hasError?(e.error(this.thrownError),s.Subscription.EMPTY):this.isStopped?(e.complete(),s.Subscription.EMPTY):(this.observers.push(e),new u.SubjectSubscription(this,e))},t.prototype.asObservable=function(){var e=new i.Observable;return e.source=this,e},t.create=function(e,t){return new f(e,t)},t}(i.Observable);t.Subject=p;var f=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return o(t,e),t.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},t.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},t.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},t.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):s.Subscription.EMPTY},t}(p);t.AnonymousSubject=f},3716(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.SubjectSubscription=function(e){function t(t,r){var n=e.call(this)||this;return n.subject=t,n.subscriber=r,n.closed=!1,n}return o(t,e),t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var r=t.indexOf(this.subscriber);-1!==r&&t.splice(r,1)}}},t}(r(1016).Subscription)},7759(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(4864),a=r(4143),s=r(1016),l=r(8636),u=r(5319),c=r(9468),d=function(e){function t(r,n,o){var i=e.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=a.empty;break;case 1:if(!r){i.destination=a.empty;break}if("object"==typeof r){r instanceof t?(i.syncErrorThrowable=r.syncErrorThrowable,i.destination=r,r.add(i)):(i.syncErrorThrowable=!0,i.destination=new p(i,r));break}default:i.syncErrorThrowable=!0,i.destination=new p(i,r,n,o)}return i}return o(t,e),t.prototype[l.rxSubscriber]=function(){return this},t.create=function(e,r,n){var o=new t(e,r,n);return o.syncErrorThrowable=!1,o},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(s.Subscription);t.Subscriber=d;var p=function(e){function t(t,r,n,o){var s,l=e.call(this)||this;l._parentSubscriber=t;var u=l;return i.isFunction(r)?s=r:r&&(s=r.next,n=r.error,o=r.complete,r!==a.empty&&(u=Object.create(r),i.isFunction(u.unsubscribe)&&l.add(u.unsubscribe.bind(u)),u.unsubscribe=l.unsubscribe.bind(l))),l._context=u,l._next=s,l._error=n,l._complete=o,l}return o(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;u.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,r=u.config.useDeprecatedSynchronousErrorHandling;if(this._error)r&&t.syncErrorThrowable?this.__tryOrSetError(t,this._error,e):this.__tryOrUnsub(this._error,e),this.unsubscribe();else if(t.syncErrorThrowable)r?(t.syncErrorValue=e,t.syncErrorThrown=!0):c.hostReportError(e),this.unsubscribe();else{if(this.unsubscribe(),r)throw e;c.hostReportError(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var r=function(){return e._complete.call(e._context)};u.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,r):this.__tryOrUnsub(r),this.unsubscribe()}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),u.config.useDeprecatedSynchronousErrorHandling)throw e;c.hostReportError(e)}},t.prototype.__tryOrSetError=function(e,t,r){if(!u.config.useDeprecatedSynchronousErrorHandling)throw Error("bad call");try{t.call(this._context,r)}catch(t){if(u.config.useDeprecatedSynchronousErrorHandling)return e.syncErrorValue=t,e.syncErrorThrown=!0,!0;return c.hostReportError(t),!0}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(d);t.SafeSubscriber=p},1016(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(743),o=r(6727),i=r(4864),a=r(1806);function s(e){return e.reduce(function(e,t){return e.concat(t instanceof a.UnsubscriptionError?t.errors:t)},[])}t.Subscription=function(){var e;function t(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return t.prototype.unsubscribe=function(){if(!this.closed){var e,r=this._parentOrParents,l=this._ctorUnsubscribe,u=this._unsubscribe,c=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r instanceof t)r.remove(this);else if(null!==r)for(var d=0;d<r.length;++d)r[d].remove(this);if(i.isFunction(u)){l&&(this._unsubscribe=void 0);try{u.call(this)}catch(t){e=t instanceof a.UnsubscriptionError?s(t.errors):[t]}}if(n.isArray(c))for(var d=-1,p=c.length;++d<p;){var f=c[d];if(o.isObject(f))try{f.unsubscribe()}catch(t){e=e||[],t instanceof a.UnsubscriptionError?e=e.concat(s(t.errors)):e.push(t)}}if(e)throw new a.UnsubscriptionError(e)}},t.prototype.add=function(e){var r=e;if(!e)return t.EMPTY;switch(typeof e){case"function":r=new t(e);case"object":if(r===this||r.closed||"function"!=typeof r.unsubscribe)return r;if(this.closed)return r.unsubscribe(),r;if(!(r instanceof t)){var n=r;(r=new t)._subscriptions=[n]}break;default:throw Error("unrecognized teardown "+e+" added to Subscription.")}var o=r._parentOrParents;if(null===o)r._parentOrParents=this;else if(o instanceof t){if(o===this)return r;r._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return r;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[r]:i.push(r),r},t.prototype.remove=function(e){var t=this._subscriptions;if(t){var r=t.indexOf(e);-1!==r&&t.splice(r,1)}},(e=new t).closed=!0,t.EMPTY=e,t}()},5319(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=!1;t.config={Promise:void 0,set useDeprecatedSynchronousErrorHandling(value){value?console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+Error().stack):r&&console.log("RxJS: Back to a better error behavior. Thank you. <3"),r=value},get useDeprecatedSynchronousErrorHandling(){return r}}},5901(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759),a=r(5092),s=r(1727);t.SimpleInnerSubscriber=function(e){function t(t){var r=e.call(this)||this;return r.parent=t,r}return o(t,e),t.prototype._next=function(e){this.parent.notifyNext(e)},t.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},t}(i.Subscriber),t.ComplexInnerSubscriber=function(e){function t(t,r,n){var o=e.call(this)||this;return o.parent=t,o.outerValue=r,o.outerIndex=n,o}return o(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this)},t.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(i.Subscriber),t.SimpleOuterSubscriber=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.destination.complete()},t}(i.Subscriber),t.ComplexOuterSubscriber=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.notifyNext=function(e,t,r,n){this.destination.next(t)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(i.Subscriber),t.innerSubscribe=function(e,t){var r;if(!t.closed){if(e instanceof a.Observable)return e.subscribe(t);try{r=s.subscribeTo(e)(t)}catch(e){t.error(e)}return r}}},7432(e,t,r){"use strict";var n,o,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var a=r(1077),s=r(5092),l=r(7759),u=r(1016),c=r(5203),d=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subjectFactory=r,n._refCount=0,n._isComplete=!1,n}return i(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject},t.prototype.connect=function(){var e=this._connection;return!e&&(this._isComplete=!1,(e=this._connection=new u.Subscription).add(this.source.subscribe(new p(this.getSubject(),this))),e.closed&&(this._connection=null,e=u.Subscription.EMPTY)),e},t.prototype.refCount=function(){return c.refCount()(this)},t}(s.Observable);t.ConnectableObservable=d,t.connectableObservableDescriptor={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:(o=d.prototype)._subscribe},_isComplete:{value:o._isComplete,writable:!0},getSubject:{value:o.getSubject},connect:{value:o.connect},refCount:{value:o.refCount}};var p=function(e){function t(t,r){var n=e.call(this,t)||this;return n.connectable=r,n}return i(t,e),t.prototype._error=function(t){this._unsubscribe(),e.prototype._error.call(this,t)},t.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}},t}(a.SubjectSubscriber);(function(e){this.connectable=e}).prototype.call=function(e,t){var r=this.connectable;r._refCount++;var n=new f(e,r),o=t.subscribe(n);return n.closed||(n.connection=r.connect()),o};var f=function(e){function t(t,r){var n=e.call(this,t)||this;return n.connectable=r,n}return i(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(!e){this.connection=null;return}this.connectable=null;var t=e._refCount;if(t<=0||(e._refCount=t-1,t>1)){this.connection=null;return}var r=this.connection,n=e._connection;this.connection=null,n&&(!r||n===r)&&n.unsubscribe()},t}(l.Subscriber)},7563(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5092),a=r(3766),s=r(9673);t.SubscribeOnObservable=function(e){function t(t,r,n){void 0===r&&(r=0),void 0===n&&(n=a.asap);var o=e.call(this)||this;return o.source=t,o.delayTime=r,o.scheduler=n,(!s.isNumeric(r)||r<0)&&(o.delayTime=0),n&&"function"==typeof n.schedule||(o.scheduler=a.asap),o}return o(t,e),t.create=function(e,r,n){return void 0===r&&(r=0),void 0===n&&(n=a.asap),new t(e,r,n)},t.dispatch=function(e){var t=e.source,r=e.subscriber;return this.add(t.subscribe(r))},t.prototype._subscribe=function(e){var r=this.delayTime,n=this.source;return this.scheduler.schedule(t.dispatch,r,{source:n,subscriber:e})},t}(i.Observable)},2413(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(3935),a=r(743),s=r(6771),l=r(7778),u=r(7446),c={};t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=void 0,n=void 0;return i.isScheduler(e[e.length-1])&&(n=e.pop()),"function"==typeof e[e.length-1]&&(r=e.pop()),1===e.length&&a.isArray(e[0])&&(e=e[0]),u.fromArray(e,n).lift(new d(r))};var d=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new p(e,this.resultSelector))},e}();t.CombineLatestOperator=d;var p=function(e){function t(t,r){var n=e.call(this,t)||this;return n.resultSelector=r,n.active=0,n.values=[],n.observables=[],n}return o(t,e),t.prototype._next=function(e){this.values.push(c),this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(var r=0;r<t;r++){var n=e[r];this.add(l.subscribeToResult(this,n,void 0,r))}}},t.prototype.notifyComplete=function(e){0==(this.active-=1)&&this.destination.complete()},t.prototype.notifyNext=function(e,t,r){var n=this.values,o=n[r],i=this.toRespond?o===c?--this.toRespond:this.toRespond:0;n[r]=t,0===i&&(this.resultSelector?this._tryResultSelector(n):this.destination.next(n.slice()))},t.prototype._tryResultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(s.OuterSubscriber);t.CombineLatestSubscriber=p},9623(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7986),o=r(208);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.concatAll()(n.of.apply(void 0,e))}},6691(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5092),o=r(5295),i=r(4914);t.defer=function(e){return new n.Observable(function(t){var r;try{r=e()}catch(e){t.error(e);return}return(r?o.from(r):i.empty()).subscribe(t)})}},4914(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5092);t.EMPTY=new n.Observable(function(e){return e.complete()}),t.empty=function(e){var r;return e?(r=e,new n.Observable(function(e){return r.schedule(function(){return e.complete()})})):t.EMPTY}},5295(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5092),o=r(1727),i=r(7670);t.from=function(e,t){return t?i.scheduled(e,t):e instanceof n.Observable?e:new n.Observable(o.subscribeTo(e))}},7446(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5092),o=r(422),i=r(5791);t.fromArray=function(e,t){return t?i.scheduleArray(e,t):new n.Observable(o.subscribeToArray(e))}},3395(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5092),o=r(3935),i=r(980),a=r(7446);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=1/0,s=null,l=e[e.length-1];return(o.isScheduler(l)?(s=e.pop(),e.length>1&&"number"==typeof e[e.length-1]&&(r=e.pop())):"number"==typeof l&&(r=e.pop()),null===s&&1===e.length&&e[0]instanceof n.Observable)?e[0]:i.mergeAll(r)(a.fromArray(e,s))}},7986(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3935),o=r(7446),i=r(5791);t.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return n.isScheduler(r)?(e.pop(),i.scheduleArray(e,r)):o.fromArray(e)}},7894(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(743),a=r(7446),s=r(6771),l=r(7778);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length)if(!i.isArray(e[0]))return e[0];else e=e[0];return a.fromArray(e,void 0).lift(new u)};var u=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new c(e))},e}();t.RaceOperator=u;var c=function(e){function t(t){var r=e.call(this,t)||this;return r.hasFirst=!1,r.observables=[],r.subscriptions=[],r}return o(t,e),t.prototype._next=function(e){this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{for(var r=0;r<t&&!this.hasFirst;r++){var n=e[r],o=l.subscribeToResult(this,n,void 0,r);this.subscriptions&&this.subscriptions.push(o),this.add(o)}this.observables=null}},t.prototype.notifyNext=function(e,t,r){if(!this.hasFirst){this.hasFirst=!0;for(var n=0;n<this.subscriptions.length;n++)if(n!==r){var o=this.subscriptions[n];o.unsubscribe(),this.remove(o)}this.subscriptions=null}this.destination.next(t)},t}(s.OuterSubscriber);t.RaceSubscriber=c},1673(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5092);function o(e){var t=e.error;e.subscriber.error(t)}t.throwError=function(e,t){return new n.Observable(t?function(r){return t.schedule(o,0,{error:e,subscriber:r})}:function(t){return t.error(e)})}},7954(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5092),o=r(6735),i=r(9673),a=r(3935);function s(e){var t=e.index,r=e.period,n=e.subscriber;if(n.next(t),!n.closed){if(-1===r)return n.complete();e.index=t+1,this.schedule(e,r)}}t.timer=function(e,t,r){void 0===e&&(e=0);var l=-1;return i.isNumeric(t)?l=1>Number(t)&&1||Number(t):a.isScheduler(t)&&(r=t),a.isScheduler(r)||(r=o.async),new n.Observable(function(t){var n=i.isNumeric(e)?e:e-r.now();return r.schedule(s,n,{index:0,period:l,subscriber:t})})}},5356(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7446),a=r(743),s=r(7759),l=r(8258),u=r(5901);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return"function"==typeof r&&e.pop(),i.fromArray(e,void 0).lift(new c(r))};var c=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new d(e,this.resultSelector))},e}();t.ZipOperator=c;var d=function(e){function t(t,r,n){void 0===n&&(n=Object.create(null));var o=e.call(this,t)||this;return o.resultSelector=r,o.iterators=[],o.active=0,o.resultSelector="function"==typeof r?r:void 0,o}return o(t,e),t.prototype._next=function(e){var t=this.iterators;a.isArray(e)?t.push(new f(e)):"function"==typeof e[l.iterator]?t.push(new p(e[l.iterator]())):t.push(new h(this.destination,this,e))},t.prototype._complete=function(){var e=this.iterators,t=e.length;if(this.unsubscribe(),0===t)return void this.destination.complete();this.active=t;for(var r=0;r<t;r++){var n=e[r];n.stillUnsubscribed?this.destination.add(n.subscribe()):this.active--}},t.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},t.prototype.checkIterators=function(){for(var e=this.iterators,t=e.length,r=this.destination,n=0;n<t;n++){var o=e[n];if("function"==typeof o.hasValue&&!o.hasValue())return}for(var i=!1,a=[],n=0;n<t;n++){var o=e[n],s=o.next();if(o.hasCompleted()&&(i=!0),s.done)return void r.complete();a.push(s.value)}this.resultSelector?this._tryresultSelector(a):r.next(a),i&&r.complete()},t.prototype._tryresultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(s.Subscriber);t.ZipSubscriber=d;var p=function(){function e(e){this.iterator=e,this.nextResult=e.next()}return e.prototype.hasValue=function(){return!0},e.prototype.next=function(){var e=this.nextResult;return this.nextResult=this.iterator.next(),e},e.prototype.hasCompleted=function(){var e=this.nextResult;return!!(e&&e.done)},e}(),f=function(){function e(e){this.array=e,this.index=0,this.length=0,this.length=e.length}return e.prototype[l.iterator]=function(){return this},e.prototype.next=function(e){var t=this.index++,r=this.array;return t<this.length?{value:r[t],done:!1}:{value:null,done:!0}},e.prototype.hasValue=function(){return this.array.length>this.index},e.prototype.hasCompleted=function(){return this.array.length===this.index},e}(),h=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.parent=r,o.observable=n,o.stillUnsubscribed=!0,o.buffer=[],o.isComplete=!1,o}return o(t,e),t.prototype[l.iterator]=function(){return this},t.prototype.next=function(){var e=this.buffer;return 0===e.length&&this.isComplete?{value:null,done:!0}:{value:e.shift(),done:!1}},t.prototype.hasValue=function(){return this.buffer.length>0},t.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},t.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},t.prototype.notifyNext=function(e){this.buffer.push(e),this.parent.checkIterators()},t.prototype.subscribe=function(){return u.innerSubscribe(this.observable,new u.SimpleInnerSubscriber(this))},t}(u.SimpleOuterSubscriber)},8780(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5901);t.audit=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.durationSelector))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.durationSelector=r,n.hasValue=!1,n}return o(t,e),t.prototype._next=function(e){if(this.value=e,this.hasValue=!0,!this.throttled){var t=void 0;try{t=(0,this.durationSelector)(e)}catch(e){return this.destination.error(e)}var r=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this));!r||r.closed?this.clearThrottle():this.add(this.throttled=r)}},t.prototype.clearThrottle=function(){var e=this.value,t=this.hasValue,r=this.throttled;r&&(this.remove(r),this.throttled=void 0,r.unsubscribe()),t&&(this.value=void 0,this.hasValue=!1,this.destination.next(e))},t.prototype.notifyNext=function(){this.clearThrottle()},t.prototype.notifyComplete=function(){this.clearThrottle()},t}(i.SimpleOuterSubscriber)},3441(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6735),o=r(8780),i=r(7954);t.auditTime=function(e,t){return void 0===t&&(t=n.async),o.audit(function(){return i.timer(e,t)})}},4234(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5901);t.buffer=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.closingNotifier=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.closingNotifier))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.buffer=[],n.add(i.innerSubscribe(r,new i.SimpleInnerSubscriber(n))),n}return o(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype.notifyNext=function(){var e=this.buffer;this.buffer=[],this.destination.next(e)},t}(i.SimpleOuterSubscriber)},7650(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.bufferCount=function(e,t){return void 0===t&&(t=null),function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.bufferSize=e,this.startBufferEvery=t,t&&e!==t?this.subscriberClass=l:this.subscriberClass=s}return e.prototype.call=function(e,t){return t.subscribe(new this.subscriberClass(e,this.bufferSize,this.startBufferEvery))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.bufferSize=r,n.buffer=[],n}return o(t,e),t.prototype._next=function(e){var t=this.buffer;t.push(e),t.length==this.bufferSize&&(this.destination.next(t),this.buffer=[])},t.prototype._complete=function(){var t=this.buffer;t.length>0&&this.destination.next(t),e.prototype._complete.call(this)},t}(i.Subscriber),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.bufferSize=r,o.startBufferEvery=n,o.buffers=[],o.count=0,o}return o(t,e),t.prototype._next=function(e){var t=this.bufferSize,r=this.startBufferEvery,n=this.buffers,o=this.count;this.count++,o%r==0&&n.push([]);for(var i=n.length;i--;){var a=n[i];a.push(e),a.length===t&&(n.splice(i,1),this.destination.next(a))}},t.prototype._complete=function(){for(var t=this.buffers,r=this.destination;t.length>0;){var n=t.shift();n.length>0&&r.next(n)}e.prototype._complete.call(this)},t}(i.Subscriber)},4360(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(6735),a=r(7759),s=r(3935);t.bufferTime=function(e){var t=arguments.length,r=i.async;s.isScheduler(arguments[arguments.length-1])&&(r=arguments[arguments.length-1],t--);var n=null;t>=2&&(n=arguments[1]);var o=1/0;return t>=3&&(o=arguments[2]),function(t){return t.lift(new l(e,n,o,r))}};var l=function(){function e(e,t,r,n){this.bufferTimeSpan=e,this.bufferCreationInterval=t,this.maxBufferSize=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},e}(),u=function(){this.buffer=[]},c=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;a.bufferTimeSpan=r,a.bufferCreationInterval=n,a.maxBufferSize=o,a.scheduler=i,a.contexts=[];var s=a.openContext();return a.timespanOnly=null==n||n<0,a.timespanOnly?a.add(s.closeAction=i.schedule(d,r,{subscriber:a,context:s,bufferTimeSpan:r})):(a.add(s.closeAction=i.schedule(f,r,{subscriber:a,context:s})),a.add(i.schedule(p,n,{bufferTimeSpan:r,bufferCreationInterval:n,subscriber:a,scheduler:i}))),a}return o(t,e),t.prototype._next=function(e){for(var t,r=this.contexts,n=r.length,o=0;o<n;o++){var i=r[o],a=i.buffer;a.push(e),a.length==this.maxBufferSize&&(t=i)}t&&this.onBufferFull(t)},t.prototype._error=function(t){this.contexts.length=0,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts,r=this.destination;t.length>0;){var n=t.shift();r.next(n.buffer)}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.contexts=null},t.prototype.onBufferFull=function(e){this.closeContext(e);var t=e.closeAction;if(t.unsubscribe(),this.remove(t),!this.closed&&this.timespanOnly){e=this.openContext();var r=this.bufferTimeSpan,n={subscriber:this,context:e,bufferTimeSpan:r};this.add(e.closeAction=this.scheduler.schedule(d,r,n))}},t.prototype.openContext=function(){var e=new u;return this.contexts.push(e),e},t.prototype.closeContext=function(e){this.destination.next(e.buffer);var t=this.contexts;(t?t.indexOf(e):-1)>=0&&t.splice(t.indexOf(e),1)},t}(a.Subscriber);function d(e){var t=e.subscriber,r=e.context;r&&t.closeContext(r),t.closed||(e.context=t.openContext(),e.context.closeAction=this.schedule(e,e.bufferTimeSpan))}function p(e){var t=e.bufferCreationInterval,r=e.bufferTimeSpan,n=e.subscriber,o=e.scheduler,i=n.openContext();n.closed||(n.add(i.closeAction=o.schedule(f,r,{subscriber:n,context:i})),this.schedule(e,t))}function f(e){var t=e.subscriber,r=e.context;t.closeContext(r)}},3381(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1016),a=r(7778),s=r(6771);t.bufferToggle=function(e,t){return function(r){return r.lift(new l(e,t))}};var l=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.openings,this.closingSelector))},e}(),u=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.closingSelector=n,o.contexts=[],o.add(a.subscribeToResult(o,r)),o}return o(t,e),t.prototype._next=function(e){for(var t=this.contexts,r=t.length,n=0;n<r;n++)t[n].buffer.push(e)},t.prototype._error=function(t){for(var r=this.contexts;r.length>0;){var n=r.shift();n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts;t.length>0;){var r=t.shift();this.destination.next(r.buffer),r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,e.prototype._complete.call(this)},t.prototype.notifyNext=function(e,t){e?this.closeBuffer(e):this.openBuffer(t)},t.prototype.notifyComplete=function(e){this.closeBuffer(e.context)},t.prototype.openBuffer=function(e){try{var t=this.closingSelector.call(this,e);t&&this.trySubscribe(t)}catch(e){this._error(e)}},t.prototype.closeBuffer=function(e){var t=this.contexts;if(t&&e){var r=e.buffer,n=e.subscription;this.destination.next(r),t.splice(t.indexOf(e),1),this.remove(n),n.unsubscribe()}},t.prototype.trySubscribe=function(e){var t=this.contexts,r=new i.Subscription,n={buffer:[],subscription:r};t.push(n);var o=a.subscribeToResult(this,e,n);!o||o.closed?this.closeBuffer(n):(o.context=n,this.add(o),r.add(o))},t}(s.OuterSubscriber)},1069(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1016),a=r(5901);t.bufferWhen=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.closingSelector))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.closingSelector=r,n.subscribing=!1,n.openBuffer(),n}return o(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype._complete=function(){var t=this.buffer;t&&this.destination.next(t),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},t.prototype.notifyNext=function(){this.openBuffer()},t.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},t.prototype.openBuffer=function(){var e,t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var r=this.buffer;this.buffer&&this.destination.next(r),this.buffer=[];try{e=(0,this.closingSelector)()}catch(e){return this.error(e)}t=new i.Subscription,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(a.innerSubscribe(e,new a.SimpleInnerSubscriber(this))),this.subscribing=!1},t}(a.SimpleOuterSubscriber)},5916(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5901);t.catchError=function(e){return function(t){var r=new a(e),n=t.lift(r);return r.caught=n}};var a=function(){function e(e){this.selector=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.selector,this.caught))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.selector=r,o.caught=n,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var r=void 0;try{r=this.selector(t,this.caught)}catch(t){e.prototype.error.call(this,t);return}this._unsubscribeAndRecycle();var n=new i.SimpleInnerSubscriber(this);this.add(n);var o=i.innerSubscribe(r,n);o!==n&&this.add(o)}},t}(i.SimpleOuterSubscriber)},239(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2413);t.combineAll=function(e){return function(t){return t.lift(new n.CombineLatestOperator(e))}}},9397(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(743),o=r(2413),i=r(5295);t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=null;return"function"==typeof e[e.length-1]&&(r=e.pop()),1===e.length&&n.isArray(e[0])&&(e=e[0].slice()),function(t){return t.lift.call(i.from([t].concat(e)),new o.CombineLatestOperator(r))}}},6255(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9623);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(n.concat.apply(void 0,[t].concat(e)))}}},208(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(980);t.concatAll=function(){return n.mergeAll(1)}},2209(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(781);t.concatMap=function(e,t){return n.mergeMap(e,t,1)}},3232(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2209);t.concatMapTo=function(e,t){return n.concatMap(function(){return e},t)}},5476(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.count=function(e){return function(t){return t.lift(new a(e,t))}};var a=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.source))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.source=n,o.count=0,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.predicate?this._tryPredicate(e):this.count++},t.prototype._tryPredicate=function(e){var t;try{t=this.predicate(e,this.index++,this.source)}catch(e){this.destination.error(e);return}t&&this.count++},t.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},t}(i.Subscriber)},9768(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5901);t.debounce=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.durationSelector))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.durationSelector=r,n.hasValue=!1,n}return o(t,e),t.prototype._next=function(e){try{var t=this.durationSelector.call(this,e);t&&this._tryNext(e,t)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.emitValue(),this.destination.complete()},t.prototype._tryNext=function(e,t){var r=this.durationSubscription;this.value=e,this.hasValue=!0,r&&(r.unsubscribe(),this.remove(r)),(r=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this)))&&!r.closed&&this.add(this.durationSubscription=r)},t.prototype.notifyNext=function(){this.emitValue()},t.prototype.notifyComplete=function(){this.emitValue()},t.prototype.emitValue=function(){if(this.hasValue){var t=this.value,r=this.durationSubscription;r&&(this.durationSubscription=void 0,r.unsubscribe(),this.remove(r)),this.value=void 0,this.hasValue=!1,e.prototype._next.call(this,t)}},t}(i.SimpleOuterSubscriber)},2661(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759),a=r(6735);t.debounceTime=function(e,t){return void 0===t&&(t=a.async),function(r){return r.lift(new s(e,t))}};var s=function(){function e(e,t){this.dueTime=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.dueTime,this.scheduler))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.dueTime=r,o.scheduler=n,o.debouncedSubscription=null,o.lastValue=null,o.hasValue=!1,o}return o(t,e),t.prototype._next=function(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(u,this.dueTime,this))},t.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},t.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var e=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(e)}},t.prototype.clearDebounce=function(){var e=this.debouncedSubscription;null!==e&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)},t}(i.Subscriber);function u(e){e.debouncedNext()}},952(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.defaultIfEmpty=function(e){return void 0===e&&(e=null),function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.defaultValue=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.defaultValue))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.defaultValue=r,n.isEmpty=!0,n}return o(t,e),t.prototype._next=function(e){this.isEmpty=!1,this.destination.next(e)},t.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},t}(i.Subscriber)},7436(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(6735),a=r(6740),s=r(7759),l=r(4942);t.delay=function(e,t){void 0===t&&(t=i.async);var r=a.isDate(e)?e-t.now():Math.abs(e);return function(e){return e.lift(new u(r,t))}};var u=function(){function e(e,t){this.delay=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.delay,this.scheduler))},e}(),c=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.delay=r,o.scheduler=n,o.queue=[],o.active=!1,o.errored=!1,o}return o(t,e),t.dispatch=function(e){for(var t=e.source,r=t.queue,n=e.scheduler,o=e.destination;r.length>0&&r[0].time-n.now()<=0;)r.shift().notification.observe(o);if(r.length>0){var i=Math.max(0,r[0].time-n.now());this.schedule(e,i)}else this.unsubscribe(),t.active=!1},t.prototype._schedule=function(e){this.active=!0,this.destination.add(e.schedule(t.dispatch,this.delay,{source:this,destination:this.destination,scheduler:e}))},t.prototype.scheduleNotification=function(e){if(!0!==this.errored){var t=this.scheduler,r=new d(t.now()+this.delay,e);this.queue.push(r),!1===this.active&&this._schedule(t)}},t.prototype._next=function(e){this.scheduleNotification(l.Notification.createNext(e))},t.prototype._error=function(e){this.errored=!0,this.queue=[],this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.scheduleNotification(l.Notification.createComplete()),this.unsubscribe()},t}(s.Subscriber),d=function(e,t){this.time=e,this.notification=t}},1136(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759),a=r(5092),s=r(6771),l=r(7778);t.delayWhen=function(e,t){return t?function(r){return new d(r,t).lift(new u(e))}:function(t){return t.lift(new u(e))}};var u=function(){function e(e){this.delayDurationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.delayDurationSelector))},e}(),c=function(e){function t(t,r){var n=e.call(this,t)||this;return n.delayDurationSelector=r,n.completed=!1,n.delayNotifierSubscriptions=[],n.index=0,n}return o(t,e),t.prototype.notifyNext=function(e,t,r,n,o){this.destination.next(e),this.removeSubscription(o),this.tryComplete()},t.prototype.notifyError=function(e,t){this._error(e)},t.prototype.notifyComplete=function(e){var t=this.removeSubscription(e);t&&this.destination.next(t),this.tryComplete()},t.prototype._next=function(e){var t=this.index++;try{var r=this.delayDurationSelector(e,t);r&&this.tryDelay(r,e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},t.prototype.removeSubscription=function(e){e.unsubscribe();var t=this.delayNotifierSubscriptions.indexOf(e);return -1!==t&&this.delayNotifierSubscriptions.splice(t,1),e.outerValue},t.prototype.tryDelay=function(e,t){var r=l.subscribeToResult(this,e,t);r&&!r.closed&&(this.destination.add(r),this.delayNotifierSubscriptions.push(r))},t.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},t}(s.OuterSubscriber),d=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subscriptionDelay=r,n}return o(t,e),t.prototype._subscribe=function(e){this.subscriptionDelay.subscribe(new p(e,this.source))},t}(a.Observable),p=function(e){function t(t,r){var n=e.call(this)||this;return n.parent=t,n.source=r,n.sourceSubscribed=!1,n}return o(t,e),t.prototype._next=function(e){this.subscribeToSource()},t.prototype._error=function(e){this.unsubscribe(),this.parent.error(e)},t.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},t.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},t}(i.Subscriber)},6051(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.dematerialize=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype._next=function(e){e.observe(this.destination)},t}(i.Subscriber)},5343(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5901);t.distinct=function(e,t){return function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.keySelector=e,this.flushes=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.keySelector,this.flushes))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.keySelector=r,o.values=new Set,n&&o.add(i.innerSubscribe(n,new i.SimpleInnerSubscriber(o))),o}return o(t,e),t.prototype.notifyNext=function(){this.values.clear()},t.prototype.notifyError=function(e){this._error(e)},t.prototype._next=function(e){this.keySelector?this._useKeySelector(e):this._finalizeNext(e,e)},t.prototype._useKeySelector=function(e){var t,r=this.destination;try{t=this.keySelector(e)}catch(e){r.error(e);return}this._finalizeNext(t,e)},t.prototype._finalizeNext=function(e,t){var r=this.values;r.has(e)||(r.add(e),this.destination.next(t))},t}(i.SimpleOuterSubscriber);t.DistinctSubscriber=s},8179(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.distinctUntilChanged=function(e,t){return function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.compare=e,this.keySelector=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.compare,this.keySelector))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.keySelector=n,o.hasKey=!1,"function"==typeof r&&(o.compare=r),o}return o(t,e),t.prototype.compare=function(e,t){return e===t},t.prototype._next=function(e){try{var t,r=this.keySelector;t=r?r(e):e}catch(e){return this.destination.error(e)}var n=!1;if(this.hasKey)try{n=(0,this.compare)(this.key,t)}catch(e){return this.destination.error(e)}else this.hasKey=!0;n||(this.key=t,this.destination.next(e))},t}(i.Subscriber)},3670(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8179);t.distinctUntilKeyChanged=function(e,t){return n.distinctUntilChanged(function(r,n){return t?t(r[e],n[e]):r[e]===n[e]})}},7366(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2519),o=r(4629),i=r(8347),a=r(952),s=r(5624);t.elementAt=function(e,t){if(e<0)throw new n.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(l){return l.pipe(o.filter(function(t,r){return r===e}),s.take(1),r?a.defaultIfEmpty(t):i.throwIfEmpty(function(){return new n.ArgumentOutOfRangeError}))}}},1650(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9623),o=r(7986);t.endWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return n.concat(t,o.of.apply(void 0,e))}}},2472(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.every=function(e,t){return function(r){return r.lift(new a(e,t,r))}};var a=function(){function e(e,t,r){this.predicate=e,this.thisArg=t,this.source=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.thisArg,this.source))},e}(),s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.predicate=r,i.thisArg=n,i.source=o,i.index=0,i.thisArg=n||i,i}return o(t,e),t.prototype.notifyComplete=function(e){this.destination.next(e),this.destination.complete()},t.prototype._next=function(e){var t=!1;try{t=this.predicate.call(this.thisArg,e,this.index++,this.source)}catch(e){this.destination.error(e);return}t||this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(i.Subscriber)},5893(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5901);t.exhaust=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){var r=e.call(this,t)||this;return r.hasCompleted=!1,r.hasSubscription=!1,r}return o(t,e),t.prototype._next=function(e){this.hasSubscription||(this.hasSubscription=!0,this.add(i.innerSubscribe(e,new i.SimpleInnerSubscriber(this))))},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},t.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},t}(i.SimpleOuterSubscriber)},9219(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(9233),a=r(5295),s=r(5901);t.exhaustMap=function e(t,r){return r?function(n){return n.pipe(e(function(e,n){return a.from(t(e,n)).pipe(i.map(function(t,o){return r(e,t,n,o)}))}))}:function(e){return e.lift(new l(t))}};var l=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.project))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.project=r,n.hasSubscription=!1,n.hasCompleted=!1,n.index=0,n}return o(t,e),t.prototype._next=function(e){this.hasSubscription||this.tryNext(e)},t.prototype.tryNext=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(e){this.destination.error(e);return}this.hasSubscription=!0,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new s.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=s.innerSubscribe(e,t);n!==t&&r.add(n)},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},t}(s.SimpleOuterSubscriber)},6527(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5901);t.expand=function(e,t,r){return void 0===t&&(t=1/0),t=1>(t||0)?1/0:t,function(n){return n.lift(new a(e,t,r))}};var a=function(){function e(e,t,r){this.project=e,this.concurrent=t,this.scheduler=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.project,this.concurrent,this.scheduler))},e}();t.ExpandOperator=a;var s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.project=r,i.concurrent=n,i.scheduler=o,i.index=0,i.active=0,i.hasCompleted=!1,n<1/0&&(i.buffer=[]),i}return o(t,e),t.dispatch=function(e){var t=e.subscriber,r=e.result,n=e.value,o=e.index;t.subscribeToProjection(r,n,o)},t.prototype._next=function(e){var r=this.destination;if(r.closed)return void this._complete();var n=this.index++;if(this.active<this.concurrent){r.next(e);try{var o=(0,this.project)(e,n);this.scheduler?this.destination.add(this.scheduler.schedule(t.dispatch,0,{subscriber:this,result:o,value:e,index:n})):this.subscribeToProjection(o,e,n)}catch(e){r.error(e)}}else this.buffer.push(e)},t.prototype.subscribeToProjection=function(e,t,r){this.active++,this.destination.add(i.innerSubscribe(e,new i.SimpleInnerSubscriber(this)))},t.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this._next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e&&e.length>0&&this._next(e.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},t}(i.SimpleOuterSubscriber);t.ExpandSubscriber=s},4629(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.filter=function(e,t){return function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.thisArg))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.thisArg=n,o.count=0,o}return o(t,e),t.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(e){this.destination.error(e);return}t&&this.destination.next(e)},t}(i.Subscriber)},4349(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759),a=r(1016);t.finalize=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.callback=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.callback))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.add(new a.Subscription(r)),n}return o(t,e),t}(i.Subscriber)},2376(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.find=function(e,t){if("function"!=typeof e)throw TypeError("predicate is not a function");return function(r){return r.lift(new a(e,r,!1,t))}};var a=function(){function e(e,t,r,n){this.predicate=e,this.source=t,this.yieldIndex=r,this.thisArg=n}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.source,this.yieldIndex,this.thisArg))},e}();t.FindValueOperator=a;var s=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.predicate=r,a.source=n,a.yieldIndex=o,a.thisArg=i,a.index=0,a}return o(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete(),this.unsubscribe()},t.prototype._next=function(e){var t=this.predicate,r=this.thisArg,n=this.index++;try{t.call(r||this,e,n,this.source)&&this.notifyComplete(this.yieldIndex?n:e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},t}(i.Subscriber);t.FindValueSubscriber=s},8674(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2376);t.findIndex=function(e,t){return function(r){return r.lift(new n.FindValueOperator(e,r,!0,t))}}},7089(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2637),o=r(4629),i=r(5624),a=r(952),s=r(8347),l=r(8522);t.first=function(e,t){var r=arguments.length>=2;return function(u){return u.pipe(e?o.filter(function(t,r){return e(t,r,u)}):l.identity,i.take(1),r?a.defaultIfEmpty(t):s.throwIfEmpty(function(){return new n.EmptyError}))}}},6217(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759),a=r(1016),s=r(5092),l=r(1077);t.groupBy=function(e,t,r,n){return function(o){return o.lift(new u(e,t,r,n))}};var u=function(){function e(e,t,r,n){this.keySelector=e,this.elementSelector=t,this.durationSelector=r,this.subjectSelector=n}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},e}(),c=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.keySelector=r,a.elementSelector=n,a.durationSelector=o,a.subjectSelector=i,a.groups=null,a.attemptedToUnsubscribe=!1,a.count=0,a}return o(t,e),t.prototype._next=function(e){var t;try{t=this.keySelector(e)}catch(e){this.error(e);return}this._group(e,t)},t.prototype._group=function(e,t){var r,n=this.groups;n||(n=this.groups=new Map);var o=n.get(t);if(this.elementSelector)try{r=this.elementSelector(e)}catch(e){this.error(e)}else r=e;if(!o){o=this.subjectSelector?this.subjectSelector():new l.Subject,n.set(t,o);var i=new p(t,o,this);if(this.destination.next(i),this.durationSelector){var a=void 0;try{a=this.durationSelector(new p(t,o))}catch(e){this.error(e);return}this.add(a.subscribe(new d(t,o,this)))}}o.closed||o.next(r)},t.prototype._error=function(e){var t=this.groups;t&&(t.forEach(function(t,r){t.error(e)}),t.clear()),this.destination.error(e)},t.prototype._complete=function(){var e=this.groups;e&&(e.forEach(function(e,t){e.complete()}),e.clear()),this.destination.complete()},t.prototype.removeGroup=function(e){this.groups.delete(e)},t.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&e.prototype.unsubscribe.call(this))},t}(i.Subscriber),d=function(e){function t(t,r,n){var o=e.call(this,r)||this;return o.key=t,o.group=r,o.parent=n,o}return o(t,e),t.prototype._next=function(e){this.complete()},t.prototype._unsubscribe=function(){var e=this.parent,t=this.key;this.key=this.parent=null,e&&e.removeGroup(t)},t}(i.Subscriber),p=function(e){function t(t,r,n){var o=e.call(this)||this;return o.key=t,o.groupSubject=r,o.refCountSubscription=n,o}return o(t,e),t.prototype._subscribe=function(e){var t=new a.Subscription,r=this.refCountSubscription,n=this.groupSubject;return r&&!r.closed&&t.add(new f(r)),t.add(n.subscribe(e)),t},t}(s.Observable);t.GroupedObservable=p;var f=function(e){function t(t){var r=e.call(this)||this;return r.parent=t,t.count++,r}return o(t,e),t.prototype.unsubscribe=function(){var t=this.parent;t.closed||this.closed||(e.prototype.unsubscribe.call(this),t.count-=1,0===t.count&&t.attemptedToUnsubscribe&&t.unsubscribe())},t}(a.Subscription)},6024(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.ignoreElements=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype._next=function(e){},t}(i.Subscriber)},7362(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.isEmpty=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype._next=function(e){this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(i.Subscriber)},6047(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2637),o=r(4629),i=r(6696),a=r(8347),s=r(952),l=r(8522);t.last=function(e,t){var r=arguments.length>=2;return function(u){return u.pipe(e?o.filter(function(t,r){return e(t,r,u)}):l.identity,i.takeLast(1),r?s.defaultIfEmpty(t):a.throwIfEmpty(function(){return new n.EmptyError}))}}},9233(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.map=function(e,t){return function(r){if("function"!=typeof e)throw TypeError("argument is not a function. Are you looking for `mapTo()`?");return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.project,this.thisArg))},e}();t.MapOperator=a;var s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.project=r,o.count=0,o.thisArg=n||o,o}return o(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(i.Subscriber)},7296(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.mapTo=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.value=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.value))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.value=r,n}return o(t,e),t.prototype._next=function(e){this.destination.next(this.value)},t}(i.Subscriber)},5434(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759),a=r(4942);t.materialize=function(){return function(e){return e.lift(new s)}};var s=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new l(e))},e}(),l=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype._next=function(e){this.destination.next(a.Notification.createNext(e))},t.prototype._error=function(e){var t=this.destination;t.next(a.Notification.createError(e)),t.complete()},t.prototype._complete=function(){var e=this.destination;e.next(a.Notification.createComplete()),e.complete()},t}(i.Subscriber)},7001(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1929);t.max=function(e){return n.reduce("function"==typeof e?function(t,r){return e(t,r)>0?t:r}:function(e,t){return e>t?e:t})}},4779(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3395);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(n.merge.apply(void 0,[t].concat(e)))}}},980(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(781),o=r(8522);t.mergeAll=function(e){return void 0===e&&(e=1/0),n.mergeMap(o.identity,e)}},781(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(9233),a=r(5295),s=r(5901);function l(e,t,r){return(void 0===r&&(r=1/0),"function"==typeof t)?function(n){return n.pipe(l(function(r,n){return a.from(e(r,n)).pipe(i.map(function(e,o){return t(r,e,n,o)}))},r))}:("number"==typeof t&&(r=t),function(t){return t.lift(new u(e,r))})}t.mergeMap=l;var u=function(){function e(e,t){void 0===t&&(t=1/0),this.project=e,this.concurrent=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.project,this.concurrent))},e}();t.MergeMapOperator=u;var c=function(e){function t(t,r,n){void 0===n&&(n=1/0);var o=e.call(this,t)||this;return o.project=r,o.concurrent=n,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)},t.prototype._tryNext=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(e){this.destination.error(e);return}this.active++,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new s.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=s.innerSubscribe(e,t);n!==t&&r.add(n)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(s.SimpleOuterSubscriber);t.MergeMapSubscriber=c,t.flatMap=l},2988(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(781);t.mergeMapTo=function(e,t,r){return(void 0===r&&(r=1/0),"function"==typeof t)?n.mergeMap(function(){return e},t,r):("number"==typeof t&&(r=t),n.mergeMap(function(){return e},r))}},6430(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5901);t.mergeScan=function(e,t,r){return void 0===r&&(r=1/0),function(n){return n.lift(new a(e,t,r))}};var a=function(){function e(e,t,r){this.accumulator=e,this.seed=t,this.concurrent=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.accumulator,this.seed,this.concurrent))},e}();t.MergeScanOperator=a;var s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.accumulator=r,i.acc=n,i.concurrent=o,i.hasValue=!1,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return o(t,e),t.prototype._next=function(e){if(this.active<this.concurrent){var t=this.index++,r=this.destination,n=void 0;try{n=(0,this.accumulator)(this.acc,e,t)}catch(e){return r.error(e)}this.active++,this._innerSub(n)}else this.buffer.push(e)},t.prototype._innerSub=function(e){var t=new i.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=i.innerSubscribe(e,t);n!==t&&r.add(n)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe()},t.prototype.notifyNext=function(e){var t=this.destination;this.acc=e,this.hasValue=!0,t.next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},t}(i.SimpleOuterSubscriber);t.MergeScanSubscriber=s},1547(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1929);t.min=function(e){return n.reduce("function"==typeof e?function(t,r){return 0>e(t,r)?t:r}:function(e,t){return e<t?e:t})}},9529(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7432);t.multicast=function(e,t){return function(r){if(i="function"==typeof e?e:function(){return e},"function"==typeof t)return r.lift(new o(i,t));var i,a=Object.create(r,n.connectableObservableDescriptor);return a.source=r,a.subjectFactory=i,a}};var o=function(){function e(e,t){this.subjectFactory=e,this.selector=t}return e.prototype.call=function(e,t){var r=this.selector,n=this.subjectFactory(),o=r(n).subscribe(e);return o.add(t.subscribe(n)),o},e}();t.MulticastOperator=o},4654(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759),a=r(4942);t.observeOn=function(e,t){return void 0===t&&(t=0),function(r){return r.lift(new s(e,t))}};var s=function(){function e(e,t){void 0===t&&(t=0),this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.scheduler,this.delay))},e}();t.ObserveOnOperator=s;var l=function(e){function t(t,r,n){void 0===n&&(n=0);var o=e.call(this,t)||this;return o.scheduler=r,o.delay=n,o}return o(t,e),t.dispatch=function(e){var t=e.notification,r=e.destination;t.observe(r),this.unsubscribe()},t.prototype.scheduleMessage=function(e){this.destination.add(this.scheduler.schedule(t.dispatch,this.delay,new u(e,this.destination)))},t.prototype._next=function(e){this.scheduleMessage(a.Notification.createNext(e))},t.prototype._error=function(e){this.scheduleMessage(a.Notification.createError(e)),this.unsubscribe()},t.prototype._complete=function(){this.scheduleMessage(a.Notification.createComplete()),this.unsubscribe()},t}(i.Subscriber);t.ObserveOnSubscriber=l;var u=function(e,t){this.notification=e,this.destination=t};t.ObserveOnMessage=u},5276(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5295),a=r(743),s=r(5901);t.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length&&a.isArray(e[0])&&(e=e[0]),function(t){return t.lift(new l(e))}},t.onErrorResumeNextStatic=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=void 0;return 1===e.length&&a.isArray(e[0])&&(e=e[0]),r=e.shift(),i.from(r).lift(new l(e))};var l=function(){function e(e){this.nextSources=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.nextSources))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.destination=t,n.nextSources=r,n}return o(t,e),t.prototype.notifyError=function(){this.subscribeToNextSource()},t.prototype.notifyComplete=function(){this.subscribeToNextSource()},t.prototype._error=function(e){this.subscribeToNextSource(),this.unsubscribe()},t.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},t.prototype.subscribeToNextSource=function(){var e=this.nextSources.shift();if(e){var t=new s.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=s.innerSubscribe(e,t);n!==t&&r.add(n)}else this.destination.complete()},t}(s.SimpleOuterSubscriber)},8155(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.pairwise=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){var r=e.call(this,t)||this;return r.hasPrev=!1,r}return o(t,e),t.prototype._next=function(e){var t;this.hasPrev?t=[this.prev,e]:this.hasPrev=!0,this.prev=e,t&&this.destination.next(t)},t}(i.Subscriber)},7337(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4103),o=r(4629);t.partition=function(e,t){return function(r){return[o.filter(e,t)(r),o.filter(n.not(e,t))(r)]}}},6050(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9233);t.pluck=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.length;if(0===r)throw Error("list of properties cannot be empty.");return function(t){var o,i;return n.map((o=e,i=r,function(e){for(var t=e,r=0;r<i;r++){var n=null!=t?t[o[r]]:void 0;if(void 0===n)return;t=n}return t}))(t)}}},6904(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1077),o=r(9529);t.publish=function(e){return e?o.multicast(function(){return new n.Subject},e):o.multicast(new n.Subject)}},2334(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8791),o=r(9529);t.publishBehavior=function(e){return function(t){return o.multicast(new n.BehaviorSubject(e))(t)}}},232(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8513),o=r(9529);t.publishLast=function(){return function(e){return o.multicast(new n.AsyncSubject)(e)}}},4355(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(328),o=r(9529);t.publishReplay=function(e,t,r,i){r&&"function"!=typeof r&&(i=r);var a="function"==typeof r?r:void 0,s=new n.ReplaySubject(e,t,i);return function(e){return o.multicast(function(){return s},a)(e)}}},9646(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(743),o=r(7894);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return 1===e.length&&n.isArray(e[0])&&(e=e[0]),t.lift.call(o.race.apply(void 0,[t].concat(e)))}}},1929(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5002),o=r(6696),i=r(952),a=r(7928);t.reduce=function(e,t){return arguments.length>=2?function(r){return a.pipe(n.scan(e,t),o.takeLast(1),i.defaultIfEmpty(t))(r)}:function(t){return a.pipe(n.scan(function(t,r,n){return e(t,r,n+1)}),o.takeLast(1))(t)}}},5203(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.refCount=function(){return function(e){return e.lift(new a(e))}};var a=function(){function e(e){this.connectable=e}return e.prototype.call=function(e,t){var r=this.connectable;r._refCount++;var n=new s(e,r),o=t.subscribe(n);return n.closed||(n.connection=r.connect()),o},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.connectable=r,n}return o(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(!e){this.connection=null;return}this.connectable=null;var t=e._refCount;if(t<=0||(e._refCount=t-1,t>1)){this.connection=null;return}var r=this.connection,n=e._connection;this.connection=null,n&&(!r||n===r)&&n.unsubscribe()},t}(i.Subscriber)},68(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759),a=r(4914);t.repeat=function(e){return void 0===e&&(e=-1),function(t){return 0===e?a.empty():e<0?t.lift(new s(-1,t)):t.lift(new s(e-1,t))}};var s=function(){function e(e,t){this.count=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.count,this.source))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.count=r,o.source=n,o}return o(t,e),t.prototype.complete=function(){if(!this.isStopped){var t=this.source,r=this.count;if(0===r)return e.prototype.complete.call(this);r>-1&&(this.count=r-1),t.subscribe(this._unsubscribeAndRecycle())}},t}(i.Subscriber)},8440(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1077),a=r(5901);t.repeatWhen=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.notifier,t))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.notifier=r,o.source=n,o.sourceIsBeingSubscribedTo=!0,o}return o(t,e),t.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},t.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return e.prototype.complete.call(this)},t.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return e.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},t.prototype._unsubscribe=function(){var e=this.notifications,t=this.retriesSubscription;e&&(e.unsubscribe(),this.notifications=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype._unsubscribeAndRecycle=function(){var t=this._unsubscribe;return this._unsubscribe=null,e.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=t,this},t.prototype.subscribeToRetries=function(){this.notifications=new i.Subject;try{var t;t=(0,this.notifier)(this.notifications)}catch(t){return e.prototype.complete.call(this)}this.retries=t,this.retriesSubscription=a.innerSubscribe(t,new a.SimpleInnerSubscriber(this))},t}(a.SimpleOuterSubscriber)},9933(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.retry=function(e){return void 0===e&&(e=-1),function(t){return t.lift(new a(e,t))}};var a=function(){function e(e,t){this.count=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.count,this.source))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.count=r,o.source=n,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var r=this.source,n=this.count;if(0===n)return e.prototype.error.call(this,t);n>-1&&(this.count=n-1),r.subscribe(this._unsubscribeAndRecycle())}},t}(i.Subscriber)},3325(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1077),a=r(5901);t.retryWhen=function(e){return function(t){return t.lift(new s(e,t))}};var s=function(){function e(e,t){this.notifier=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.notifier,this.source))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.notifier=r,o.source=n,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var r=this.errors,n=this.retries,o=this.retriesSubscription;if(n)this.errors=void 0,this.retriesSubscription=void 0;else{r=new i.Subject;try{n=(0,this.notifier)(r)}catch(t){return e.prototype.error.call(this,t)}o=a.innerSubscribe(n,new a.SimpleInnerSubscriber(this))}this._unsubscribeAndRecycle(),this.errors=r,this.retries=n,this.retriesSubscription=o,r.next(t)}},t.prototype._unsubscribe=function(){var e=this.errors,t=this.retriesSubscription;e&&(e.unsubscribe(),this.errors=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype.notifyNext=function(){var e=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=e,this.source.subscribe(this)},t}(a.SimpleOuterSubscriber)},7677(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5901);t.sample=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var r=new s(e),n=t.subscribe(r);return n.add(i.innerSubscribe(this.notifier,new i.SimpleInnerSubscriber(r))),n},e}(),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hasValue=!1,t}return o(t,e),t.prototype._next=function(e){this.value=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.emitValue()},t.prototype.notifyComplete=function(){this.emitValue()},t.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},t}(i.SimpleOuterSubscriber)},8360(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759),a=r(6735);t.sampleTime=function(e,t){return void 0===t&&(t=a.async),function(r){return r.lift(new s(e,t))}};var s=function(){function e(e,t){this.period=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.period,this.scheduler))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.period=r,o.scheduler=n,o.hasValue=!1,o.add(n.schedule(u,r,{subscriber:o,period:r})),o}return o(t,e),t.prototype._next=function(e){this.lastValue=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},t}(i.Subscriber);function u(e){var t=e.subscriber,r=e.period;t.notifyNext(),this.schedule(e,r)}},5002(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.scan=function(e,t){var r=!1;return arguments.length>=2&&(r=!0),function(n){return n.lift(new a(e,t,r))}};var a=function(){function e(e,t,r){void 0===r&&(r=!1),this.accumulator=e,this.seed=t,this.hasSeed=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.accumulator,this.seed,this.hasSeed))},e}(),s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.accumulator=r,i._seed=n,i.hasSeed=o,i.index=0,i}return o(t,e),Object.defineProperty(t.prototype,"seed",{get:function(){return this._seed},set:function(e){this.hasSeed=!0,this._seed=e},enumerable:!0,configurable:!0}),t.prototype._next=function(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)},t.prototype._tryNext=function(e){var t,r=this.index++;try{t=this.accumulator(this.seed,e,r)}catch(e){this.destination.error(e)}this.seed=t,this.destination.next(t)},t}(i.Subscriber)},4332(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.sequenceEqual=function(e,t){return function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.compareTo=e,this.comparator=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.compareTo,this.comparator))},e}();t.SequenceEqualOperator=a;var s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.compareTo=r,o.comparator=n,o._a=[],o._b=[],o._oneComplete=!1,o.destination.add(r.subscribe(new l(t,o))),o}return o(t,e),t.prototype._next=function(e){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(e),this.checkValues())},t.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},t.prototype.checkValues=function(){for(var e=this._a,t=this._b,r=this.comparator;e.length>0&&t.length>0;){var n=e.shift(),o=t.shift(),i=!1;try{i=r?r(n,o):n===o}catch(e){this.destination.error(e)}i||this.emit(!1)}},t.prototype.emit=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype.nextB=function(e){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(e),this.checkValues())},t.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},t}(i.Subscriber);t.SequenceEqualSubscriber=s;var l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.parent=r,n}return o(t,e),t.prototype._next=function(e){this.parent.nextB(e)},t.prototype._error=function(e){this.parent.error(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},t}(i.Subscriber)},9184(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9529),o=r(5203),i=r(1077);function a(){return new i.Subject}t.share=function(){return function(e){return o.refCount()(n.multicast(a)(e))}}},1451(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(328);t.shareReplay=function(e,t,r){var o;return o=e&&"object"==typeof e?e:{bufferSize:e,windowTime:t,refCount:!1,scheduler:r},function(e){var t,r,i,a,s,l,u,c,d,p,f,h;return e.lift((s=void 0===(a=(t=o).bufferSize)?1/0:a,u=void 0===(l=t.windowTime)?1/0:l,c=t.refCount,d=t.scheduler,p=0,f=!1,h=!1,function(e){var t;p++,!r||f?(f=!1,t=(r=new n.ReplaySubject(s,u,d)).subscribe(this),i=e.subscribe({next:function(e){r.next(e)},error:function(e){f=!0,r.error(e)},complete:function(){h=!0,i=void 0,r.complete()}}),h&&(i=void 0)):t=r.subscribe(this),this.add(function(){p--,t.unsubscribe(),t=void 0,i&&!h&&c&&0===p&&(i.unsubscribe(),i=void 0,r=void 0)})}))}}},6003(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759),a=r(2637);t.single=function(e){return function(t){return t.lift(new s(e,t))}};var s=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.predicate,this.source))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.source=n,o.seenValue=!1,o.index=0,o}return o(t,e),t.prototype.applySingleValue=function(e){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=e)},t.prototype._next=function(e){var t=this.index++;this.predicate?this.tryNext(e,t):this.applySingleValue(e)},t.prototype.tryNext=function(e,t){try{this.predicate(e,t,this.source)&&this.applySingleValue(e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){var e=this.destination;this.index>0?(e.next(this.seenValue?this.singleValue:void 0),e.complete()):e.error(new a.EmptyError)},t}(i.Subscriber)},7124(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.skip=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.total=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.total))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.count=0,n}return o(t,e),t.prototype._next=function(e){++this.count>this.total&&this.destination.next(e)},t}(i.Subscriber)},1444(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759),a=r(2519);t.skipLast=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){if(this._skipCount=e,this._skipCount<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return 0===this._skipCount?t.subscribe(new i.Subscriber(e)):t.subscribe(new l(e,this._skipCount))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n._skipCount=r,n._count=0,n._ring=Array(r),n}return o(t,e),t.prototype._next=function(e){var t=this._skipCount,r=this._count++;if(r<t)this._ring[r]=e;else{var n=r%t,o=this._ring,i=o[n];o[n]=e,this.destination.next(i)}},t}(i.Subscriber)},1026(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5901);t.skipUntil=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.notifier))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;n.hasValue=!1;var o=new i.SimpleInnerSubscriber(n);n.add(o),n.innerSubscription=o;var a=i.innerSubscribe(r,o);return a!==o&&(n.add(a),n.innerSubscription=a),n}return o(t,e),t.prototype._next=function(t){this.hasValue&&e.prototype._next.call(this,t)},t.prototype.notifyNext=function(){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},t.prototype.notifyComplete=function(){},t}(i.SimpleOuterSubscriber)},9159(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.skipWhile=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.predicate=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.predicate=r,n.skipping=!0,n.index=0,n}return o(t,e),t.prototype._next=function(e){var t=this.destination;this.skipping&&this.tryCallPredicate(e),this.skipping||t.next(e)},t.prototype.tryCallPredicate=function(e){try{var t=this.predicate(e,this.index++);this.skipping=!!t}catch(e){this.destination.error(e)}},t}(i.Subscriber)},9155(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9623),o=r(3935);t.startWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return o.isScheduler(r)?(e.pop(),function(t){return n.concat(e,t,r)}):function(t){return n.concat(e,t)}}},162(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7563);t.subscribeOn=function(e,t){return void 0===t&&(t=0),function(r){return r.lift(new o(e,t))}};var o=function(){function e(e,t){this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return new n.SubscribeOnObservable(t,this.delay,this.scheduler).subscribe(e)},e}()},1324(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(917),o=r(8522);t.switchAll=function(){return n.switchMap(o.identity)}},917(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(9233),a=r(5295),s=r(5901);t.switchMap=function e(t,r){return"function"==typeof r?function(n){return n.pipe(e(function(e,n){return a.from(t(e,n)).pipe(i.map(function(t,o){return r(e,t,n,o)}))}))}:function(e){return e.lift(new l(t))}};var l=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.project))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.project=r,n.index=0,n}return o(t,e),t.prototype._next=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(e){this.destination.error(e);return}this._innerSub(t)},t.prototype._innerSub=function(e){var t=this.innerSubscription;t&&t.unsubscribe();var r=new s.SimpleInnerSubscriber(this),n=this.destination;n.add(r),this.innerSubscription=s.innerSubscribe(e,r),this.innerSubscription!==r&&n.add(this.innerSubscription)},t.prototype._complete=function(){var t=this.innerSubscription;(!t||t.closed)&&e.prototype._complete.call(this),this.unsubscribe()},t.prototype._unsubscribe=function(){this.innerSubscription=void 0},t.prototype.notifyComplete=function(){this.innerSubscription=void 0,this.isStopped&&e.prototype._complete.call(this)},t.prototype.notifyNext=function(e){this.destination.next(e)},t}(s.SimpleOuterSubscriber)},5428(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(917);t.switchMapTo=function(e,t){return t?n.switchMap(function(){return e},t):n.switchMap(function(){return e})}},5624(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759),a=r(2519),s=r(4914);t.take=function(e){return function(t){return 0===e?s.empty():t.lift(new l(e))}};var l=function(){function e(e){if(this.total=e,this.total<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.total))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.count=0,n}return o(t,e),t.prototype._next=function(e){var t=this.total,r=++this.count;r<=t&&(this.destination.next(e),r===t&&(this.destination.complete(),this.unsubscribe()))},t}(i.Subscriber)},6696(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759),a=r(2519),s=r(4914);t.takeLast=function(e){return function(t){return 0===e?s.empty():t.lift(new l(e))}};var l=function(){function e(e){if(this.total=e,this.total<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.total))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.ring=[],n.count=0,n}return o(t,e),t.prototype._next=function(e){var t=this.ring,r=this.total,n=this.count++;t.length<r?t.push(e):t[n%r]=e},t.prototype._complete=function(){var e=this.destination,t=this.count;if(t>0)for(var r=this.count>=this.total?this.total:this.count,n=this.ring,o=0;o<r;o++){var i=t++%r;e.next(n[i])}e.complete()},t}(i.Subscriber)},1534(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5901);t.takeUntil=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var r=new s(e),n=i.innerSubscribe(this.notifier,new i.SimpleInnerSubscriber(r));return n&&!r.seenValue?(r.add(n),t.subscribe(r)):r},e}(),s=function(e){function t(t){var r=e.call(this,t)||this;return r.seenValue=!1,r}return o(t,e),t.prototype.notifyNext=function(){this.seenValue=!0,this.complete()},t.prototype.notifyComplete=function(){},t}(i.SimpleOuterSubscriber)},5179(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.takeWhile=function(e,t){return void 0===t&&(t=!1),function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.predicate=e,this.inclusive=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.inclusive))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.inclusive=n,o.index=0,o}return o(t,e),t.prototype._next=function(e){var t,r=this.destination;try{t=this.predicate(e,this.index++)}catch(e){r.error(e);return}this.nextOrComplete(e,t)},t.prototype.nextOrComplete=function(e,t){var r=this.destination;t?r.next(e):(this.inclusive&&r.next(e),r.complete())},t}(i.Subscriber)},8022(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759),a=r(3912),s=r(4864);t.tap=function(e,t,r){return function(n){return n.lift(new l(e,t,r))}};var l=function(){function e(e,t,r){this.nextOrObserver=e,this.error=t,this.complete=r}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.nextOrObserver,this.error,this.complete))},e}(),u=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i._tapNext=a.noop,i._tapError=a.noop,i._tapComplete=a.noop,i._tapError=n||a.noop,i._tapComplete=o||a.noop,s.isFunction(r)?(i._context=i,i._tapNext=r):r&&(i._context=r,i._tapNext=r.next||a.noop,i._tapError=r.error||a.noop,i._tapComplete=r.complete||a.noop),i}return o(t,e),t.prototype._next=function(e){try{this._tapNext.call(this._context,e)}catch(e){this.destination.error(e);return}this.destination.next(e)},t.prototype._error=function(e){try{this._tapError.call(this._context,e)}catch(e){this.destination.error(e);return}this.destination.error(e)},t.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(e){this.destination.error(e);return}return this.destination.complete()},t}(i.Subscriber)},5019(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5901);t.defaultThrottleConfig={leading:!0,trailing:!1},t.throttle=function(e,r){return void 0===r&&(r=t.defaultThrottleConfig),function(t){return t.lift(new a(e,!!r.leading,!!r.trailing))}};var a=function(){function e(e,t,r){this.durationSelector=e,this.leading=t,this.trailing=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.durationSelector,this.leading,this.trailing))},e}(),s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.destination=t,i.durationSelector=r,i._leading=n,i._trailing=o,i._hasValue=!1,i}return o(t,e),t.prototype._next=function(e){this._hasValue=!0,this._sendValue=e,this._throttled||(this._leading?this.send():this.throttle(e))},t.prototype.send=function(){var e=this._hasValue,t=this._sendValue;e&&(this.destination.next(t),this.throttle(t)),this._hasValue=!1,this._sendValue=void 0},t.prototype.throttle=function(e){var t=this.tryDurationSelector(e);t&&this.add(this._throttled=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this)))},t.prototype.tryDurationSelector=function(e){try{return this.durationSelector(e)}catch(e){return this.destination.error(e),null}},t.prototype.throttlingDone=function(){var e=this._throttled,t=this._trailing;e&&e.unsubscribe(),this._throttled=void 0,t&&this.send()},t.prototype.notifyNext=function(){this.throttlingDone()},t.prototype.notifyComplete=function(){this.throttlingDone()},t}(i.SimpleOuterSubscriber)},7406(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759),a=r(6735),s=r(5019);t.throttleTime=function(e,t,r){return void 0===t&&(t=a.async),void 0===r&&(r=s.defaultThrottleConfig),function(n){return n.lift(new l(e,t,r.leading,r.trailing))}};var l=function(){function e(e,t,r,n){this.duration=e,this.scheduler=t,this.leading=r,this.trailing=n}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.duration,this.scheduler,this.leading,this.trailing))},e}(),u=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.duration=r,a.scheduler=n,a.leading=o,a.trailing=i,a._hasTrailingValue=!1,a._trailingValue=null,a}return o(t,e),t.prototype._next=function(e){this.throttled?this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(c,this.duration,{subscriber:this})),this.leading?this.destination.next(e):this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0))},t.prototype._complete=function(){this._hasTrailingValue&&this.destination.next(this._trailingValue),this.destination.complete()},t.prototype.clearThrottle=function(){var e=this.throttled;e&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),e.unsubscribe(),this.remove(e),this.throttled=null)},t}(i.Subscriber);function c(e){e.subscriber.clearThrottle()}},8347(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(2637),a=r(7759);t.throwIfEmpty=function(e){return void 0===e&&(e=u),function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.errorFactory=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.errorFactory))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.errorFactory=r,n.hasValue=!1,n}return o(t,e),t.prototype._next=function(e){this.hasValue=!0,this.destination.next(e)},t.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var e=void 0;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)},t}(a.Subscriber);function u(){return new i.EmptyError}},1115(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6735),o=r(5002),i=r(6691),a=r(9233);t.timeInterval=function(e){return void 0===e&&(e=n.async),function(t){return i.defer(function(){return t.pipe(o.scan(function(t,r){var n=t.current;return{value:r,current:e.now(),last:n}},{current:e.now(),value:void 0,last:void 0}),a.map(function(e){var t=e.current,r=e.last;return new s(e.value,t-r)}))})}};var s=function(e,t){this.value=e,this.interval=t};t.TimeInterval=s},2784(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6735),o=r(1027),i=r(5816),a=r(1673);t.timeout=function(e,t){return void 0===t&&(t=n.async),i.timeoutWith(e,a.throwError(new o.TimeoutError),t)}},5816(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(6735),a=r(6740),s=r(5901);t.timeoutWith=function(e,t,r){return void 0===r&&(r=i.async),function(n){var o=a.isDate(e),i=o?e-r.now():Math.abs(e);return n.lift(new l(i,o,t,r))}};var l=function(){function e(e,t,r,n){this.waitFor=e,this.absoluteTimeout=t,this.withObservable=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},e}(),u=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.absoluteTimeout=r,a.waitFor=n,a.withObservable=o,a.scheduler=i,a.scheduleTimeout(),a}return o(t,e),t.dispatchTimeout=function(e){var t=e.withObservable;e._unsubscribeAndRecycle(),e.add(s.innerSubscribe(t,new s.SimpleInnerSubscriber(e)))},t.prototype.scheduleTimeout=function(){var e=this.action;e?this.action=e.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(t.dispatchTimeout,this.waitFor,this))},t.prototype._next=function(t){this.absoluteTimeout||this.scheduleTimeout(),e.prototype._next.call(this,t)},t.prototype._unsubscribe=function(){this.action=void 0,this.scheduler=null,this.withObservable=null},t}(s.SimpleOuterSubscriber)},2748(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6735),o=r(9233);t.timestamp=function(e){return void 0===e&&(e=n.async),o.map(function(t){return new i(t,e.now())})};var i=function(e,t){this.value=e,this.timestamp=t};t.Timestamp=i},9133(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1929);function o(e,t,r){return 0===r?[t]:(e.push(t),e)}t.toArray=function(){return n.reduce(o,[])}},2363(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1077),a=r(5901);t.window=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.windowBoundaries=e}return e.prototype.call=function(e,t){var r=new l(e),n=t.subscribe(r);return n.closed||r.add(a.innerSubscribe(this.windowBoundaries,new a.SimpleInnerSubscriber(r))),n},e}(),l=function(e){function t(t){var r=e.call(this,t)||this;return r.window=new i.Subject,t.next(r.window),r}return o(t,e),t.prototype.notifyNext=function(){this.openWindow()},t.prototype.notifyError=function(e){this._error(e)},t.prototype.notifyComplete=function(){this._complete()},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e)},t.prototype._complete=function(){this.window.complete(),this.destination.complete()},t.prototype._unsubscribe=function(){this.window=null},t.prototype.openWindow=function(){var e=this.window;e&&e.complete();var t=this.destination,r=this.window=new i.Subject;t.next(r)},t}(a.SimpleOuterSubscriber)},2216(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759),a=r(1077);t.windowCount=function(e,t){return void 0===t&&(t=0),function(r){return r.lift(new s(e,t))}};var s=function(){function e(e,t){this.windowSize=e,this.startWindowEvery=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.windowSize,this.startWindowEvery))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.destination=t,o.windowSize=r,o.startWindowEvery=n,o.windows=[new a.Subject],o.count=0,t.next(o.windows[0]),o}return o(t,e),t.prototype._next=function(e){for(var t=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,r=this.destination,n=this.windowSize,o=this.windows,i=o.length,s=0;s<i&&!this.closed;s++)o[s].next(e);var l=this.count-n+1;if(l>=0&&l%t==0&&!this.closed&&o.shift().complete(),++this.count%t==0&&!this.closed){var u=new a.Subject;o.push(u),r.next(u)}},t.prototype._error=function(e){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().complete();this.destination.complete()},t.prototype._unsubscribe=function(){this.count=0,this.windows=null},t}(i.Subscriber)},3886(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1077),a=r(6735),s=r(7759),l=r(9673),u=r(3935);t.windowTime=function(e){var t=a.async,r=null,n=1/0;return u.isScheduler(arguments[3])&&(t=arguments[3]),u.isScheduler(arguments[2])?t=arguments[2]:l.isNumeric(arguments[2])&&(n=Number(arguments[2])),u.isScheduler(arguments[1])?t=arguments[1]:l.isNumeric(arguments[1])&&(r=Number(arguments[1])),function(o){return o.lift(new c(e,r,n,t))}};var c=function(){function e(e,t,r,n){this.windowTimeSpan=e,this.windowCreationInterval=t,this.maxWindowSize=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new p(e,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},e}(),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._numberOfNextedValues=0,t}return o(t,e),t.prototype.next=function(t){this._numberOfNextedValues++,e.prototype.next.call(this,t)},Object.defineProperty(t.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),t}(i.Subject),p=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;a.destination=t,a.windowTimeSpan=r,a.windowCreationInterval=n,a.maxWindowSize=o,a.scheduler=i,a.windows=[];var s=a.openWindow();return null!==n&&n>=0?(a.add(i.schedule(m,r,{subscriber:a,window:s,context:null})),a.add(i.schedule(h,n,{windowTimeSpan:r,windowCreationInterval:n,subscriber:a,scheduler:i}))):a.add(i.schedule(f,r,{subscriber:a,window:s,windowTimeSpan:r})),a}return o(t,e),t.prototype._next=function(e){for(var t=this.windows,r=t.length,n=0;n<r;n++){var o=t[n];!o.closed&&(o.next(e),o.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(o))}},t.prototype._error=function(e){for(var t=this.windows;t.length>0;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){for(var e=this.windows;e.length>0;){var t=e.shift();t.closed||t.complete()}this.destination.complete()},t.prototype.openWindow=function(){var e=new d;return this.windows.push(e),this.destination.next(e),e},t.prototype.closeWindow=function(e){e.complete();var t=this.windows;t.splice(t.indexOf(e),1)},t}(s.Subscriber);function f(e){var t=e.subscriber,r=e.windowTimeSpan,n=e.window;n&&t.closeWindow(n),e.window=t.openWindow(),this.schedule(e,r)}function h(e){var t=e.windowTimeSpan,r=e.subscriber,n=e.scheduler,o=e.windowCreationInterval,i=r.openWindow(),a={action:this,subscription:null};a.subscription=n.schedule(m,t,{subscriber:r,window:i,context:a}),this.add(a.subscription),this.schedule(e,o)}function m(e){var t=e.subscriber,r=e.window,n=e.context;n&&n.action&&n.subscription&&n.action.remove(n.subscription),t.closeWindow(r)}},3903(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1077),a=r(1016),s=r(6771),l=r(7778);t.windowToggle=function(e,t){return function(r){return r.lift(new u(e,t))}};var u=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.openings,this.closingSelector))},e}(),c=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.openings=r,o.closingSelector=n,o.contexts=[],o.add(o.openSubscription=l.subscribeToResult(o,r,r)),o}return o(t,e),t.prototype._next=function(e){var t=this.contexts;if(t)for(var r=t.length,n=0;n<r;n++)t[n].window.next(e)},t.prototype._error=function(t){var r=this.contexts;if(this.contexts=null,r)for(var n=r.length,o=-1;++o<n;){var i=r[o];i.window.error(t),i.subscription.unsubscribe()}e.prototype._error.call(this,t)},t.prototype._complete=function(){var t=this.contexts;if(this.contexts=null,t)for(var r=t.length,n=-1;++n<r;){var o=t[n];o.window.complete(),o.subscription.unsubscribe()}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.contexts;if(this.contexts=null,e)for(var t=e.length,r=-1;++r<t;){var n=e[r];n.window.unsubscribe(),n.subscription.unsubscribe()}},t.prototype.notifyNext=function(e,t,r,n,o){if(e===this.openings){var s=void 0;try{s=(0,this.closingSelector)(t)}catch(e){return this.error(e)}var u=new i.Subject,c=new a.Subscription,d={window:u,subscription:c};this.contexts.push(d);var p=l.subscribeToResult(this,s,d);p.closed?this.closeWindow(this.contexts.length-1):(p.context=d,c.add(p)),this.destination.next(u)}else this.closeWindow(this.contexts.indexOf(e))},t.prototype.notifyError=function(e){this.error(e)},t.prototype.notifyComplete=function(e){e!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(e.context))},t.prototype.closeWindow=function(e){if(-1!==e){var t=this.contexts,r=t[e],n=r.window,o=r.subscription;t.splice(e,1),n.complete(),o.unsubscribe()}},t}(s.OuterSubscriber)},7539(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1077),a=r(6771),s=r(7778);t.windowWhen=function(e){return function(t){return t.lift(new l(e))}};var l=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.closingSelector))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.destination=t,n.closingSelector=r,n.openWindow(),n}return o(t,e),t.prototype.notifyNext=function(e,t,r,n,o){this.openWindow(o)},t.prototype.notifyError=function(e){this._error(e)},t.prototype.notifyComplete=function(e){this.openWindow(e)},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e),this.unsubscribeClosingNotification()},t.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},t.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},t.prototype.openWindow=function(e){void 0===e&&(e=null),e&&(this.remove(e),e.unsubscribe());var t,r=this.window;r&&r.complete();var n=this.window=new i.Subject;this.destination.next(n);try{t=(0,this.closingSelector)()}catch(e){this.destination.error(e),this.window.error(e);return}this.add(this.closingNotification=s.subscribeToResult(this,t))},t}(a.OuterSubscriber)},6788(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(6771),a=r(7778);t.withLatestFrom=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var r;return"function"==typeof e[e.length-1]&&(r=e.pop()),t.lift(new s(e,r))}};var s=function(){function e(e,t){this.observables=e,this.project=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.observables,this.project))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;o.observables=r,o.project=n,o.toRespond=[];var i=r.length;o.values=Array(i);for(var s=0;s<i;s++)o.toRespond.push(s);for(var s=0;s<i;s++){var l=r[s];o.add(a.subscribeToResult(o,l,void 0,s))}return o}return o(t,e),t.prototype.notifyNext=function(e,t,r){this.values[r]=t;var n=this.toRespond;if(n.length>0){var o=n.indexOf(r);-1!==o&&n.splice(o,1)}},t.prototype.notifyComplete=function(){},t.prototype._next=function(e){if(0===this.toRespond.length){var t=[e].concat(this.values);this.project?this._tryProject(t):this.destination.next(t)}},t.prototype._tryProject=function(e){var t;try{t=this.project.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(i.OuterSubscriber)},4868(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5356);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(n.zip.apply(void 0,[t].concat(e)))}}},5517(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5356);t.zipAll=function(e){return function(t){return t.lift(new n.ZipOperator(e))}}},5791(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5092),o=r(1016);t.scheduleArray=function(e,t){return new n.Observable(function(r){var n=new o.Subscription,i=0;return n.add(t.schedule(function(){i===e.length?r.complete():(r.next(e[i++]),r.closed||n.add(this.schedule()))})),n})}},4178(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5092),o=r(1016),i=r(8258);t.scheduleIterable=function(e,t){if(!e)throw Error("Iterable cannot be null");return new n.Observable(function(r){var n,a=new o.Subscription;return a.add(function(){n&&"function"==typeof n.return&&n.return()}),a.add(t.schedule(function(){n=e[i.iterator](),a.add(t.schedule(function(){if(!r.closed){try{var e,t,o=n.next();e=o.value,t=o.done}catch(e){r.error(e);return}t?r.complete():(r.next(e),this.schedule())}}))})),a})}},2873(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5092),o=r(1016),i=r(6713);t.scheduleObservable=function(e,t){return new n.Observable(function(r){var n=new o.Subscription;return n.add(t.schedule(function(){var o=e[i.observable]();n.add(o.subscribe({next:function(e){n.add(t.schedule(function(){return r.next(e)}))},error:function(e){n.add(t.schedule(function(){return r.error(e)}))},complete:function(){n.add(t.schedule(function(){return r.complete()}))}}))})),n})}},1039(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5092),o=r(1016);t.schedulePromise=function(e,t){return new n.Observable(function(r){var n=new o.Subscription;return n.add(t.schedule(function(){return e.then(function(e){n.add(t.schedule(function(){r.next(e),n.add(t.schedule(function(){return r.complete()}))}))},function(e){n.add(t.schedule(function(){return r.error(e)}))})})),n})}},7670(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2873),o=r(1039),i=r(5791),a=r(4178),s=r(7606),l=r(4215),u=r(624),c=r(4442);t.scheduled=function(e,t){if(null!=e){if(s.isInteropObservable(e))return n.scheduleObservable(e,t);else if(l.isPromise(e))return o.schedulePromise(e,t);else if(u.isArrayLike(e))return i.scheduleArray(e,t);else if(c.isIterable(e)||"string"==typeof e)return a.scheduleIterable(e,t)}throw TypeError((null!==e&&typeof e||e)+" is not observable")}},5169(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Action=function(e){function t(t,r){return e.call(this)||this}return o(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(r(1016).Subscription)},2900(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(2839);t.AsapAction=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return o(t,e),t.prototype.requestAsyncId=function(t,r,n){return(void 0===n&&(n=0),null!==n&&n>0)?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t.scheduled||(t.scheduled=i.Immediate.setImmediate(t.flush.bind(t,null))))},t.prototype.recycleAsyncId=function(t,r,n){if(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);0===t.actions.length&&(i.Immediate.clearImmediate(r),t.scheduled=void 0)},t}(r(469).AsyncAction)},3069(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapScheduler=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,r=this.actions,n=-1,o=r.length;e=e||r.shift();do if(t=e.execute(e.state,e.delay))break;while(++n<o&&(e=r.shift()));if(this.active=!1,t){for(;++n<o&&(e=r.shift());)e.unsubscribe();throw t}},t}(r(5646).AsyncScheduler)},469(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAction=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n.pending=!1,n}return o(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,n=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(n,r,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(n,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),setInterval(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!==r&&this.delay===r&&!1===this.pending)return t;clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var r=!1,n=void 0;try{this.work(e)}catch(e){r=!0,n=!!e&&e||Error(e)}if(r)return this.unsubscribe(),n},t.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,r=t.actions,n=r.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==n&&r.splice(n,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null},t}(r(5169).Action)},5646(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(4688);t.AsyncScheduler=function(e){function t(r,n){void 0===n&&(n=i.Scheduler.now);var o=e.call(this,r,function(){return t.delegate&&t.delegate!==o?t.delegate.now():n()})||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return o(t,e),t.prototype.schedule=function(r,n,o){return(void 0===n&&(n=0),t.delegate&&t.delegate!==this)?t.delegate.schedule(r,n,o):e.prototype.schedule.call(this,r,n,o)},t.prototype.flush=function(e){var t,r=this.actions;if(this.active)return void r.push(e);this.active=!0;do if(t=e.execute(e.state,e.delay))break;while(e=r.shift());if(this.active=!1,t){for(;e=r.shift();)e.unsubscribe();throw t}},t}(i.Scheduler)},8538(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueAction=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return o(t,e),t.prototype.schedule=function(t,r){return(void 0===r&&(r=0),r>0)?e.prototype.schedule.call(this,t,r):(this.delay=r,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,r){return r>0||this.closed?e.prototype.execute.call(this,t,r):this._execute(t,r)},t.prototype.requestAsyncId=function(t,r,n){return(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)?e.prototype.requestAsyncId.call(this,t,r,n):t.flush(this)},t}(r(469).AsyncAction)},8831(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueScheduler=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(r(5646).AsyncScheduler)},3766(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2900);t.asapScheduler=new(r(3069)).AsapScheduler(n.AsapAction),t.asap=t.asapScheduler},6735(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(469);t.asyncScheduler=new(r(5646)).AsyncScheduler(n.AsyncAction),t.async=t.asyncScheduler},3792(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8538);t.queueScheduler=new(r(8831)).QueueScheduler(n.QueueAction),t.queue=t.queueScheduler},8258(e,t){"use strict";function r(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(t,"__esModule",{value:!0}),t.getSymbolIterator=r,t.iterator=r(),t.$$iterator=t.iterator},6713(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},8636(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rxSubscriber="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),t.$$rxSubscriber=t.rxSubscriber},2519(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArgumentOutOfRangeError=function(){function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e}()},2637(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyError=function(){function e(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return e.prototype=Object.create(Error.prototype),e}()},2839(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=1,n=Promise.resolve(),o={};function i(e){return e in o&&(delete o[e],!0)}t.Immediate={setImmediate:function(e){var t=r++;return o[t]=!0,n.then(function(){return i(t)&&e()}),t},clearImmediate:function(e){i(e)}},t.TestTools={pending:function(){return Object.keys(o).length}}},8860(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUnsubscribedError=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}()},1027(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeoutError=function(){function e(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return e.prototype=Object.create(Error.prototype),e}()},1806(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsubscriptionError=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}()},1226(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7759);t.canReportError=function(e){for(;e;){var t=e,r=t.closed,o=t.destination,i=t.isStopped;if(r||i)return!1;e=o&&o instanceof n.Subscriber?o:null}return!0}},9468(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hostReportError=function(e){setTimeout(function(){throw e},0)}},8522(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.identity=function(e){return e}},743(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArray=Array.isArray||function(e){return e&&"number"==typeof e.length}},624(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},6740(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDate=function(e){return e instanceof Date&&!isNaN(+e)}},4864(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=function(e){return"function"==typeof e}},7606(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6713);t.isInteropObservable=function(e){return e&&"function"==typeof e[n.observable]}},4442(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8258);t.isIterable=function(e){return e&&"function"==typeof e[n.iterator]}},9673(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(743);t.isNumeric=function(e){return!n.isArray(e)&&e-parseFloat(e)+1>=0}},6727(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=function(e){return null!==e&&"object"==typeof e}},4215(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=function(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}},3935(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isScheduler=function(e){return e&&"function"==typeof e.schedule}},3912(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=function(){}},4103(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.not=function(e,t){function r(){return!r.pred.apply(r.thisArg,arguments)}return r.pred=e,r.thisArg=t,r}},7928(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8522);function o(e){return 0===e.length?n.identity:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}t.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o(e)},t.pipeFromArray=o},1727(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(422),o=r(3266),i=r(7429),a=r(3394),s=r(624),l=r(4215),u=r(6727),c=r(8258),d=r(6713);t.subscribeTo=function(e){if(e&&"function"==typeof e[d.observable])return a.subscribeToObservable(e);if(s.isArrayLike(e))return n.subscribeToArray(e);if(l.isPromise(e))return o.subscribeToPromise(e);if(e&&"function"==typeof e[c.iterator])return i.subscribeToIterable(e);throw TypeError("You provided "+(u.isObject(e)?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},422(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.subscribeToArray=function(e){return function(t){for(var r=0,n=e.length;r<n&&!t.closed;r++)t.next(e[r]);t.complete()}}},7429(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8258);t.subscribeToIterable=function(e){return function(t){for(var r=e[n.iterator]();;){var o=void 0;try{o=r.next()}catch(e){return t.error(e),t}if(o.done){t.complete();break}if(t.next(o.value),t.closed)break}return"function"==typeof r.return&&t.add(function(){r.return&&r.return()}),t}}},3394(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6713);t.subscribeToObservable=function(e){return function(t){var r=e[n.observable]();if("function"==typeof r.subscribe)return r.subscribe(t);throw TypeError("Provided object does not correctly implement Symbol.observable")}}},3266(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9468);t.subscribeToPromise=function(e){return function(t){return e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,n.hostReportError),t}}},7778(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1359),o=r(1727),i=r(5092);t.subscribeToResult=function(e,t,r,a,s){if(void 0===s&&(s=new n.InnerSubscriber(e,r,a)),!s.closed)return t instanceof i.Observable?t.subscribe(s):o.subscribeTo(t)(s)}},7595(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7759),o=r(8636),i=r(4143);t.toSubscriber=function(e,t,r){if(e){if(e instanceof n.Subscriber)return e;if(e[o.rxSubscriber])return e[o.rxSubscriber]()}return e||t||r?new n.Subscriber(e,t,r):new n.Subscriber(i.empty)}},9549(e,t,r){"use strict";r(8780).audit,r(3441).auditTime,r(4234).buffer,r(7650).bufferCount,r(4360).bufferTime,r(3381).bufferToggle,r(1069).bufferWhen,r(5916).catchError,r(239).combineAll,r(9397).combineLatest,r(6255).concat,r(208).concatAll,r(2209).concatMap,r(3232).concatMapTo,r(5476).count,r(9768).debounce,r(2661).debounceTime,r(952).defaultIfEmpty,r(7436).delay,r(1136).delayWhen,r(6051).dematerialize,r(5343).distinct,r(8179).distinctUntilChanged,r(3670).distinctUntilKeyChanged,r(7366).elementAt,r(1650).endWith,r(2472).every,r(5893).exhaust,r(9219).exhaustMap,r(6527).expand,r(4629).filter,r(4349).finalize,r(2376).find,r(8674).findIndex,r(7089).first,r(6217).groupBy,r(6024).ignoreElements,r(7362).isEmpty,r(6047).last,t.map=r(9233).map,r(7296).mapTo,r(5434).materialize,r(7001).max,r(4779).merge,r(980).mergeAll;var n=r(781);n.mergeMap,n.flatMap,r(2988).mergeMapTo,r(6430).mergeScan,r(1547).min,r(9529).multicast,r(4654).observeOn,r(5276).onErrorResumeNext,r(8155).pairwise,r(7337).partition,r(6050).pluck,r(6904).publish,r(2334).publishBehavior,r(232).publishLast,r(4355).publishReplay,r(9646).race,r(1929).reduce,r(68).repeat,r(8440).repeatWhen,r(9933).retry,r(3325).retryWhen,r(5203).refCount,r(7677).sample,r(8360).sampleTime,r(5002).scan,r(4332).sequenceEqual,r(9184).share,r(1451).shareReplay,r(6003).single,r(7124).skip,r(1444).skipLast,r(1026).skipUntil,r(9159).skipWhile,r(9155).startWith,r(162).subscribeOn,r(1324).switchAll,r(917).switchMap,r(5428).switchMapTo,t.take=r(5624).take,r(6696).takeLast,r(1534).takeUntil,r(5179).takeWhile,r(8022).tap,r(5019).throttle,r(7406).throttleTime,r(8347).throwIfEmpty,r(1115).timeInterval,r(2784).timeout,r(5816).timeoutWith,r(2748).timestamp,r(9133).toArray,r(2363).window,r(2216).windowCount,r(3886).windowTime,r(3903).windowToggle,r(7539).windowWhen,r(6788).withLatestFrom,r(4868).zip,r(5517).zipAll},1565(e,t,r){"use strict";let n=Symbol("SemVer ANY");class o{static get ANY(){return n}constructor(e,t){if(t=i(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?a[s.COMPARATORLOOSE]:a[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=i(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 i=r(3990),{safeRe:a,t:s}=r(2841),l=r(4004),u=r(1361),c=r(4517),d=r(7476)},7476(e,t,r){"use strict";let n=/\s+/g;class o{constructor(e,t){if(t=a(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=>!g(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&&b(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&&m)|(this.options.loose&&y))+":"+e,r=i.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,T(this.options.includePrerelease))),l("comparator trim",e=e.replace(c[d.COMPARATORTRIM],p)),l("tilde trim",e=e.replace(c[d.TILDETRIM],f)),l("caret trim",e=e.replace(c[d.CARETTRIM],h));let a=e.split(" ").map(e=>w(e,this.options)).join(" ").split(/\s+/).map(e=>j(e,this.options));n&&(a=a.filter(e=>(l("loose invalid filter",e,this.options),!!e.match(c[d.COMPARATORLOOSE])))),l("range list",a);let u=new Map;for(let e of a.map(e=>new s(e,this.options))){if(g(e))return[e];u.set(e.value,e)}u.size>1&&u.has("")&&u.delete("");let b=[...u.values()];return i.set(t,b),b}intersects(e,t){if(!(e instanceof o))throw TypeError("a Range is required");return this.set.some(r=>v(r,t)&&e.set.some(e=>v(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(R(this.set[t],e,this.options))return!0;return!1}}e.exports=o;let i=new(r(8953)),a=r(3990),s=r(1565),l=r(1361),u=r(4517),{safeRe:c,t:d,comparatorTrimReplace:p,tildeTrimReplace:f,caretTrimReplace:h}=r(2841),{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:y}=r(9543),g=e=>"<0.0.0-0"===e.value,b=e=>""===e.value,v=(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=D(e,t)),l("tildes",e=E(e,t)),l("xrange",e=P(e,t)),l("stars",e=C(e,t)),e),x=e=>!e||"x"===e.toLowerCase()||"*"===e,E=(e,t)=>e.trim().split(/\s+/).map(e=>S(e,t)).join(" "),S=(e,t)=>{let r=t.loose?c[d.TILDELOOSE]:c[d.TILDE];return e.replace(r,(t,r,n,o,i)=>{let a;return l("tilde",e,t,r,n,o,i),x(r)?a="":x(n)?a=`>=${r}.0.0 <${+r+1}.0.0-0`:x(o)?a=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:i?(l("replaceTilde pr",i),a=`>=${r}.${n}.${o}-${i} <${r}.${+n+1}.0-0`):a=`>=${r}.${n}.${o} <${r}.${+n+1}.0-0`,l("tilde return",a),a})},D=(e,t)=>e.trim().split(/\s+/).map(e=>O(e,t)).join(" "),O=(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,i,a)=>{let s;return l("caret",e,t,r,o,i,a),x(r)?s="":x(o)?s=`>=${r}.0.0${n} <${+r+1}.0.0-0`:x(i)?s="0"===r?`>=${r}.${o}.0${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.0${n} <${+r+1}.0.0-0`:a?(l("replaceCaret pr",a),s="0"===r?"0"===o?`>=${r}.${o}.${i}-${a} <${r}.${o}.${+i+1}-0`:`>=${r}.${o}.${i}-${a} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${i}-${a} <${+r+1}.0.0-0`):(l("no pr"),s="0"===r?"0"===o?`>=${r}.${o}.${i}${n} <${r}.${o}.${+i+1}-0`:`>=${r}.${o}.${i}${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${i} <${+r+1}.0.0-0`),l("caret return",s),s})},P=(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,i,a,s)=>{l("xRange",e,r,n,o,i,a,s);let u=x(o),c=u||x(i),d=c||x(a);return"="===n&&d&&(n=""),s=t.includePrerelease?"-0":"",u?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&d?(c&&(i=0),a=0,">"===n?(n=">=",c?(o=+o+1,i=0):i=+i+1,a=0):"<="===n&&(n="<",c?o=+o+1:i=+i+1),"<"===n&&(s="-0"),r=`${n+o}.${i}.${a}${s}`):c?r=`>=${o}.0.0${s} <${+o+1}.0.0-0`:d&&(r=`>=${o}.${i}.0${s} <${o}.${+i+1}.0-0`),l("xRange return",r),r})},C=(e,t)=>(l("replaceStars",e,t),e.trim().replace(c[d.STAR],"")),j=(e,t)=>(l("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?d.GTE0PRE:d.GTE0],"")),T=e=>(t,r,n,o,i,a,s,l,u,c,d,p)=>(r=x(n)?"":x(o)?`>=${n}.0.0${e?"-0":""}`:x(i)?`>=${n}.${o}.0${e?"-0":""}`:a?`>=${r}`:`>=${r}${e?"-0":""}`,l=x(u)?"":x(c)?`<${+u+1}.0.0-0`:x(d)?`<${u}.${+c+1}.0-0`:p?`<=${u}.${c}.${d}-${p}`:e?`<${u}.${c}.${+d+1}-0`:`<=${l}`,`${r} ${l}`.trim()),R=(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}},4517(e,t,r){"use strict";let n=r(1361),{MAX_LENGTH:o,MAX_SAFE_INTEGER:i}=r(9543),{safeRe:a,t:s}=r(2841),l=r(3990),{compareIdentifiers:u}=r(3806);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?a[s.LOOSE]:a[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>i||this.major<0)throw TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>i||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<i)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?a[s.PRERELEASELOOSE]:a[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},2281(e,t,r){"use strict";let n=r(3955);e.exports=(e,t)=>{let r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},4004(e,t,r){"use strict";let n=r(8848),o=r(8220),i=r(9761),a=r(2386),s=r(1262),l=r(9639);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 i(e,r,u);case">=":return a(e,r,u);case"<":return s(e,r,u);case"<=":return l(e,r,u);default:throw TypeError(`Invalid operator: ${t}`)}}},6783(e,t,r){"use strict";let n=r(4517),o=r(3955),{safeRe:i,t:a}=r(2841);e.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let n,o=t.includePrerelease?i[a.COERCERTLFULL]:i[a.COERCERTL];for(;(n=o.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&n.index+n[0].length===r.index+r[0].length||(r=n),o.lastIndex=n.index+n[1].length+n[2].length;o.lastIndex=-1}else r=e.match(t.includePrerelease?i[a.COERCEFULL]:i[a.COERCE]);if(null===r)return null;let s=r[2],l=r[3]||"0",u=r[4]||"0",c=t.includePrerelease&&r[5]?`-${r[5]}`:"",d=t.includePrerelease&&r[6]?`+${r[6]}`:"";return o(`${s}.${l}.${u}${c}${d}`,t)}},6106(e,t,r){"use strict";let n=r(4517);e.exports=(e,t,r)=>{let o=new n(e,r),i=new n(t,r);return o.compare(i)||o.compareBuild(i)}},2132(e,t,r){"use strict";let n=r(7851);e.exports=(e,t)=>n(e,t,!0)},7851(e,t,r){"use strict";let n=r(4517);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},3269(e,t,r){"use strict";let n=r(3955);e.exports=(e,t)=>{let r=n(e,null,!0),o=n(t,null,!0),i=r.compare(o);if(0===i)return null;let a=i>0,s=a?r:o,l=a?o:r,u=!!s.prerelease.length;if(l.prerelease.length&&!u){if(!l.patch&&!l.minor)return"major";if(0===l.compareMain(s))return l.minor&&!l.patch?"minor":"patch"}let c=u?"pre":"";return r.major!==o.major?c+"major":r.minor!==o.minor?c+"minor":r.patch!==o.patch?c+"patch":"prerelease"}},8848(e,t,r){"use strict";let n=r(7851);e.exports=(e,t,r)=>0===n(e,t,r)},9761(e,t,r){"use strict";let n=r(7851);e.exports=(e,t,r)=>n(e,t,r)>0},2386(e,t,r){"use strict";let n=r(7851);e.exports=(e,t,r)=>n(e,t,r)>=0},8868(e,t,r){"use strict";let n=r(4517);e.exports=(e,t,r,o,i)=>{"string"==typeof r&&(i=o,o=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,o,i).version}catch(e){return null}}},1262(e,t,r){"use strict";let n=r(7851);e.exports=(e,t,r)=>0>n(e,t,r)},9639(e,t,r){"use strict";let n=r(7851);e.exports=(e,t,r)=>0>=n(e,t,r)},6381(e,t,r){"use strict";let n=r(4517);e.exports=(e,t)=>new n(e,t).major},1353(e,t,r){"use strict";let n=r(4517);e.exports=(e,t)=>new n(e,t).minor},8220(e,t,r){"use strict";let n=r(7851);e.exports=(e,t,r)=>0!==n(e,t,r)},3955(e,t,r){"use strict";let n=r(4517);e.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}},6082(e,t,r){"use strict";let n=r(4517);e.exports=(e,t)=>new n(e,t).patch},9428(e,t,r){"use strict";let n=r(3955);e.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}},7555(e,t,r){"use strict";let n=r(7851);e.exports=(e,t,r)=>n(t,e,r)},3810(e,t,r){"use strict";let n=r(6106);e.exports=(e,t)=>e.sort((e,r)=>n(r,e,t))},7229(e,t,r){"use strict";let n=r(7476);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},4042(e,t,r){"use strict";let n=r(6106);e.exports=(e,t)=>e.sort((e,r)=>n(e,r,t))},8474(e,t,r){"use strict";let n=r(3955);e.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}},2722(e,t,r){"use strict";let n=r(2841),o=r(9543),i=r(4517),a=r(3806),s=r(3955),l=r(8474),u=r(2281),c=r(8868),d=r(3269),p=r(6381),f=r(1353),h=r(6082),m=r(9428),y=r(7851),g=r(7555),b=r(2132),v=r(6106),w=r(4042),x=r(3810),E=r(9761),S=r(1262),D=r(8848),O=r(8220),P=r(2386),k=r(9639),C=r(4004),j=r(6783),T=r(1565),R=r(7476),N=r(7229),A=r(6364),$=r(5039),I=r(5357),M=r(1280),L=r(7403),F=r(8854),B=r(7226),V=r(7183),U=r(8623);e.exports={parse:s,valid:l,clean:u,inc:c,diff:d,major:p,minor:f,patch:h,prerelease:m,compare:y,rcompare:g,compareLoose:b,compareBuild:v,sort:w,rsort:x,gt:E,lt:S,eq:D,neq:O,gte:P,lte:k,cmp:C,coerce:j,Comparator:T,Range:R,satisfies:N,toComparators:A,maxSatisfying:$,minSatisfying:I,minVersion:M,validRange:L,outside:F,gtr:B,ltr:V,intersects:U,simplifyRange:r(6486),subset:r(583),SemVer:i,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:o.SEMVER_SPEC_VERSION,RELEASE_TYPES:o.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}},9543(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}},1361(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):()=>{}},3806(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)}},8953(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}}},3990(e){"use strict";let t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},2841(e,t,r){"use strict";let{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:i}=r(9543),a=r(1361),s=(t=e.exports={}).re=[],l=t.safeRe=[],u=t.src=[],c=t.safeSrc=[],d=t.t={},p=0,f="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",i],[f,o]],m=(e,t,r)=>{let n=(e=>{for(let[t,r]of h)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),o=p++;a(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)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),m("MAINVERSION",`(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASE",`(?:-(${u[d.PRERELEASEIDENTIFIER]}(?:\\.${u[d.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${u[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[d.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${f}+`),m("BUILD",`(?:\\+(${u[d.BUILDIDENTIFIER]}(?:\\.${u[d.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${u[d.MAINVERSION]}${u[d.PRERELEASE]}?${u[d.BUILD]}?`),m("FULL",`^${u[d.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${u[d.MAINVERSIONLOOSE]}${u[d.PRERELEASELOOSE]}?${u[d.BUILD]}?`),m("LOOSE",`^${u[d.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${u[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${u[d.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:${u[d.PRERELEASE]})?${u[d.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:${u[d.PRERELEASELOOSE]})?${u[d.BUILD]}?)?)?`),m("XRANGE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),m("COERCE",`${u[d.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",u[d.COERCEPLAIN]+`(?:${u[d.PRERELEASE]})?`+`(?:${u[d.BUILD]})?`+"(?:$|[^\\d])"),m("COERCERTL",u[d.COERCE],!0),m("COERCERTLFULL",u[d.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${u[d.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",m("TILDE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${u[d.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",m("CARET",`^${u[d.LONECARET]}${u[d.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${u[d.LONECARET]}${u[d.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${u[d.GTLT]}\\s*(${u[d.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]}|${u[d.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${u[d.XRANGEPLAIN]})\\s+-\\s+(${u[d.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${u[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[d.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},7226(e,t,r){"use strict";let n=r(8854);e.exports=(e,t,r)=>n(e,t,">",r)},8623(e,t,r){"use strict";let n=r(7476);e.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))},7183(e,t,r){"use strict";let n=r(8854);e.exports=(e,t,r)=>n(e,t,"<",r)},5039(e,t,r){"use strict";let n=r(4517),o=r(7476);e.exports=(e,t,r)=>{let i=null,a=null,s=null;try{s=new o(t,r)}catch(e){return null}return e.forEach(e=>{s.test(e)&&(!i||-1===a.compare(e))&&(a=new n(i=e,r))}),i}},5357(e,t,r){"use strict";let n=r(4517),o=r(7476);e.exports=(e,t,r)=>{let i=null,a=null,s=null;try{s=new o(t,r)}catch(e){return null}return e.forEach(e=>{s.test(e)&&(!i||1===a.compare(e))&&(a=new n(i=e,r))}),i}},1280(e,t,r){"use strict";let n=r(4517),o=r(7476),i=r(9761);e.exports=(e,t)=>{e=new o(e,t);let r=new n("0.0.0");if(e.test(r)||(r=new n("0.0.0-0"),e.test(r)))return r;r=null;for(let t=0;t<e.set.length;++t){let o=e.set[t],a=null;o.forEach(e=>{let t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!a||i(t,a))&&(a=t);break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),a&&(!r||i(r,a))&&(r=a)}return r&&e.test(r)?r:null}},8854(e,t,r){"use strict";let n=r(4517),o=r(1565),{ANY:i}=o,a=r(7476),s=r(7229),l=r(9761),u=r(1262),c=r(9639),d=r(2386);e.exports=(e,t,r,p)=>{let f,h,m,y,g;switch(e=new n(e,p),t=new a(t,p),r){case">":f=l,h=c,m=u,y=">",g=">=";break;case"<":f=u,h=d,m=l,y="<",g="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,t,p))return!1;for(let r=0;r<t.set.length;++r){let n=t.set[r],a=null,s=null;if(n.forEach(e=>{e.semver===i&&(e=new o(">=0.0.0")),a=a||e,s=s||e,f(e.semver,a.semver,p)?a=e:m(e.semver,s.semver,p)&&(s=e)}),a.operator===y||a.operator===g||(!s.operator||s.operator===y)&&h(e,s.semver)||s.operator===g&&m(e,s.semver))return!1}return!0}},6486(e,t,r){"use strict";let n=r(7229),o=r(7851);e.exports=(e,t,r)=>{let i=[],a=null,s=null,l=e.sort((e,t)=>o(e,t,r));for(let e of l)n(e,t,r)?(s=e,a||(a=e)):(s&&i.push([a,s]),s=null,a=null);a&&i.push([a,null]);let u=[];for(let[e,t]of i)e===t?u.push(e):t||e!==l[0]?t?e===l[0]?u.push(`<=${t}`):u.push(`${e} - ${t}`):u.push(`>=${e}`):u.push("*");let c=u.join(" || "),d="string"==typeof t.raw?t.raw:String(t);return c.length<d.length?c:t}},583(e,t,r){"use strict";let n=r(7476),o=r(1565),{ANY:i}=o,a=r(7229),s=r(7851),l=[new o(">=0.0.0-0")],u=[new o(">=0.0.0")],c=(e,t,r)=>{let n,o,c,f,h,m,y;if(e===t)return!0;if(1===e.length&&e[0].semver===i)if(1===t.length&&t[0].semver===i)return!0;else e=r.includePrerelease?l:u;if(1===t.length&&t[0].semver===i)if(r.includePrerelease)return!0;else t=u;let g=new Set;for(let t of e)">"===t.operator||">="===t.operator?n=d(n,t,r):"<"===t.operator||"<="===t.operator?o=p(o,t,r):g.add(t.semver);if(g.size>1)return null;if(n&&o&&((c=s(n.semver,o.semver,r))>0||0===c&&(">="!==n.operator||"<="!==o.operator)))return null;for(let e of g){if(n&&!a(e,String(n),r)||o&&!a(e,String(o),r))return null;for(let n of t)if(!a(e,String(n),r))return!1;return!0}let b=!!o&&!r.includePrerelease&&!!o.semver.prerelease.length&&o.semver,v=!!n&&!r.includePrerelease&&!!n.semver.prerelease.length&&n.semver;for(let e of(b&&1===b.prerelease.length&&"<"===o.operator&&0===b.prerelease[0]&&(b=!1),t)){if(y=y||">"===e.operator||">="===e.operator,m=m||"<"===e.operator||"<="===e.operator,n){if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),">"===e.operator||">="===e.operator){if((f=d(n,e,r))===e&&f!==n)return!1}else if(">="===n.operator&&!a(n.semver,String(e),r))return!1}if(o){if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),"<"===e.operator||"<="===e.operator){if((h=p(o,e,r))===e&&h!==o)return!1}else if("<="===o.operator&&!a(o.semver,String(e),r))return!1}if(!e.operator&&(o||n)&&0!==c)return!1}return(!n||!m||!!o||0===c)&&(!o||!y||!!n||0===c)&&!v&&!b&&!0},d=(e,t,r)=>{if(!e)return t;let n=s(e.semver,t.semver,r);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},p=(e,t,r)=>{if(!e)return t;let n=s(e.semver,t.semver,r);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let o=!1;e:for(let n of e.set){for(let e of t.set){let t=c(n,e,r);if(o=o||null!==t,t)continue e}if(o)return!1}return!0}},6364(e,t,r){"use strict";let n=r(7476);e.exports=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" "))},7403(e,t,r){"use strict";let n=r(7476);e.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}},4557(e,t,r){"use strict";let n,o,i,a,s,l,u,c,d,p,f,h;r.r(t),r.d(t,{GenderUnknownIcon:()=>gb,evaluateAsNumber:()=>pq,getImportMapOverrideMap:()=>sP,StockManagementPictogram:()=>kf,ChemistryIcon:()=>ge,BabyIcon:()=>yQ,DashboardExtension:()=>bb,openmrsComponentDecorator:()=>mo,tryRegisterExtension:()=>yv,pictogramIds:()=>PX,ActivityIcon:()=>yG,compile:()=>pX,removeRouteMapOverride:()=>s4,checkStatus:()=>fy,TableBatchActions:()=>yI,getAsyncLifecycle:()=>ma,subscribeOpenmrsEvent:()=>px,dispatchConnectivityChanged:()=>y,PasswordIcon:()=>gU,Assessment2Pictogram:()=>P2,CloseIcon:()=>gi,setupRouteMapOverrides:()=>s5,getWorkspaceGroupRegistration:()=>hp,registerWorkspace:()=>hl,useFeatureFlag:()=>mL,reset:()=>f8,LabOrderIcon:()=>gk,VisitMode:()=>pk,offlineUuidPrefix:()=>d8,useLocations:()=>m3,getLifecycle:()=>mi,formatDatetime:()=>D2,getVisitsForPatient:()=>pI,subscribeConnectivity:()=>b,formatPartialDate:()=>DX,CustomOverflowMenu:()=>yW,LocationIcon:()=>gj,GroupIcon:()=>gw,canBeginEditSynchronizationItemsOfType:()=>d1,VisitStatus:()=>pC,createUseStore:()=>hL,getCurrentImportMap:()=>sF,getSessionLocation:()=>aD,usePatient:()=>yt,useRenderableExtensions:()=>yn,getOpenedWindowIndexByWorkspace:()=>hy,checkStatusFor:()=>fg,clearHistory:()=>ai,clearConfigErrors:()=>og,formatTime:()=>D1,isDevEnabled:()=>aC,setLeftNav:()=>ht,syncOfflinePatientData:()=>pg,closeWorkspaceGroup2:()=>Cg,getCurrentRouteMap:()=>sX,ConfigurableLink:()=>hT,sessionStore:()=>ay,subscribeSnackbarShown:()=>A,getDynamicOfflineDataEntriesFor:()=>pa,getLoggedInUser:()=>aS,GenderMaleIcon:()=>gy,getExtensionSlotConfigFromStore:()=>nN,evaluateAsNumberAsync:()=>pZ,putDynamicOfflineDataFor:()=>pl,getImportMapDefaultMap:()=>sD,unregisterExtensionRendering:()=>fk,implementerToolsConfigStore:()=>nG,Type:()=>nv,InPatientPictogram:()=>kr,cleanupObsoleteFeatureFlags:()=>fc,showSnackbar:()=>kP,PatientBannerActionsMenu:()=>PK,PatientSearchPictogram:()=>ka,DocumentAttachmentIcon:()=>gu,Snackbar:()=>kx,CardiologyPictogram:()=>P3,ImageMedicalIcon:()=>gE,ActionableNotificationComponent:()=>Pu,DiagnosisTags:()=>OY,iconIds:()=>yH,PatientsPictogram:()=>ks,interpolateUrl:()=>i7,setupHistory:()=>ar,subscribeToastShown:()=>N,detachAll:()=>f3,convertToLocaleCalendar:()=>D4,DocumentIcon:()=>gl,configInternalStore:()=>nP,ActionMenuButton2:()=>CN,setupDynamicOfflineDataHandler:()=>po,makeUrl:()=>ap,oneOf:()=>oS,selectPreferredName:()=>PN,launchWorkspaceGroup:()=>function e(t,r){let n=hp(t),{state:o,onWorkspaceGroupLaunch:i,workspaceGroupCleanup:a,workspaceToLaunch:s}=r,l=function(){return kG}();if(l.getState().openWorkspaces.length){let n=l.getState().workspaceGroup;n?k$(n?.name,()=>{e(t,r)}):kJ(()=>{e(t,r)})}else l.setState(e=>({...e,workspaceGroup:{name:t,members:n.members,cleanup:a}})),k2(t,o),i?.(),s&&kM(s.name,s.additionalProps??{})},syncDynamicOfflineData:()=>pp,MobileCheckIcon:()=>gI,createErrorHandler:()=>I,openmrsObservableFetch:()=>ah,parseDate:()=>DH,getAttachmentByUuid:()=>s9,LeftNavMenu:()=>O2,getExtensionRegistration:()=>f0,ShoppingCartAddItemIcon:()=>bm,ReferralOrderIcon:()=>gq,ReportIcon:()=>gY,dispatchToastShown:()=>j,getImportMapNextPageMap:()=>sO,registerExtension:()=>f1,setupOfflineSync:()=>d3,DownloadIcon:()=>gc,useConnectivity:()=>mC,provide:()=>n5,getSynchronizationItemsFor:()=>dY,ShoppingCartArrowDownIcon:()=>g4,featureFlagsStore:()=>fl,promptBeforeClosing:()=>kB,removeDynamicOfflineDataFor:()=>pc,jsep:()=>pF,GeriatricsPictogram:()=>ke,SearchIcon:()=>gQ,reportError:()=>$,slugify:()=>sI,isOmrsDateToday:()=>DW,getExtensionStore:()=>fC,BloodBankPictogram:()=>P4,TriagePictogram:()=>km,Workspace2:()=>CP,refetchCurrentUser:()=>a_,CheckmarkOutlineIcon:()=>y8,registerExtensionSlot:()=>f9,AllergiesIcon:()=>bd,ArrowDownIcon:()=>yZ,useOpenmrsInfinite:()=>mG,getExtensionConfigFromExtensionSlotStore:()=>nM,OpenmrsDatePicker:()=>Oq,getExtensionConfigFromStore:()=>nI,getDynamicOfflineDataEntries:()=>pi,getLocaleDisplayName:()=>Dl,messageOmrsServiceWorker:()=>lb,navigate:()=>i8,launchWorkspace2:()=>Cb,getGroupByWindowName:()=>hm,CustomOverflowMenuItem:()=>yz,isUrl:()=>oE,CaretDownIcon:()=>y2,ArrowLeftIcon:()=>yY,FacilityPictogram:()=>P8,ViewOffIcon:()=>bl,setCurrentOfflineMode:()=>lO,updateInternalExtensionStore:()=>fx,dispatchActionableNotificationShown:()=>k,resetRouteMapOverrides:()=>s3,formatDurationBetween:()=>Ot,defaultVisitCustomRepresentation:()=>pj,getBreadcrumbsFor:()=>oN,useOpenmrsPagination:()=>mB,Pagination:()=>Pk,CheckmarkFilledIcon:()=>y9,clearCurrentUser:()=>ax,showModal:()=>Pa,ChevronUpIcon:()=>go,saveVisit:()=>pA,useAttachments:()=>mE,Pictogram:()=>kw,useExtensionSlot:()=>hz,ChevronDownIcon:()=>gt,OpenmrsDateRangePicker:()=>OZ,deleteAttachmentPermanently:()=>lt,getVisitTypes:()=>pP,OverflowMenuHorizontalIcon:()=>gB,EventScheduleIcon:()=>gf,getSessionStore:()=>av,ActionMenu:()=>Cf,ProcedureOrderIcon:()=>gH,preloadImport:()=>sL,registerWorkspaceWindows2:()=>hb,useOnVisible:()=>m5,setSessionLocation:()=>aO,userHasAccess:()=>aE,ChartAverageIcon:()=>y5,getFeatureFlag:()=>fd,UserAvatarIcon:()=>bo,renderExtension:()=>hP,useFhirInfinite:()=>mX,toVisitTypeObject:()=>pO,useSession:()=>yo,EmergencyDepartmentPictogram:()=>P9,Notification:()=>Ps,dispatchSnackbarShown:()=>C,getSynchronizationItem:()=>d0,navigateAndLaunchWorkspace:()=>kL,omrsOfflineCachingStrategyHttpHeaderName:()=>lg,formatDate:()=>DQ,workspace2StoreActions:()=>C_,SwitcherIcon:()=>g1,esmStyleGuideSchema:()=>yN,getImportMapDisabledOverrides:()=>sk,useAssignedExtensionIds:()=>m_,CaretRightIcon:()=>y3,evaluateAsType:()=>pY,PageHeader:()=>PO,TranslateIcon:()=>be,setUserProperties:()=>aP,MovementIcon:()=>gF,renderInlineNotifications:()=>Pg,subscribePrecacheStaticDependencies:()=>x,PaymentsDeskPictogram:()=>kl,usePrimaryIdentifierCode:()=>yr,dispatchPrecacheStaticDependencies:()=>w,getCurrentUser:()=>ab,useLayoutType:()=>m0,XrayPictogram:()=>ky,CaretUpIcon:()=>y6,renderActionableNotifications:()=>Pv,OpenmrsAppContext:()=>my,setupModals:()=>Pi,omrsOfflineResponseBodyHttpHeaderName:()=>lm,getDefaultsFromConfigSchema:()=>function e(t){let r={};for(let n of Object.keys(t))if(CJ(t[n])&&t[n].hasOwnProperty("_default"))r[n]=t[n]._default;else{if(n.startsWith("_"))continue;CJ(t[n])?r[n]=e(t[n]):r[n]=t[n]}return r},subscribeTo:()=>J,recordConfigDerivationError:()=>nK,useAbortController:()=>mb,Extension:()=>hR,getFhirServerPaginationHandlers:()=>mz,useConnectedExtensions:()=>mk,registerApp:()=>y_,queueSynchronizationItemFor:()=>dq,HospitalBedIcon:()=>gx,useExtensionInternalStore:()=>m$,configExtensionStore:()=>nC,getSynchronizationItems:()=>dX,getExtensionSlotsConfigStore:()=>nT,registerExtensionRendering:()=>fP,RenderIfValueIsTruthy:()=>mg,registerFeatureFlag:()=>fu,useFhirFetchAll:()=>mJ,restBaseUrl:()=>au,CalendarHeatMapIcon:()=>y0,getWorkspaceRegistration:()=>hd,isImportMapOverrideDisabled:()=>sC,resetConfigSystem:()=>ob,getFullSynchronizationItems:()=>dQ,getExtensionInternalStore:()=>fw,registerGlobalStore:()=>Z,runSynchronization:()=>dK,evaluateAsBoolean:()=>pH,PatientBannerPatientInfo:()=>PW,addRouteMapOverride:()=>s2,getDefaultCalendar:()=>DY,SettingsIcon:()=>g0,DrugOrderIcon:()=>gd,isOnline:()=>fh,ProgramsIcon:()=>gG,useAssignedExtensions:()=>hW,CloseFilledIcon:()=>ga,canAccessStorage:()=>CY,registerDefaultCalendar:()=>DZ,TreeViewAltIcon:()=>br,OverflowMenuVerticalIcon:()=>gV,clearConfigDerivationError:()=>nH,getConfigStore:()=>nj,registerWorkspaceGroup:()=>hu,InformationSquareIcon:()=>gO,EmptyCard:()=>OQ,ChevronLeftIcon:()=>gr,RadiologyIcon:()=>bh,useCandidateExtensions:()=>mx,renderToasts:()=>kR,isDesktop:()=>m1,integrateBreakpoints:()=>yO,RegistrationPictogram:()=>kd,CardHeader:()=>yj,getExtensionRegistrationFrom:()=>fQ,InformationIcon:()=>gS,TrashCanIcon:()=>bt,useShallowStableValue:()=>hN,useOpenmrsSWR:()=>m7,Assessment1Pictogram:()=>P1,finishRegisteringAllApps:()=>yx,importDynamic:()=>sM,useFhirPagination:()=>mW,useVisitContextStore:()=>yp,ArrowUpIcon:()=>yX,showActionableNotification:()=>Pw,getDynamicOfflineDataHandlers:()=>pn,useForceUpdate:()=>mF,updateWorkspaceWindowState:()=>kZ,useVisit:()=>yf,PatientBannerPatientIdentifiers:()=>PF,WorkspaceNotification:()=>Cn,TransferPictogram:()=>kh,usePagination:()=>m9,Breakpoint:()=>yE,PatientBannerToggleContactDetailsButton:()=>CA,CloseOutlineIcon:()=>gs,ObstetricsPictogram:()=>ki,parseDateInput:()=>D6,getConfig:()=>n9,attach:()=>f2,getLocale:()=>Du,ActionMenuButton:()=>k7,isUrlWithTemplateParameters:()=>ox,useEmrConfiguration:()=>mA,useLeftNav:()=>m2,ToolsIcon:()=>g8,ErrorState:()=>O0,detach:()=>f4,setCurrentVisit:()=>pN,registerOmrsServiceWorker:()=>lf,ConditionsIcon:()=>bf,SaveIcon:()=>gX,activateOfflineCapability:()=>lP,useWorkspaces:()=>kX,resetWorkspaceStore:()=>k1,useConfig:()=>mP,validator:()=>nw,CalendarIcon:()=>y1,getHistory:()=>an,StickyNoteAddIcon:()=>g3,useWorkspace2Store:()=>Cx,getPatientName:()=>PC,getVisitStore:()=>pR,getCoreTranslation:()=>sf,registerModuleWithConfigSystem:()=>n2,isOfflineUuid:()=>pt,registerModuleLoad:()=>n4,getBreadcrumbs:()=>oj,extractVariableNames:()=>fi,getOfflineSynchronizationStore:()=>dz,translateFrom:()=>sp,EditIcon:()=>gp,useStoreWithActions:()=>hM,getCandidateExtensions:()=>f7,putDynamicOfflineData:()=>ps,shallowEqual:()=>L,subscribeNotificationShown:()=>T,MaximizeIcon:()=>gR,promptForClosingWorkspaces:()=>Cw,WarningIcon:()=>bc,closeAllWorkspaces:()=>kJ,fhirBaseUrl:()=>ac,matchLocale:()=>CZ,registerBreadcrumb:()=>ok,usePatientPhoto:()=>Pq,EventsIcon:()=>gh,createGlobalStore:()=>q,workspaceStore:()=>kG,getCurrentOfflineMode:()=>lD,subscribeToFeatureFlag:()=>fp,useExtensionStore:()=>mM,closeWorkspace:()=>kz,createAttachment:()=>le,useLeftNavStore:()=>m4,TableIcon:()=>g7,Icon:()=>bg,InformationFilledIcon:()=>gD,getCurrentPageMap:()=>sS,LaboratoryPictogram:()=>kn,temporaryConfigStore:()=>nk,getPromptBeforeClosingFcn:()=>kV,toDateObjectStrict:()=>Dz,defineConfigSchema:()=>n1,filterBreadcrumbs:()=>oR,invalidateImplementerToolsConfig:()=>nW,PatientBannerContactDetails:()=>CB,getAssignedExtensions:()=>f5,PatientPhoto:()=>PJ,MaterialOrderIcon:()=>gT,MicroscopeIcon:()=>g$,scheduleRecomputation:()=>fA,PharmacyPictogram:()=>ku,AttachmentIcon:()=>bp,MoneyIcon:()=>gM,getAttachments:()=>s8,getFullSynchronizationItemsFor:()=>dJ,PageHeaderContent:()=>PP,MedicationIcon:()=>gN,PrinterIcon:()=>gK,getWorkspaceGroupStore:()=>k2,PatientListsPictogram:()=>kb,useAppContext:()=>mv,isOpenmrsRoutes:()=>sU,AppointmentsAltPictogram:()=>P0,GenericOrderTypeIcon:()=>gv,batchExtensionUpdates:()=>fR,useExtensionSlotStore:()=>hV,ViewIcon:()=>bu,formattedName:()=>PR,sessionEndpoint:()=>ad,duration:()=>D8,resetImportMapOverrides:()=>sR,TableOfContentsIcon:()=>g5,CaretLeftIcon:()=>y4,getTranslationOverrides:()=>n8,isVersionSatisfied:()=>C0,EmptyCardIllustration:()=>OX,PenIcon:()=>gz,getWorkspaceStore:()=>kq,registerOfflinePatientHandler:()=>py,setupImportMapOverrides:()=>s$,showToast:()=>kN,useDefineAppContext:()=>mm,validators:()=>oD,getGlobalStore:()=>Y,useOnClickOutside:()=>m6,getWindowByWorkspaceName:()=>hh,ArrowRightIcon:()=>yJ,loadLifeCycles:()=>yy,registerBreadcrumbs:()=>oC,MotherIcon:()=>gL,fetchCurrentPatient:()=>pv,Toast:()=>kk,MessageQueueIcon:()=>gA,TwoFactorAuthenticationIcon:()=>bn,Pharmacy2Pictogram:()=>kc,goBackInHistory:()=>ao,GroupAccessIcon:()=>g_,getExtensionRenderingsStore:()=>f_,setImplementerToolsConfigRecomputer:()=>nU,getAsyncExtensionLifecycle:()=>ml,setupApiModule:()=>aT,renderLoadingSpinner:()=>CV,WorkspaceContainer:()=>Ch,showNotification:()=>Pb,queueSynchronizationItem:()=>dZ,getModalRegistration:()=>hi,ListCheckedIcon:()=>gC,ResponsiveWrapper:()=>k_,GynaecologyPictogram:()=>kt,ShoppingCartIcon:()=>g2,getRouteMapNextPageMap:()=>s0,updateVisit:()=>p$,backendDependencies:()=>aj,MaybePictogram:()=>kv,beginEditSynchronizationItem:()=>d2,createParcelMounter:()=>hD,getStartedVisit:()=>pM,omrsOfflineResponseStatusHttpHeaderName:()=>ly,isOpenmrsAppRoutes:()=>sV,openmrsFetch:()=>af,HomePictogram:()=>kg,DentistryPictogram:()=>P5,ServiceQueuesPictogram:()=>kp,toLanguageTag:()=>Ds,launchWorkspace:()=>kM,setFeatureFlag:()=>ff,useStore:()=>hI,DigitalTrustPictogram:()=>P7,NumericObservation:()=>PS,attachmentUrl:()=>s7,interpolateString:()=>i9,inRange:()=>o_,useExtensionSlotMeta:()=>mI,AppointmentsPictogram:()=>PQ,renderSnackbars:()=>kO,getRegisteredWorkspace2Names:()=>CS,toLocationObject:()=>pS,ChartLineIcon:()=>y7,UserHasAccess:()=>yi,evaluateAsBooleanAsync:()=>pG,changeWorkspaceContext:()=>kK,createDashboard:()=>bv,getLocations:()=>pD,getOfflineDb:()=>dB,canCloseWorkspaceWithoutPrompting:()=>kA,getExtensionsConfigStore:()=>nA,getRouteMapDefaultMap:()=>sQ,age:()=>P$,syncAllDynamicOfflineData:()=>pd,isOmrsDateStrict:()=>DU,registerWorkspaceGroups2:()=>hg,usePaginationInfo:()=>m8,evaluateAsync:()=>pK,useOpenmrsFetchAll:()=>mZ,removeImportMapOverride:()=>sT,showWorkspacePrompts:()=>kQ,useVisitTypes:()=>yh,ageAsDuration:()=>PA,removeDynamicOfflineData:()=>pu,getExtensionNameFromId:()=>fX,deleteSynchronizationItem:()=>d4,renderParcel:()=>hS,useWorkspace2Context:()=>CE,ResetIcon:()=>gJ,RenewIcon:()=>gZ,subscribeActionableNotificationShown:()=>R,ErrorCard:()=>O1,GenderFemaleIcon:()=>gm,enableImportMapOverride:()=>sN,getOfflinePatientDataStore:()=>pm,retry:()=>C1,ComponentContext:()=>hj,ExtensionSlot:()=>hH,getOmrsServiceWorker:()=>lh,addImportMapOverride:()=>sj,subscribeConnectivityChanged:()=>g,unsetLeftNav:()=>hr,MaybeIcon:()=>by,useCustomOverflowMenu:()=>yU,PedestrianFamilyIcon:()=>gW,generateOfflineUuid:()=>pe,cancelPrompt:()=>kU,CtScanPictogram:()=>P6,dispatchNotificationShown:()=>P,leftNavStore:()=>he,OpenmrsFetchError:()=>am,UserFollowIcon:()=>bi,launchWorkspaceGroup2:()=>Cy,ChevronRightIcon:()=>gn,UserXrayIcon:()=>ba,GenderOtherIcon:()=>gg,formatDuration:()=>D3,toOmrsIsoString:()=>DK,Labs2Pictogram:()=>ko,workspace2Store:()=>hf,setUserLanguage:()=>aw,useBodyScrollLock:()=>mS,getExtensionConfig:()=>n$,SyringeIcon:()=>g6,LocationPicker:()=>O4,useDebounce:()=>mj,TimeIcon:()=>g9,getExtensionSlotConfig:()=>nR,AddIcon:()=>yq,getRouteMapOverrideMap:()=>s1,processConfig:()=>oe,InventoryManagementIcon:()=>gP,registerWorkspaces2:()=>hv,UserIcon:()=>bs,formatPatientName:()=>PT,fireOpenmrsEvent:()=>p_,registerModal:()=>ho,registerTranslationNamespace:()=>n3,displayName:()=>Pj,evaluate:()=>pz,defineExtensionConfigSchema:()=>n6,renderWorkspaceWindowsAndMenu:()=>CG,getSyncLifecycle:()=>ms,evaluateAsTypeAsync:()=>pJ});let m="openmrs:connectivity-changed";function y(e){window.dispatchEvent(new CustomEvent(m,{detail:{online:e}}))}function g(e){if(!window.offlineEnabled)return()=>{};let t=t=>e(t.detail);return window.addEventListener(m,t),()=>window.removeEventListener(m,t)}function b(e){return e({online:!window.offlineEnabled||navigator.onLine}),g(e)}let v="openmrs:precache-static-dependencies";function w(e={}){window.dispatchEvent(new CustomEvent(v,{detail:e}))}function x(e){let t=t=>e(t.detail);return window.addEventListener(v,t),()=>window.removeEventListener(v,t)}let E="openmrs:notification-shown",S="openmrs:actionable-notification-shown",D="openmrs:toast-shown",O="openmrs:snack-bar-shown";function P(e){window.dispatchEvent(new CustomEvent(E,{detail:e}))}function k(e){window.dispatchEvent(new CustomEvent(S,{detail:e}))}function C(e){window.dispatchEvent(new CustomEvent(O,{detail:e}))}function j(e){window.dispatchEvent(new CustomEvent(D,{detail:e}))}function T(e){let t=t=>e(t.detail);return window.addEventListener(E,t),()=>window.removeEventListener(E,t)}function R(e){let t=t=>e(t.detail);return window.addEventListener(S,t),()=>window.removeEventListener(S,t)}function N(e){let t=t=>e(t.detail);return window.addEventListener(D,t),()=>window.removeEventListener(D,t)}function A(e){let t=t=>e(t.detail);return window.addEventListener(O,t),()=>window.removeEventListener(O,t)}function $(e){let t=M(e);setTimeout(()=>{throw t})}function I(){let e=Error();return t=>{let r=M(t);r.stack+=`
|
|
1
|
+
(globalThis.webpackChunk_openmrs_esm_openconceptlab_app=globalThis.webpackChunk_openmrs_esm_openconceptlab_app||[]).push([["2638"],{5602(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)}}},4397(e){e.exports=function(e,t,r){var n=t.prototype,o=function(e){var t=e.date,o=e.utc,i={};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 a=o?r.utc():r();Object.keys(t).forEach(function(e){var r;i["date"===(r=n.$utils().p(e))?"day":r]=t[e]});var s=i.day||(i.year||i.month>=0?1:a.date()),l=i.year||a.year(),u=i.month>=0?i.month:i.year||i.day?0:a.month(),c=i.hour||0,d=i.minute||0,p=i.second||0,f=i.millisecond||0;return o?new Date(Date.UTC(l,u,s,c,d,p,f)):new Date(l,u,s,c,d,p,f)}return t},i=n.parse;n.parse=function(e){e.date=o.bind(this)(e),i.bind(this)(e)};var a=n.set,s=n.add,l=n.subtract,u=function(e,t,r,n){void 0===n&&(n=1);var o=Object.keys(t),i=this;return o.forEach(function(r){i=e.bind(i)(t[r]*n,r)}),i};n.set=function(e,t){return t=void 0===t?e:t,"Object"===e.constructor.name?u.bind(this)(function(e,t){return a.bind(this)(t,e)},t,e):a.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)}}},7657(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,o,i){var a=o.prototype;i.utc=function(e){var t={date:e,utc:!0,args:arguments};return new o(t)},a.utc=function(t){var r=i(this.toDate(),{locale:this.$L,utc:!0});return t?r.add(this.utcOffset(),e):r},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var s=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var l=a.init;a.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=a.utcOffset;a.utcOffset=function(n,o){var i=this.$utils().u;if(i(n))return this.$u?0:i(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],i=o[0],a=60*o[1]+ +o[2];return 0===a?0:"+"===i?a:-a}(n)))return this;var a=16>=Math.abs(n)?60*n:n,s=this;if(o)return s.$offset=a,s.$u=0===n,s;if(0!==n){var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(a+l,e)).$offset=a,s.$x.$localOffset=l}else s=this.utc();return s};var c=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var d=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var p=a.diff;a.diff=function(e,t,r){if(e&&this.$u===e.$u)return p.call(this,e,t,r);var n=this.local(),o=i(e).local();return p.call(n,o,t,r)}}}()},5570(e,t,r){!function(t){"use strict";var n=r(9109);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 i=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=i.generate(e,r);t(this).css("background-image",o.toDataUrl())})}))}("u">typeof jQuery?jQuery:null)},1812(e){"use strict";e.exports={hex2rgb:function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,t,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,i=e.b,a=Math.max(n/=255,o/=255,i/=255),s=Math.min(n,o,i),l=(a+s)/2;if(a===s)t=r=0;else{var u=a-s;switch(r=l>.5?u/(2-a-s):u/(a+s),a){case n:t=(o-i)/u+6*(o<i);break;case o:t=(i-n)/u+2;break;case i: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,i=e.h,a=e.s,s=e.l;if(0===a)r=n=o=s;else{var l=s<.5?s*(1+a):s+a-s*a,u=2*s-l;r=t(u,l,i+1/3),n=t(u,l,i),o=t(u,l,i-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(",")+")"}}},9109(e,t,r){"use strict";var n=r(4751),o=r(1812),i=r(2742),a=r(3153),s={baseColor:"#933c3c"},l=["octogons","overlappingCircles","plusSigns","xes","sineWaves","hexagons","overlappingRings","plaid","triangles","squares","concentricCircles","diamonds","tessellation","nestedSquares","mosaicSquares","chevrons"],u="#000";function c(e,t,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 p(e){return e%2==0?"#ddd":"#222"}function f(e){return d(e,0,15,.02,.15)}var h=e.exports=function(e,t){return this.opts=n({},s,t),this.hash=t.hash||i(e),this.svg=new a,this.generateBackground(),this.generatePattern(),this};function m(e){return[[e,0,e,3*e],[0,e,3*e,e]]}function y(e){return[0,0,e,e,0,e,0,0].join(",")}function g(e,t,r,n,o){var i=y(n),a=f(o[0]),s=p(o[0]),l={stroke:u,"stroke-opacity":.02,"fill-opacity":a,fill:s};e.polyline(i,l).transform({translate:[t+n,r],scale:[-1,1]}),e.polyline(i,l).transform({translate:[t+n,r+2*n],scale:[1,-1]}),l={stroke:u,"stroke-opacity":.02,"fill-opacity":a=f(o[1]),fill:s=p(o[1])},e.polyline(i,l).transform({translate:[t+n,r+2*n],scale:[-1,-1]}),e.polyline(i,l).transform({translate:[t+n,r],scale:[1,1]})}function b(e,t,r,n,o){var i=f(o),a=p(o),s=y(n),l={stroke:u,"stroke-opacity":.02,"fill-opacity":i,fill:a};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]})}h.prototype.toSvg=function(){return this.svg.toString()},h.prototype.toString=function(){return this.toSvg()},h.prototype.toBase64=function(){var e=this.toSvg();return"u">typeof window&&"function"==typeof window.btoa?window.btoa(e):new Buffer(e).toString("base64")},h.prototype.toDataUri=function(){return"data:image/svg+xml;base64,"+this.toBase64()},h.prototype.toDataUrl=function(){return'url("'+this.toDataUri()+'")'},h.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)})},h.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)]()},h.prototype.geoHexagons=function(){var e,t,r,n,o,i,a,s,l,h=d(c(this.hash,0),0,15,8,60),m=h*Math.sqrt(3),y=2*h,g=(s=h/2,[0,l=Math.sin(60*Math.PI/180)*h,s,0,s+h,0,2*h,l,s+h,2*l,s,2*l,0,l].join(","));for(this.svg.setWidth(3*y+3*h),this.svg.setHeight(6*m),t=0,a=0;a<6;a++)for(i=0;i<6;i++)o=c(this.hash,t),e=i%2==0?a*m:a*m+m/2,r=f(o),n={fill:p(o),"fill-opacity":r,stroke:u,"stroke-opacity":.02},this.svg.polyline(g,n).transform({translate:[i*h*1.5-y/2,e-m/2]}),0===i&&this.svg.polyline(g,n).transform({translate:[6*h*1.5-y/2,e-m/2]}),0===a&&(e=i%2==0?6*m:6*m+m/2,this.svg.polyline(g,n).transform({translate:[i*h*1.5-y/2,e-m/2]})),0===i&&0===a&&this.svg.polyline(g,n).transform({translate:[6*h*1.5-y/2,5*m+m/2]}),t++},h.prototype.geoSineWaves=function(){var e,t,r,n,o,i,a,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=f(i=c(this.hash,t)),e=p(i),a=s/4*.7,o={fill:"none",stroke:e,opacity:r,"stroke-width":""+u+"px"},n="M0 "+l+" C "+a+" 0, "+(s/2-a)+" 0, "+s/2+" "+l+" S "+(s-a)+" "+2*l+", "+s+" "+l+" S "+(1.5*s-a)+" 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]})},h.prototype.geoChevrons=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,30,80),l=d(c(this.hash,0),0,15,30,80),h=(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,a=0;a<6;a++)for(i=0;i<6;i++)r=f(o=c(this.hash,t)),n={stroke:u,"stroke-opacity":.02,fill:p(o),"fill-opacity":r,"stroke-width":1},this.svg.group(n).transform({translate:[i*s,a*l*.66-l/2]}).polyline(h).end(),0===a&&this.svg.group(n).transform({translate:[i*s,6*l*.66-l/2]}).polyline(h).end(),t+=1},h.prototype.geoPlusSigns=function(){var e,t,r,n,o,i,a,s,l=d(c(this.hash,0),0,15,10,25),h=3*l,y=m(l);for(this.svg.setWidth(12*l),this.svg.setHeight(12*l),r=0,s=0;s<6;s++)for(a=0;a<6;a++)n=f(i=c(this.hash,r)),t=p(i),e=+(s%2!=0),o={fill:t,stroke:u,"stroke-opacity":.02,"fill-opacity":n},this.svg.group(o).transform({translate:[a*h-a*l+e*l-l,s*h-s*l-h/2]}).rect(y).end(),0===a&&this.svg.group(o).transform({translate:[4*h-a*l+e*l-l,s*h-s*l-h/2]}).rect(y).end(),0===s&&this.svg.group(o).transform({translate:[a*h-a*l+e*l-l,4*h-s*l-h/2]}).rect(y).end(),0===a&&0===s&&this.svg.group(o).transform({translate:[4*h-a*l+e*l-l,4*h-s*l-h/2]}).rect(y).end(),r++},h.prototype.geoXes=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,10,25),l=m(s),u=3*s*.943;for(this.svg.setWidth(3*u),this.svg.setHeight(3*u),t=0,a=0;a<6;a++)for(i=0;i<6;i++)r=f(o=c(this.hash,t)),e=i%2==0?a*u-.5*u:a*u-.5*u+u/4,n={fill:p(o),opacity:r},this.svg.group(n).transform({translate:[i*u/2-u/2,e-a*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===i&&this.svg.group(n).transform({translate:[6*u/2-u/2,e-a*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===a&&(e=i%2==0?6*u-u/2:6*u-u/2+u/4,this.svg.group(n).transform({translate:[i*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end()),5===a&&this.svg.group(n).transform({translate:[i*u/2-u/2,e-11*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===i&&0===a&&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++},h.prototype.geoOverlappingCircles=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,25,200)/2;for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=f(n=c(this.hash,e)),r={fill:p(n),opacity:t},this.svg.circle(o*a,i*a,a,r),0===o&&this.svg.circle(6*a,i*a,a,r),0===i&&this.svg.circle(o*a,6*a,a,r),0===o&&0===i&&this.svg.circle(6*a,6*a,a,r),e++},h.prototype.geoOctogons=function(){var e,t,r,n,o,i,a,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,a=0;a<6;a++)for(i=0;i<6;i++)n=f(o=c(this.hash,r)),t=p(o),this.svg.polyline(l,{fill:t,"fill-opacity":n,stroke:u,"stroke-opacity":.02}).transform({translate:[i*s,a*s]}),r+=1},h.prototype.geoSquares=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,10,60);for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),t=0,i=0;i<6;i++)for(o=0;o<6;o++)r=f(n=c(this.hash,t)),e=p(n),this.svg.rect(o*a,i*a,a,a,{fill:e,"fill-opacity":r,stroke:u,"stroke-opacity":.02}),t+=1},h.prototype.geoConcentricCircles=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,10,60),s=a/5;for(this.svg.setWidth((a+s)*6),this.svg.setHeight((a+s)*6),t=0,i=0;i<6;i++)for(o=0;o<6;o++)r=f(n=c(this.hash,t)),e=p(n),this.svg.circle(o*a+o*s+(a+s)/2,i*a+i*s+(a+s)/2,a/2,{fill:"none",stroke:e,opacity:r,"stroke-width":s+"px"}),r=f(n=c(this.hash,39-t)),e=p(n),this.svg.circle(o*a+o*s+(a+s)/2,i*a+i*s+(a+s)/2,a/4,{fill:e,"fill-opacity":r}),t+=1},h.prototype.geoOverlappingRings=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,10,60),s=a/4;for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=f(n=c(this.hash,e)),r={fill:"none",stroke:p(n),opacity:t,"stroke-width":s+"px"},this.svg.circle(o*a,i*a,a-s/2,r),0===o&&this.svg.circle(6*a,i*a,a-s/2,r),0===i&&this.svg.circle(o*a,6*a,a-s/2,r),0===o&&0===i&&this.svg.circle(6*a,6*a,a-s/2,r),e+=1},h.prototype.geoTriangles=function(){var e,t,r,n,o,i,a,s,l=d(c(this.hash,0),0,15,15,80),h=l/2*Math.sqrt(3),m=[s=l/2,0,l,h,0,h,s,0].join(",");for(this.svg.setWidth(3*l),this.svg.setHeight(6*h),e=0,a=0;a<6;a++)for(i=0;i<6;i++)t=f(o=c(this.hash,e)),n={fill:p(o),"fill-opacity":t,stroke:u,"stroke-opacity":.02},r=a%2==0?180*(i%2==0):180*(i%2!=0),this.svg.polyline(m,n).transform({translate:[i*l*.5-l/2,h*a],rotate:[r,l/2,h/2]}),0===i&&this.svg.polyline(m,n).transform({translate:[6*l*.5-l/2,h*a],rotate:[r,l/2,h/2]}),e+=1},h.prototype.geoDiamonds=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,10,50),l=d(c(this.hash,1),0,15,10,50),h=[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,a=0;a<6;a++)for(i=0;i<6;i++)r=f(o=c(this.hash,t)),n={fill:p(o),"fill-opacity":r,stroke:u,"stroke-opacity":.02},e=a%2==0?0:s/2,this.svg.polyline(h,n).transform({translate:[i*s-s/2+e,l/2*a-l/2]}),0===i&&this.svg.polyline(h,n).transform({translate:[6*s-s/2+e,l/2*a-l/2]}),0===a&&this.svg.polyline(h,n).transform({translate:[i*s-s/2+e,l/2*6-l/2]}),0===i&&0===a&&this.svg.polyline(h,n).transform({translate:[6*s-s/2+e,l/2*6-l/2]}),t+=1},h.prototype.geoNestedSquares=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,4,12),s=7*a;for(this.svg.setWidth((s+a)*6+6*a),this.svg.setHeight((s+a)*6+6*a),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=f(n=c(this.hash,e)),r={fill:"none",stroke:p(n),opacity:t,"stroke-width":a+"px"},this.svg.rect(o*s+o*a*2+a/2,i*s+i*a*2+a/2,s,s,r),t=f(n=c(this.hash,39-e)),r={fill:"none",stroke:p(n),opacity:t,"stroke-width":a+"px"},this.svg.rect(o*s+o*a*2+a/2+2*a,i*s+i*a*2+a/2+2*a,3*a,3*a,r),e+=1},h.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?b(this.svg,t*n*2,r*n*2,n,c(this.hash,e)):g(this.svg,t*n*2,r*n*2,n,[c(this.hash,e),c(this.hash,e+1)]):r%2==0?g(this.svg,t*n*2,r*n*2,n,[c(this.hash,e),c(this.hash,e+1)]):b(this.svg,t*n*2,r*n*2,n,c(this.hash,e)),e+=1},h.prototype.geoPlaid=function(){var e,t,r,n,o,i,a=0,s=0;for(t=0;t<36;)a+=c(this.hash,t)+5,r=f(i=c(this.hash,t+1)),e=p(i),n=i+5,this.svg.rect(0,a,"100%",n,{opacity:r,fill:e}),a+=n,t+=2;for(t=0;t<36;)s+=c(this.hash,t)+5,r=f(i=c(this.hash,t+1)),e=p(i),o=i+5,this.svg.rect(s,0,o,"100%",{opacity:r,fill:e}),s+=o,t+=2;this.svg.setWidth(s),this.svg.setHeight(a)},h.prototype.geoTessellation=function(){var e,t,r,n,o=d(c(this.hash,0),0,15,5,40),i=o*Math.sqrt(3),a=2*o,s=o/2*Math.sqrt(3),l=[0,0,s,o/2,0,o,0,0].join(","),h=3*o+2*s,m=2*i+2*o;for(this.svg.setWidth(h),this.svg.setHeight(m),e=0;e<20;e++)switch(t=f(n=c(this.hash,e)),r={stroke:u,"stroke-opacity":.02,fill:p(n),"fill-opacity":t,"stroke-width":1},e){case 0:this.svg.rect(-o/2,-o/2,o,o,r),this.svg.rect(h-o/2,-o/2,o,o,r),this.svg.rect(-o/2,m-o/2,o,o,r),this.svg.rect(h-o/2,m-o/2,o,o,r);break;case 1:this.svg.rect(a/2+s,i/2,o,o,r);break;case 2:this.svg.rect(-o/2,m/2-o/2,o,o,r),this.svg.rect(h-o/2,m/2-o/2,o,o,r);break;case 3:this.svg.rect(a/2+s,1.5*i+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,m- -o/2],rotate:[0,o/2,s/2],scale:[1,-1]});break;case 5:this.svg.polyline(l,r).transform({translate:[h-o/2,-o/2],rotate:[0,o/2,s/2],scale:[-1,1]}),this.svg.polyline(l,r).transform({translate:[h-o/2,m+o/2],rotate:[0,o/2,s/2],scale:[-1,-1]});break;case 6:this.svg.polyline(l,r).transform({translate:[h/2+o/2,i/2]});break;case 7:this.svg.polyline(l,r).transform({translate:[h-h/2-o/2,i/2],scale:[-1,1]});break;case 8:this.svg.polyline(l,r).transform({translate:[h/2+o/2,m-i/2],scale:[1,-1]});break;case 9:this.svg.polyline(l,r).transform({translate:[h-h/2-o/2,m-i/2],scale:[-1,-1]});break;case 10:this.svg.polyline(l,r).transform({translate:[o/2,m/2-o/2]});break;case 11:this.svg.polyline(l,r).transform({translate:[h-o/2,m/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:[-h+o/2,o/2],rotate:[-30,0,0]});break;case 14:this.svg.rect(0,0,o,o,r).transform({translate:[o/2,m/2-o/2-o],rotate:[30,0,o]});break;case 15:this.svg.rect(0,0,o,o,r).transform({scale:[-1,1],translate:[-h+o/2,m/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,-m+m/2-o/2-o],rotate:[30,0,o]});break;case 17:this.svg.rect(0,0,o,o,r).transform({scale:[-1,-1],translate:[-h+o/2,-m+m/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,-m+o/2],rotate:[-30,0,0]});break;case 19:this.svg.rect(0,0,o,o,r).transform({scale:[-1,-1],translate:[-h+o/2,-m+o/2],rotate:[-30,0,0]})}}},2742(e){"use strict";function t(){var e=0x67452301,t=0xefcdab89,r=0x98badcfe,n=0x10325476,o=0xc3d2e1f0,i=new Uint32Array(80),a=0,s=24,l=0;function u(){for(var s,l,u=16;u<80;u++){var c=i[u-3]^i[u-8]^i[u-14]^i[u-16];i[u]=c<<1|c>>>31}var d=e,p=t,f=r,h=n,m=o;for(u=0;u<80;u++){u<20?(s=h^p&(f^h),l=0x5a827999):u<40?(s=p^f^h,l=0x6ed9eba1):u<60?(s=p&f|h&(p|f),l=0x8f1bbcdc):(s=p^f^h,l=0xca62c1d6);var y=(d<<5|d>>>27)+s+m+l+(0|i[u]);m=h,h=f,f=p<<30|p>>>2,p=d,d=y}for(u=0,e=e+d|0,t=t+p|0,r=r+f|0,n=n+h|0,o=o+m|0,a=0;u<16;u++)i[u]=0}function c(e){i[a]|=(255&e)<<s,s?s-=8:(a++,s=24),16===a&&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),(a>14||14===a&&s<24)&&u(),a=14,s=24,c(0),c(0),c(l>0xffffffffff?l/0x10000000000:0),c(l>0xffffffff?l/0x100000000:0);for(var i=24;i>=0;i-=8)c(l>>i);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()}},3153(e,t,r){"use strict";var n=r(4751),o=r(7338);function i(){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=i,i.prototype.currentContext=function(){return this.context[this.context.length-1]||this.svg},i.prototype.end=function(){return this.context.pop(),this},i.prototype.currentNode=function(){var e=this.currentContext();return e.lastChild||e},i.prototype.transform=function(e){return this.currentNode().setAttribute("transform",Object.keys(e).map(function(t){return t+"("+e[t].join(",")+")"}).join(" ")),this},i.prototype.setAttributes=function(e,t){Object.keys(t).forEach(function(r){e.setAttribute(r,t[r])})},i.prototype.setWidth=function(e){this.svg.setAttribute("width",Math.floor(e))},i.prototype.setHeight=function(e){this.svg.setAttribute("height",Math.floor(e))},i.prototype.toString=function(){return this.svg.toString()},i.prototype.rect=function(e,t,r,i,a){var s=this;if(Array.isArray(e))return e.forEach(function(e){s.rect.apply(s,e.concat(a))}),this;var l=o("rect");return this.currentContext().appendChild(l),this.setAttributes(l,n({x:e,y:t,width:r,height:i},a)),this},i.prototype.circle=function(e,t,r,i){var a=o("circle");return this.currentContext().appendChild(a),this.setAttributes(a,n({cx:e,cy:t,r:r},i)),this},i.prototype.path=function(e,t){var r=o("path");return this.currentContext().appendChild(r),this.setAttributes(r,n({d:e},t)),this},i.prototype.polyline=function(e,t){var r=this;if(Array.isArray(e))return e.forEach(function(e){r.polyline(e,t)}),this;var i=o("polyline");return this.currentContext().appendChild(i),this.setAttributes(i,n({points:e},t)),this},i.prototype.group=function(e){var t=o("g");return this.currentContext().appendChild(t),this.context.push(t),this.setAttributes(t,n({},e)),this}},7338(e){"use strict";var t=e.exports=function(e){return this instanceof t?(this.tagName=e,this.attributes=Object.create(null),this.children=[],this.lastChild=null,this):new t(e)};t.prototype.appendChild=function(e){return this.children.push(e),this.lastChild=e,this},t.prototype.setAttribute=function(e,t){return this.attributes[e]=t,this},t.prototype.toString=function(){var e=this;return["<",e.tagName,Object.keys(e.attributes).map(function(t){return[" ",t,'="',e.attributes[t],'"'].join("")}).join(""),">",e.children.map(function(e){return e.toString()}).join(""),"</",e.tagName,">"].join("")}},4751(e){var t=Object.prototype.hasOwnProperty,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"),i=t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(n in e);return void 0===n||t.call(e,n)}e.exports=function e(){var t,r,o,i,a,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!==(i=t[r])&&(d&&i&&(n(i)||(a=Array.isArray(i)))?(a?(a=!1,s=o&&Array.isArray(o)?o:[]):s=o&&n(o)?o:{},l[r]=e(d,s,i)):void 0!==i&&(l[r]=i));return l}},2034(e,t){"use strict";t.pathToRegexp=function(e,t={}){let{delimiter:u="/",end:c=!0,sensitive:d=!1,trailing:p=!0}=t,f=[],h=[];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:a=r}=t,u=[...e],c=[],d=0,p=0;function f(){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=i[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:f()}):"*"===e?c.push({type:"wildcard",index:d++,value:f()}):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[p++];if(o.type===r)break;if("char"===o.type||"escape"===o.type){let e=o.value,t=c[p];for(;"char"===t.type||"escape"===t.type;)e+=t.value,t=c[++p];n.push({type:"text",value:a(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 i of e(o.tokens,0,n.slice()))yield*e(t,r+1,i);else n.push(o);yield*e(t,r+1,n)}(e.tokens,0,[]))h.push(function(e,t,r,n){let o="",i="",s=!0;for(let d of e){if("text"===d.type){o+=a(d.value),i+=d.value,s||(s=d.value.includes(t));continue}if("param"===d.type||"wildcard"===d.type){var u,c;if(!s&&!i)throw new l(`Missing text before "${d.name}" ${d.type}`,n);"param"===d.type?o+=`(${u=t,(c=s?"":i).length<2?u.length<2?`[^${a(u+c)}]`:`(?:(?!${a(u)})[^${a(c)}])`:u.length<2?`(?:(?!${a(c)})[^${a(u)}])`:`(?:(?!${a(c)}|${a(u)})[\\s\\S])`}+)`:o+="([\\s\\S]+)",r.push(d),i="",s=!1;continue}}return o}(t,u,f,e.originalPath))}let m=`^(?:${h.join("|")})`;return p&&(m+=`(?:${a(u)}$)?`),{regexp:new RegExp(m+=c?"$":`(?=${a(u)}|$)`,d?"":"i"),keys:f}};let r=e=>e,n=/^[$_\p{ID_Start}]$/u,o=/^[$\u200c\u200d\p{ID_Continue}]$/u,i={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function a(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}}},5873(e,t,r){"use strict";var n=r(5427);t.createRoot=n.createRoot,t.hydrateRoot=n.hydrateRoot},8513(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1077),a=r(1016);t.AsyncSubject=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.value=null,t.hasNext=!1,t.hasCompleted=!1,t}return o(t,e),t.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),a.Subscription.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),a.Subscription.EMPTY):e.prototype._subscribe.call(this,t)},t.prototype.next=function(e){this.hasCompleted||(this.value=e,this.hasNext=!0)},t.prototype.error=function(t){this.hasCompleted||e.prototype.error.call(this,t)},t.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&e.prototype.next.call(this,this.value),e.prototype.complete.call(this)},t}(i.Subject)},8791(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1077),a=r(8860);t.BehaviorSubject=function(e){function t(t){var r=e.call(this)||this;return r._value=t,r}return o(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return r&&!r.closed&&t.next(this._value),r},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(!this.closed)return this._value;throw new a.ObjectUnsubscribedError},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(i.Subject)},1359(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.InnerSubscriber=function(e){function t(t,r,n){var o=e.call(this)||this;return o.parent=t,o.outerValue=r,o.outerIndex=n,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)},t.prototype._error=function(e){this.parent.notifyError(e,this),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(r(7759).Subscriber)},4942(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(4914),i=r(7986),a=r(1673);(n=t.NotificationKind||(t.NotificationKind={})).NEXT="N",n.ERROR="E",n.COMPLETE="C",t.Notification=function(){function e(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}return e.prototype.observe=function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}},e.prototype.do=function(e,t,r){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return r&&r()}},e.prototype.accept=function(e,t,r){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,r)},e.prototype.toObservable=function(){switch(this.kind){case"N":return i.of(this.value);case"E":return a.throwError(this.error);case"C":return o.empty()}throw Error("unexpected notification kind value")},e.createNext=function(t){return void 0!==t?new e("N",t):e.undefinedValueNotification},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e.undefinedValueNotification=new e("N",void 0),e}()},5092(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1226),o=r(7595),i=r(6713),a=r(7928),s=r(5319);function l(e){if(e||(e=s.config.Promise||Promise),!e)throw Error("no Promise impl found");return e}t.Observable=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n=this.operator,i=o.toSubscriber(e,t,r);if(n?i.add(n.call(i,this.source)):i.add(this.source||s.config.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),s.config.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){s.config.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),n.canReportError(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=l(t))(function(t,n){var o;o=r.subscribe(function(t){try{e(t)}catch(e){n(e),o&&o.unsubscribe()}},n,t)})},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[i.observable]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:a.pipeFromArray(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=l(e))(function(e,r){var n;t.subscribe(function(e){return n=e},function(e){return r(e)},function(){return e(n)})})},e.create=function(t){return new e(t)},e}()},4143(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5319),o=r(9468);t.empty={closed:!0,next:function(e){},error:function(e){if(n.config.useDeprecatedSynchronousErrorHandling)throw e;o.hostReportError(e)},complete:function(){}}},6771(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.OuterSubscriber=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.notifyNext=function(e,t,r,n,o){this.destination.next(t)},t.prototype.notifyError=function(e,t){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(r(7759).Subscriber)},328(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1077),a=r(3792),s=r(1016),l=r(4654),u=r(8860),c=r(3716);t.ReplaySubject=function(e){function t(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0);var o=e.call(this)||this;return o.scheduler=n,o._events=[],o._infiniteTimeWindow=!1,o._bufferSize=t<1?1:t,o._windowTime=r<1?1:r,r===1/0?(o._infiniteTimeWindow=!0,o.next=o.nextInfiniteTimeWindow):o.next=o.nextTimeWindow,o}return o(t,e),t.prototype.nextInfiniteTimeWindow=function(t){if(!this.isStopped){var r=this._events;r.push(t),r.length>this._bufferSize&&r.shift()}e.prototype.next.call(this,t)},t.prototype.nextTimeWindow=function(t){this.isStopped||(this._events.push(new d(this._getNow(),t)),this._trimBufferThenGetEvents()),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){var t,r=this._infiniteTimeWindow,n=r?this._events:this._trimBufferThenGetEvents(),o=this.scheduler,i=n.length;if(this.closed)throw new u.ObjectUnsubscribedError;if(this.isStopped||this.hasError?t=s.Subscription.EMPTY:(this.observers.push(e),t=new c.SubjectSubscription(this,e)),o&&e.add(e=new l.ObserveOnSubscriber(e,o)),r)for(var a=0;a<i&&!e.closed;a++)e.next(n[a]);else for(var a=0;a<i&&!e.closed;a++)e.next(n[a].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),t},t.prototype._getNow=function(){return(this.scheduler||a.queue).now()},t.prototype._trimBufferThenGetEvents=function(){for(var e=this._getNow(),t=this._bufferSize,r=this._windowTime,n=this._events,o=n.length,i=0;i<o&&!(e-n[i].time<r);)i++;return o>t&&(i=Math.max(i,o-t)),i>0&&n.splice(0,i),n},t}(i.Subject);var d=function(e,t){this.time=e,this.value=t}},4688(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scheduler=function(){function e(t,r){void 0===r&&(r=e.now),this.SchedulerAction=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.SchedulerAction(this,e).schedule(r,t)},e.now=function(){return Date.now()},e}()},1077(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5092),a=r(7759),s=r(1016),l=r(8860),u=r(3716),c=r(8636),d=function(e){function t(t){var r=e.call(this,t)||this;return r.destination=t,r}return o(t,e),t}(a.Subscriber);t.SubjectSubscriber=d;var p=function(e){function t(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return o(t,e),t.prototype[c.rxSubscriber]=function(){return new d(this)},t.prototype.lift=function(e){var t=new f(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new l.ObjectUnsubscribedError;if(!this.isStopped)for(var t=this.observers,r=t.length,n=t.slice(),o=0;o<r;o++)n[o].next(e)},t.prototype.error=function(e){if(this.closed)throw new l.ObjectUnsubscribedError;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,r=t.length,n=t.slice(),o=0;o<r;o++)n[o].error(e);this.observers.length=0},t.prototype.complete=function(){if(this.closed)throw new l.ObjectUnsubscribedError;this.isStopped=!0;for(var e=this.observers,t=e.length,r=e.slice(),n=0;n<t;n++)r[n].complete();this.observers.length=0},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(t){if(!this.closed)return e.prototype._trySubscribe.call(this,t);throw new l.ObjectUnsubscribedError},t.prototype._subscribe=function(e){if(this.closed)throw new l.ObjectUnsubscribedError;return this.hasError?(e.error(this.thrownError),s.Subscription.EMPTY):this.isStopped?(e.complete(),s.Subscription.EMPTY):(this.observers.push(e),new u.SubjectSubscription(this,e))},t.prototype.asObservable=function(){var e=new i.Observable;return e.source=this,e},t.create=function(e,t){return new f(e,t)},t}(i.Observable);t.Subject=p;var f=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return o(t,e),t.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},t.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},t.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},t.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):s.Subscription.EMPTY},t}(p);t.AnonymousSubject=f},3716(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.SubjectSubscription=function(e){function t(t,r){var n=e.call(this)||this;return n.subject=t,n.subscriber=r,n.closed=!1,n}return o(t,e),t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var r=t.indexOf(this.subscriber);-1!==r&&t.splice(r,1)}}},t}(r(1016).Subscription)},7759(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(4864),a=r(4143),s=r(1016),l=r(8636),u=r(5319),c=r(9468),d=function(e){function t(r,n,o){var i=e.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=a.empty;break;case 1:if(!r){i.destination=a.empty;break}if("object"==typeof r){r instanceof t?(i.syncErrorThrowable=r.syncErrorThrowable,i.destination=r,r.add(i)):(i.syncErrorThrowable=!0,i.destination=new p(i,r));break}default:i.syncErrorThrowable=!0,i.destination=new p(i,r,n,o)}return i}return o(t,e),t.prototype[l.rxSubscriber]=function(){return this},t.create=function(e,r,n){var o=new t(e,r,n);return o.syncErrorThrowable=!1,o},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(s.Subscription);t.Subscriber=d;var p=function(e){function t(t,r,n,o){var s,l=e.call(this)||this;l._parentSubscriber=t;var u=l;return i.isFunction(r)?s=r:r&&(s=r.next,n=r.error,o=r.complete,r!==a.empty&&(u=Object.create(r),i.isFunction(u.unsubscribe)&&l.add(u.unsubscribe.bind(u)),u.unsubscribe=l.unsubscribe.bind(l))),l._context=u,l._next=s,l._error=n,l._complete=o,l}return o(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;u.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,r=u.config.useDeprecatedSynchronousErrorHandling;if(this._error)r&&t.syncErrorThrowable?this.__tryOrSetError(t,this._error,e):this.__tryOrUnsub(this._error,e),this.unsubscribe();else if(t.syncErrorThrowable)r?(t.syncErrorValue=e,t.syncErrorThrown=!0):c.hostReportError(e),this.unsubscribe();else{if(this.unsubscribe(),r)throw e;c.hostReportError(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var r=function(){return e._complete.call(e._context)};u.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,r):this.__tryOrUnsub(r),this.unsubscribe()}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),u.config.useDeprecatedSynchronousErrorHandling)throw e;c.hostReportError(e)}},t.prototype.__tryOrSetError=function(e,t,r){if(!u.config.useDeprecatedSynchronousErrorHandling)throw Error("bad call");try{t.call(this._context,r)}catch(t){if(u.config.useDeprecatedSynchronousErrorHandling)return e.syncErrorValue=t,e.syncErrorThrown=!0,!0;return c.hostReportError(t),!0}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(d);t.SafeSubscriber=p},1016(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(743),o=r(6727),i=r(4864),a=r(1806);function s(e){return e.reduce(function(e,t){return e.concat(t instanceof a.UnsubscriptionError?t.errors:t)},[])}t.Subscription=function(){var e;function t(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return t.prototype.unsubscribe=function(){if(!this.closed){var e,r=this._parentOrParents,l=this._ctorUnsubscribe,u=this._unsubscribe,c=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r instanceof t)r.remove(this);else if(null!==r)for(var d=0;d<r.length;++d)r[d].remove(this);if(i.isFunction(u)){l&&(this._unsubscribe=void 0);try{u.call(this)}catch(t){e=t instanceof a.UnsubscriptionError?s(t.errors):[t]}}if(n.isArray(c))for(var d=-1,p=c.length;++d<p;){var f=c[d];if(o.isObject(f))try{f.unsubscribe()}catch(t){e=e||[],t instanceof a.UnsubscriptionError?e=e.concat(s(t.errors)):e.push(t)}}if(e)throw new a.UnsubscriptionError(e)}},t.prototype.add=function(e){var r=e;if(!e)return t.EMPTY;switch(typeof e){case"function":r=new t(e);case"object":if(r===this||r.closed||"function"!=typeof r.unsubscribe)return r;if(this.closed)return r.unsubscribe(),r;if(!(r instanceof t)){var n=r;(r=new t)._subscriptions=[n]}break;default:throw Error("unrecognized teardown "+e+" added to Subscription.")}var o=r._parentOrParents;if(null===o)r._parentOrParents=this;else if(o instanceof t){if(o===this)return r;r._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return r;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[r]:i.push(r),r},t.prototype.remove=function(e){var t=this._subscriptions;if(t){var r=t.indexOf(e);-1!==r&&t.splice(r,1)}},(e=new t).closed=!0,t.EMPTY=e,t}()},5319(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=!1;t.config={Promise:void 0,set useDeprecatedSynchronousErrorHandling(value){value?console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+Error().stack):r&&console.log("RxJS: Back to a better error behavior. Thank you. <3"),r=value},get useDeprecatedSynchronousErrorHandling(){return r}}},5901(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759),a=r(5092),s=r(1727);t.SimpleInnerSubscriber=function(e){function t(t){var r=e.call(this)||this;return r.parent=t,r}return o(t,e),t.prototype._next=function(e){this.parent.notifyNext(e)},t.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},t}(i.Subscriber),t.ComplexInnerSubscriber=function(e){function t(t,r,n){var o=e.call(this)||this;return o.parent=t,o.outerValue=r,o.outerIndex=n,o}return o(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this)},t.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(i.Subscriber),t.SimpleOuterSubscriber=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.destination.complete()},t}(i.Subscriber),t.ComplexOuterSubscriber=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.notifyNext=function(e,t,r,n){this.destination.next(t)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(i.Subscriber),t.innerSubscribe=function(e,t){var r;if(!t.closed){if(e instanceof a.Observable)return e.subscribe(t);try{r=s.subscribeTo(e)(t)}catch(e){t.error(e)}return r}}},7432(e,t,r){"use strict";var n,o,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var a=r(1077),s=r(5092),l=r(7759),u=r(1016),c=r(5203),d=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subjectFactory=r,n._refCount=0,n._isComplete=!1,n}return i(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject},t.prototype.connect=function(){var e=this._connection;return!e&&(this._isComplete=!1,(e=this._connection=new u.Subscription).add(this.source.subscribe(new p(this.getSubject(),this))),e.closed&&(this._connection=null,e=u.Subscription.EMPTY)),e},t.prototype.refCount=function(){return c.refCount()(this)},t}(s.Observable);t.ConnectableObservable=d,t.connectableObservableDescriptor={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:(o=d.prototype)._subscribe},_isComplete:{value:o._isComplete,writable:!0},getSubject:{value:o.getSubject},connect:{value:o.connect},refCount:{value:o.refCount}};var p=function(e){function t(t,r){var n=e.call(this,t)||this;return n.connectable=r,n}return i(t,e),t.prototype._error=function(t){this._unsubscribe(),e.prototype._error.call(this,t)},t.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}},t}(a.SubjectSubscriber);(function(e){this.connectable=e}).prototype.call=function(e,t){var r=this.connectable;r._refCount++;var n=new f(e,r),o=t.subscribe(n);return n.closed||(n.connection=r.connect()),o};var f=function(e){function t(t,r){var n=e.call(this,t)||this;return n.connectable=r,n}return i(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(!e){this.connection=null;return}this.connectable=null;var t=e._refCount;if(t<=0||(e._refCount=t-1,t>1)){this.connection=null;return}var r=this.connection,n=e._connection;this.connection=null,n&&(!r||n===r)&&n.unsubscribe()},t}(l.Subscriber)},7563(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5092),a=r(3766),s=r(9673);t.SubscribeOnObservable=function(e){function t(t,r,n){void 0===r&&(r=0),void 0===n&&(n=a.asap);var o=e.call(this)||this;return o.source=t,o.delayTime=r,o.scheduler=n,(!s.isNumeric(r)||r<0)&&(o.delayTime=0),n&&"function"==typeof n.schedule||(o.scheduler=a.asap),o}return o(t,e),t.create=function(e,r,n){return void 0===r&&(r=0),void 0===n&&(n=a.asap),new t(e,r,n)},t.dispatch=function(e){var t=e.source,r=e.subscriber;return this.add(t.subscribe(r))},t.prototype._subscribe=function(e){var r=this.delayTime,n=this.source;return this.scheduler.schedule(t.dispatch,r,{source:n,subscriber:e})},t}(i.Observable)},2413(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(3935),a=r(743),s=r(6771),l=r(7778),u=r(7446),c={};t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=void 0,n=void 0;return i.isScheduler(e[e.length-1])&&(n=e.pop()),"function"==typeof e[e.length-1]&&(r=e.pop()),1===e.length&&a.isArray(e[0])&&(e=e[0]),u.fromArray(e,n).lift(new d(r))};var d=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new p(e,this.resultSelector))},e}();t.CombineLatestOperator=d;var p=function(e){function t(t,r){var n=e.call(this,t)||this;return n.resultSelector=r,n.active=0,n.values=[],n.observables=[],n}return o(t,e),t.prototype._next=function(e){this.values.push(c),this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(var r=0;r<t;r++){var n=e[r];this.add(l.subscribeToResult(this,n,void 0,r))}}},t.prototype.notifyComplete=function(e){0==(this.active-=1)&&this.destination.complete()},t.prototype.notifyNext=function(e,t,r){var n=this.values,o=n[r],i=this.toRespond?o===c?--this.toRespond:this.toRespond:0;n[r]=t,0===i&&(this.resultSelector?this._tryResultSelector(n):this.destination.next(n.slice()))},t.prototype._tryResultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(s.OuterSubscriber);t.CombineLatestSubscriber=p},9623(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7986),o=r(208);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.concatAll()(n.of.apply(void 0,e))}},6691(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5092),o=r(5295),i=r(4914);t.defer=function(e){return new n.Observable(function(t){var r;try{r=e()}catch(e){t.error(e);return}return(r?o.from(r):i.empty()).subscribe(t)})}},4914(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5092);t.EMPTY=new n.Observable(function(e){return e.complete()}),t.empty=function(e){var r;return e?(r=e,new n.Observable(function(e){return r.schedule(function(){return e.complete()})})):t.EMPTY}},5295(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5092),o=r(1727),i=r(7670);t.from=function(e,t){return t?i.scheduled(e,t):e instanceof n.Observable?e:new n.Observable(o.subscribeTo(e))}},7446(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5092),o=r(422),i=r(5791);t.fromArray=function(e,t){return t?i.scheduleArray(e,t):new n.Observable(o.subscribeToArray(e))}},3395(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5092),o=r(3935),i=r(980),a=r(7446);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=1/0,s=null,l=e[e.length-1];return(o.isScheduler(l)?(s=e.pop(),e.length>1&&"number"==typeof e[e.length-1]&&(r=e.pop())):"number"==typeof l&&(r=e.pop()),null===s&&1===e.length&&e[0]instanceof n.Observable)?e[0]:i.mergeAll(r)(a.fromArray(e,s))}},7986(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3935),o=r(7446),i=r(5791);t.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return n.isScheduler(r)?(e.pop(),i.scheduleArray(e,r)):o.fromArray(e)}},7894(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(743),a=r(7446),s=r(6771),l=r(7778);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length)if(!i.isArray(e[0]))return e[0];else e=e[0];return a.fromArray(e,void 0).lift(new u)};var u=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new c(e))},e}();t.RaceOperator=u;var c=function(e){function t(t){var r=e.call(this,t)||this;return r.hasFirst=!1,r.observables=[],r.subscriptions=[],r}return o(t,e),t.prototype._next=function(e){this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{for(var r=0;r<t&&!this.hasFirst;r++){var n=e[r],o=l.subscribeToResult(this,n,void 0,r);this.subscriptions&&this.subscriptions.push(o),this.add(o)}this.observables=null}},t.prototype.notifyNext=function(e,t,r){if(!this.hasFirst){this.hasFirst=!0;for(var n=0;n<this.subscriptions.length;n++)if(n!==r){var o=this.subscriptions[n];o.unsubscribe(),this.remove(o)}this.subscriptions=null}this.destination.next(t)},t}(s.OuterSubscriber);t.RaceSubscriber=c},1673(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5092);function o(e){var t=e.error;e.subscriber.error(t)}t.throwError=function(e,t){return new n.Observable(t?function(r){return t.schedule(o,0,{error:e,subscriber:r})}:function(t){return t.error(e)})}},7954(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5092),o=r(6735),i=r(9673),a=r(3935);function s(e){var t=e.index,r=e.period,n=e.subscriber;if(n.next(t),!n.closed){if(-1===r)return n.complete();e.index=t+1,this.schedule(e,r)}}t.timer=function(e,t,r){void 0===e&&(e=0);var l=-1;return i.isNumeric(t)?l=1>Number(t)&&1||Number(t):a.isScheduler(t)&&(r=t),a.isScheduler(r)||(r=o.async),new n.Observable(function(t){var n=i.isNumeric(e)?e:e-r.now();return r.schedule(s,n,{index:0,period:l,subscriber:t})})}},5356(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7446),a=r(743),s=r(7759),l=r(8258),u=r(5901);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return"function"==typeof r&&e.pop(),i.fromArray(e,void 0).lift(new c(r))};var c=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new d(e,this.resultSelector))},e}();t.ZipOperator=c;var d=function(e){function t(t,r,n){void 0===n&&(n=Object.create(null));var o=e.call(this,t)||this;return o.resultSelector=r,o.iterators=[],o.active=0,o.resultSelector="function"==typeof r?r:void 0,o}return o(t,e),t.prototype._next=function(e){var t=this.iterators;a.isArray(e)?t.push(new f(e)):"function"==typeof e[l.iterator]?t.push(new p(e[l.iterator]())):t.push(new h(this.destination,this,e))},t.prototype._complete=function(){var e=this.iterators,t=e.length;if(this.unsubscribe(),0===t)return void this.destination.complete();this.active=t;for(var r=0;r<t;r++){var n=e[r];n.stillUnsubscribed?this.destination.add(n.subscribe()):this.active--}},t.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},t.prototype.checkIterators=function(){for(var e=this.iterators,t=e.length,r=this.destination,n=0;n<t;n++){var o=e[n];if("function"==typeof o.hasValue&&!o.hasValue())return}for(var i=!1,a=[],n=0;n<t;n++){var o=e[n],s=o.next();if(o.hasCompleted()&&(i=!0),s.done)return void r.complete();a.push(s.value)}this.resultSelector?this._tryresultSelector(a):r.next(a),i&&r.complete()},t.prototype._tryresultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(s.Subscriber);t.ZipSubscriber=d;var p=function(){function e(e){this.iterator=e,this.nextResult=e.next()}return e.prototype.hasValue=function(){return!0},e.prototype.next=function(){var e=this.nextResult;return this.nextResult=this.iterator.next(),e},e.prototype.hasCompleted=function(){var e=this.nextResult;return!!(e&&e.done)},e}(),f=function(){function e(e){this.array=e,this.index=0,this.length=0,this.length=e.length}return e.prototype[l.iterator]=function(){return this},e.prototype.next=function(e){var t=this.index++,r=this.array;return t<this.length?{value:r[t],done:!1}:{value:null,done:!0}},e.prototype.hasValue=function(){return this.array.length>this.index},e.prototype.hasCompleted=function(){return this.array.length===this.index},e}(),h=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.parent=r,o.observable=n,o.stillUnsubscribed=!0,o.buffer=[],o.isComplete=!1,o}return o(t,e),t.prototype[l.iterator]=function(){return this},t.prototype.next=function(){var e=this.buffer;return 0===e.length&&this.isComplete?{value:null,done:!0}:{value:e.shift(),done:!1}},t.prototype.hasValue=function(){return this.buffer.length>0},t.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},t.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},t.prototype.notifyNext=function(e){this.buffer.push(e),this.parent.checkIterators()},t.prototype.subscribe=function(){return u.innerSubscribe(this.observable,new u.SimpleInnerSubscriber(this))},t}(u.SimpleOuterSubscriber)},8780(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5901);t.audit=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.durationSelector))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.durationSelector=r,n.hasValue=!1,n}return o(t,e),t.prototype._next=function(e){if(this.value=e,this.hasValue=!0,!this.throttled){var t=void 0;try{t=(0,this.durationSelector)(e)}catch(e){return this.destination.error(e)}var r=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this));!r||r.closed?this.clearThrottle():this.add(this.throttled=r)}},t.prototype.clearThrottle=function(){var e=this.value,t=this.hasValue,r=this.throttled;r&&(this.remove(r),this.throttled=void 0,r.unsubscribe()),t&&(this.value=void 0,this.hasValue=!1,this.destination.next(e))},t.prototype.notifyNext=function(){this.clearThrottle()},t.prototype.notifyComplete=function(){this.clearThrottle()},t}(i.SimpleOuterSubscriber)},3441(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6735),o=r(8780),i=r(7954);t.auditTime=function(e,t){return void 0===t&&(t=n.async),o.audit(function(){return i.timer(e,t)})}},4234(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5901);t.buffer=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.closingNotifier=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.closingNotifier))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.buffer=[],n.add(i.innerSubscribe(r,new i.SimpleInnerSubscriber(n))),n}return o(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype.notifyNext=function(){var e=this.buffer;this.buffer=[],this.destination.next(e)},t}(i.SimpleOuterSubscriber)},7650(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.bufferCount=function(e,t){return void 0===t&&(t=null),function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.bufferSize=e,this.startBufferEvery=t,t&&e!==t?this.subscriberClass=l:this.subscriberClass=s}return e.prototype.call=function(e,t){return t.subscribe(new this.subscriberClass(e,this.bufferSize,this.startBufferEvery))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.bufferSize=r,n.buffer=[],n}return o(t,e),t.prototype._next=function(e){var t=this.buffer;t.push(e),t.length==this.bufferSize&&(this.destination.next(t),this.buffer=[])},t.prototype._complete=function(){var t=this.buffer;t.length>0&&this.destination.next(t),e.prototype._complete.call(this)},t}(i.Subscriber),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.bufferSize=r,o.startBufferEvery=n,o.buffers=[],o.count=0,o}return o(t,e),t.prototype._next=function(e){var t=this.bufferSize,r=this.startBufferEvery,n=this.buffers,o=this.count;this.count++,o%r==0&&n.push([]);for(var i=n.length;i--;){var a=n[i];a.push(e),a.length===t&&(n.splice(i,1),this.destination.next(a))}},t.prototype._complete=function(){for(var t=this.buffers,r=this.destination;t.length>0;){var n=t.shift();n.length>0&&r.next(n)}e.prototype._complete.call(this)},t}(i.Subscriber)},4360(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(6735),a=r(7759),s=r(3935);t.bufferTime=function(e){var t=arguments.length,r=i.async;s.isScheduler(arguments[arguments.length-1])&&(r=arguments[arguments.length-1],t--);var n=null;t>=2&&(n=arguments[1]);var o=1/0;return t>=3&&(o=arguments[2]),function(t){return t.lift(new l(e,n,o,r))}};var l=function(){function e(e,t,r,n){this.bufferTimeSpan=e,this.bufferCreationInterval=t,this.maxBufferSize=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},e}(),u=function(){this.buffer=[]},c=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;a.bufferTimeSpan=r,a.bufferCreationInterval=n,a.maxBufferSize=o,a.scheduler=i,a.contexts=[];var s=a.openContext();return a.timespanOnly=null==n||n<0,a.timespanOnly?a.add(s.closeAction=i.schedule(d,r,{subscriber:a,context:s,bufferTimeSpan:r})):(a.add(s.closeAction=i.schedule(f,r,{subscriber:a,context:s})),a.add(i.schedule(p,n,{bufferTimeSpan:r,bufferCreationInterval:n,subscriber:a,scheduler:i}))),a}return o(t,e),t.prototype._next=function(e){for(var t,r=this.contexts,n=r.length,o=0;o<n;o++){var i=r[o],a=i.buffer;a.push(e),a.length==this.maxBufferSize&&(t=i)}t&&this.onBufferFull(t)},t.prototype._error=function(t){this.contexts.length=0,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts,r=this.destination;t.length>0;){var n=t.shift();r.next(n.buffer)}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.contexts=null},t.prototype.onBufferFull=function(e){this.closeContext(e);var t=e.closeAction;if(t.unsubscribe(),this.remove(t),!this.closed&&this.timespanOnly){e=this.openContext();var r=this.bufferTimeSpan,n={subscriber:this,context:e,bufferTimeSpan:r};this.add(e.closeAction=this.scheduler.schedule(d,r,n))}},t.prototype.openContext=function(){var e=new u;return this.contexts.push(e),e},t.prototype.closeContext=function(e){this.destination.next(e.buffer);var t=this.contexts;(t?t.indexOf(e):-1)>=0&&t.splice(t.indexOf(e),1)},t}(a.Subscriber);function d(e){var t=e.subscriber,r=e.context;r&&t.closeContext(r),t.closed||(e.context=t.openContext(),e.context.closeAction=this.schedule(e,e.bufferTimeSpan))}function p(e){var t=e.bufferCreationInterval,r=e.bufferTimeSpan,n=e.subscriber,o=e.scheduler,i=n.openContext();n.closed||(n.add(i.closeAction=o.schedule(f,r,{subscriber:n,context:i})),this.schedule(e,t))}function f(e){var t=e.subscriber,r=e.context;t.closeContext(r)}},3381(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1016),a=r(7778),s=r(6771);t.bufferToggle=function(e,t){return function(r){return r.lift(new l(e,t))}};var l=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.openings,this.closingSelector))},e}(),u=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.closingSelector=n,o.contexts=[],o.add(a.subscribeToResult(o,r)),o}return o(t,e),t.prototype._next=function(e){for(var t=this.contexts,r=t.length,n=0;n<r;n++)t[n].buffer.push(e)},t.prototype._error=function(t){for(var r=this.contexts;r.length>0;){var n=r.shift();n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts;t.length>0;){var r=t.shift();this.destination.next(r.buffer),r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,e.prototype._complete.call(this)},t.prototype.notifyNext=function(e,t){e?this.closeBuffer(e):this.openBuffer(t)},t.prototype.notifyComplete=function(e){this.closeBuffer(e.context)},t.prototype.openBuffer=function(e){try{var t=this.closingSelector.call(this,e);t&&this.trySubscribe(t)}catch(e){this._error(e)}},t.prototype.closeBuffer=function(e){var t=this.contexts;if(t&&e){var r=e.buffer,n=e.subscription;this.destination.next(r),t.splice(t.indexOf(e),1),this.remove(n),n.unsubscribe()}},t.prototype.trySubscribe=function(e){var t=this.contexts,r=new i.Subscription,n={buffer:[],subscription:r};t.push(n);var o=a.subscribeToResult(this,e,n);!o||o.closed?this.closeBuffer(n):(o.context=n,this.add(o),r.add(o))},t}(s.OuterSubscriber)},1069(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1016),a=r(5901);t.bufferWhen=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.closingSelector))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.closingSelector=r,n.subscribing=!1,n.openBuffer(),n}return o(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype._complete=function(){var t=this.buffer;t&&this.destination.next(t),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},t.prototype.notifyNext=function(){this.openBuffer()},t.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},t.prototype.openBuffer=function(){var e,t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var r=this.buffer;this.buffer&&this.destination.next(r),this.buffer=[];try{e=(0,this.closingSelector)()}catch(e){return this.error(e)}t=new i.Subscription,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(a.innerSubscribe(e,new a.SimpleInnerSubscriber(this))),this.subscribing=!1},t}(a.SimpleOuterSubscriber)},5916(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5901);t.catchError=function(e){return function(t){var r=new a(e),n=t.lift(r);return r.caught=n}};var a=function(){function e(e){this.selector=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.selector,this.caught))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.selector=r,o.caught=n,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var r=void 0;try{r=this.selector(t,this.caught)}catch(t){e.prototype.error.call(this,t);return}this._unsubscribeAndRecycle();var n=new i.SimpleInnerSubscriber(this);this.add(n);var o=i.innerSubscribe(r,n);o!==n&&this.add(o)}},t}(i.SimpleOuterSubscriber)},239(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2413);t.combineAll=function(e){return function(t){return t.lift(new n.CombineLatestOperator(e))}}},9397(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(743),o=r(2413),i=r(5295);t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=null;return"function"==typeof e[e.length-1]&&(r=e.pop()),1===e.length&&n.isArray(e[0])&&(e=e[0].slice()),function(t){return t.lift.call(i.from([t].concat(e)),new o.CombineLatestOperator(r))}}},6255(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9623);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(n.concat.apply(void 0,[t].concat(e)))}}},208(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(980);t.concatAll=function(){return n.mergeAll(1)}},2209(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(781);t.concatMap=function(e,t){return n.mergeMap(e,t,1)}},3232(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2209);t.concatMapTo=function(e,t){return n.concatMap(function(){return e},t)}},5476(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.count=function(e){return function(t){return t.lift(new a(e,t))}};var a=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.source))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.source=n,o.count=0,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.predicate?this._tryPredicate(e):this.count++},t.prototype._tryPredicate=function(e){var t;try{t=this.predicate(e,this.index++,this.source)}catch(e){this.destination.error(e);return}t&&this.count++},t.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},t}(i.Subscriber)},9768(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5901);t.debounce=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.durationSelector))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.durationSelector=r,n.hasValue=!1,n}return o(t,e),t.prototype._next=function(e){try{var t=this.durationSelector.call(this,e);t&&this._tryNext(e,t)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.emitValue(),this.destination.complete()},t.prototype._tryNext=function(e,t){var r=this.durationSubscription;this.value=e,this.hasValue=!0,r&&(r.unsubscribe(),this.remove(r)),(r=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this)))&&!r.closed&&this.add(this.durationSubscription=r)},t.prototype.notifyNext=function(){this.emitValue()},t.prototype.notifyComplete=function(){this.emitValue()},t.prototype.emitValue=function(){if(this.hasValue){var t=this.value,r=this.durationSubscription;r&&(this.durationSubscription=void 0,r.unsubscribe(),this.remove(r)),this.value=void 0,this.hasValue=!1,e.prototype._next.call(this,t)}},t}(i.SimpleOuterSubscriber)},2661(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759),a=r(6735);t.debounceTime=function(e,t){return void 0===t&&(t=a.async),function(r){return r.lift(new s(e,t))}};var s=function(){function e(e,t){this.dueTime=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.dueTime,this.scheduler))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.dueTime=r,o.scheduler=n,o.debouncedSubscription=null,o.lastValue=null,o.hasValue=!1,o}return o(t,e),t.prototype._next=function(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(u,this.dueTime,this))},t.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},t.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var e=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(e)}},t.prototype.clearDebounce=function(){var e=this.debouncedSubscription;null!==e&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)},t}(i.Subscriber);function u(e){e.debouncedNext()}},952(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.defaultIfEmpty=function(e){return void 0===e&&(e=null),function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.defaultValue=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.defaultValue))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.defaultValue=r,n.isEmpty=!0,n}return o(t,e),t.prototype._next=function(e){this.isEmpty=!1,this.destination.next(e)},t.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},t}(i.Subscriber)},7436(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(6735),a=r(6740),s=r(7759),l=r(4942);t.delay=function(e,t){void 0===t&&(t=i.async);var r=a.isDate(e)?e-t.now():Math.abs(e);return function(e){return e.lift(new u(r,t))}};var u=function(){function e(e,t){this.delay=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.delay,this.scheduler))},e}(),c=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.delay=r,o.scheduler=n,o.queue=[],o.active=!1,o.errored=!1,o}return o(t,e),t.dispatch=function(e){for(var t=e.source,r=t.queue,n=e.scheduler,o=e.destination;r.length>0&&r[0].time-n.now()<=0;)r.shift().notification.observe(o);if(r.length>0){var i=Math.max(0,r[0].time-n.now());this.schedule(e,i)}else this.unsubscribe(),t.active=!1},t.prototype._schedule=function(e){this.active=!0,this.destination.add(e.schedule(t.dispatch,this.delay,{source:this,destination:this.destination,scheduler:e}))},t.prototype.scheduleNotification=function(e){if(!0!==this.errored){var t=this.scheduler,r=new d(t.now()+this.delay,e);this.queue.push(r),!1===this.active&&this._schedule(t)}},t.prototype._next=function(e){this.scheduleNotification(l.Notification.createNext(e))},t.prototype._error=function(e){this.errored=!0,this.queue=[],this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.scheduleNotification(l.Notification.createComplete()),this.unsubscribe()},t}(s.Subscriber),d=function(e,t){this.time=e,this.notification=t}},1136(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759),a=r(5092),s=r(6771),l=r(7778);t.delayWhen=function(e,t){return t?function(r){return new d(r,t).lift(new u(e))}:function(t){return t.lift(new u(e))}};var u=function(){function e(e){this.delayDurationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.delayDurationSelector))},e}(),c=function(e){function t(t,r){var n=e.call(this,t)||this;return n.delayDurationSelector=r,n.completed=!1,n.delayNotifierSubscriptions=[],n.index=0,n}return o(t,e),t.prototype.notifyNext=function(e,t,r,n,o){this.destination.next(e),this.removeSubscription(o),this.tryComplete()},t.prototype.notifyError=function(e,t){this._error(e)},t.prototype.notifyComplete=function(e){var t=this.removeSubscription(e);t&&this.destination.next(t),this.tryComplete()},t.prototype._next=function(e){var t=this.index++;try{var r=this.delayDurationSelector(e,t);r&&this.tryDelay(r,e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},t.prototype.removeSubscription=function(e){e.unsubscribe();var t=this.delayNotifierSubscriptions.indexOf(e);return -1!==t&&this.delayNotifierSubscriptions.splice(t,1),e.outerValue},t.prototype.tryDelay=function(e,t){var r=l.subscribeToResult(this,e,t);r&&!r.closed&&(this.destination.add(r),this.delayNotifierSubscriptions.push(r))},t.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},t}(s.OuterSubscriber),d=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subscriptionDelay=r,n}return o(t,e),t.prototype._subscribe=function(e){this.subscriptionDelay.subscribe(new p(e,this.source))},t}(a.Observable),p=function(e){function t(t,r){var n=e.call(this)||this;return n.parent=t,n.source=r,n.sourceSubscribed=!1,n}return o(t,e),t.prototype._next=function(e){this.subscribeToSource()},t.prototype._error=function(e){this.unsubscribe(),this.parent.error(e)},t.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},t.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},t}(i.Subscriber)},6051(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.dematerialize=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype._next=function(e){e.observe(this.destination)},t}(i.Subscriber)},5343(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5901);t.distinct=function(e,t){return function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.keySelector=e,this.flushes=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.keySelector,this.flushes))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.keySelector=r,o.values=new Set,n&&o.add(i.innerSubscribe(n,new i.SimpleInnerSubscriber(o))),o}return o(t,e),t.prototype.notifyNext=function(){this.values.clear()},t.prototype.notifyError=function(e){this._error(e)},t.prototype._next=function(e){this.keySelector?this._useKeySelector(e):this._finalizeNext(e,e)},t.prototype._useKeySelector=function(e){var t,r=this.destination;try{t=this.keySelector(e)}catch(e){r.error(e);return}this._finalizeNext(t,e)},t.prototype._finalizeNext=function(e,t){var r=this.values;r.has(e)||(r.add(e),this.destination.next(t))},t}(i.SimpleOuterSubscriber);t.DistinctSubscriber=s},8179(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.distinctUntilChanged=function(e,t){return function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.compare=e,this.keySelector=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.compare,this.keySelector))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.keySelector=n,o.hasKey=!1,"function"==typeof r&&(o.compare=r),o}return o(t,e),t.prototype.compare=function(e,t){return e===t},t.prototype._next=function(e){try{var t,r=this.keySelector;t=r?r(e):e}catch(e){return this.destination.error(e)}var n=!1;if(this.hasKey)try{n=(0,this.compare)(this.key,t)}catch(e){return this.destination.error(e)}else this.hasKey=!0;n||(this.key=t,this.destination.next(e))},t}(i.Subscriber)},3670(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8179);t.distinctUntilKeyChanged=function(e,t){return n.distinctUntilChanged(function(r,n){return t?t(r[e],n[e]):r[e]===n[e]})}},7366(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2519),o=r(4629),i=r(8347),a=r(952),s=r(5624);t.elementAt=function(e,t){if(e<0)throw new n.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(l){return l.pipe(o.filter(function(t,r){return r===e}),s.take(1),r?a.defaultIfEmpty(t):i.throwIfEmpty(function(){return new n.ArgumentOutOfRangeError}))}}},1650(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9623),o=r(7986);t.endWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return n.concat(t,o.of.apply(void 0,e))}}},2472(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.every=function(e,t){return function(r){return r.lift(new a(e,t,r))}};var a=function(){function e(e,t,r){this.predicate=e,this.thisArg=t,this.source=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.thisArg,this.source))},e}(),s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.predicate=r,i.thisArg=n,i.source=o,i.index=0,i.thisArg=n||i,i}return o(t,e),t.prototype.notifyComplete=function(e){this.destination.next(e),this.destination.complete()},t.prototype._next=function(e){var t=!1;try{t=this.predicate.call(this.thisArg,e,this.index++,this.source)}catch(e){this.destination.error(e);return}t||this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(i.Subscriber)},5893(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5901);t.exhaust=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){var r=e.call(this,t)||this;return r.hasCompleted=!1,r.hasSubscription=!1,r}return o(t,e),t.prototype._next=function(e){this.hasSubscription||(this.hasSubscription=!0,this.add(i.innerSubscribe(e,new i.SimpleInnerSubscriber(this))))},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},t.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},t}(i.SimpleOuterSubscriber)},9219(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(9233),a=r(5295),s=r(5901);t.exhaustMap=function e(t,r){return r?function(n){return n.pipe(e(function(e,n){return a.from(t(e,n)).pipe(i.map(function(t,o){return r(e,t,n,o)}))}))}:function(e){return e.lift(new l(t))}};var l=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.project))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.project=r,n.hasSubscription=!1,n.hasCompleted=!1,n.index=0,n}return o(t,e),t.prototype._next=function(e){this.hasSubscription||this.tryNext(e)},t.prototype.tryNext=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(e){this.destination.error(e);return}this.hasSubscription=!0,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new s.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=s.innerSubscribe(e,t);n!==t&&r.add(n)},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},t}(s.SimpleOuterSubscriber)},6527(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5901);t.expand=function(e,t,r){return void 0===t&&(t=1/0),t=1>(t||0)?1/0:t,function(n){return n.lift(new a(e,t,r))}};var a=function(){function e(e,t,r){this.project=e,this.concurrent=t,this.scheduler=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.project,this.concurrent,this.scheduler))},e}();t.ExpandOperator=a;var s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.project=r,i.concurrent=n,i.scheduler=o,i.index=0,i.active=0,i.hasCompleted=!1,n<1/0&&(i.buffer=[]),i}return o(t,e),t.dispatch=function(e){var t=e.subscriber,r=e.result,n=e.value,o=e.index;t.subscribeToProjection(r,n,o)},t.prototype._next=function(e){var r=this.destination;if(r.closed)return void this._complete();var n=this.index++;if(this.active<this.concurrent){r.next(e);try{var o=(0,this.project)(e,n);this.scheduler?this.destination.add(this.scheduler.schedule(t.dispatch,0,{subscriber:this,result:o,value:e,index:n})):this.subscribeToProjection(o,e,n)}catch(e){r.error(e)}}else this.buffer.push(e)},t.prototype.subscribeToProjection=function(e,t,r){this.active++,this.destination.add(i.innerSubscribe(e,new i.SimpleInnerSubscriber(this)))},t.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this._next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e&&e.length>0&&this._next(e.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},t}(i.SimpleOuterSubscriber);t.ExpandSubscriber=s},4629(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.filter=function(e,t){return function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.thisArg))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.thisArg=n,o.count=0,o}return o(t,e),t.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(e){this.destination.error(e);return}t&&this.destination.next(e)},t}(i.Subscriber)},4349(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759),a=r(1016);t.finalize=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.callback=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.callback))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.add(new a.Subscription(r)),n}return o(t,e),t}(i.Subscriber)},2376(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.find=function(e,t){if("function"!=typeof e)throw TypeError("predicate is not a function");return function(r){return r.lift(new a(e,r,!1,t))}};var a=function(){function e(e,t,r,n){this.predicate=e,this.source=t,this.yieldIndex=r,this.thisArg=n}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.source,this.yieldIndex,this.thisArg))},e}();t.FindValueOperator=a;var s=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.predicate=r,a.source=n,a.yieldIndex=o,a.thisArg=i,a.index=0,a}return o(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete(),this.unsubscribe()},t.prototype._next=function(e){var t=this.predicate,r=this.thisArg,n=this.index++;try{t.call(r||this,e,n,this.source)&&this.notifyComplete(this.yieldIndex?n:e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},t}(i.Subscriber);t.FindValueSubscriber=s},8674(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2376);t.findIndex=function(e,t){return function(r){return r.lift(new n.FindValueOperator(e,r,!0,t))}}},7089(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2637),o=r(4629),i=r(5624),a=r(952),s=r(8347),l=r(8522);t.first=function(e,t){var r=arguments.length>=2;return function(u){return u.pipe(e?o.filter(function(t,r){return e(t,r,u)}):l.identity,i.take(1),r?a.defaultIfEmpty(t):s.throwIfEmpty(function(){return new n.EmptyError}))}}},6217(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759),a=r(1016),s=r(5092),l=r(1077);t.groupBy=function(e,t,r,n){return function(o){return o.lift(new u(e,t,r,n))}};var u=function(){function e(e,t,r,n){this.keySelector=e,this.elementSelector=t,this.durationSelector=r,this.subjectSelector=n}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},e}(),c=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.keySelector=r,a.elementSelector=n,a.durationSelector=o,a.subjectSelector=i,a.groups=null,a.attemptedToUnsubscribe=!1,a.count=0,a}return o(t,e),t.prototype._next=function(e){var t;try{t=this.keySelector(e)}catch(e){this.error(e);return}this._group(e,t)},t.prototype._group=function(e,t){var r,n=this.groups;n||(n=this.groups=new Map);var o=n.get(t);if(this.elementSelector)try{r=this.elementSelector(e)}catch(e){this.error(e)}else r=e;if(!o){o=this.subjectSelector?this.subjectSelector():new l.Subject,n.set(t,o);var i=new p(t,o,this);if(this.destination.next(i),this.durationSelector){var a=void 0;try{a=this.durationSelector(new p(t,o))}catch(e){this.error(e);return}this.add(a.subscribe(new d(t,o,this)))}}o.closed||o.next(r)},t.prototype._error=function(e){var t=this.groups;t&&(t.forEach(function(t,r){t.error(e)}),t.clear()),this.destination.error(e)},t.prototype._complete=function(){var e=this.groups;e&&(e.forEach(function(e,t){e.complete()}),e.clear()),this.destination.complete()},t.prototype.removeGroup=function(e){this.groups.delete(e)},t.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&e.prototype.unsubscribe.call(this))},t}(i.Subscriber),d=function(e){function t(t,r,n){var o=e.call(this,r)||this;return o.key=t,o.group=r,o.parent=n,o}return o(t,e),t.prototype._next=function(e){this.complete()},t.prototype._unsubscribe=function(){var e=this.parent,t=this.key;this.key=this.parent=null,e&&e.removeGroup(t)},t}(i.Subscriber),p=function(e){function t(t,r,n){var o=e.call(this)||this;return o.key=t,o.groupSubject=r,o.refCountSubscription=n,o}return o(t,e),t.prototype._subscribe=function(e){var t=new a.Subscription,r=this.refCountSubscription,n=this.groupSubject;return r&&!r.closed&&t.add(new f(r)),t.add(n.subscribe(e)),t},t}(s.Observable);t.GroupedObservable=p;var f=function(e){function t(t){var r=e.call(this)||this;return r.parent=t,t.count++,r}return o(t,e),t.prototype.unsubscribe=function(){var t=this.parent;t.closed||this.closed||(e.prototype.unsubscribe.call(this),t.count-=1,0===t.count&&t.attemptedToUnsubscribe&&t.unsubscribe())},t}(a.Subscription)},6024(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.ignoreElements=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype._next=function(e){},t}(i.Subscriber)},7362(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.isEmpty=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype._next=function(e){this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(i.Subscriber)},6047(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2637),o=r(4629),i=r(6696),a=r(8347),s=r(952),l=r(8522);t.last=function(e,t){var r=arguments.length>=2;return function(u){return u.pipe(e?o.filter(function(t,r){return e(t,r,u)}):l.identity,i.takeLast(1),r?s.defaultIfEmpty(t):a.throwIfEmpty(function(){return new n.EmptyError}))}}},9233(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.map=function(e,t){return function(r){if("function"!=typeof e)throw TypeError("argument is not a function. Are you looking for `mapTo()`?");return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.project,this.thisArg))},e}();t.MapOperator=a;var s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.project=r,o.count=0,o.thisArg=n||o,o}return o(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(i.Subscriber)},7296(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.mapTo=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.value=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.value))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.value=r,n}return o(t,e),t.prototype._next=function(e){this.destination.next(this.value)},t}(i.Subscriber)},5434(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759),a=r(4942);t.materialize=function(){return function(e){return e.lift(new s)}};var s=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new l(e))},e}(),l=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype._next=function(e){this.destination.next(a.Notification.createNext(e))},t.prototype._error=function(e){var t=this.destination;t.next(a.Notification.createError(e)),t.complete()},t.prototype._complete=function(){var e=this.destination;e.next(a.Notification.createComplete()),e.complete()},t}(i.Subscriber)},7001(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1929);t.max=function(e){return n.reduce("function"==typeof e?function(t,r){return e(t,r)>0?t:r}:function(e,t){return e>t?e:t})}},4779(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3395);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(n.merge.apply(void 0,[t].concat(e)))}}},980(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(781),o=r(8522);t.mergeAll=function(e){return void 0===e&&(e=1/0),n.mergeMap(o.identity,e)}},781(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(9233),a=r(5295),s=r(5901);function l(e,t,r){return(void 0===r&&(r=1/0),"function"==typeof t)?function(n){return n.pipe(l(function(r,n){return a.from(e(r,n)).pipe(i.map(function(e,o){return t(r,e,n,o)}))},r))}:("number"==typeof t&&(r=t),function(t){return t.lift(new u(e,r))})}t.mergeMap=l;var u=function(){function e(e,t){void 0===t&&(t=1/0),this.project=e,this.concurrent=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.project,this.concurrent))},e}();t.MergeMapOperator=u;var c=function(e){function t(t,r,n){void 0===n&&(n=1/0);var o=e.call(this,t)||this;return o.project=r,o.concurrent=n,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)},t.prototype._tryNext=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(e){this.destination.error(e);return}this.active++,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new s.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=s.innerSubscribe(e,t);n!==t&&r.add(n)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(s.SimpleOuterSubscriber);t.MergeMapSubscriber=c,t.flatMap=l},2988(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(781);t.mergeMapTo=function(e,t,r){return(void 0===r&&(r=1/0),"function"==typeof t)?n.mergeMap(function(){return e},t,r):("number"==typeof t&&(r=t),n.mergeMap(function(){return e},r))}},6430(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5901);t.mergeScan=function(e,t,r){return void 0===r&&(r=1/0),function(n){return n.lift(new a(e,t,r))}};var a=function(){function e(e,t,r){this.accumulator=e,this.seed=t,this.concurrent=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.accumulator,this.seed,this.concurrent))},e}();t.MergeScanOperator=a;var s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.accumulator=r,i.acc=n,i.concurrent=o,i.hasValue=!1,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return o(t,e),t.prototype._next=function(e){if(this.active<this.concurrent){var t=this.index++,r=this.destination,n=void 0;try{n=(0,this.accumulator)(this.acc,e,t)}catch(e){return r.error(e)}this.active++,this._innerSub(n)}else this.buffer.push(e)},t.prototype._innerSub=function(e){var t=new i.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=i.innerSubscribe(e,t);n!==t&&r.add(n)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe()},t.prototype.notifyNext=function(e){var t=this.destination;this.acc=e,this.hasValue=!0,t.next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},t}(i.SimpleOuterSubscriber);t.MergeScanSubscriber=s},1547(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1929);t.min=function(e){return n.reduce("function"==typeof e?function(t,r){return 0>e(t,r)?t:r}:function(e,t){return e<t?e:t})}},9529(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7432);t.multicast=function(e,t){return function(r){if(i="function"==typeof e?e:function(){return e},"function"==typeof t)return r.lift(new o(i,t));var i,a=Object.create(r,n.connectableObservableDescriptor);return a.source=r,a.subjectFactory=i,a}};var o=function(){function e(e,t){this.subjectFactory=e,this.selector=t}return e.prototype.call=function(e,t){var r=this.selector,n=this.subjectFactory(),o=r(n).subscribe(e);return o.add(t.subscribe(n)),o},e}();t.MulticastOperator=o},4654(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759),a=r(4942);t.observeOn=function(e,t){return void 0===t&&(t=0),function(r){return r.lift(new s(e,t))}};var s=function(){function e(e,t){void 0===t&&(t=0),this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.scheduler,this.delay))},e}();t.ObserveOnOperator=s;var l=function(e){function t(t,r,n){void 0===n&&(n=0);var o=e.call(this,t)||this;return o.scheduler=r,o.delay=n,o}return o(t,e),t.dispatch=function(e){var t=e.notification,r=e.destination;t.observe(r),this.unsubscribe()},t.prototype.scheduleMessage=function(e){this.destination.add(this.scheduler.schedule(t.dispatch,this.delay,new u(e,this.destination)))},t.prototype._next=function(e){this.scheduleMessage(a.Notification.createNext(e))},t.prototype._error=function(e){this.scheduleMessage(a.Notification.createError(e)),this.unsubscribe()},t.prototype._complete=function(){this.scheduleMessage(a.Notification.createComplete()),this.unsubscribe()},t}(i.Subscriber);t.ObserveOnSubscriber=l;var u=function(e,t){this.notification=e,this.destination=t};t.ObserveOnMessage=u},5276(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5295),a=r(743),s=r(5901);t.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length&&a.isArray(e[0])&&(e=e[0]),function(t){return t.lift(new l(e))}},t.onErrorResumeNextStatic=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=void 0;return 1===e.length&&a.isArray(e[0])&&(e=e[0]),r=e.shift(),i.from(r).lift(new l(e))};var l=function(){function e(e){this.nextSources=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.nextSources))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.destination=t,n.nextSources=r,n}return o(t,e),t.prototype.notifyError=function(){this.subscribeToNextSource()},t.prototype.notifyComplete=function(){this.subscribeToNextSource()},t.prototype._error=function(e){this.subscribeToNextSource(),this.unsubscribe()},t.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},t.prototype.subscribeToNextSource=function(){var e=this.nextSources.shift();if(e){var t=new s.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=s.innerSubscribe(e,t);n!==t&&r.add(n)}else this.destination.complete()},t}(s.SimpleOuterSubscriber)},8155(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.pairwise=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){var r=e.call(this,t)||this;return r.hasPrev=!1,r}return o(t,e),t.prototype._next=function(e){var t;this.hasPrev?t=[this.prev,e]:this.hasPrev=!0,this.prev=e,t&&this.destination.next(t)},t}(i.Subscriber)},7337(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4103),o=r(4629);t.partition=function(e,t){return function(r){return[o.filter(e,t)(r),o.filter(n.not(e,t))(r)]}}},6050(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9233);t.pluck=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.length;if(0===r)throw Error("list of properties cannot be empty.");return function(t){var o,i;return n.map((o=e,i=r,function(e){for(var t=e,r=0;r<i;r++){var n=null!=t?t[o[r]]:void 0;if(void 0===n)return;t=n}return t}))(t)}}},6904(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1077),o=r(9529);t.publish=function(e){return e?o.multicast(function(){return new n.Subject},e):o.multicast(new n.Subject)}},2334(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8791),o=r(9529);t.publishBehavior=function(e){return function(t){return o.multicast(new n.BehaviorSubject(e))(t)}}},232(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8513),o=r(9529);t.publishLast=function(){return function(e){return o.multicast(new n.AsyncSubject)(e)}}},4355(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(328),o=r(9529);t.publishReplay=function(e,t,r,i){r&&"function"!=typeof r&&(i=r);var a="function"==typeof r?r:void 0,s=new n.ReplaySubject(e,t,i);return function(e){return o.multicast(function(){return s},a)(e)}}},9646(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(743),o=r(7894);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return 1===e.length&&n.isArray(e[0])&&(e=e[0]),t.lift.call(o.race.apply(void 0,[t].concat(e)))}}},1929(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5002),o=r(6696),i=r(952),a=r(7928);t.reduce=function(e,t){return arguments.length>=2?function(r){return a.pipe(n.scan(e,t),o.takeLast(1),i.defaultIfEmpty(t))(r)}:function(t){return a.pipe(n.scan(function(t,r,n){return e(t,r,n+1)}),o.takeLast(1))(t)}}},5203(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.refCount=function(){return function(e){return e.lift(new a(e))}};var a=function(){function e(e){this.connectable=e}return e.prototype.call=function(e,t){var r=this.connectable;r._refCount++;var n=new s(e,r),o=t.subscribe(n);return n.closed||(n.connection=r.connect()),o},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.connectable=r,n}return o(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(!e){this.connection=null;return}this.connectable=null;var t=e._refCount;if(t<=0||(e._refCount=t-1,t>1)){this.connection=null;return}var r=this.connection,n=e._connection;this.connection=null,n&&(!r||n===r)&&n.unsubscribe()},t}(i.Subscriber)},68(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759),a=r(4914);t.repeat=function(e){return void 0===e&&(e=-1),function(t){return 0===e?a.empty():e<0?t.lift(new s(-1,t)):t.lift(new s(e-1,t))}};var s=function(){function e(e,t){this.count=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.count,this.source))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.count=r,o.source=n,o}return o(t,e),t.prototype.complete=function(){if(!this.isStopped){var t=this.source,r=this.count;if(0===r)return e.prototype.complete.call(this);r>-1&&(this.count=r-1),t.subscribe(this._unsubscribeAndRecycle())}},t}(i.Subscriber)},8440(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1077),a=r(5901);t.repeatWhen=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.notifier,t))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.notifier=r,o.source=n,o.sourceIsBeingSubscribedTo=!0,o}return o(t,e),t.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},t.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return e.prototype.complete.call(this)},t.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return e.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},t.prototype._unsubscribe=function(){var e=this.notifications,t=this.retriesSubscription;e&&(e.unsubscribe(),this.notifications=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype._unsubscribeAndRecycle=function(){var t=this._unsubscribe;return this._unsubscribe=null,e.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=t,this},t.prototype.subscribeToRetries=function(){this.notifications=new i.Subject;try{var t;t=(0,this.notifier)(this.notifications)}catch(t){return e.prototype.complete.call(this)}this.retries=t,this.retriesSubscription=a.innerSubscribe(t,new a.SimpleInnerSubscriber(this))},t}(a.SimpleOuterSubscriber)},9933(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.retry=function(e){return void 0===e&&(e=-1),function(t){return t.lift(new a(e,t))}};var a=function(){function e(e,t){this.count=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.count,this.source))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.count=r,o.source=n,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var r=this.source,n=this.count;if(0===n)return e.prototype.error.call(this,t);n>-1&&(this.count=n-1),r.subscribe(this._unsubscribeAndRecycle())}},t}(i.Subscriber)},3325(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1077),a=r(5901);t.retryWhen=function(e){return function(t){return t.lift(new s(e,t))}};var s=function(){function e(e,t){this.notifier=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.notifier,this.source))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.notifier=r,o.source=n,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var r=this.errors,n=this.retries,o=this.retriesSubscription;if(n)this.errors=void 0,this.retriesSubscription=void 0;else{r=new i.Subject;try{n=(0,this.notifier)(r)}catch(t){return e.prototype.error.call(this,t)}o=a.innerSubscribe(n,new a.SimpleInnerSubscriber(this))}this._unsubscribeAndRecycle(),this.errors=r,this.retries=n,this.retriesSubscription=o,r.next(t)}},t.prototype._unsubscribe=function(){var e=this.errors,t=this.retriesSubscription;e&&(e.unsubscribe(),this.errors=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype.notifyNext=function(){var e=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=e,this.source.subscribe(this)},t}(a.SimpleOuterSubscriber)},7677(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5901);t.sample=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var r=new s(e),n=t.subscribe(r);return n.add(i.innerSubscribe(this.notifier,new i.SimpleInnerSubscriber(r))),n},e}(),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hasValue=!1,t}return o(t,e),t.prototype._next=function(e){this.value=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.emitValue()},t.prototype.notifyComplete=function(){this.emitValue()},t.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},t}(i.SimpleOuterSubscriber)},8360(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759),a=r(6735);t.sampleTime=function(e,t){return void 0===t&&(t=a.async),function(r){return r.lift(new s(e,t))}};var s=function(){function e(e,t){this.period=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.period,this.scheduler))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.period=r,o.scheduler=n,o.hasValue=!1,o.add(n.schedule(u,r,{subscriber:o,period:r})),o}return o(t,e),t.prototype._next=function(e){this.lastValue=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},t}(i.Subscriber);function u(e){var t=e.subscriber,r=e.period;t.notifyNext(),this.schedule(e,r)}},5002(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.scan=function(e,t){var r=!1;return arguments.length>=2&&(r=!0),function(n){return n.lift(new a(e,t,r))}};var a=function(){function e(e,t,r){void 0===r&&(r=!1),this.accumulator=e,this.seed=t,this.hasSeed=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.accumulator,this.seed,this.hasSeed))},e}(),s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.accumulator=r,i._seed=n,i.hasSeed=o,i.index=0,i}return o(t,e),Object.defineProperty(t.prototype,"seed",{get:function(){return this._seed},set:function(e){this.hasSeed=!0,this._seed=e},enumerable:!0,configurable:!0}),t.prototype._next=function(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)},t.prototype._tryNext=function(e){var t,r=this.index++;try{t=this.accumulator(this.seed,e,r)}catch(e){this.destination.error(e)}this.seed=t,this.destination.next(t)},t}(i.Subscriber)},4332(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.sequenceEqual=function(e,t){return function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.compareTo=e,this.comparator=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.compareTo,this.comparator))},e}();t.SequenceEqualOperator=a;var s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.compareTo=r,o.comparator=n,o._a=[],o._b=[],o._oneComplete=!1,o.destination.add(r.subscribe(new l(t,o))),o}return o(t,e),t.prototype._next=function(e){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(e),this.checkValues())},t.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},t.prototype.checkValues=function(){for(var e=this._a,t=this._b,r=this.comparator;e.length>0&&t.length>0;){var n=e.shift(),o=t.shift(),i=!1;try{i=r?r(n,o):n===o}catch(e){this.destination.error(e)}i||this.emit(!1)}},t.prototype.emit=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype.nextB=function(e){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(e),this.checkValues())},t.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},t}(i.Subscriber);t.SequenceEqualSubscriber=s;var l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.parent=r,n}return o(t,e),t.prototype._next=function(e){this.parent.nextB(e)},t.prototype._error=function(e){this.parent.error(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},t}(i.Subscriber)},9184(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9529),o=r(5203),i=r(1077);function a(){return new i.Subject}t.share=function(){return function(e){return o.refCount()(n.multicast(a)(e))}}},1451(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(328);t.shareReplay=function(e,t,r){var o;return o=e&&"object"==typeof e?e:{bufferSize:e,windowTime:t,refCount:!1,scheduler:r},function(e){var t,r,i,a,s,l,u,c,d,p,f,h;return e.lift((s=void 0===(a=(t=o).bufferSize)?1/0:a,u=void 0===(l=t.windowTime)?1/0:l,c=t.refCount,d=t.scheduler,p=0,f=!1,h=!1,function(e){var t;p++,!r||f?(f=!1,t=(r=new n.ReplaySubject(s,u,d)).subscribe(this),i=e.subscribe({next:function(e){r.next(e)},error:function(e){f=!0,r.error(e)},complete:function(){h=!0,i=void 0,r.complete()}}),h&&(i=void 0)):t=r.subscribe(this),this.add(function(){p--,t.unsubscribe(),t=void 0,i&&!h&&c&&0===p&&(i.unsubscribe(),i=void 0,r=void 0)})}))}}},6003(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759),a=r(2637);t.single=function(e){return function(t){return t.lift(new s(e,t))}};var s=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.predicate,this.source))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.source=n,o.seenValue=!1,o.index=0,o}return o(t,e),t.prototype.applySingleValue=function(e){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=e)},t.prototype._next=function(e){var t=this.index++;this.predicate?this.tryNext(e,t):this.applySingleValue(e)},t.prototype.tryNext=function(e,t){try{this.predicate(e,t,this.source)&&this.applySingleValue(e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){var e=this.destination;this.index>0?(e.next(this.seenValue?this.singleValue:void 0),e.complete()):e.error(new a.EmptyError)},t}(i.Subscriber)},7124(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.skip=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.total=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.total))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.count=0,n}return o(t,e),t.prototype._next=function(e){++this.count>this.total&&this.destination.next(e)},t}(i.Subscriber)},1444(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759),a=r(2519);t.skipLast=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){if(this._skipCount=e,this._skipCount<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return 0===this._skipCount?t.subscribe(new i.Subscriber(e)):t.subscribe(new l(e,this._skipCount))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n._skipCount=r,n._count=0,n._ring=Array(r),n}return o(t,e),t.prototype._next=function(e){var t=this._skipCount,r=this._count++;if(r<t)this._ring[r]=e;else{var n=r%t,o=this._ring,i=o[n];o[n]=e,this.destination.next(i)}},t}(i.Subscriber)},1026(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5901);t.skipUntil=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.notifier))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;n.hasValue=!1;var o=new i.SimpleInnerSubscriber(n);n.add(o),n.innerSubscription=o;var a=i.innerSubscribe(r,o);return a!==o&&(n.add(a),n.innerSubscription=a),n}return o(t,e),t.prototype._next=function(t){this.hasValue&&e.prototype._next.call(this,t)},t.prototype.notifyNext=function(){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},t.prototype.notifyComplete=function(){},t}(i.SimpleOuterSubscriber)},9159(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.skipWhile=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.predicate=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.predicate=r,n.skipping=!0,n.index=0,n}return o(t,e),t.prototype._next=function(e){var t=this.destination;this.skipping&&this.tryCallPredicate(e),this.skipping||t.next(e)},t.prototype.tryCallPredicate=function(e){try{var t=this.predicate(e,this.index++);this.skipping=!!t}catch(e){this.destination.error(e)}},t}(i.Subscriber)},9155(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9623),o=r(3935);t.startWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return o.isScheduler(r)?(e.pop(),function(t){return n.concat(e,t,r)}):function(t){return n.concat(e,t)}}},162(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7563);t.subscribeOn=function(e,t){return void 0===t&&(t=0),function(r){return r.lift(new o(e,t))}};var o=function(){function e(e,t){this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return new n.SubscribeOnObservable(t,this.delay,this.scheduler).subscribe(e)},e}()},1324(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(917),o=r(8522);t.switchAll=function(){return n.switchMap(o.identity)}},917(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(9233),a=r(5295),s=r(5901);t.switchMap=function e(t,r){return"function"==typeof r?function(n){return n.pipe(e(function(e,n){return a.from(t(e,n)).pipe(i.map(function(t,o){return r(e,t,n,o)}))}))}:function(e){return e.lift(new l(t))}};var l=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.project))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.project=r,n.index=0,n}return o(t,e),t.prototype._next=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(e){this.destination.error(e);return}this._innerSub(t)},t.prototype._innerSub=function(e){var t=this.innerSubscription;t&&t.unsubscribe();var r=new s.SimpleInnerSubscriber(this),n=this.destination;n.add(r),this.innerSubscription=s.innerSubscribe(e,r),this.innerSubscription!==r&&n.add(this.innerSubscription)},t.prototype._complete=function(){var t=this.innerSubscription;(!t||t.closed)&&e.prototype._complete.call(this),this.unsubscribe()},t.prototype._unsubscribe=function(){this.innerSubscription=void 0},t.prototype.notifyComplete=function(){this.innerSubscription=void 0,this.isStopped&&e.prototype._complete.call(this)},t.prototype.notifyNext=function(e){this.destination.next(e)},t}(s.SimpleOuterSubscriber)},5428(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(917);t.switchMapTo=function(e,t){return t?n.switchMap(function(){return e},t):n.switchMap(function(){return e})}},5624(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759),a=r(2519),s=r(4914);t.take=function(e){return function(t){return 0===e?s.empty():t.lift(new l(e))}};var l=function(){function e(e){if(this.total=e,this.total<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.total))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.count=0,n}return o(t,e),t.prototype._next=function(e){var t=this.total,r=++this.count;r<=t&&(this.destination.next(e),r===t&&(this.destination.complete(),this.unsubscribe()))},t}(i.Subscriber)},6696(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759),a=r(2519),s=r(4914);t.takeLast=function(e){return function(t){return 0===e?s.empty():t.lift(new l(e))}};var l=function(){function e(e){if(this.total=e,this.total<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.total))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.ring=[],n.count=0,n}return o(t,e),t.prototype._next=function(e){var t=this.ring,r=this.total,n=this.count++;t.length<r?t.push(e):t[n%r]=e},t.prototype._complete=function(){var e=this.destination,t=this.count;if(t>0)for(var r=this.count>=this.total?this.total:this.count,n=this.ring,o=0;o<r;o++){var i=t++%r;e.next(n[i])}e.complete()},t}(i.Subscriber)},1534(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5901);t.takeUntil=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var r=new s(e),n=i.innerSubscribe(this.notifier,new i.SimpleInnerSubscriber(r));return n&&!r.seenValue?(r.add(n),t.subscribe(r)):r},e}(),s=function(e){function t(t){var r=e.call(this,t)||this;return r.seenValue=!1,r}return o(t,e),t.prototype.notifyNext=function(){this.seenValue=!0,this.complete()},t.prototype.notifyComplete=function(){},t}(i.SimpleOuterSubscriber)},5179(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759);t.takeWhile=function(e,t){return void 0===t&&(t=!1),function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.predicate=e,this.inclusive=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.inclusive))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.inclusive=n,o.index=0,o}return o(t,e),t.prototype._next=function(e){var t,r=this.destination;try{t=this.predicate(e,this.index++)}catch(e){r.error(e);return}this.nextOrComplete(e,t)},t.prototype.nextOrComplete=function(e,t){var r=this.destination;t?r.next(e):(this.inclusive&&r.next(e),r.complete())},t}(i.Subscriber)},8022(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759),a=r(3912),s=r(4864);t.tap=function(e,t,r){return function(n){return n.lift(new l(e,t,r))}};var l=function(){function e(e,t,r){this.nextOrObserver=e,this.error=t,this.complete=r}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.nextOrObserver,this.error,this.complete))},e}(),u=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i._tapNext=a.noop,i._tapError=a.noop,i._tapComplete=a.noop,i._tapError=n||a.noop,i._tapComplete=o||a.noop,s.isFunction(r)?(i._context=i,i._tapNext=r):r&&(i._context=r,i._tapNext=r.next||a.noop,i._tapError=r.error||a.noop,i._tapComplete=r.complete||a.noop),i}return o(t,e),t.prototype._next=function(e){try{this._tapNext.call(this._context,e)}catch(e){this.destination.error(e);return}this.destination.next(e)},t.prototype._error=function(e){try{this._tapError.call(this._context,e)}catch(e){this.destination.error(e);return}this.destination.error(e)},t.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(e){this.destination.error(e);return}return this.destination.complete()},t}(i.Subscriber)},5019(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5901);t.defaultThrottleConfig={leading:!0,trailing:!1},t.throttle=function(e,r){return void 0===r&&(r=t.defaultThrottleConfig),function(t){return t.lift(new a(e,!!r.leading,!!r.trailing))}};var a=function(){function e(e,t,r){this.durationSelector=e,this.leading=t,this.trailing=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.durationSelector,this.leading,this.trailing))},e}(),s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.destination=t,i.durationSelector=r,i._leading=n,i._trailing=o,i._hasValue=!1,i}return o(t,e),t.prototype._next=function(e){this._hasValue=!0,this._sendValue=e,this._throttled||(this._leading?this.send():this.throttle(e))},t.prototype.send=function(){var e=this._hasValue,t=this._sendValue;e&&(this.destination.next(t),this.throttle(t)),this._hasValue=!1,this._sendValue=void 0},t.prototype.throttle=function(e){var t=this.tryDurationSelector(e);t&&this.add(this._throttled=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this)))},t.prototype.tryDurationSelector=function(e){try{return this.durationSelector(e)}catch(e){return this.destination.error(e),null}},t.prototype.throttlingDone=function(){var e=this._throttled,t=this._trailing;e&&e.unsubscribe(),this._throttled=void 0,t&&this.send()},t.prototype.notifyNext=function(){this.throttlingDone()},t.prototype.notifyComplete=function(){this.throttlingDone()},t}(i.SimpleOuterSubscriber)},7406(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759),a=r(6735),s=r(5019);t.throttleTime=function(e,t,r){return void 0===t&&(t=a.async),void 0===r&&(r=s.defaultThrottleConfig),function(n){return n.lift(new l(e,t,r.leading,r.trailing))}};var l=function(){function e(e,t,r,n){this.duration=e,this.scheduler=t,this.leading=r,this.trailing=n}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.duration,this.scheduler,this.leading,this.trailing))},e}(),u=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.duration=r,a.scheduler=n,a.leading=o,a.trailing=i,a._hasTrailingValue=!1,a._trailingValue=null,a}return o(t,e),t.prototype._next=function(e){this.throttled?this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(c,this.duration,{subscriber:this})),this.leading?this.destination.next(e):this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0))},t.prototype._complete=function(){this._hasTrailingValue&&this.destination.next(this._trailingValue),this.destination.complete()},t.prototype.clearThrottle=function(){var e=this.throttled;e&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),e.unsubscribe(),this.remove(e),this.throttled=null)},t}(i.Subscriber);function c(e){e.subscriber.clearThrottle()}},8347(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(2637),a=r(7759);t.throwIfEmpty=function(e){return void 0===e&&(e=u),function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.errorFactory=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.errorFactory))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.errorFactory=r,n.hasValue=!1,n}return o(t,e),t.prototype._next=function(e){this.hasValue=!0,this.destination.next(e)},t.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var e=void 0;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)},t}(a.Subscriber);function u(){return new i.EmptyError}},1115(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6735),o=r(5002),i=r(6691),a=r(9233);t.timeInterval=function(e){return void 0===e&&(e=n.async),function(t){return i.defer(function(){return t.pipe(o.scan(function(t,r){var n=t.current;return{value:r,current:e.now(),last:n}},{current:e.now(),value:void 0,last:void 0}),a.map(function(e){var t=e.current,r=e.last;return new s(e.value,t-r)}))})}};var s=function(e,t){this.value=e,this.interval=t};t.TimeInterval=s},2784(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6735),o=r(1027),i=r(5816),a=r(1673);t.timeout=function(e,t){return void 0===t&&(t=n.async),i.timeoutWith(e,a.throwError(new o.TimeoutError),t)}},5816(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(6735),a=r(6740),s=r(5901);t.timeoutWith=function(e,t,r){return void 0===r&&(r=i.async),function(n){var o=a.isDate(e),i=o?e-r.now():Math.abs(e);return n.lift(new l(i,o,t,r))}};var l=function(){function e(e,t,r,n){this.waitFor=e,this.absoluteTimeout=t,this.withObservable=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},e}(),u=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.absoluteTimeout=r,a.waitFor=n,a.withObservable=o,a.scheduler=i,a.scheduleTimeout(),a}return o(t,e),t.dispatchTimeout=function(e){var t=e.withObservable;e._unsubscribeAndRecycle(),e.add(s.innerSubscribe(t,new s.SimpleInnerSubscriber(e)))},t.prototype.scheduleTimeout=function(){var e=this.action;e?this.action=e.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(t.dispatchTimeout,this.waitFor,this))},t.prototype._next=function(t){this.absoluteTimeout||this.scheduleTimeout(),e.prototype._next.call(this,t)},t.prototype._unsubscribe=function(){this.action=void 0,this.scheduler=null,this.withObservable=null},t}(s.SimpleOuterSubscriber)},2748(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6735),o=r(9233);t.timestamp=function(e){return void 0===e&&(e=n.async),o.map(function(t){return new i(t,e.now())})};var i=function(e,t){this.value=e,this.timestamp=t};t.Timestamp=i},9133(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1929);function o(e,t,r){return 0===r?[t]:(e.push(t),e)}t.toArray=function(){return n.reduce(o,[])}},2363(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1077),a=r(5901);t.window=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.windowBoundaries=e}return e.prototype.call=function(e,t){var r=new l(e),n=t.subscribe(r);return n.closed||r.add(a.innerSubscribe(this.windowBoundaries,new a.SimpleInnerSubscriber(r))),n},e}(),l=function(e){function t(t){var r=e.call(this,t)||this;return r.window=new i.Subject,t.next(r.window),r}return o(t,e),t.prototype.notifyNext=function(){this.openWindow()},t.prototype.notifyError=function(e){this._error(e)},t.prototype.notifyComplete=function(){this._complete()},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e)},t.prototype._complete=function(){this.window.complete(),this.destination.complete()},t.prototype._unsubscribe=function(){this.window=null},t.prototype.openWindow=function(){var e=this.window;e&&e.complete();var t=this.destination,r=this.window=new i.Subject;t.next(r)},t}(a.SimpleOuterSubscriber)},2216(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7759),a=r(1077);t.windowCount=function(e,t){return void 0===t&&(t=0),function(r){return r.lift(new s(e,t))}};var s=function(){function e(e,t){this.windowSize=e,this.startWindowEvery=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.windowSize,this.startWindowEvery))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.destination=t,o.windowSize=r,o.startWindowEvery=n,o.windows=[new a.Subject],o.count=0,t.next(o.windows[0]),o}return o(t,e),t.prototype._next=function(e){for(var t=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,r=this.destination,n=this.windowSize,o=this.windows,i=o.length,s=0;s<i&&!this.closed;s++)o[s].next(e);var l=this.count-n+1;if(l>=0&&l%t==0&&!this.closed&&o.shift().complete(),++this.count%t==0&&!this.closed){var u=new a.Subject;o.push(u),r.next(u)}},t.prototype._error=function(e){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().complete();this.destination.complete()},t.prototype._unsubscribe=function(){this.count=0,this.windows=null},t}(i.Subscriber)},3886(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1077),a=r(6735),s=r(7759),l=r(9673),u=r(3935);t.windowTime=function(e){var t=a.async,r=null,n=1/0;return u.isScheduler(arguments[3])&&(t=arguments[3]),u.isScheduler(arguments[2])?t=arguments[2]:l.isNumeric(arguments[2])&&(n=Number(arguments[2])),u.isScheduler(arguments[1])?t=arguments[1]:l.isNumeric(arguments[1])&&(r=Number(arguments[1])),function(o){return o.lift(new c(e,r,n,t))}};var c=function(){function e(e,t,r,n){this.windowTimeSpan=e,this.windowCreationInterval=t,this.maxWindowSize=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new p(e,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},e}(),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._numberOfNextedValues=0,t}return o(t,e),t.prototype.next=function(t){this._numberOfNextedValues++,e.prototype.next.call(this,t)},Object.defineProperty(t.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),t}(i.Subject),p=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;a.destination=t,a.windowTimeSpan=r,a.windowCreationInterval=n,a.maxWindowSize=o,a.scheduler=i,a.windows=[];var s=a.openWindow();return null!==n&&n>=0?(a.add(i.schedule(m,r,{subscriber:a,window:s,context:null})),a.add(i.schedule(h,n,{windowTimeSpan:r,windowCreationInterval:n,subscriber:a,scheduler:i}))):a.add(i.schedule(f,r,{subscriber:a,window:s,windowTimeSpan:r})),a}return o(t,e),t.prototype._next=function(e){for(var t=this.windows,r=t.length,n=0;n<r;n++){var o=t[n];!o.closed&&(o.next(e),o.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(o))}},t.prototype._error=function(e){for(var t=this.windows;t.length>0;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){for(var e=this.windows;e.length>0;){var t=e.shift();t.closed||t.complete()}this.destination.complete()},t.prototype.openWindow=function(){var e=new d;return this.windows.push(e),this.destination.next(e),e},t.prototype.closeWindow=function(e){e.complete();var t=this.windows;t.splice(t.indexOf(e),1)},t}(s.Subscriber);function f(e){var t=e.subscriber,r=e.windowTimeSpan,n=e.window;n&&t.closeWindow(n),e.window=t.openWindow(),this.schedule(e,r)}function h(e){var t=e.windowTimeSpan,r=e.subscriber,n=e.scheduler,o=e.windowCreationInterval,i=r.openWindow(),a={action:this,subscription:null};a.subscription=n.schedule(m,t,{subscriber:r,window:i,context:a}),this.add(a.subscription),this.schedule(e,o)}function m(e){var t=e.subscriber,r=e.window,n=e.context;n&&n.action&&n.subscription&&n.action.remove(n.subscription),t.closeWindow(r)}},3903(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1077),a=r(1016),s=r(6771),l=r(7778);t.windowToggle=function(e,t){return function(r){return r.lift(new u(e,t))}};var u=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.openings,this.closingSelector))},e}(),c=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.openings=r,o.closingSelector=n,o.contexts=[],o.add(o.openSubscription=l.subscribeToResult(o,r,r)),o}return o(t,e),t.prototype._next=function(e){var t=this.contexts;if(t)for(var r=t.length,n=0;n<r;n++)t[n].window.next(e)},t.prototype._error=function(t){var r=this.contexts;if(this.contexts=null,r)for(var n=r.length,o=-1;++o<n;){var i=r[o];i.window.error(t),i.subscription.unsubscribe()}e.prototype._error.call(this,t)},t.prototype._complete=function(){var t=this.contexts;if(this.contexts=null,t)for(var r=t.length,n=-1;++n<r;){var o=t[n];o.window.complete(),o.subscription.unsubscribe()}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.contexts;if(this.contexts=null,e)for(var t=e.length,r=-1;++r<t;){var n=e[r];n.window.unsubscribe(),n.subscription.unsubscribe()}},t.prototype.notifyNext=function(e,t,r,n,o){if(e===this.openings){var s=void 0;try{s=(0,this.closingSelector)(t)}catch(e){return this.error(e)}var u=new i.Subject,c=new a.Subscription,d={window:u,subscription:c};this.contexts.push(d);var p=l.subscribeToResult(this,s,d);p.closed?this.closeWindow(this.contexts.length-1):(p.context=d,c.add(p)),this.destination.next(u)}else this.closeWindow(this.contexts.indexOf(e))},t.prototype.notifyError=function(e){this.error(e)},t.prototype.notifyComplete=function(e){e!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(e.context))},t.prototype.closeWindow=function(e){if(-1!==e){var t=this.contexts,r=t[e],n=r.window,o=r.subscription;t.splice(e,1),n.complete(),o.unsubscribe()}},t}(s.OuterSubscriber)},7539(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1077),a=r(6771),s=r(7778);t.windowWhen=function(e){return function(t){return t.lift(new l(e))}};var l=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.closingSelector))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.destination=t,n.closingSelector=r,n.openWindow(),n}return o(t,e),t.prototype.notifyNext=function(e,t,r,n,o){this.openWindow(o)},t.prototype.notifyError=function(e){this._error(e)},t.prototype.notifyComplete=function(e){this.openWindow(e)},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e),this.unsubscribeClosingNotification()},t.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},t.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},t.prototype.openWindow=function(e){void 0===e&&(e=null),e&&(this.remove(e),e.unsubscribe());var t,r=this.window;r&&r.complete();var n=this.window=new i.Subject;this.destination.next(n);try{t=(0,this.closingSelector)()}catch(e){this.destination.error(e),this.window.error(e);return}this.add(this.closingNotification=s.subscribeToResult(this,t))},t}(a.OuterSubscriber)},6788(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(6771),a=r(7778);t.withLatestFrom=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var r;return"function"==typeof e[e.length-1]&&(r=e.pop()),t.lift(new s(e,r))}};var s=function(){function e(e,t){this.observables=e,this.project=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.observables,this.project))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;o.observables=r,o.project=n,o.toRespond=[];var i=r.length;o.values=Array(i);for(var s=0;s<i;s++)o.toRespond.push(s);for(var s=0;s<i;s++){var l=r[s];o.add(a.subscribeToResult(o,l,void 0,s))}return o}return o(t,e),t.prototype.notifyNext=function(e,t,r){this.values[r]=t;var n=this.toRespond;if(n.length>0){var o=n.indexOf(r);-1!==o&&n.splice(o,1)}},t.prototype.notifyComplete=function(){},t.prototype._next=function(e){if(0===this.toRespond.length){var t=[e].concat(this.values);this.project?this._tryProject(t):this.destination.next(t)}},t.prototype._tryProject=function(e){var t;try{t=this.project.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(i.OuterSubscriber)},4868(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5356);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(n.zip.apply(void 0,[t].concat(e)))}}},5517(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5356);t.zipAll=function(e){return function(t){return t.lift(new n.ZipOperator(e))}}},5791(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5092),o=r(1016);t.scheduleArray=function(e,t){return new n.Observable(function(r){var n=new o.Subscription,i=0;return n.add(t.schedule(function(){i===e.length?r.complete():(r.next(e[i++]),r.closed||n.add(this.schedule()))})),n})}},4178(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5092),o=r(1016),i=r(8258);t.scheduleIterable=function(e,t){if(!e)throw Error("Iterable cannot be null");return new n.Observable(function(r){var n,a=new o.Subscription;return a.add(function(){n&&"function"==typeof n.return&&n.return()}),a.add(t.schedule(function(){n=e[i.iterator](),a.add(t.schedule(function(){if(!r.closed){try{var e,t,o=n.next();e=o.value,t=o.done}catch(e){r.error(e);return}t?r.complete():(r.next(e),this.schedule())}}))})),a})}},2873(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5092),o=r(1016),i=r(6713);t.scheduleObservable=function(e,t){return new n.Observable(function(r){var n=new o.Subscription;return n.add(t.schedule(function(){var o=e[i.observable]();n.add(o.subscribe({next:function(e){n.add(t.schedule(function(){return r.next(e)}))},error:function(e){n.add(t.schedule(function(){return r.error(e)}))},complete:function(){n.add(t.schedule(function(){return r.complete()}))}}))})),n})}},1039(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5092),o=r(1016);t.schedulePromise=function(e,t){return new n.Observable(function(r){var n=new o.Subscription;return n.add(t.schedule(function(){return e.then(function(e){n.add(t.schedule(function(){r.next(e),n.add(t.schedule(function(){return r.complete()}))}))},function(e){n.add(t.schedule(function(){return r.error(e)}))})})),n})}},7670(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2873),o=r(1039),i=r(5791),a=r(4178),s=r(7606),l=r(4215),u=r(624),c=r(4442);t.scheduled=function(e,t){if(null!=e){if(s.isInteropObservable(e))return n.scheduleObservable(e,t);else if(l.isPromise(e))return o.schedulePromise(e,t);else if(u.isArrayLike(e))return i.scheduleArray(e,t);else if(c.isIterable(e)||"string"==typeof e)return a.scheduleIterable(e,t)}throw TypeError((null!==e&&typeof e||e)+" is not observable")}},5169(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Action=function(e){function t(t,r){return e.call(this)||this}return o(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(r(1016).Subscription)},2900(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(2839);t.AsapAction=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return o(t,e),t.prototype.requestAsyncId=function(t,r,n){return(void 0===n&&(n=0),null!==n&&n>0)?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t.scheduled||(t.scheduled=i.Immediate.setImmediate(t.flush.bind(t,null))))},t.prototype.recycleAsyncId=function(t,r,n){if(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);0===t.actions.length&&(i.Immediate.clearImmediate(r),t.scheduled=void 0)},t}(r(469).AsyncAction)},3069(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapScheduler=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,r=this.actions,n=-1,o=r.length;e=e||r.shift();do if(t=e.execute(e.state,e.delay))break;while(++n<o&&(e=r.shift()));if(this.active=!1,t){for(;++n<o&&(e=r.shift());)e.unsubscribe();throw t}},t}(r(5646).AsyncScheduler)},469(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAction=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n.pending=!1,n}return o(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,n=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(n,r,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(n,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),setInterval(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!==r&&this.delay===r&&!1===this.pending)return t;clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var r=!1,n=void 0;try{this.work(e)}catch(e){r=!0,n=!!e&&e||Error(e)}if(r)return this.unsubscribe(),n},t.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,r=t.actions,n=r.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==n&&r.splice(n,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null},t}(r(5169).Action)},5646(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(4688);t.AsyncScheduler=function(e){function t(r,n){void 0===n&&(n=i.Scheduler.now);var o=e.call(this,r,function(){return t.delegate&&t.delegate!==o?t.delegate.now():n()})||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return o(t,e),t.prototype.schedule=function(r,n,o){return(void 0===n&&(n=0),t.delegate&&t.delegate!==this)?t.delegate.schedule(r,n,o):e.prototype.schedule.call(this,r,n,o)},t.prototype.flush=function(e){var t,r=this.actions;if(this.active)return void r.push(e);this.active=!0;do if(t=e.execute(e.state,e.delay))break;while(e=r.shift());if(this.active=!1,t){for(;e=r.shift();)e.unsubscribe();throw t}},t}(i.Scheduler)},8538(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueAction=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return o(t,e),t.prototype.schedule=function(t,r){return(void 0===r&&(r=0),r>0)?e.prototype.schedule.call(this,t,r):(this.delay=r,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,r){return r>0||this.closed?e.prototype.execute.call(this,t,r):this._execute(t,r)},t.prototype.requestAsyncId=function(t,r,n){return(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)?e.prototype.requestAsyncId.call(this,t,r,n):t.flush(this)},t}(r(469).AsyncAction)},8831(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueScheduler=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(r(5646).AsyncScheduler)},3766(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2900);t.asapScheduler=new(r(3069)).AsapScheduler(n.AsapAction),t.asap=t.asapScheduler},6735(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(469);t.asyncScheduler=new(r(5646)).AsyncScheduler(n.AsyncAction),t.async=t.asyncScheduler},3792(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8538);t.queueScheduler=new(r(8831)).QueueScheduler(n.QueueAction),t.queue=t.queueScheduler},8258(e,t){"use strict";function r(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(t,"__esModule",{value:!0}),t.getSymbolIterator=r,t.iterator=r(),t.$$iterator=t.iterator},6713(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},8636(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rxSubscriber="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),t.$$rxSubscriber=t.rxSubscriber},2519(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArgumentOutOfRangeError=function(){function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e}()},2637(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyError=function(){function e(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return e.prototype=Object.create(Error.prototype),e}()},2839(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=1,n=Promise.resolve(),o={};function i(e){return e in o&&(delete o[e],!0)}t.Immediate={setImmediate:function(e){var t=r++;return o[t]=!0,n.then(function(){return i(t)&&e()}),t},clearImmediate:function(e){i(e)}},t.TestTools={pending:function(){return Object.keys(o).length}}},8860(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUnsubscribedError=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}()},1027(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeoutError=function(){function e(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return e.prototype=Object.create(Error.prototype),e}()},1806(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsubscriptionError=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}()},1226(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7759);t.canReportError=function(e){for(;e;){var t=e,r=t.closed,o=t.destination,i=t.isStopped;if(r||i)return!1;e=o&&o instanceof n.Subscriber?o:null}return!0}},9468(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hostReportError=function(e){setTimeout(function(){throw e},0)}},8522(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.identity=function(e){return e}},743(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArray=Array.isArray||function(e){return e&&"number"==typeof e.length}},624(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},6740(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDate=function(e){return e instanceof Date&&!isNaN(+e)}},4864(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=function(e){return"function"==typeof e}},7606(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6713);t.isInteropObservable=function(e){return e&&"function"==typeof e[n.observable]}},4442(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8258);t.isIterable=function(e){return e&&"function"==typeof e[n.iterator]}},9673(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(743);t.isNumeric=function(e){return!n.isArray(e)&&e-parseFloat(e)+1>=0}},6727(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=function(e){return null!==e&&"object"==typeof e}},4215(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=function(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}},3935(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isScheduler=function(e){return e&&"function"==typeof e.schedule}},3912(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=function(){}},4103(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.not=function(e,t){function r(){return!r.pred.apply(r.thisArg,arguments)}return r.pred=e,r.thisArg=t,r}},7928(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8522);function o(e){return 0===e.length?n.identity:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}t.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o(e)},t.pipeFromArray=o},1727(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(422),o=r(3266),i=r(7429),a=r(3394),s=r(624),l=r(4215),u=r(6727),c=r(8258),d=r(6713);t.subscribeTo=function(e){if(e&&"function"==typeof e[d.observable])return a.subscribeToObservable(e);if(s.isArrayLike(e))return n.subscribeToArray(e);if(l.isPromise(e))return o.subscribeToPromise(e);if(e&&"function"==typeof e[c.iterator])return i.subscribeToIterable(e);throw TypeError("You provided "+(u.isObject(e)?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},422(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.subscribeToArray=function(e){return function(t){for(var r=0,n=e.length;r<n&&!t.closed;r++)t.next(e[r]);t.complete()}}},7429(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8258);t.subscribeToIterable=function(e){return function(t){for(var r=e[n.iterator]();;){var o=void 0;try{o=r.next()}catch(e){return t.error(e),t}if(o.done){t.complete();break}if(t.next(o.value),t.closed)break}return"function"==typeof r.return&&t.add(function(){r.return&&r.return()}),t}}},3394(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6713);t.subscribeToObservable=function(e){return function(t){var r=e[n.observable]();if("function"==typeof r.subscribe)return r.subscribe(t);throw TypeError("Provided object does not correctly implement Symbol.observable")}}},3266(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9468);t.subscribeToPromise=function(e){return function(t){return e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,n.hostReportError),t}}},7778(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1359),o=r(1727),i=r(5092);t.subscribeToResult=function(e,t,r,a,s){if(void 0===s&&(s=new n.InnerSubscriber(e,r,a)),!s.closed)return t instanceof i.Observable?t.subscribe(s):o.subscribeTo(t)(s)}},7595(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7759),o=r(8636),i=r(4143);t.toSubscriber=function(e,t,r){if(e){if(e instanceof n.Subscriber)return e;if(e[o.rxSubscriber])return e[o.rxSubscriber]()}return e||t||r?new n.Subscriber(e,t,r):new n.Subscriber(i.empty)}},9549(e,t,r){"use strict";r(8780).audit,r(3441).auditTime,r(4234).buffer,r(7650).bufferCount,r(4360).bufferTime,r(3381).bufferToggle,r(1069).bufferWhen,r(5916).catchError,r(239).combineAll,r(9397).combineLatest,r(6255).concat,r(208).concatAll,r(2209).concatMap,r(3232).concatMapTo,r(5476).count,r(9768).debounce,r(2661).debounceTime,r(952).defaultIfEmpty,r(7436).delay,r(1136).delayWhen,r(6051).dematerialize,r(5343).distinct,r(8179).distinctUntilChanged,r(3670).distinctUntilKeyChanged,r(7366).elementAt,r(1650).endWith,r(2472).every,r(5893).exhaust,r(9219).exhaustMap,r(6527).expand,r(4629).filter,r(4349).finalize,r(2376).find,r(8674).findIndex,r(7089).first,r(6217).groupBy,r(6024).ignoreElements,r(7362).isEmpty,r(6047).last,t.map=r(9233).map,r(7296).mapTo,r(5434).materialize,r(7001).max,r(4779).merge,r(980).mergeAll;var n=r(781);n.mergeMap,n.flatMap,r(2988).mergeMapTo,r(6430).mergeScan,r(1547).min,r(9529).multicast,r(4654).observeOn,r(5276).onErrorResumeNext,r(8155).pairwise,r(7337).partition,r(6050).pluck,r(6904).publish,r(2334).publishBehavior,r(232).publishLast,r(4355).publishReplay,r(9646).race,r(1929).reduce,r(68).repeat,r(8440).repeatWhen,r(9933).retry,r(3325).retryWhen,r(5203).refCount,r(7677).sample,r(8360).sampleTime,r(5002).scan,r(4332).sequenceEqual,r(9184).share,r(1451).shareReplay,r(6003).single,r(7124).skip,r(1444).skipLast,r(1026).skipUntil,r(9159).skipWhile,r(9155).startWith,r(162).subscribeOn,r(1324).switchAll,r(917).switchMap,r(5428).switchMapTo,t.take=r(5624).take,r(6696).takeLast,r(1534).takeUntil,r(5179).takeWhile,r(8022).tap,r(5019).throttle,r(7406).throttleTime,r(8347).throwIfEmpty,r(1115).timeInterval,r(2784).timeout,r(5816).timeoutWith,r(2748).timestamp,r(9133).toArray,r(2363).window,r(2216).windowCount,r(3886).windowTime,r(3903).windowToggle,r(7539).windowWhen,r(6788).withLatestFrom,r(4868).zip,r(5517).zipAll},1565(e,t,r){"use strict";let n=Symbol("SemVer ANY");class o{static get ANY(){return n}constructor(e,t){if(t=i(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?a[s.COMPARATORLOOSE]:a[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=i(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 i=r(3990),{safeRe:a,t:s}=r(2841),l=r(4004),u=r(1361),c=r(4517),d=r(7476)},7476(e,t,r){"use strict";let n=/\s+/g;class o{constructor(e,t){if(t=a(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=>!g(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&&b(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&&m)|(this.options.loose&&y))+":"+e,r=i.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,T(this.options.includePrerelease))),l("comparator trim",e=e.replace(c[d.COMPARATORTRIM],p)),l("tilde trim",e=e.replace(c[d.TILDETRIM],f)),l("caret trim",e=e.replace(c[d.CARETTRIM],h));let a=e.split(" ").map(e=>w(e,this.options)).join(" ").split(/\s+/).map(e=>j(e,this.options));n&&(a=a.filter(e=>(l("loose invalid filter",e,this.options),!!e.match(c[d.COMPARATORLOOSE])))),l("range list",a);let u=new Map;for(let e of a.map(e=>new s(e,this.options))){if(g(e))return[e];u.set(e.value,e)}u.size>1&&u.has("")&&u.delete("");let b=[...u.values()];return i.set(t,b),b}intersects(e,t){if(!(e instanceof o))throw TypeError("a Range is required");return this.set.some(r=>v(r,t)&&e.set.some(e=>v(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(R(this.set[t],e,this.options))return!0;return!1}}e.exports=o;let i=new(r(8953)),a=r(3990),s=r(1565),l=r(1361),u=r(4517),{safeRe:c,t:d,comparatorTrimReplace:p,tildeTrimReplace:f,caretTrimReplace:h}=r(2841),{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:y}=r(9543),g=e=>"<0.0.0-0"===e.value,b=e=>""===e.value,v=(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=D(e,t)),l("tildes",e=E(e,t)),l("xrange",e=P(e,t)),l("stars",e=C(e,t)),e),x=e=>!e||"x"===e.toLowerCase()||"*"===e,E=(e,t)=>e.trim().split(/\s+/).map(e=>S(e,t)).join(" "),S=(e,t)=>{let r=t.loose?c[d.TILDELOOSE]:c[d.TILDE];return e.replace(r,(t,r,n,o,i)=>{let a;return l("tilde",e,t,r,n,o,i),x(r)?a="":x(n)?a=`>=${r}.0.0 <${+r+1}.0.0-0`:x(o)?a=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:i?(l("replaceTilde pr",i),a=`>=${r}.${n}.${o}-${i} <${r}.${+n+1}.0-0`):a=`>=${r}.${n}.${o} <${r}.${+n+1}.0-0`,l("tilde return",a),a})},D=(e,t)=>e.trim().split(/\s+/).map(e=>O(e,t)).join(" "),O=(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,i,a)=>{let s;return l("caret",e,t,r,o,i,a),x(r)?s="":x(o)?s=`>=${r}.0.0${n} <${+r+1}.0.0-0`:x(i)?s="0"===r?`>=${r}.${o}.0${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.0${n} <${+r+1}.0.0-0`:a?(l("replaceCaret pr",a),s="0"===r?"0"===o?`>=${r}.${o}.${i}-${a} <${r}.${o}.${+i+1}-0`:`>=${r}.${o}.${i}-${a} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${i}-${a} <${+r+1}.0.0-0`):(l("no pr"),s="0"===r?"0"===o?`>=${r}.${o}.${i}${n} <${r}.${o}.${+i+1}-0`:`>=${r}.${o}.${i}${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${i} <${+r+1}.0.0-0`),l("caret return",s),s})},P=(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,i,a,s)=>{l("xRange",e,r,n,o,i,a,s);let u=x(o),c=u||x(i),d=c||x(a);return"="===n&&d&&(n=""),s=t.includePrerelease?"-0":"",u?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&d?(c&&(i=0),a=0,">"===n?(n=">=",c?(o=+o+1,i=0):i=+i+1,a=0):"<="===n&&(n="<",c?o=+o+1:i=+i+1),"<"===n&&(s="-0"),r=`${n+o}.${i}.${a}${s}`):c?r=`>=${o}.0.0${s} <${+o+1}.0.0-0`:d&&(r=`>=${o}.${i}.0${s} <${o}.${+i+1}.0-0`),l("xRange return",r),r})},C=(e,t)=>(l("replaceStars",e,t),e.trim().replace(c[d.STAR],"")),j=(e,t)=>(l("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?d.GTE0PRE:d.GTE0],"")),T=e=>(t,r,n,o,i,a,s,l,u,c,d,p)=>(r=x(n)?"":x(o)?`>=${n}.0.0${e?"-0":""}`:x(i)?`>=${n}.${o}.0${e?"-0":""}`:a?`>=${r}`:`>=${r}${e?"-0":""}`,l=x(u)?"":x(c)?`<${+u+1}.0.0-0`:x(d)?`<${u}.${+c+1}.0-0`:p?`<=${u}.${c}.${d}-${p}`:e?`<${u}.${c}.${+d+1}-0`:`<=${l}`,`${r} ${l}`.trim()),R=(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}},4517(e,t,r){"use strict";let n=r(1361),{MAX_LENGTH:o,MAX_SAFE_INTEGER:i}=r(9543),{safeRe:a,t:s}=r(2841),l=r(3990),{compareIdentifiers:u}=r(3806);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?a[s.LOOSE]:a[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>i||this.major<0)throw TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>i||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<i)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?a[s.PRERELEASELOOSE]:a[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},2281(e,t,r){"use strict";let n=r(3955);e.exports=(e,t)=>{let r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},4004(e,t,r){"use strict";let n=r(8848),o=r(8220),i=r(9761),a=r(2386),s=r(1262),l=r(9639);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 i(e,r,u);case">=":return a(e,r,u);case"<":return s(e,r,u);case"<=":return l(e,r,u);default:throw TypeError(`Invalid operator: ${t}`)}}},6783(e,t,r){"use strict";let n=r(4517),o=r(3955),{safeRe:i,t:a}=r(2841);e.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let n,o=t.includePrerelease?i[a.COERCERTLFULL]:i[a.COERCERTL];for(;(n=o.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&n.index+n[0].length===r.index+r[0].length||(r=n),o.lastIndex=n.index+n[1].length+n[2].length;o.lastIndex=-1}else r=e.match(t.includePrerelease?i[a.COERCEFULL]:i[a.COERCE]);if(null===r)return null;let s=r[2],l=r[3]||"0",u=r[4]||"0",c=t.includePrerelease&&r[5]?`-${r[5]}`:"",d=t.includePrerelease&&r[6]?`+${r[6]}`:"";return o(`${s}.${l}.${u}${c}${d}`,t)}},6106(e,t,r){"use strict";let n=r(4517);e.exports=(e,t,r)=>{let o=new n(e,r),i=new n(t,r);return o.compare(i)||o.compareBuild(i)}},2132(e,t,r){"use strict";let n=r(7851);e.exports=(e,t)=>n(e,t,!0)},7851(e,t,r){"use strict";let n=r(4517);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},3269(e,t,r){"use strict";let n=r(3955);e.exports=(e,t)=>{let r=n(e,null,!0),o=n(t,null,!0),i=r.compare(o);if(0===i)return null;let a=i>0,s=a?r:o,l=a?o:r,u=!!s.prerelease.length;if(l.prerelease.length&&!u){if(!l.patch&&!l.minor)return"major";if(0===l.compareMain(s))return l.minor&&!l.patch?"minor":"patch"}let c=u?"pre":"";return r.major!==o.major?c+"major":r.minor!==o.minor?c+"minor":r.patch!==o.patch?c+"patch":"prerelease"}},8848(e,t,r){"use strict";let n=r(7851);e.exports=(e,t,r)=>0===n(e,t,r)},9761(e,t,r){"use strict";let n=r(7851);e.exports=(e,t,r)=>n(e,t,r)>0},2386(e,t,r){"use strict";let n=r(7851);e.exports=(e,t,r)=>n(e,t,r)>=0},8868(e,t,r){"use strict";let n=r(4517);e.exports=(e,t,r,o,i)=>{"string"==typeof r&&(i=o,o=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,o,i).version}catch(e){return null}}},1262(e,t,r){"use strict";let n=r(7851);e.exports=(e,t,r)=>0>n(e,t,r)},9639(e,t,r){"use strict";let n=r(7851);e.exports=(e,t,r)=>0>=n(e,t,r)},6381(e,t,r){"use strict";let n=r(4517);e.exports=(e,t)=>new n(e,t).major},1353(e,t,r){"use strict";let n=r(4517);e.exports=(e,t)=>new n(e,t).minor},8220(e,t,r){"use strict";let n=r(7851);e.exports=(e,t,r)=>0!==n(e,t,r)},3955(e,t,r){"use strict";let n=r(4517);e.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}},6082(e,t,r){"use strict";let n=r(4517);e.exports=(e,t)=>new n(e,t).patch},9428(e,t,r){"use strict";let n=r(3955);e.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}},7555(e,t,r){"use strict";let n=r(7851);e.exports=(e,t,r)=>n(t,e,r)},3810(e,t,r){"use strict";let n=r(6106);e.exports=(e,t)=>e.sort((e,r)=>n(r,e,t))},7229(e,t,r){"use strict";let n=r(7476);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},4042(e,t,r){"use strict";let n=r(6106);e.exports=(e,t)=>e.sort((e,r)=>n(e,r,t))},8474(e,t,r){"use strict";let n=r(3955);e.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}},2722(e,t,r){"use strict";let n=r(2841),o=r(9543),i=r(4517),a=r(3806),s=r(3955),l=r(8474),u=r(2281),c=r(8868),d=r(3269),p=r(6381),f=r(1353),h=r(6082),m=r(9428),y=r(7851),g=r(7555),b=r(2132),v=r(6106),w=r(4042),x=r(3810),E=r(9761),S=r(1262),D=r(8848),O=r(8220),P=r(2386),k=r(9639),C=r(4004),j=r(6783),T=r(1565),R=r(7476),N=r(7229),A=r(6364),$=r(5039),I=r(5357),M=r(1280),L=r(7403),F=r(8854),B=r(7226),V=r(7183),U=r(8623);e.exports={parse:s,valid:l,clean:u,inc:c,diff:d,major:p,minor:f,patch:h,prerelease:m,compare:y,rcompare:g,compareLoose:b,compareBuild:v,sort:w,rsort:x,gt:E,lt:S,eq:D,neq:O,gte:P,lte:k,cmp:C,coerce:j,Comparator:T,Range:R,satisfies:N,toComparators:A,maxSatisfying:$,minSatisfying:I,minVersion:M,validRange:L,outside:F,gtr:B,ltr:V,intersects:U,simplifyRange:r(6486),subset:r(583),SemVer:i,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:o.SEMVER_SPEC_VERSION,RELEASE_TYPES:o.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}},9543(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}},1361(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):()=>{}},3806(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)}},8953(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}}},3990(e){"use strict";let t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},2841(e,t,r){"use strict";let{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:i}=r(9543),a=r(1361),s=(t=e.exports={}).re=[],l=t.safeRe=[],u=t.src=[],c=t.safeSrc=[],d=t.t={},p=0,f="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",i],[f,o]],m=(e,t,r)=>{let n=(e=>{for(let[t,r]of h)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),o=p++;a(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)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),m("MAINVERSION",`(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASE",`(?:-(${u[d.PRERELEASEIDENTIFIER]}(?:\\.${u[d.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${u[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[d.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${f}+`),m("BUILD",`(?:\\+(${u[d.BUILDIDENTIFIER]}(?:\\.${u[d.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${u[d.MAINVERSION]}${u[d.PRERELEASE]}?${u[d.BUILD]}?`),m("FULL",`^${u[d.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${u[d.MAINVERSIONLOOSE]}${u[d.PRERELEASELOOSE]}?${u[d.BUILD]}?`),m("LOOSE",`^${u[d.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${u[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${u[d.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:${u[d.PRERELEASE]})?${u[d.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:${u[d.PRERELEASELOOSE]})?${u[d.BUILD]}?)?)?`),m("XRANGE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),m("COERCE",`${u[d.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",u[d.COERCEPLAIN]+`(?:${u[d.PRERELEASE]})?`+`(?:${u[d.BUILD]})?`+"(?:$|[^\\d])"),m("COERCERTL",u[d.COERCE],!0),m("COERCERTLFULL",u[d.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${u[d.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",m("TILDE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${u[d.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",m("CARET",`^${u[d.LONECARET]}${u[d.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${u[d.LONECARET]}${u[d.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${u[d.GTLT]}\\s*(${u[d.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]}|${u[d.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${u[d.XRANGEPLAIN]})\\s+-\\s+(${u[d.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${u[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[d.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},7226(e,t,r){"use strict";let n=r(8854);e.exports=(e,t,r)=>n(e,t,">",r)},8623(e,t,r){"use strict";let n=r(7476);e.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))},7183(e,t,r){"use strict";let n=r(8854);e.exports=(e,t,r)=>n(e,t,"<",r)},5039(e,t,r){"use strict";let n=r(4517),o=r(7476);e.exports=(e,t,r)=>{let i=null,a=null,s=null;try{s=new o(t,r)}catch(e){return null}return e.forEach(e=>{s.test(e)&&(!i||-1===a.compare(e))&&(a=new n(i=e,r))}),i}},5357(e,t,r){"use strict";let n=r(4517),o=r(7476);e.exports=(e,t,r)=>{let i=null,a=null,s=null;try{s=new o(t,r)}catch(e){return null}return e.forEach(e=>{s.test(e)&&(!i||1===a.compare(e))&&(a=new n(i=e,r))}),i}},1280(e,t,r){"use strict";let n=r(4517),o=r(7476),i=r(9761);e.exports=(e,t)=>{e=new o(e,t);let r=new n("0.0.0");if(e.test(r)||(r=new n("0.0.0-0"),e.test(r)))return r;r=null;for(let t=0;t<e.set.length;++t){let o=e.set[t],a=null;o.forEach(e=>{let t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!a||i(t,a))&&(a=t);break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),a&&(!r||i(r,a))&&(r=a)}return r&&e.test(r)?r:null}},8854(e,t,r){"use strict";let n=r(4517),o=r(1565),{ANY:i}=o,a=r(7476),s=r(7229),l=r(9761),u=r(1262),c=r(9639),d=r(2386);e.exports=(e,t,r,p)=>{let f,h,m,y,g;switch(e=new n(e,p),t=new a(t,p),r){case">":f=l,h=c,m=u,y=">",g=">=";break;case"<":f=u,h=d,m=l,y="<",g="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,t,p))return!1;for(let r=0;r<t.set.length;++r){let n=t.set[r],a=null,s=null;if(n.forEach(e=>{e.semver===i&&(e=new o(">=0.0.0")),a=a||e,s=s||e,f(e.semver,a.semver,p)?a=e:m(e.semver,s.semver,p)&&(s=e)}),a.operator===y||a.operator===g||(!s.operator||s.operator===y)&&h(e,s.semver)||s.operator===g&&m(e,s.semver))return!1}return!0}},6486(e,t,r){"use strict";let n=r(7229),o=r(7851);e.exports=(e,t,r)=>{let i=[],a=null,s=null,l=e.sort((e,t)=>o(e,t,r));for(let e of l)n(e,t,r)?(s=e,a||(a=e)):(s&&i.push([a,s]),s=null,a=null);a&&i.push([a,null]);let u=[];for(let[e,t]of i)e===t?u.push(e):t||e!==l[0]?t?e===l[0]?u.push(`<=${t}`):u.push(`${e} - ${t}`):u.push(`>=${e}`):u.push("*");let c=u.join(" || "),d="string"==typeof t.raw?t.raw:String(t);return c.length<d.length?c:t}},583(e,t,r){"use strict";let n=r(7476),o=r(1565),{ANY:i}=o,a=r(7229),s=r(7851),l=[new o(">=0.0.0-0")],u=[new o(">=0.0.0")],c=(e,t,r)=>{let n,o,c,f,h,m,y;if(e===t)return!0;if(1===e.length&&e[0].semver===i)if(1===t.length&&t[0].semver===i)return!0;else e=r.includePrerelease?l:u;if(1===t.length&&t[0].semver===i)if(r.includePrerelease)return!0;else t=u;let g=new Set;for(let t of e)">"===t.operator||">="===t.operator?n=d(n,t,r):"<"===t.operator||"<="===t.operator?o=p(o,t,r):g.add(t.semver);if(g.size>1)return null;if(n&&o&&((c=s(n.semver,o.semver,r))>0||0===c&&(">="!==n.operator||"<="!==o.operator)))return null;for(let e of g){if(n&&!a(e,String(n),r)||o&&!a(e,String(o),r))return null;for(let n of t)if(!a(e,String(n),r))return!1;return!0}let b=!!o&&!r.includePrerelease&&!!o.semver.prerelease.length&&o.semver,v=!!n&&!r.includePrerelease&&!!n.semver.prerelease.length&&n.semver;for(let e of(b&&1===b.prerelease.length&&"<"===o.operator&&0===b.prerelease[0]&&(b=!1),t)){if(y=y||">"===e.operator||">="===e.operator,m=m||"<"===e.operator||"<="===e.operator,n){if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),">"===e.operator||">="===e.operator){if((f=d(n,e,r))===e&&f!==n)return!1}else if(">="===n.operator&&!a(n.semver,String(e),r))return!1}if(o){if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),"<"===e.operator||"<="===e.operator){if((h=p(o,e,r))===e&&h!==o)return!1}else if("<="===o.operator&&!a(o.semver,String(e),r))return!1}if(!e.operator&&(o||n)&&0!==c)return!1}return(!n||!m||!!o||0===c)&&(!o||!y||!!n||0===c)&&!v&&!b&&!0},d=(e,t,r)=>{if(!e)return t;let n=s(e.semver,t.semver,r);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},p=(e,t,r)=>{if(!e)return t;let n=s(e.semver,t.semver,r);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let o=!1;e:for(let n of e.set){for(let e of t.set){let t=c(n,e,r);if(o=o||null!==t,t)continue e}if(o)return!1}return!0}},6364(e,t,r){"use strict";let n=r(7476);e.exports=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" "))},7403(e,t,r){"use strict";let n=r(7476);e.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}},4557(e,t,r){"use strict";let n,o,i,a,s,l,u,c,d,p,f,h;r.r(t),r.d(t,{GenderUnknownIcon:()=>gv,evaluateAsNumber:()=>pZ,getImportMapOverrideMap:()=>sP,StockManagementPictogram:()=>kh,ChemistryIcon:()=>gt,BabyIcon:()=>y0,DashboardExtension:()=>bv,openmrsComponentDecorator:()=>mi,tryRegisterExtension:()=>yw,pictogramIds:()=>PQ,ActivityIcon:()=>yq,compile:()=>pQ,removeRouteMapOverride:()=>s4,checkStatus:()=>fg,TableBatchActions:()=>yM,getAsyncLifecycle:()=>ms,subscribeOpenmrsEvent:()=>pE,dispatchConnectivityChanged:()=>y,PasswordIcon:()=>gW,Assessment2Pictogram:()=>P4,CloseIcon:()=>ga,setupRouteMapOverrides:()=>s5,getWorkspaceGroupRegistration:()=>hf,registerWorkspace:()=>hu,useFeatureFlag:()=>mF,reset:()=>he,LabOrderIcon:()=>gC,VisitMode:()=>pC,offlineUuidPrefix:()=>pe,useLocations:()=>m6,getLifecycle:()=>ma,formatDatetime:()=>D4,getVisitsForPatient:()=>pM,subscribeConnectivity:()=>b,formatPartialDate:()=>DQ,CustomOverflowMenu:()=>yz,LocationIcon:()=>gT,GroupIcon:()=>g_,canBeginEditSynchronizationItemsOfType:()=>d2,VisitStatus:()=>pj,createUseStore:()=>hF,getCurrentImportMap:()=>sF,getSessionLocation:()=>aD,usePatient:()=>yr,useRenderableExtensions:()=>yo,getOpenedWindowIndexByWorkspace:()=>hg,checkStatusFor:()=>fb,clearHistory:()=>ai,clearConfigErrors:()=>og,formatTime:()=>D2,isDevEnabled:()=>aC,setLeftNav:()=>hr,syncOfflinePatientData:()=>pb,closeWorkspaceGroup2:()=>Cb,getCurrentRouteMap:()=>sX,ConfigurableLink:()=>hR,sessionStore:()=>ay,subscribeSnackbarShown:()=>A,getDynamicOfflineDataEntriesFor:()=>ps,getLoggedInUser:()=>aS,GenderMaleIcon:()=>gg,getExtensionSlotConfigFromStore:()=>nN,evaluateAsNumberAsync:()=>pY,putDynamicOfflineDataFor:()=>pu,getImportMapDefaultMap:()=>sD,unregisterExtensionRendering:()=>fC,implementerToolsConfigStore:()=>nG,Type:()=>nv,InPatientPictogram:()=>kn,cleanupObsoleteFeatureFlags:()=>fd,getAttachmentsUrl:()=>le,showSnackbar:()=>kk,PatientBannerActionsMenu:()=>PH,PatientSearchPictogram:()=>ks,DocumentAttachmentIcon:()=>gc,Snackbar:()=>kE,CardiologyPictogram:()=>P6,ImageMedicalIcon:()=>gS,ActionableNotificationComponent:()=>Pc,DiagnosisTags:()=>OJ,iconIds:()=>yG,PatientsPictogram:()=>kl,interpolateUrl:()=>i7,setupHistory:()=>ar,subscribeToastShown:()=>N,detachAll:()=>f6,convertToLocaleCalendar:()=>D3,DocumentIcon:()=>gu,configInternalStore:()=>nP,ActionMenuButton2:()=>CA,setupDynamicOfflineDataHandler:()=>pi,makeUrl:()=>ap,oneOf:()=>oS,selectPreferredName:()=>PA,launchWorkspaceGroup:()=>function e(t,r){let n=hf(t),{state:o,onWorkspaceGroupLaunch:i,workspaceGroupCleanup:a,workspaceToLaunch:s}=r,l=function(){return kq}();if(l.getState().openWorkspaces.length){let n=l.getState().workspaceGroup;n?kI(n?.name,()=>{e(t,r)}):kX(()=>{e(t,r)})}else l.setState(e=>({...e,workspaceGroup:{name:t,members:n.members,cleanup:a}})),k4(t,o),i?.(),s&&kL(s.name,s.additionalProps??{})},syncDynamicOfflineData:()=>pf,MobileCheckIcon:()=>gM,createErrorHandler:()=>I,openmrsObservableFetch:()=>ah,parseDate:()=>DG,getAttachmentByUuid:()=>s9,LeftNavMenu:()=>O4,getExtensionRegistration:()=>f1,ShoppingCartAddItemIcon:()=>by,ReferralOrderIcon:()=>gZ,ReportIcon:()=>gJ,dispatchToastShown:()=>j,getImportMapNextPageMap:()=>sO,registerExtension:()=>f2,setupOfflineSync:()=>d6,DownloadIcon:()=>gd,useConnectivity:()=>mj,provide:()=>n5,getSynchronizationItemsFor:()=>dJ,ShoppingCartArrowDownIcon:()=>g3,featureFlagsStore:()=>fu,promptBeforeClosing:()=>kV,removeDynamicOfflineDataFor:()=>pd,jsep:()=>pB,GeriatricsPictogram:()=>kt,SearchIcon:()=>g0,reportError:()=>$,slugify:()=>sI,isOmrsDateToday:()=>Dz,getExtensionStore:()=>fj,BloodBankPictogram:()=>P3,TriagePictogram:()=>ky,Workspace2:()=>Ck,refetchCurrentUser:()=>a_,CheckmarkOutlineIcon:()=>ge,registerExtensionSlot:()=>f8,AllergiesIcon:()=>bp,ArrowDownIcon:()=>yY,useOpenmrsInfinite:()=>mq,getExtensionConfigFromExtensionSlotStore:()=>nM,OpenmrsDatePicker:()=>OZ,getExtensionConfigFromStore:()=>nI,getDynamicOfflineDataEntries:()=>pa,getLocaleDisplayName:()=>Du,messageOmrsServiceWorker:()=>lv,navigate:()=>i8,launchWorkspace2:()=>Cv,getGroupByWindowName:()=>hy,CustomOverflowMenuItem:()=>yK,isUrl:()=>oE,CaretDownIcon:()=>y4,ArrowLeftIcon:()=>yJ,FacilityPictogram:()=>ke,ViewOffIcon:()=>bu,setCurrentOfflineMode:()=>lP,updateInternalExtensionStore:()=>fE,dispatchActionableNotificationShown:()=>k,resetRouteMapOverrides:()=>s3,formatDurationBetween:()=>Or,defaultVisitCustomRepresentation:()=>pT,getBreadcrumbsFor:()=>oN,useOpenmrsPagination:()=>mV,Pagination:()=>PC,CheckmarkFilledIcon:()=>y8,clearCurrentUser:()=>ax,showModal:()=>Ps,ChevronUpIcon:()=>gi,saveVisit:()=>p$,useAttachments:()=>mS,Pictogram:()=>k_,useExtensionSlot:()=>hK,ChevronDownIcon:()=>gr,OpenmrsDateRangePicker:()=>OY,deleteAttachmentPermanently:()=>lr,getVisitTypes:()=>pk,OverflowMenuHorizontalIcon:()=>gV,EventScheduleIcon:()=>gh,getSessionStore:()=>av,ActionMenu:()=>Ch,ProcedureOrderIcon:()=>gG,preloadImport:()=>sL,registerWorkspaceWindows2:()=>hv,useOnVisible:()=>m7,setSessionLocation:()=>aO,userHasAccess:()=>aE,ChartAverageIcon:()=>y7,getFeatureFlag:()=>fp,UserAvatarIcon:()=>bi,renderExtension:()=>hk,useFhirInfinite:()=>mQ,toVisitTypeObject:()=>pP,useSession:()=>yi,EmergencyDepartmentPictogram:()=>P8,Notification:()=>Pl,dispatchSnackbarShown:()=>C,getSynchronizationItem:()=>d1,navigateAndLaunchWorkspace:()=>kF,omrsOfflineCachingStrategyHttpHeaderName:()=>lb,formatDate:()=>D0,workspace2StoreActions:()=>Cx,SwitcherIcon:()=>g2,esmStyleGuideSchema:()=>yA,getImportMapDisabledOverrides:()=>sk,useAssignedExtensionIds:()=>mx,CaretRightIcon:()=>y6,evaluateAsType:()=>pJ,PageHeader:()=>PP,TranslateIcon:()=>bt,setUserProperties:()=>aP,MovementIcon:()=>gB,renderInlineNotifications:()=>Pb,subscribePrecacheStaticDependencies:()=>x,PaymentsDeskPictogram:()=>ku,usePrimaryIdentifierCode:()=>yn,dispatchPrecacheStaticDependencies:()=>w,getCurrentUser:()=>ab,useLayoutType:()=>m1,XrayPictogram:()=>kg,CaretUpIcon:()=>y5,renderActionableNotifications:()=>Pw,OpenmrsAppContext:()=>mg,setupModals:()=>Pa,omrsOfflineResponseBodyHttpHeaderName:()=>ly,getDefaultsFromConfigSchema:()=>function e(t){let r={};for(let n of Object.keys(t))if(CX(t[n])&&t[n].hasOwnProperty("_default"))r[n]=t[n]._default;else{if(n.startsWith("_"))continue;CX(t[n])?r[n]=e(t[n]):r[n]=t[n]}return r},subscribeTo:()=>J,recordConfigDerivationError:()=>nK,useAbortController:()=>mv,Extension:()=>hN,getFhirServerPaginationHandlers:()=>mK,useConnectedExtensions:()=>mC,registerApp:()=>yx,queueSynchronizationItemFor:()=>dZ,HospitalBedIcon:()=>gE,useExtensionInternalStore:()=>mI,configExtensionStore:()=>nC,getSynchronizationItems:()=>dQ,getExtensionSlotsConfigStore:()=>nT,registerExtensionRendering:()=>fk,RenderIfValueIsTruthy:()=>mb,registerFeatureFlag:()=>fc,useFhirFetchAll:()=>mX,restBaseUrl:()=>au,CalendarHeatMapIcon:()=>y1,getWorkspaceRegistration:()=>hp,isImportMapOverrideDisabled:()=>sC,resetConfigSystem:()=>ob,getFullSynchronizationItems:()=>d0,getExtensionInternalStore:()=>f_,registerGlobalStore:()=>Z,runSynchronization:()=>dH,evaluateAsBoolean:()=>pG,PatientBannerPatientInfo:()=>Pz,addRouteMapOverride:()=>s2,getDefaultCalendar:()=>DJ,SettingsIcon:()=>g1,DrugOrderIcon:()=>gp,isOnline:()=>fm,ProgramsIcon:()=>gq,useAssignedExtensions:()=>hz,CloseFilledIcon:()=>gs,canAccessStorage:()=>CJ,registerDefaultCalendar:()=>DY,TreeViewAltIcon:()=>bn,OverflowMenuVerticalIcon:()=>gU,clearConfigDerivationError:()=>nH,getConfigStore:()=>nj,registerWorkspaceGroup:()=>hc,InformationSquareIcon:()=>gP,EmptyCard:()=>O0,ChevronLeftIcon:()=>gn,RadiologyIcon:()=>bm,useCandidateExtensions:()=>mE,renderToasts:()=>kN,isDesktop:()=>m2,integrateBreakpoints:()=>yP,RegistrationPictogram:()=>kp,CardHeader:()=>yT,getExtensionRegistrationFrom:()=>f0,InformationIcon:()=>gD,TrashCanIcon:()=>br,useShallowStableValue:()=>hA,useOpenmrsSWR:()=>m9,Assessment1Pictogram:()=>P2,finishRegisteringAllApps:()=>yE,importDynamic:()=>sM,useFhirPagination:()=>mz,useVisitContextStore:()=>yf,ArrowUpIcon:()=>yQ,showActionableNotification:()=>P_,getDynamicOfflineDataHandlers:()=>po,useForceUpdate:()=>mB,updateWorkspaceWindowState:()=>kY,useVisit:()=>yh,PatientBannerPatientIdentifiers:()=>PB,WorkspaceNotification:()=>Co,TransferPictogram:()=>km,usePagination:()=>m8,Breakpoint:()=>yS,PatientBannerToggleContactDetailsButton:()=>C$,CloseOutlineIcon:()=>gl,ObstetricsPictogram:()=>ka,parseDateInput:()=>D5,getConfig:()=>n9,attach:()=>f4,getLocale:()=>Dc,ActionMenuButton:()=>k9,isUrlWithTemplateParameters:()=>ox,useEmrConfiguration:()=>m$,useLeftNav:()=>m4,ToolsIcon:()=>be,ErrorState:()=>O1,detach:()=>f3,setCurrentVisit:()=>pA,registerOmrsServiceWorker:()=>lh,ConditionsIcon:()=>bh,SaveIcon:()=>gQ,activateOfflineCapability:()=>lk,useWorkspaces:()=>kQ,resetWorkspaceStore:()=>k2,useConfig:()=>mk,validator:()=>nw,CalendarIcon:()=>y2,getHistory:()=>an,StickyNoteAddIcon:()=>g6,useWorkspace2Store:()=>CE,getPatientName:()=>Pj,getVisitStore:()=>pN,getCoreTranslation:()=>sf,registerModuleWithConfigSystem:()=>n2,isOfflineUuid:()=>pr,registerModuleLoad:()=>n4,getBreadcrumbs:()=>oj,extractVariableNames:()=>fa,getOfflineSynchronizationStore:()=>dK,translateFrom:()=>sp,EditIcon:()=>gf,useStoreWithActions:()=>hL,getCandidateExtensions:()=>f9,putDynamicOfflineData:()=>pl,shallowEqual:()=>L,subscribeNotificationShown:()=>T,MaximizeIcon:()=>gN,promptForClosingWorkspaces:()=>C_,WarningIcon:()=>bd,closeAllWorkspaces:()=>kX,fhirBaseUrl:()=>ac,matchLocale:()=>CY,registerBreadcrumb:()=>ok,usePatientPhoto:()=>PZ,EventsIcon:()=>gm,createGlobalStore:()=>q,workspaceStore:()=>kq,getCurrentOfflineMode:()=>lO,subscribeToFeatureFlag:()=>ff,useExtensionStore:()=>mL,closeWorkspace:()=>kK,createAttachment:()=>lt,useLeftNavStore:()=>m3,TableIcon:()=>g9,Icon:()=>bb,InformationFilledIcon:()=>gO,getCurrentPageMap:()=>sS,LaboratoryPictogram:()=>ko,temporaryConfigStore:()=>nk,getPromptBeforeClosingFcn:()=>kU,toDateObjectStrict:()=>DK,defineConfigSchema:()=>n1,filterBreadcrumbs:()=>oR,invalidateImplementerToolsConfig:()=>nW,PatientBannerContactDetails:()=>CV,getAssignedExtensions:()=>f7,PatientPhoto:()=>PX,MaterialOrderIcon:()=>gR,MicroscopeIcon:()=>gI,scheduleRecomputation:()=>f$,PharmacyPictogram:()=>kc,AttachmentIcon:()=>bf,MoneyIcon:()=>gL,getAttachments:()=>s8,getFullSynchronizationItemsFor:()=>dX,PageHeaderContent:()=>Pk,MedicationIcon:()=>gA,PrinterIcon:()=>gH,getWorkspaceGroupStore:()=>k4,PatientListsPictogram:()=>kv,useAppContext:()=>mw,isOpenmrsRoutes:()=>sU,AppointmentsAltPictogram:()=>P1,GenericOrderTypeIcon:()=>gw,batchExtensionUpdates:()=>fN,useExtensionSlotStore:()=>hU,ViewIcon:()=>bc,formattedName:()=>PN,sessionEndpoint:()=>ad,duration:()=>Oe,resetImportMapOverrides:()=>sR,TableOfContentsIcon:()=>g7,CaretLeftIcon:()=>y3,getTranslationOverrides:()=>n8,isVersionSatisfied:()=>C1,EmptyCardIllustration:()=>OQ,PenIcon:()=>gK,getWorkspaceStore:()=>kZ,registerOfflinePatientHandler:()=>pg,setupImportMapOverrides:()=>s$,showToast:()=>kA,useDefineAppContext:()=>my,validators:()=>oD,getGlobalStore:()=>Y,useOnClickOutside:()=>m5,getWindowByWorkspaceName:()=>hm,ArrowRightIcon:()=>yX,loadLifeCycles:()=>yg,registerBreadcrumbs:()=>oC,MotherIcon:()=>gF,fetchCurrentPatient:()=>pw,Toast:()=>kC,MessageQueueIcon:()=>g$,TwoFactorAuthenticationIcon:()=>bo,Pharmacy2Pictogram:()=>kd,goBackInHistory:()=>ao,GroupAccessIcon:()=>gx,getExtensionRenderingsStore:()=>fx,setImplementerToolsConfigRecomputer:()=>nU,getAsyncExtensionLifecycle:()=>mu,setupApiModule:()=>aT,renderLoadingSpinner:()=>CU,WorkspaceContainer:()=>Cm,showNotification:()=>Pv,queueSynchronizationItem:()=>dY,getModalRegistration:()=>ha,ListCheckedIcon:()=>gj,ResponsiveWrapper:()=>kx,GynaecologyPictogram:()=>kr,ShoppingCartIcon:()=>g4,getRouteMapNextPageMap:()=>s0,updateVisit:()=>pI,backendDependencies:()=>aj,MaybePictogram:()=>kw,beginEditSynchronizationItem:()=>d4,createParcelMounter:()=>hO,getStartedVisit:()=>pL,omrsOfflineResponseStatusHttpHeaderName:()=>lg,isOpenmrsAppRoutes:()=>sV,openmrsFetch:()=>af,HomePictogram:()=>kb,DentistryPictogram:()=>P7,ServiceQueuesPictogram:()=>kf,toLanguageTag:()=>Dl,launchWorkspace:()=>kL,setFeatureFlag:()=>fh,useStore:()=>hM,DigitalTrustPictogram:()=>P9,NumericObservation:()=>PD,attachmentUrl:()=>s7,interpolateString:()=>i9,inRange:()=>o_,useExtensionSlotMeta:()=>mM,AppointmentsPictogram:()=>P0,renderSnackbars:()=>kP,getRegisteredWorkspace2Names:()=>CD,toLocationObject:()=>pD,ChartLineIcon:()=>y9,UserHasAccess:()=>ya,evaluateAsBooleanAsync:()=>pq,changeWorkspaceContext:()=>kH,createDashboard:()=>bw,getLocations:()=>pO,getOfflineDb:()=>dV,canCloseWorkspaceWithoutPrompting:()=>k$,getExtensionsConfigStore:()=>nA,getRouteMapDefaultMap:()=>sQ,age:()=>PI,syncAllDynamicOfflineData:()=>pp,isOmrsDateStrict:()=>DW,registerWorkspaceGroups2:()=>hb,usePaginationInfo:()=>ye,evaluateAsync:()=>pH,useOpenmrsFetchAll:()=>mY,removeImportMapOverride:()=>sT,showWorkspacePrompts:()=>k0,useVisitTypes:()=>ym,ageAsDuration:()=>P$,removeDynamicOfflineData:()=>pc,getExtensionNameFromId:()=>fQ,deleteSynchronizationItem:()=>d3,renderParcel:()=>hD,useWorkspace2Context:()=>CS,ResetIcon:()=>gX,RenewIcon:()=>gY,subscribeActionableNotificationShown:()=>R,ErrorCard:()=>O2,GenderFemaleIcon:()=>gy,enableImportMapOverride:()=>sN,getOfflinePatientDataStore:()=>py,retry:()=>C2,ComponentContext:()=>hT,ExtensionSlot:()=>hG,getOmrsServiceWorker:()=>lm,addImportMapOverride:()=>sj,subscribeConnectivityChanged:()=>g,unsetLeftNav:()=>hn,MaybeIcon:()=>bg,useCustomOverflowMenu:()=>yW,PedestrianFamilyIcon:()=>gz,generateOfflineUuid:()=>pt,cancelPrompt:()=>kW,CtScanPictogram:()=>P5,dispatchNotificationShown:()=>P,leftNavStore:()=>ht,OpenmrsFetchError:()=>am,UserFollowIcon:()=>ba,launchWorkspaceGroup2:()=>Cg,ChevronRightIcon:()=>go,UserXrayIcon:()=>bs,GenderOtherIcon:()=>gb,formatDuration:()=>D6,toOmrsIsoString:()=>DH,Labs2Pictogram:()=>ki,workspace2Store:()=>hh,setUserLanguage:()=>aw,useBodyScrollLock:()=>mD,getExtensionConfig:()=>n$,SyringeIcon:()=>g5,LocationPicker:()=>O3,useDebounce:()=>mT,TimeIcon:()=>g8,getExtensionSlotConfig:()=>nR,AddIcon:()=>yZ,getRouteMapOverrideMap:()=>s1,processConfig:()=>oe,InventoryManagementIcon:()=>gk,registerWorkspaces2:()=>hw,UserIcon:()=>bl,formatPatientName:()=>PR,fireOpenmrsEvent:()=>px,registerModal:()=>hi,registerTranslationNamespace:()=>n3,displayName:()=>PT,evaluate:()=>pK,defineExtensionConfigSchema:()=>n6,renderWorkspaceWindowsAndMenu:()=>Cq,getSyncLifecycle:()=>ml,evaluateAsTypeAsync:()=>pX});let m="openmrs:connectivity-changed";function y(e){window.dispatchEvent(new CustomEvent(m,{detail:{online:e}}))}function g(e){if(!window.offlineEnabled)return()=>{};let t=t=>e(t.detail);return window.addEventListener(m,t),()=>window.removeEventListener(m,t)}function b(e){return e({online:!window.offlineEnabled||navigator.onLine}),g(e)}let v="openmrs:precache-static-dependencies";function w(e={}){window.dispatchEvent(new CustomEvent(v,{detail:e}))}function x(e){let t=t=>e(t.detail);return window.addEventListener(v,t),()=>window.removeEventListener(v,t)}let E="openmrs:notification-shown",S="openmrs:actionable-notification-shown",D="openmrs:toast-shown",O="openmrs:snack-bar-shown";function P(e){window.dispatchEvent(new CustomEvent(E,{detail:e}))}function k(e){window.dispatchEvent(new CustomEvent(S,{detail:e}))}function C(e){window.dispatchEvent(new CustomEvent(O,{detail:e}))}function j(e){window.dispatchEvent(new CustomEvent(D,{detail:e}))}function T(e){let t=t=>e(t.detail);return window.addEventListener(E,t),()=>window.removeEventListener(E,t)}function R(e){let t=t=>e(t.detail);return window.addEventListener(S,t),()=>window.removeEventListener(S,t)}function N(e){let t=t=>e(t.detail);return window.addEventListener(D,t),()=>window.removeEventListener(D,t)}function A(e){let t=t=>e(t.detail);return window.addEventListener(O,t),()=>window.removeEventListener(O,t)}function $(e){let t=M(e);setTimeout(()=>{throw t})}function I(){let e=Error();return t=>{let r=M(t);r.stack+=`
|
|
2
2
|
Async stacktrace:
|
|
3
3
|
${e.stack}`,$(t)}}function M(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 L(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 F(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),i=null!=(n=r.getItem(e))?n:null;return i instanceof Promise?i.then(o):o(i)},setItem:(e,n)=>r.setItem(e,JSON.stringify(n,null==t?void 0:t.replacer)),removeItem:e=>r.removeItem(e)}}window.onerror=function(e){return console.error("Unexpected error: ",e),j({description:e??"Oops! An unexpected error occurred.",kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(e){console.error("Unhandled rejection: ",e.reason),j({description:e.reason??"Oops! An unhandled promise rejection occurred.",kind:"error",title:"Error"})};let B=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>B(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>B(t)(e)}}},V=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,i={setState:n,getState:o,getInitialState:()=>a,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()}},a=t=e(n,o,i);return i},U=e=>e?V(e):V;function W(){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 z={},K=Symbol.for("openmrs.esm-state.instanceCount"),H=globalThis,G=(H[K]??0)+1;function q(e,t,r="none"){let n=z[e];if(n)return n.active?W()||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=X(e,t,r);return z[e]={value:n,active:!0},n}}function Z(e,t){let r=z[e];return r?(r.active?W()||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):(z[e]={value:t,active:!0},t)}function Y(e,t,r="none"){let n=z[e];if(!n){let n=X(e,t??{},r);return z[e]={value:n,active:!1},n}return n.value}function J(...e){let[t,r,n]=e,o=void 0===n?r:n,i=void 0===n?e=>e:r,a=i(t.getState());return o(a),t.subscribe(e=>{let t=i(e);L(a,t)||(a=t,o(t))})}function X(e,t,r){return"sessionStorage"===r?U()(((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 i,a,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{i=s.getStorage()}catch(e){}if(!i)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=B(s.serialize),p=()=>{let e,t=d({state:s.partialize({...n()}),version:s.version}).then(e=>i.setItem(s.name,e)).catch(t=>{e=t});if(e)throw e;return t},f=o.setState;o.setState=(e,t)=>{f(e,t),p()};let h=e((...e)=>{r(...e),p()},n,o),m=()=>{var e;if(!i)return;l=!1,u.forEach(e=>e(n()));let t=(null==(e=s.onRehydrateStorage)?void 0:e.call(s,n()))||void 0;return B(i.getItem.bind(i))(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(a=s.merge(e,null!=(t=n())?t:h),!0),p()}).then(()=>{null==t||t(a,void 0),l=!0,c.forEach(e=>e(a))}).catch(e=>{null==t||t(void 0,e)})};return o.persist={setOptions:e=>{s={...s,...e},e.getStorage&&(i=e.getStorage())},clearStorage:()=>{null==i||i.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>m(),hasHydrated:()=>l,onHydrate:e=>(u.add(e),()=>{u.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},m(),a||h};return(r,n,o)=>{let i,a={storage:F(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},s=!1,l=new Set,u=new Set,c=a.storage;if(!c)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(...e)},n,o);let d=()=>{let e=a.partialize({...n()});return c.setItem(a.name,{state:e,version:a.version})},p=o.setState;o.setState=(e,t)=>{p(e,t),d()};let f=e((...e)=>{r(...e),d()},n,o);o.getInitialState=()=>f;let h=()=>{var e,t;if(!c)return;s=!1,l.forEach(e=>{var t;return e(null!=(t=n())?t:f)});let o=(null==(t=a.onRehydrateStorage)?void 0:t.call(a,null!=(e=n())?e:f))||void 0;return B(c.getItem.bind(c))(a.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===a.version)return[!1,e.state];else{if(a.migrate)return[!0,a.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(i=a.merge(s,null!=(t=n())?t:f),!0),o)return d()}).then(()=>{null==o||o(i,void 0),i=n(),s=!0,u.forEach(e=>e(i))}).catch(e=>{null==o||o(void 0,e)})};return o.persist={setOptions:e=>{a={...a,...e},e.storage&&(c=e.storage)},clearStorage:()=>{null==c||c.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>s,onHydrate:e=>(l.add(e),()=>{l.delete(e)}),onFinishHydration:e=>(u.add(e),()=>{u.delete(e)})},a.skipHydration||h(),i||f}})(()=>t,{name:e,storage:F(()=>sessionStorage)})):U()(()=>t)}H[K]=G,G>1&&!W()&&console.error(`Detected ${G} 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=z)},1e3);let Q=function(e){return void 0===e};var ee,et,er,en,eo,ei,ea,es,el,eu,ec,ed,ep=r(7118),ef="object"==typeof global&&global&&global.Object===Object&&global,eh="object"==typeof self&&self&&self.Object===Object&&self,em=ef||eh||Function("return this")(),ey=em.Symbol,eg=Object.prototype,eb=eg.hasOwnProperty,ev=eg.toString,ew=ey?ey.toStringTag:void 0;let e_=function(e){var t=eb.call(e,ew),r=e[ew];try{e[ew]=void 0;var n=!0}catch(e){}var o=ev.call(e);return n&&(t?e[ew]=r:delete e[ew]),o};var ex=Object.prototype.toString,eE=ey?ey.toStringTag:void 0;let eS=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":eE&&eE in Object(e)?e_(e):ex.call(e)},eD=function(e,t){return function(r){return e(t(r))}};var eO=eD(Object.getPrototypeOf,Object);let eP=function(e){return null!=e&&"object"==typeof e};var ek=Object.prototype,eC=Function.prototype.toString,ej=ek.hasOwnProperty,eT=eC.call(Object);let eR=function(e){if(!eP(e)||"[object Object]"!=eS(e))return!1;var t=eO(e);if(null===t)return!0;var r=ej.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&eC.call(r)==eT},eN=function(e,t){return e===t||e!=e&&t!=t},eA=function(e,t){for(var r=e.length;r--;)if(eN(e[r][0],t))return r;return -1};var e$=Array.prototype.splice;function eI(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])}}eI.prototype.clear=function(){this.__data__=[],this.size=0},eI.prototype.delete=function(e){var t=this.__data__,r=eA(t,e);return!(r<0)&&(r==t.length-1?t.pop():e$.call(t,r,1),--this.size,!0)},eI.prototype.get=function(e){var t=this.__data__,r=eA(t,e);return r<0?void 0:t[r][1]},eI.prototype.has=function(e){return eA(this.__data__,e)>-1},eI.prototype.set=function(e,t){var r=this.__data__,n=eA(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};let eM=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},eL=function(e){if(!eM(e))return!1;var t=eS(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};var eF=em["__core-js_shared__"],eB=(ee=/[^.]+$/.exec(eF&&eF.keys&&eF.keys.IE_PROTO||""))?"Symbol(src)_1."+ee:"",eV=Function.prototype.toString;let eU=function(e){if(null!=e){try{return eV.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var eW=/^\[object .+?Constructor\]$/,ez=Object.prototype,eK=Function.prototype.toString,eH=ez.hasOwnProperty,eG=RegExp("^"+eK.call(eH).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");let eq=function(e){return!!eM(e)&&(!eB||!(eB in e))&&(eL(e)?eG:eW).test(eU(e))},eZ=function(e,t){var r=null==e?void 0:e[t];return eq(r)?r:void 0};var eY=eZ(em,"Map"),eJ=eZ(Object,"create"),eX=Object.prototype.hasOwnProperty,eQ=Object.prototype.hasOwnProperty;function e0(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])}}e0.prototype.clear=function(){this.__data__=eJ?eJ(null):{},this.size=0},e0.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t},e0.prototype.get=function(e){var t=this.__data__;if(eJ){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return eX.call(t,e)?t[e]:void 0},e0.prototype.has=function(e){var t=this.__data__;return eJ?void 0!==t[e]:eQ.call(t,e)},e0.prototype.set=function(e,t){var r=this.__data__;return this.size+=+!this.has(e),r[e]=eJ&&void 0===t?"__lodash_hash_undefined__":t,this};let e1=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},e2=function(e,t){var r=e.__data__;return e1(t)?r["string"==typeof t?"string":"hash"]:r.map};function e4(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 e3(e){var t=this.__data__=new eI(e);this.size=t.size}e4.prototype.clear=function(){this.size=0,this.__data__={hash:new e0,map:new(eY||eI),string:new e0}},e4.prototype.delete=function(e){var t=e2(this,e).delete(e);return this.size-=!!t,t},e4.prototype.get=function(e){return e2(this,e).get(e)},e4.prototype.has=function(e){return e2(this,e).has(e)},e4.prototype.set=function(e,t){var r=e2(this,e),n=r.size;return r.set(e,t),this.size+=+(r.size!=n),this},e3.prototype.clear=function(){this.__data__=new eI,this.size=0},e3.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},e3.prototype.get=function(e){return this.__data__.get(e)},e3.prototype.has=function(e){return this.__data__.has(e)},e3.prototype.set=function(e,t){var r=this.__data__;if(r instanceof eI){var n=r.__data__;if(!eY||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new e4(n)}return r.set(e,t),this.size=r.size,this};var e6=function(){try{var e=eZ(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();let e5=function(e,t,r){"__proto__"==t&&e6?e6(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r},e7=function(e,t,r){(void 0===r||eN(e[t],r))&&(void 0!==r||t in e)||e5(e,t,r)},e9=function(e,t,r){for(var n=-1,o=Object(e),i=r(e),a=i.length;a--;){var s=i[++n];if(!1===t(o[s],s,o))break}return e};var e8="object"==typeof exports&&exports&&!exports.nodeType&&exports,te=e8&&"object"==typeof module&&module&&!module.nodeType&&module,tt=te&&te.exports===e8?em.Buffer:void 0,tr=tt?tt.allocUnsafe:void 0;let tn=function(e,t){if(t)return e.slice();var r=e.length,n=tr?tr(r):new e.constructor(r);return e.copy(n),n};var to=em.Uint8Array;let ti=function(e){var t=new e.constructor(e.byteLength);return new to(t).set(new to(e)),t},ta=function(e,t){var r=t?ti(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)},ts=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t};var tl=Object.create,tu=function(){function e(){}return function(t){if(!eM(t))return{};if(tl)return tl(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),tc=Object.prototype;let td=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||tc)},tp=function(e){return"function"!=typeof e.constructor||td(e)?{}:tu(eO(e))},tf=function(e){return eP(e)&&"[object Arguments]"==eS(e)};var th=Object.prototype,tm=th.hasOwnProperty,ty=th.propertyIsEnumerable,tg=tf(function(){return arguments}())?tf:function(e){return eP(e)&&tm.call(e,"callee")&&!ty.call(e,"callee")},tb=Array.isArray;let tv=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff},tw=function(e){return null!=e&&tv(e.length)&&!eL(e)};var t_="object"==typeof exports&&exports&&!exports.nodeType&&exports,tx=t_&&"object"==typeof module&&module&&!module.nodeType&&module,tE=tx&&tx.exports===t_?em.Buffer:void 0;let tS=(tE?tE.isBuffer:void 0)||function(){return!1};var tD={};tD["[object Float32Array]"]=tD["[object Float64Array]"]=tD["[object Int8Array]"]=tD["[object Int16Array]"]=tD["[object Int32Array]"]=tD["[object Uint8Array]"]=tD["[object Uint8ClampedArray]"]=tD["[object Uint16Array]"]=tD["[object Uint32Array]"]=!0,tD["[object Arguments]"]=tD["[object Array]"]=tD["[object ArrayBuffer]"]=tD["[object Boolean]"]=tD["[object DataView]"]=tD["[object Date]"]=tD["[object Error]"]=tD["[object Function]"]=tD["[object Map]"]=tD["[object Number]"]=tD["[object Object]"]=tD["[object RegExp]"]=tD["[object Set]"]=tD["[object String]"]=tD["[object WeakMap]"]=!1;let tO=function(e){return function(t){return e(t)}};var tP="object"==typeof exports&&exports&&!exports.nodeType&&exports,tk=tP&&"object"==typeof module&&module&&!module.nodeType&&module,tC=tk&&tk.exports===tP&&ef.process,tj=function(){try{var e=tk&&tk.require&&tk.require("util").types;if(e)return e;return tC&&tC.binding&&tC.binding("util")}catch(e){}}(),tT=tj&&tj.isTypedArray,tR=tT?tO(tT):function(e){return eP(e)&&tv(e.length)&&!!tD[eS(e)]};let tN=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};var tA=Object.prototype.hasOwnProperty;let t$=function(e,t,r){var n=e[t];tA.call(e,t)&&eN(n,r)&&(void 0!==r||t in e)||e5(e,t,r)},tI=function(e,t,r,n){var o=!r;r||(r={});for(var i=-1,a=t.length;++i<a;){var s=t[i],l=n?n(r[s],e[s],s,r,e):void 0;void 0===l&&(l=e[s]),o?e5(r,s,l):t$(r,s,l)}return r},tM=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n};var tL=/^(?:0|[1-9]\d*)$/;let tF=function(e,t){var r=typeof e;return!!(t=null==t?0x1fffffffffffff:t)&&("number"==r||"symbol"!=r&&tL.test(e))&&e>-1&&e%1==0&&e<t};var tB=Object.prototype.hasOwnProperty;let tV=function(e,t){var r=tb(e),n=!r&&tg(e),o=!r&&!n&&tS(e),i=!r&&!n&&!o&&tR(e),a=r||n||o||i,s=a?tM(e.length,String):[],l=s.length;for(var u in e)(t||tB.call(e,u))&&!(a&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||tF(u,l)))&&s.push(u);return s},tU=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t};var tW=Object.prototype.hasOwnProperty;let tz=function(e){if(!eM(e))return tU(e);var t=td(e),r=[];for(var n in e)"constructor"==n&&(t||!tW.call(e,n))||r.push(n);return r},tK=function(e){return tw(e)?tV(e,!0):tz(e)},tH=function(e,t,r,n,o,i,a){var s=tN(e,r),l=tN(t,r),u=a.get(l);if(u)return void e7(e,r,u);var c=i?i(s,l,r+"",e,t,a):void 0,d=void 0===c;if(d){var p=tb(l),f=!p&&tS(l),h=!p&&!f&&tR(l);(c=l,p||f||h)?tb(s)?c=s:eP(s)&&tw(s)?c=ts(s):f?(d=!1,c=tn(l,!0)):h?(d=!1,c=ta(l,!0)):c=[]:eR(l)||tg(l)?(c=s,tg(s))?c=tI(s,tK(s)):(!eM(s)||eL(s))&&(c=tp(l)):d=!1}d&&(a.set(l,c),o(c,l,n,i,a),a.delete(l)),e7(e,r,c)},tG=function e(t,r,n,o,i){t!==r&&e9(r,function(a,s){if(i||(i=new e3),eM(a))tH(t,r,s,n,e,o,i);else{var l=o?o(tN(t,s),a,s+"",t,r,i):void 0;void 0===l&&(l=a),e7(t,s,l)}},tK)},tq=function(e){return e},tZ=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 tY=Math.max;let tJ=function(e,t,r){return t=tY(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=tY(n.length-t,0),a=Array(i);++o<i;)a[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(a),tZ(e,this,s)}};var tX=Date.now,tQ=(et=e6?function(e,t){return e6(e,"toString",{configurable:!0,enumerable:!1,value:function(){return t},writable:!0})}:tq,er=0,en=0,function(){var e=tX(),t=16-(e-en);if(en=e,t>0){if(++er>=800)return arguments[0]}else er=0;return et.apply(void 0,arguments)});let t0=function(e,t,r){if(!eM(r))return!1;var n=typeof t;return("number"==n?!!(tw(r)&&tF(t,r.length)):"string"==n&&t in r)&&eN(r[t],e)},t1=function(e){var t;return tQ(tJ(t=function(t,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&t0(r[0],r[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++n<o;){var s=r[n];s&&e(t,s,n,i)}return t},void 0,tq),t+"")};var t2=t1(function(e,t,r,n){tG(e,t,r,n)});function t4(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new e4;++t<r;)this.add(e[t])}t4.prototype.add=t4.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},t4.prototype.has=function(e){return this.__data__.has(e)};let t3=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},t6=function(e,t,r,n,o,i){var a=1&r,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var d=-1,p=!0,f=2&r?new t4:void 0;for(i.set(e,t),i.set(t,e);++d<s;){var h=e[d],m=t[d];if(n)var y=a?n(m,h,d,t,e,i):n(h,m,d,e,t,i);if(void 0!==y){if(y)continue;p=!1;break}if(f){if(!t3(t,function(e,t){if(!f.has(t)&&(h===e||o(h,e,r,n,i)))return f.push(t)})){p=!1;break}}else if(!(h===m||o(h,m,r,n,i))){p=!1;break}}return i.delete(e),i.delete(t),p},t5=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r},t7=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r};var t9=ey?ey.prototype:void 0,t8=t9?t9.valueOf:void 0;let re=function(e,t,r,n,o,i,a){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||!i(new to(e),new to(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return eN(+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=t5;case"[object Set]":var l=1&n;if(s||(s=t7),e.size!=t.size&&!l)break;var u=a.get(e);if(u)return u==t;n|=2,a.set(e,t);var c=t6(s(e),s(t),n,o,i,a);return a.delete(e),c;case"[object Symbol]":if(t8)return t8.call(e)==t8.call(t)}return!1},rt=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e},rr=function(e,t,r){var n=t(e);return tb(e)?n:rt(n,r(e))},rn=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i},ro=function(){return[]};var ri=Object.prototype.propertyIsEnumerable,ra=Object.getOwnPropertySymbols,rs=ra?function(e){return null==e?[]:rn(ra(e=Object(e)),function(t){return ri.call(e,t)})}:ro,rl=eD(Object.keys,Object),ru=Object.prototype.hasOwnProperty;let rc=function(e){if(!td(e))return rl(e);var t=[];for(var r in Object(e))ru.call(e,r)&&"constructor"!=r&&t.push(r);return t},rd=function(e){return tw(e)?tV(e):rc(e)},rp=function(e){return rr(e,rd,rs)};var rf=Object.prototype.hasOwnProperty;let rh=function(e,t,r,n,o,i){var a=1&r,s=rp(e),l=s.length;if(l!=rp(t).length&&!a)return!1;for(var u=l;u--;){var c=s[u];if(!(a?c in t:rf.call(t,c)))return!1}var d=i.get(e),p=i.get(t);if(d&&p)return d==t&&p==e;var f=!0;i.set(e,t),i.set(t,e);for(var h=a;++u<l;){var m=e[c=s[u]],y=t[c];if(n)var g=a?n(y,m,c,t,e,i):n(m,y,c,e,t,i);if(!(void 0===g?m===y||o(m,y,r,n,i):g)){f=!1;break}h||(h="constructor"==c)}if(f&&!h){var b=e.constructor,v=t.constructor;b!=v&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof v&&v instanceof v)&&(f=!1)}return i.delete(e),i.delete(t),f};var rm=eZ(em,"DataView"),ry=eZ(em,"Promise"),rg=eZ(em,"Set"),rb=eZ(em,"WeakMap"),rv="[object Map]",rw="[object Promise]",r_="[object Set]",rx="[object WeakMap]",rE="[object DataView]",rS=eU(rm),rD=eU(eY),rO=eU(ry),rP=eU(rg),rk=eU(rb),rC=eS;(rm&&rC(new rm(new ArrayBuffer(1)))!=rE||eY&&rC(new eY)!=rv||ry&&rC(ry.resolve())!=rw||rg&&rC(new rg)!=r_||rb&&rC(new rb)!=rx)&&(rC=function(e){var t=eS(e),r="[object Object]"==t?e.constructor:void 0,n=r?eU(r):"";if(n)switch(n){case rS:return rE;case rD:return rv;case rO:return rw;case rP:return r_;case rk:return rx}return t});let rj=rC;var rT="[object Arguments]",rR="[object Array]",rN="[object Object]",rA=Object.prototype.hasOwnProperty;let r$=function(e,t,r,n,o,i){var a=tb(e),s=tb(t),l=a?rR:rj(e),u=s?rR:rj(t);l=l==rT?rN:l,u=u==rT?rN:u;var c=l==rN,d=u==rN,p=l==u;if(p&&tS(e)){if(!tS(t))return!1;a=!0,c=!1}if(p&&!c)return i||(i=new e3),a||tR(e)?t6(e,t,r,n,o,i):re(e,t,l,r,n,o,i);if(!(1&r)){var f=c&&rA.call(e,"__wrapped__"),h=d&&rA.call(t,"__wrapped__");if(f||h){var m=f?e.value():e,y=h?t.value():t;return i||(i=new e3),o(m,y,r,n,i)}}return!!p&&(i||(i=new e3),rh(e,t,r,n,o,i))},rI=function(e,t){return function e(t,r,n,o,i){return t===r||(null!=t&&null!=r&&(eP(t)||eP(r))?r$(t,r,n,o,e,i):t!=t&&r!=r)}(e,t)},rM=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},rL=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e};var rF=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)rt(t,rs(e)),e=eO(e);return t}:ro;let rB=function(e){return rr(e,tK,rF)};var rV=Object.prototype.hasOwnProperty;let rU=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&rV.call(e,"index")&&(r.index=e.index,r.input=e.input),r},rW=function(e,t){var r=t?ti(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)};var rz=/\w*$/;let rK=function(e){var t=new e.constructor(e.source,rz.exec(e));return t.lastIndex=e.lastIndex,t};var rH=ey?ey.prototype:void 0,rG=rH?rH.valueOf:void 0;let rq=function(e,t,r){var n=e.constructor;switch(t){case"[object ArrayBuffer]":return ti(e);case"[object Boolean]":case"[object Date]":return new n(+e);case"[object DataView]":return rW(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 ta(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 rK(e);case"[object Symbol]":return rG?Object(rG.call(e)):{}}};var rZ=tj&&tj.isMap,rY=rZ?tO(rZ):function(e){return eP(e)&&"[object Map]"==rj(e)},rJ=tj&&tj.isSet,rX=rJ?tO(rJ):function(e){return eP(e)&&"[object Set]"==rj(e)},rQ="[object Arguments]",r0="[object Function]",r1="[object Object]",r2={};r2[rQ]=r2["[object Array]"]=r2["[object ArrayBuffer]"]=r2["[object DataView]"]=r2["[object Boolean]"]=r2["[object Date]"]=r2["[object Float32Array]"]=r2["[object Float64Array]"]=r2["[object Int8Array]"]=r2["[object Int16Array]"]=r2["[object Int32Array]"]=r2["[object Map]"]=r2["[object Number]"]=r2[r1]=r2["[object RegExp]"]=r2["[object Set]"]=r2["[object String]"]=r2["[object Symbol]"]=r2["[object Uint8Array]"]=r2["[object Uint8ClampedArray]"]=r2["[object Uint16Array]"]=r2["[object Uint32Array]"]=!0,r2["[object Error]"]=r2[r0]=r2["[object WeakMap]"]=!1;let r4=function e(t,r,n,o,i,a){var s,l=1&r,u=2&r,c=4&r;if(n&&(s=i?n(t,o,i,a):n(t)),void 0!==s)return s;if(!eM(t))return t;var d=tb(t);if(d){if(s=rU(t),!l)return ts(t,s)}else{var p,f,h,m,y=rj(t),g=y==r0||"[object GeneratorFunction]"==y;if(tS(t))return tn(t,l);if(y==r1||y==rQ||g&&!i){if(s=u||g?{}:tp(t),!l)return u?(f=(p=s)&&tI(t,tK(t),p),tI(t,rF(t),f)):(m=(h=s)&&tI(t,rd(t),h),tI(t,rs(t),m))}else{if(!r2[y])return i?t:{};s=rq(t,y,l)}}a||(a=new e3);var b=a.get(t);if(b)return b;a.set(t,s),rX(t)?t.forEach(function(o){s.add(e(o,r,n,o,t,a))}):rY(t)&&t.forEach(function(o,i){s.set(i,e(o,r,n,i,t,a))});var v=c?u?rB:rp:u?tK:rd,w=d?void 0:v(t);return rL(w||t,function(o,i){w&&(o=t[i=o]),t$(s,i,e(o,r,n,i,t,a))}),s},r3=function(e){return"symbol"==typeof e||eP(e)&&"[object Symbol]"==eS(e)};var r6=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r5=/^\w*$/;let r7=function(e,t){if(tb(e))return!1;var r=typeof e;return!!("number"==r||"symbol"==r||"boolean"==r||null==e||r3(e))||r5.test(e)||!r6.test(e)||null!=t&&e in Object(t)};function r9(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],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(r9.Cache||e4),r}r9.Cache=e4;var r8=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ne=/\\(\\)?/g,nt=(ei=(eo=r9(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(r8,function(e,r,n,o){t.push(n?o.replace(ne,"$1"):r||e)}),t},function(e){return 500===ei.size&&ei.clear(),e})).cache,eo),nr=1/0,nn=ey?ey.prototype:void 0,no=nn?nn.toString:void 0;let ni=function e(t){if("string"==typeof t)return t;if(tb(t))return rM(t,e)+"";if(r3(t))return no?no.call(t):"";var r=t+"";return"0"==r&&1/t==-nr?"-0":r},na=function(e){return null==e?"":ni(e)},ns=function(e,t){return tb(e)?e:r7(e,t)?[e]:nt(na(e))},nl=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};var nu=1/0;let nc=function(e){if("string"==typeof e||r3(e))return e;var t=e+"";return"0"==t&&1/e==-nu?"-0":t},nd=function(e,t){t=ns(t,e);for(var r=0,n=t.length;null!=e&&r<n;)e=e[nc(t[r++])];return r&&r==n?e:void 0},np=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 i=Array(o);++n<o;)i[n]=e[n+t];return i},nf=function(e,t){var r,n;return t=ns(t,e),r=e,null==(e=(n=t).length<2?r:nd(r,np(n,0,-1)))||delete e[nc(nl(t))]},nh=function(e){return eR(e)?void 0:e};var nm=ey?ey.isConcatSpreadable:void 0;let ny=function(e){return tb(e)||tg(e)||!!(nm&&e&&e[nm])},ng=function e(t,r,n,o,i){var a=-1,s=t.length;for(n||(n=ny),i||(i=[]);++a<s;){var l=t[a];r>0&&n(l)?r>1?e(l,r-1,n,o,i):rt(i,l):o||(i[i.length]=l)}return i};var nb=tQ(tJ(ea=function(e,t){var r={};if(null==e)return r;var n=!1;t=rM(t,function(t){return t=ns(t,e),n||(n=t.length>1),t}),tI(e,rB(e),r),n&&(r=r4(r,7,nh));for(var o=t.length;o--;)nf(r,t[o]);return r},void 0,function(e){return(null==e?0:e.length)?ng(e,1):[]}),ea+""),nv=((es={}).Array="Array",es.Boolean="Boolean",es.ConceptUuid="ConceptUuid",es.Number="Number",es.Object="Object",es.String="String",es.UUID="UUID",es.PersonAttributeTypeUuid="PersonAttributeTypeUuid",es.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid",es);function nw(e,t){return r=>{if(!e(r))if("function"==typeof t)return t(r);else return t}}let n_=nw(e=>Array.isArray(e),"must be an array"),nx=nw(e=>"boolean"==typeof e,"must be a boolean"),nE=nw(e=>"number"==typeof e,"must be a number"),nS=nw(e=>"string"==typeof e,"must be a string"),nD=nw(e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,"must be an object (not an array or null)"),nO=nw(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"),nP=q("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),nk=q("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});nk.subscribe(e=>{var t=e.config;try{localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}catch(e){}});let nC=q("config-store-of-extension-state",{mountedExtensions:[]});function nj(e){return Y(`config-module-${e}`,{config:null,loaded:!1,translationOverridesLoaded:!1})}function nT(){return Y("config-extension-slots",{slots:{}})}function nR(e){return nN(nT().getState(),e)}function nN(e,t){return e.slots[t]??{loaded:!1,config:{}}}function nA(){return Y("config-extensions",{configs:{}})}function n$(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=nA(),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),i=n(r);L(o,i)||e(o,i)})}}function nI(e,t,r){return e.configs[t]?.[r]??{loaded:!1,config:null}}function nM(e,t,r){return e.configure?.[r]??null}let nL=U()(()=>({config:{}})),nF=0,nB=!0,nV=!1;function nU(e){n=e}function nW(){nB=!0,nF>0&&nz()}function nz(){if(nB&&n&&!nV){nV=!0,nB=!1;try{n()}catch(e){nB=!0,nK(e),console.error("Failed to derive the implementer tools config",e)}finally{nV=!1}}}function nK(e){nL.setState({derivationError:e instanceof Error?e.message:String(e)})}function nH(){nL.getState().derivationError&&nL.setState({derivationError:void 0})}let nG=Z("config-implementer-tools",{...nL,getState:()=>(0===nF&&nz(),nL.getState()),setState:(...e)=>(nB=!1,nL.setState(...e)),subscribe(e){nF++,nz();let t=nL.subscribe(e),r=!1;return()=>{!r&&(r=!0,nF--),t()}}});function nq(e,t){if(Array.isArray(t))return t}function nZ(e,t){return t2({},e,t,nq)}let nY=[];function nJ(){let e=nP.getState(),t=nk.getState(),r=nC.getState();!function(e,t){for(let r of Object.keys(e.schemas)){let n,o=nj(r),i=e.schemas[r],a=!!e.moduleLoaded[r],s=n0.get(r);if(s&&s.schema===i&&s.moduleLoaded===a&&s.providedConfigs===e.providedConfigs&&s.temporaryConfig===t.config)n=s.state;else{let o=a?function(e,t,r){let n=t.schemas[e],o=oa(e,oo(t,r));ol(n,o,e);let i=op(n,o);return ou(n,i,e),delete i.extensionSlots,i}(r,e,t):function(e,t,r){let n=op(ow,oa(e,oo(t,r)));return ou(ow,n,e),delete n.extensionSlots,n}(r,e,t);n={translationOverridesLoaded:!0,loaded:a,config:o},n0.set(r,{schema:i,moduleLoaded:a,providedConfigs:e.providedConfigs,temporaryConfig:t.config,state:n})}let l=o.getState();l.loaded===n.loaded&&l.translationOverridesLoaded===n.translationOverridesLoaded&&rI(l.config,n.config)||o.setState(n)}}(e,t);let n=function(e,t){let r=os(oo(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}'`,i=Object.keys(e).filter(e=>!["add","remove","order","configure"].includes(e));i.length&&oy(n,o+`' contains invalid keys '${i.join("', '")}'`),!e.add||Array.isArray(e.add)&&e.add.every(e=>"string"==typeof e)||oy(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)||oy(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)||oy(n,o+".order' is invalid. Must be an array of strings (extension IDs)"),e.configure&&!oh(e.configure)&&oy(n,o+".configure' is invalid. Must be an object with extension IDs for keys")}(n,e,r);let i={},a={};for(let e of Object.values(n))for(let[t,r]of Object.entries(e))i[t]=r,r.configure&&(a[t]??(a[t]=[])).push(r.configure);for(let[e,t]of Object.entries(a)){let r=1===t.length?t[0]:os(t);i[e].configure!==r&&(i[e]={...i[e],configure:r})}return i}(e,t);(function(e){let t=nT(),r=t.getState().slots,n={},o=!1;for(let[t,i]of Object.entries(e)){let e=r[t];e?.loaded&&rI(e.config,i)?n[t]=e:(n[t]={loaded:!0,config:i},o=!0)}(o||Object.keys(r).length!==Object.keys(n).length)&&t.setState({slots:n})})(n),function(e,t,r,n){let o=nA(),i=o.getState().configs,a={},s=!1,l=0;for(let o of t.mountedExtensions){let t=function(e,t,r,n,o,i,a){let s=function(e){let[t]=e.split("#");return t}(n),l=o.schemas[s],u=JSON.stringify([r,n,e,t]),c=ot.get(u);if(c&&c.extensionSchema===l&&c.extensionModuleSchema===o.schemas[t]&&c.providedConfigs===o.providedConfigs&&c.temporaryConfig===i.config)return c.config;let d=l?s:t,p=oo(o,i),f=a?.configure?.[n]??{},h=oa(e,p),m=h?.extensionSlots?.[r]?.configure?.[n]??{},y=os([oa(d,p),f,m]),g=l??o.schemas[t];ol(g,y,d);let b=op(g,y);return ou(g,b,d),delete b.extensionSlots,ot.set(u,{extensionSchema:l,extensionModuleSchema:o.schemas[t],providedConfigs:o.providedConfigs,temporaryConfig:i.config,config:b}),b}(o.slotModuleName,o.extensionModuleName,o.slotName,o.extensionId,e,r,n[o.slotName]),u=i[o.slotName]?.[o.extensionId],c=u?.loaded&&rI(u.config,t)?u:{config:t,loaded:!0};c!==u&&(s=!0),a[o.slotName]||(a[o.slotName]={}),a[o.slotName][o.extensionId]=c,l++}for(let[e,t]of Object.entries(a)){let r=i[e];r&&Object.keys(r).length===Object.keys(t).length&&Object.entries(t).every(([e,t])=>r[e]===t)&&(a[e]=r)}s||(s=Object.keys(i).length!==Object.keys(a).length||Object.values(i).reduce((e,t)=>e+Object.keys(t).length,0)!==l),s&&o.setState({configs:a})}(e,r,t,n),nW()}function nX(){n=()=>{var e,t;let r,n;return e=nP.getState(),t=nk.getState(),r=nG.getState(),n={config:function(e,t){let r=function(e){let t={};for(let[r,n]of Object.entries(e)){let e=on.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"}:oh(t)?Object.keys(t).reduce((r,n)=>(r[n]=e(t[n]),r),{}):{}}(r4(n,5));on.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 i={};for(let e of o){let t=r[e],o=n.map(([t])=>t[e]),a=n.map(([,e])=>e),s=or.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===a[t])){i[e]=s.result;continue}let l=t??{};n.forEach(([,e],t)=>{let r=o[t];void 0!==r&&(l=nZ(l,function e(t,r){return oh(t)?Object.keys(t).reduce((n,o)=>(n[o]=e(t[o],r),n),{}):{_value:t,_source:r}}(r,e)))}),or.set(e,{annotatedSchema:t,configSlices:o,sources:a,result:l}),i[e]=l}return i}(e,t)},void(rI(r.config,n.config)||nG.setState(n))},nJ(),nY.push(nP.subscribe(nQ),nk.subscribe(nQ),nC.subscribe(nQ))}function nQ(){nH();try{nJ()}catch(e){nK(e),console.error("Failed to recompute the configuration",e)}}nX();let n0=new Map;function n1(e,t){oi(e,t);let r=nZ(t,ow);nP.setState(t=>({...t,schemas:{...t.schemas,[e]:r},moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function n2(e){nP.setState(t=>({...t,schemas:{...t.schemas,[e]:ow}}))}function n4(e){nP.setState(t=>({...t,moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function n3(e){nP.setState(t=>({...t,schemas:{...t.schemas,[e]:ov}}))}function n6(e,t){oi(e,t);let r=nZ(t,ow);nP.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.`),nP.setState(t=>({...t,schemas:{...t.schemas,[e]:r}}))}function n5(e,t="provided"){nP.setState(r=>({...r,providedConfigs:[...r.providedConfigs,{source:t,config:e}]}))}function n7(e,t,r){return new Promise(n=>{let o,i=!1;function a(e){!i&&t(e)&&(i=!0,n(r(e)),o?.())}a(e.getState()),i||(o=e.subscribe(a))})}function n9(e){return n7(nj(e),e=>!!(e.loaded&&e.config),e=>nb(e.config,["Display conditions","Translation overrides"]))}function n8(e,t,r){let n=[n7(nj(e),e=>!!(e.translationOverridesLoaded&&e.config),e=>e.config["Translation overrides"]??{})];return t&&r&&n.push(n7(n$(t,r),e=>!!(e.loaded&&e.config),e=>e.config["Translation overrides"]??{})),Promise.all(n)}function oe(e,t,r){ol(e,t,r);let n=op(e,t);return ou(e,n,r),n}let ot=new Map,or=new Map,on=new Map;function oo(e,t){return[...e.providedConfigs.map(e=>e.config),t.config]}function oi(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 i=r+(r&&".")+o,a=t[o];if("Display conditions"===i&&console.error(`${e} declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ${n}`),"Translation overrides"===i&&console.error(`${e} declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ${n}`),!oh(a)){console.error(`${e} has bad config schema definition for key '${i}'. ${n}`);continue}a.hasOwnProperty("_default")||oi(e,a,i);let s=a._elements;if(of(s)&&oi(e,s,i+"._elements"),a._validators)for(let t of a._validators)"function"!=typeof t&&console.error(`${e} has invalid validator for key '${i}' ${n}.
|
|
4
4
|
|
|
@@ -12,21 +12,21 @@ If you're the maintainer: the 'elements' key only works with '_type' equal to 'A
|
|
|
12
12
|
${t}`)}return n}let op=(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&&of(e)){if(o._type===nv.Array&&Array.isArray(n)){let o=n.map(t=>op(e,t));r[t]=o}else if(o._type===nv.Object)for(let t of Object.keys(n))n[t]=op(e,n[t])}}else if(oh(o)){let e=n??{};oh(e)&&(r[t]=op(o,e))}}return r};function of(e){return!!e&&Object.keys(e).filter(e=>!["_default","_validators"].includes(e)).length>0}function oh(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}let om=new Set;function oy(e,t){let r=`${e}:::${t}`;om||(om=new Set),om.has(r)||(console.error(t),om.add(r))}function og(e){e?om.forEach(t=>{t.startsWith(e)&&om.delete(t)}):om.clear()}function ob(){nY.forEach(e=>e()),nY.length=0,n0.clear(),ot.clear(),on.clear(),or.clear(),nX()}let ov={"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:nv.Object,_default:{},_validators:[nw(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(", ")}.`})]}},ow={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:nv.Array,_default:[]},expression:{_description:"The expression that determines whether the extension is displayed",_type:nv.String,_default:void 0}},...ov},o_=(e,t)=>nw(r=>e<=r&&r<=t,`must be between ${e} and ${t}`),ox=e=>{let t=e.concat(["openmrsBase","openmrsSpaBase"]);return nw(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(", "))},oE=ox([]),oS=e=>nw(t=>e.includes(t),`Must be one of the following: '${e.join("', '")}'.`),oD={inRange:o_,isUrl:oE,isUrlWithTemplateParameters:ox,oneOf:oS};var oO=r(2034);let oP=q("breadcrumbs",[]);function ok(e){return oC([e])}function oC(e){let t=[...oj(),...e.map(e=>({matcher:e.matcher instanceof RegExp?e.matcher:"string"==typeof e.matcher?(0,oO.pathToRegexp)(e.matcher).regexp:(0,oO.pathToRegexp)(e.path).regexp,settings:e}))];oP.setState(t,!0)}function oj(){return oP.getState()}function oT(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=oT(e,r.join("/"));if(t)return t}}(e,t)}function oR(e,t){if(e.length>0){let r=oT(e,t);if(r){let t=[r],n=oT(e,r.settings.parent);for(;void 0!==n;)t.push(n),n=oT(e,n.settings.parent);return t.reverse()}}return[]}function oN(e){return oR(oj(),e)}var oA=Object.freeze({__proto__:null,get start(){return i5},get ensureJQuerySupport(){return i$},get setBootstrapMaxTime(){return iy},get setMountMaxTime(){return ig},get setUnmountMaxTime(){return ib},get setUnloadMaxTime(){return iv},get registerApplication(){return iH},get unregisterApplication(){return iq},get getMountedApps(){return iU},get getAppStatus(){return iz},get unloadApplication(){return iZ},get checkActivityFunctions(){return iG},get getAppNames(){return iW},get pathToActiveWhen(){return iX},get navigateToUrl(){return iO},get patchHistoryApi(){return iR},get triggerAppChange(){return i2},get addErrorHandler(){return oF},get removeErrorHandler(){return oB},get mountRootParcel(){return ic},get NOT_LOADED(){return oW},get LOADING_SOURCE_CODE(){return oz},get NOT_BOOTSTRAPPED(){return oK},get BOOTSTRAPPING(){return oH},get NOT_MOUNTED(){return oG},get MOUNTING(){return oq},get UPDATING(){return oY},get LOAD_ERROR(){return oQ},get MOUNTED(){return oZ},get UNLOADING(){return oX},get UNMOUNTING(){return oJ},get SKIP_BECAUSE_BROKEN(){return o0}}),o$=("u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{}).CustomEvent,oI=!function(){try{var e=new o$("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}:o$;let oM=[];function oL(e,t,r){let n=oU(e,t,r);oM.length?oM.forEach(e=>e(n)):setTimeout(()=>{throw n})}function oF(e){if("function"!=typeof e)throw Error(oV(28,!1));oM.push(e)}function oB(e){if("function"!=typeof e)throw Error(oV(29,!1));let t=!1;return oM=oM.filter(r=>{let n=r===e;return t=t||n,!n}),t}function oV(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 oU(e,t,r){let n,o=`${o6(t)} '${o4(t)}' died in status ${t.status}: `;if(e instanceof Error){try{e.message=o+e.message}catch(e){}n=e}else{console.warn(oV(30,!1,t.status,o4(t)));try{n=Error(o+JSON.stringify(e))}catch(t){n=e}}return n.appOrParcelName=o4(t),t.status=r,n}let oW="NOT_LOADED",oz="LOADING_SOURCE_CODE",oK="NOT_BOOTSTRAPPED",oH="BOOTSTRAPPING",oG="NOT_MOUNTED",oq="MOUNTING",oZ="MOUNTED",oY="UPDATING",oJ="UNMOUNTING",oX="UNLOADING",oQ="LOAD_ERROR",o0="SKIP_BECAUSE_BROKEN";function o1(e){return e.status===oZ}function o2(e){try{return e.activeWhen(window.location)}catch(t){return oL(t,e,o0),!1}}function o4(e){return e.name}function o3(e){return!!e.unmountThisParcel}function o6(e){return o3(e)?"parcel":"application"}function o5(){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 o7(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return e[r];return null}function o9(e){return e&&("function"==typeof e||Array.isArray(e)&&!o7(e,e=>"function"!=typeof e))}function o8(e,t){let r=e[t]||[];0===(r=Array.isArray(r)?r:[r]).length&&(r=[()=>Promise.resolve()]);let n=o6(e),o=o4(e);return function(e){return r.reduce((r,i,a)=>r.then(()=>{let r=i(e);return ie(r)?r:Promise.reject(oV(15,!1,n,o,t,a))}),Promise.resolve())}}function ie(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}let it=[];function ir(e,t){return Promise.resolve().then(()=>e.status!==oK?e:(e.status=oH,e.bootstrap?iw(e,"bootstrap").then(r).catch(r=>{if(t)throw oU(r,e,o0);return oL(r,e,o0),e}):Promise.resolve().then(r)));function r(){return e.status=oG,e}}function io(e,t){return Promise.resolve().then(()=>{if(e.status!==oZ)return e;return e.status=oJ,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 oU(r,e,o0);oL(r,e,o0)})).then(()=>e);function r(){return iw(e,"unmount").then(()=>{e.status=oG},r=>{if(t)throw oU(r,e,o0);oL(r,e,o0)})}})}let ii=!1,ia=!1;function is(e,t){return Promise.resolve().then(()=>e.status!==oG?e:(ii||(window.dispatchEvent(new oI("single-spa:before-first-mount")),ii=!0),e.status=oq,iw(e,"mount").then(()=>(e.status=oZ,ia||(window.dispatchEvent(new oI("single-spa:first-mount")),ia=!0),e)).catch(r=>{return e.status=oZ,io(e,!0).then(n,n);function n(){if(t)throw oU(r,e,o0);return oL(r,e,o0),e}})))}let il=0,iu={parcels:{}};function ic(){return id.apply(iu,arguments)}function id(e,t){let r,n,o,i=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(oV(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(oV(3,!1,typeof e.name));let a=il++,s=e.name||`parcel-${a}`;if("object"!=typeof t)throw Error(oV(4,!1,s,typeof t));if(!t.domElement)throw Error(oV(5,!1,s));let l="function"==typeof e,u=l?e:()=>Promise.resolve(e),c={id:a,parcels:{},status:l?oz:oK,customProps:t,parentName:o4(i),unmountThisParcel:()=>f.then(()=>{if(c.status!==oZ)throw Error(oV(6,!1,s,c.status));return io(c,!0)}).then(e=>(c.parentName&&delete i.parcels[c.id],e)).then(e=>(n(e),e)).catch(e=>{throw c.status=o0,o(e),e})};i.parcels[a]=c;let d=u();if(!d||"function"!=typeof d.then)throw Error(oV(7,!1));let p=(d=d.then(e=>{if(!e)throw Error(oV(8,!1));if(s=e.name||`parcel-${a}`,Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!o9(e.bootstrap))throw Error(oV(9,!1,s));if(!o9(e.mount))throw Error(oV(10,!1,s));if(!o9(e.unmount))throw Error(oV(11,!1,s));if(e.update&&!o9(e.update))throw Error(oV(12,!1,s));let t=o8(e,"bootstrap"),n=o8(e,"mount"),o=o8(e,"unmount");c.status=oK,c.name=s,c.bootstrap=t,c.mount=n,c.unmount=o,c.timeouts=i_(e.timeouts),e.update&&(c.update=o8(e,"update"),r.update=function(e){return c.customProps=e,ip(Promise.resolve().then(()=>{if(c.status!==oZ)throw Error(oV(32,!1,o4(c)));return c.status=oY,iw(c,"update").then(()=>(c.status=oZ,c)).catch(e=>{throw oU(e,c,o0)})}))})})).then(()=>ir(c,!0)),f=p.then(()=>is(c,!0)),h=new Promise((e,t)=>{n=e,o=t});return r={mount:()=>ip(Promise.resolve().then(()=>{if(c.status!==oG)throw Error(oV(13,!1,s,c.status));return i.parcels[a]=c,is(c)})),unmount:()=>ip(c.unmountThisParcel()),getStatus:()=>c.status,loadPromise:ip(d),bootstrapPromise:ip(p),mountPromise:ip(f),unmountPromise:ip(h)}}function ip(e){return e.then(()=>null)}function ih(e){let t=o4(e),r="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof r||null===r||Array.isArray(r))&&(r={},console.warn(oV(40,!1),t,r));let n=o5({},r,{name:t,mountParcel:id.bind(e),singleSpa:oA});return o3(e)&&(n.unmountSelf=e.unmountThisParcel),n}let im={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 iy(e,t,r){if("number"!=typeof e||e<=0)throw Error(oV(16,!1));im.bootstrap={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function ig(e,t,r){if("number"!=typeof e||e<=0)throw Error(oV(17,!1));im.mount={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function ib(e,t,r){if("number"!=typeof e||e<=0)throw Error(oV(18,!1));im.unmount={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function iv(e,t,r){if("number"!=typeof e||e<=0)throw Error(oV(19,!1));im.unload={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function iw(e,t){let r=e.timeouts[t],n=r.warningMillis,o=o6(e);return new Promise((i,a)=>{let s=!1,l=!1;e[t](ih(e)).then(e=>{s=!0,i(e)}).catch(e=>{s=!0,a(e)}),setTimeout(()=>c(1),n),setTimeout(()=>c(!0),r.millis);let u=oV(31,!1,t,o,o4(e),r.millis);function c(e){s||(!0===e?(l=!0,r.dieOnTimeout?a(Error(u)):console.error(u)):!l&&(console.warn(u),e*n+n<r.millis&&setTimeout(()=>c(e+1),n)))}})}function i_(e){let t={};for(let r in im)t[r]=o5({},im[r],e&&e[r]||{});return t}function ix(e){return Promise.resolve().then(()=>{let t,r;return e.loadPromise?e.loadPromise:e.status!==oW&&e.status!==oQ?e:(e.status=oz,e.loadPromise=Promise.resolve().then(()=>{let n=e.loadApp(ih(e));if(!ie(n))throw r=!0,Error(oV(33,!1,o4(e)));return n.then(r=>{let n;e.loadErrorTime=null,"object"!=typeof(t=r)&&(n=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!o9(t.bootstrap)&&(n=35),o9(t.mount)||(n=36),o9(t.unmount)||(n=37);let o=o6(t);if(n){let r;try{r=JSON.stringify(t)}catch(e){}return console.error(oV(n,!1,o,o4(e),r),t),oL(void 0,e,o0),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=o5({},e.devtools.overlays,t.devtools.overlays)),e.status=oK,e.bootstrap=o8(t,"bootstrap"),e.mount=o8(t,"mount"),e.unmount=o8(t,"unmount"),e.unload=o8(t,"unload"),e.timeouts=i_(t.timeouts),delete e.loadPromise,e})}).catch(t=>{let n;return delete e.loadPromise,r?n=o0:(n=oQ,e.loadErrorTime=(new Date).getTime()),oL(t,e,n),e}))})}let iE="u">typeof window,iS={hashchange:[],popstate:[]},iD=["hashchange","popstate"];function iO(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(oV(14,!1));t=e.currentTarget.href,e.preventDefault()}let r=iN(window.location.href),n=iN(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 iP(e){if(e){let t=e[0].type;iD.indexOf(t)>=0&&iS[t].forEach(t=>{try{t.apply(this,e)}catch(e){setTimeout(()=>{throw e})}})}}function ik(){i4([],arguments)}function iC(e,t){return function(){let r=window.location.href,n=e.apply(this,arguments),i=window.location.href;return o&&r===i||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 ij=null,iT=!1;function iR(e){if(iT)throw Error(oV(43,!1));o=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,iT=!0,ij=window.history.replaceState,window.addEventListener("hashchange",ik),window.addEventListener("popstate",ik);let t=window.addEventListener,r=window.removeEventListener;window.addEventListener=function(e,r){if(!("function"==typeof r&&iD.indexOf(e)>=0)||o7(iS[e],e=>e===r))return t.apply(this,arguments);iS[e].push(r)},window.removeEventListener=function(e,t){return"function"==typeof t&&iD.indexOf(e)>=0&&(iS[e]=iS[e].filter(e=>e!==t)),r.apply(this,arguments)},window.history.pushState=iC(window.history.pushState,"pushState"),window.history.replaceState=iC(ij,"replaceState")}function iN(e){let t=document.createElement("a");return t.href=e,t}iE&&(window.singleSpaNavigate?console.warn(oV(41,!1)):window.singleSpaNavigate=iO);let iA=!1;function i$(e=window.jQuery){if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!iA){let t=e.fn.on,r=e.fn.off;e.fn.on=function(e,r){return iI.call(this,t,window.addEventListener,e,r,arguments)},e.fn.off=function(e,t){return iI.call(this,r,window.removeEventListener,e,t,arguments)},iA=!0}}function iI(e,t,r,n,o){return"string"!=typeof r?e.apply(this,o):(r.split(/\s+/).forEach(e=>{iD.indexOf(e)>=0&&(t(e,n),r=r.replace(e,""))}),""===r.trim()?this:e.apply(this,o))}let iM={};function iL(e){return Promise.resolve().then(()=>{let t=iM[o4(e)];if(!t)return e;if(e.status===oW)return iF(e,t),e;if(e.status===oX)return t.promise.then(()=>e);if(e.status!==oG&&e.status!==oQ)return e;let r=e.status===oQ?Promise.resolve():iw(e,"unload");return e.status=oX,r.then(()=>(iF(e,t),e)).catch(r=>(delete iM[o4(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,oL(r,e,o0),t.reject(r),e))})}function iF(e,t){delete iM[o4(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=oW,t.resolve()}function iB(e,t,r,n){iM[o4(e)]={app:e,resolve:r,reject:n},Object.defineProperty(iM[o4(e)],"promise",{get:t})}let iV=[];function iU(){return iV.filter(o1).map(o4)}function iW(){return iV.map(o4)}function iz(e){let t=o7(iV,t=>o4(t)===e);return t?t.status:null}let iK=!1;function iH(e,t,r,n){var o,i;let a,s,l=(a={name:null,loadApp:null,activeWhen:null,customProps:null},"object"==typeof e?(function(e){if(Array.isArray(e)||null===e)throw Error(oV(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(oV(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(oV(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(oV(24,!1));if(!iJ(e.customProps))throw Error(oV(22,!1))}(e),a.name=e.name,a.loadApp=e.app,a.activeWhen=e.activeWhen,a.customProps=e.customProps):(function(e,t,r,n){if("string"!=typeof e||0===e.length)throw Error(oV(20,!1));if(!t)throw Error(oV(23,!1));if("function"!=typeof r)throw Error(oV(24,!1));if(!iJ(n))throw Error(oV(22,!1))}(e,t,r,n),a.name=e,a.loadApp=t,a.activeWhen=r,a.customProps=n),a.loadApp="function"!=typeof(o=a.loadApp)?()=>Promise.resolve(o):o,a.customProps=a.customProps||{},s=(s=Array.isArray(i=a.activeWhen)?i:[i]).map(e=>"function"==typeof e?e:iX(e)),a.activeWhen=e=>s.some(t=>t(e)),a);if(i6||iK||(iK=!0,setTimeout(()=>{i6||console.warn(oV(1,!1))},5e3)),-1!==iW().indexOf(l.name))throw Error(oV(21,!1,l.name));iV.push(o5({loadErrorTime:null,status:oW,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},l)),iE&&(i$(),i4())}function iG(e=window.location){return iV.filter(t=>t.activeWhen(e)).map(o4)}function iq(e){if(0===iV.filter(t=>o4(t)===e).length)throw Error(oV(25,!1,e));return(iE?iZ(e,{waitForUnmount:!1}):Promise.resolve()).then(()=>{let t=iV.map(o4).indexOf(e);iV.splice(t,1)})}function iZ(e,t={waitForUnmount:!1}){if("string"!=typeof e)throw Error(oV(26,!1));let r=o7(iV,t=>o4(t)===e);if(!r)throw Error(oV(27,!1,e));let n=iM[o4(r)];if(t&&t.waitForUnmount){if(n)return n.promise;{let e=new Promise((t,n)=>{iB(r,()=>e,t,n)});return e}}{let e;return n?(e=n.promise,iY(r,n.resolve,n.reject)):e=new Promise((t,n)=>{iB(r,()=>e,t,n),iY(r,t,n)}),e}}function iY(e,t,r){Promise.resolve().then(()=>{if(o7(iG(),t=>t===o4(e)))return i2()}).then(()=>io(e).then(iL).then(()=>{t(),setTimeout(()=>{i4()})})).catch(r)}function iJ(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)}function iX(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)&&i(t)}return i(e.length),RegExp(o,"i");function i(i){let a=e.slice(r,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=n?"[^/]+/?":a,i===e.length)if(n)t&&(o+="$");else{let e=t?"":".*";o="/"===o.charAt(o.length-1)?`${o}${e}$`:`${o}(/${e})?(#.*)?$`}n=!n,r=i}}(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 iQ=!1,i0=[],i1=iE&&window.location.href;function i2(){return i4()}function i4(e=[],t,r=!1){let n,o,i,a,s;if(iQ)return new Promise((e,r)=>{i0.push({resolve:e,reject:r,eventArguments:t})});let{appsToUnload:l,appsToUnmount:u,appsToLoad:c,appsToMount:d}=(n=[],o=[],i=[],a=[],s=(new Date).getTime(),iV.forEach(e=>{let t=e.status!==o0&&o2(e);switch(e.status){case oQ:t&&s-e.loadErrorTime>=200&&i.push(e);break;case oW:case oz:t&&i.push(e);break;case oK:case oG:!t&&iM[o4(e)]?n.push(e):t&&a.push(e);break;case oZ:t||o.push(e)}}),{appsToUnload:n,appsToUnmount:o,appsToLoad:i,appsToMount:a}),p,f=[],h=i1,m=i1=window.location.href;return i6?(iQ=!0,p=l.concat(c,u,d),Promise.resolve().then(()=>(w(0===p.length?"before-no-app-change":"before-app-change",v(!0)),w("before-routing-event",v(!0,{cancelNavigation:y})),Promise.all(f).then(r=>{if(r.some(e=>e))return ij.call(window.history,history.state,"",h.substring(location.origin.length)),i1=location.href,iQ=!1,i4(e,t,!0);let n=l.map(iL),o=Promise.all(u.map(io).map(e=>e.then(iL)).concat(n));o.then(()=>{w("before-mount-routing-event",v(!0))},e=>{throw e});let i=c.map(e=>ix(e).then(e=>i3(e,o))),a=d.filter(e=>0>c.indexOf(e)).map(e=>i3(e,o));return o.catch(e=>{throw b(),e}).then(()=>(b(),Promise.all(i.concat(a)).catch(t=>{throw e.forEach(e=>e.reject(t)),t}).then(g).then(()=>{},e=>{throw e})))})))):(p=c,Promise.resolve().then(()=>Promise.all(c.map(ix)).then(b).then(()=>[]).catch(e=>{throw b(),e}).finally(()=>{})));function y(e=!0){let t="function"==typeof(null==e?void 0:e.then)?e:Promise.resolve(e);f.push(t.catch(e=>(console.warn(Error(oV(42,!1))),console.warn(e),!1)))}function g(){let t=iU();e.forEach(e=>e.resolve(t));try{w(0===p.length?"no-app-change":"app-change",v()),w("routing-event",v())}catch(e){setTimeout(()=>{throw e})}if(iQ=!1,i0.length>0){let e=i0;i0=[],i4(e)}return t}function b(){r||(e.forEach(e=>{iP(e.eventArguments)}),iP(t))}function v(e=!1,r){let n={},o={[oZ]:[],[oG]:[],[oW]:[],[o0]:[]};e?(c.concat(d).forEach((e,t)=>{a(e,oZ)}),l.forEach(e=>{a(e,oW)}),u.forEach(e=>{a(e,oG)})):p.forEach(e=>{a(e)});let i={detail:{newAppStatuses:n,appsByNewStatus:o,totalAppChanges:p.length,originalEvent:null==t?void 0:t[0],oldUrl:h,newUrl:m}};return r&&o5(i.detail,r),i;function a(e,t){let r=o4(e);t=t||iz(r),n[r]=t,(o[t]=o[t]||[]).push(r)}}function w(e,t){r||window.dispatchEvent(new oI(`single-spa:${e}`,t))}}function i3(e,t){return o2(e)?ir(e).then(e=>t.then(()=>o2(e)?is(e):e)):t.then(()=>e)}let i6=!1;function i5(e){i6=!0,iE&&(iR(e),i4())}function i7(e,t){let r=window.getOpenmrsSpaBase().replace(/\/$/,"");return i9(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:r,...t}).replace(/^\/\//,"/")}function i9(e,t){return Object.keys(t).reduce((e,r)=>e.split("${"+r+"}").join(t[r]),e)}function i8({to:e,templateParams:t}){let r=window.getOpenmrsSpaBase().replace(/\/$/,""),n=i7(e,t).replace(window.location.origin,"");n.startsWith(r)?iO(n):window.location.assign(n)}iE&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods={getRawAppData:function(){return[...iV]},reroute:i4,NOT_LOADED:oW,toLoadPromise:ix,toBootstrapPromise:ir,unregisterApplication:iq,getProfilerData:function(){return it}});let ae="openmrs:history";function at(e){let t=JSON.parse(sessionStorage.getItem(ae)??"[]")||[];t.push(e),t.length>50&&(t=t.slice(-50)),sessionStorage.setItem(ae,JSON.stringify(t))}function ar(){0===JSON.parse(sessionStorage.getItem(ae)??"[]").length&&document.referrer&&at(document.referrer),window.addEventListener("single-spa:routing-event",e=>{let t=an();e.detail.originalEvent?.singleSpaTrigger=="replaceState"?(t[t.length-1]=window.location.href,sessionStorage.setItem(ae,JSON.stringify(t))):!e.detail.originalEvent?.singleSpa&&t.includes(window.location.href)?ao({toUrl:window.location.href}):t[t.length-1]!==window.location.href&&at(window.location.href)})}function an(){return JSON.parse(sessionStorage.getItem(ae)??"[]")}function ao({toUrl:e}){let t=an(),r=t.lastIndexOf(e);if(-1!=r){let e=t.slice(0,r+1);i8({to:t[r]}),sessionStorage.setItem(ae,JSON.stringify(e))}else throw Error(`URL ${e} not found in history; cannot go back to it.`)}function ai(){sessionStorage.removeItem(ae)}let aa="${openmrsSpaBase}/login",as={redirectAuthFailure:{enabled:{_type:nv.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:nv.String,_default:aa,_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:nv.Array,_default:[401],_elements:{_type:nv.Number,_validators:[oD.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:nv.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:nv.Boolean,_default:!0,_description:"Whether openmrsFetch should support redirects returned from the backend"}};function al(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}let au="/ws/rest/v1",ac="/ws/fhir2/R4",ad=`${au}/session`;function ap(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)}function af(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=ap(e);if(t.headers||(t.headers={}),eR(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,e.startsWith(au)&&void 0===t.headers["Disable-WWW-Authenticate"]&&(t.headers["Disable-WWW-Authenticate"]="true"),e.startsWith(ac)){let e=new URL(r,window.location.toString());e.searchParams.has("_summary")||(e.searchParams.set("_summary","data"),r=e.toString())}let n=Error();return window.fetch(r,t).then(async e=>{let{redirectAuthFailure:t,followRedirects:o}=await n9("@openmrs/esm-api");if(e.ok){let t=e.headers.get("location");return(o&&t&&(r===ap(ad)||204===e.status)&&i8({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===ap(ad)&&403===e.status||t.enabled&&t.errors.includes(e.status)?(ai(),i8({to:t.url||e.headers.get("location")||aa}),t.resolvePromise?Promise.resolve():new Promise(()=>{})):e.clone().text().then(t=>{let o=t;try{o=JSON.parse(t)}catch(e){}throw new am(r,e,o,n)},t=>{throw new am(r,e,null,n)})})}function ah(e,t={}){if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");let r=new AbortController;return t.signal=r.signal,new ep.Observable(n=>{let o=!1;return af(e,t).then(e=>{o=!0,n.next(e),n.complete()},e=>{o=!0,n.error(e)}),()=>{o||r.abort()}})}class am extends Error{constructor(e,t,r,n){super(),al(this,"response",void 0),al(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 ay=q("session",{loaded:!1,session:null}),ag=0;function ab(e={includeAuthStatus:!0}){return(ag<Date.now()-6e4||!ay.getState().loaded)&&a_(),new ep.Observable(t=>{let r=r=>{r.loaded&&(e.includeAuthStatus?t.next(r.session):t.next(r.session?.user))};return r(ay.getState()),ay.subscribe(r)})}function av(){return(ag<Date.now()-6e4||!ay.getState().loaded)&&a_(),ay}function aw(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 a_(e,t){ag=Date.now();let r={};return e&&t&&(r.Authorization=`Basic ${window.btoa(`${e}:${t}`)}`),ak(af(ad,{headers:r}))}function ax(){ay.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})}function aE(e,t){var r,n;if(void 0===t)return!e;if(!e)return!0;return r=e,n=t,("string"==typeof r?!Q(n.privileges.find(e=>r===e.display)):Array.isArray(r)?r.every(e=>!Q(n.privileges.find(t=>e===t.display))):(Q(r)||console.error(`Could not understand privileges "${r}"`),!0))||!Q(t.roles.find(e=>"System Developer"===e.display))}function aS(){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(ay.getState()),e||(t=ay.subscribe(n))})}function aD(){return new Promise((e,t)=>{ab().subscribe(t=>{e(t.sessionLocation)},t).unsubscribe()})}async function aO(e,t){return ak(af(ad,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal}))}async function aP(e,t,r){return r||(r=new AbortController),await af(`${au}/user/${e}`,{method:"POST",body:{userProperties:t},headers:{"Content-Type":"application/json"},signal:r.signal}),a_()}function ak(e){return new Promise((t,r)=>{e.then(e=>{let n;"object"==typeof e?.data?(n={loaded:!0,session:e.data},ay.setState(n),t(n)):(n={loaded:!1,session:null},ay.setState(n),r(n))}).catch(e=>{$(`Failed to fetch new session information: ${e}`);let t={loaded:!1,session:null};ay.setState(t),r(t)})})}function aC(){return"development"===window.spaEnv||"true"===localStorage.getItem("openmrs:devtools")}ay.subscribe(e=>{e.loaded&&e.session&&aw(e.session)});let aj={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"};function aT(){n1("@openmrs/esm-api",as),a_()}let aR={address1:"Address line 1",address2:"Address line 2",address3:"Address line 3",address4:"Address line 4",address5:"Address line 5",address6:"Address line 6",city:"City",cityVillage:"City",country:"Country",countyDistrict:"District",district:"District",postalCode:"Postal code",state:"State",stateProvince:"State",closeAllOpenedWorkspaces:"Discard changes in {{count}} workspaces",closingAllWorkspacesPromptBody:"There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",closingAllWorkspacesPromptTitle:"You have unsaved changes",discard:"Discard",hide:"Hide",maximize:"Maximize",minimize:"Minimize",openAnyway:"Open anyway",unsavedChangesInOpenedWorkspace:"You may have unsaved changes in the opened workspace. Do you want to discard these changes?",unsavedChangesInWorkspace:'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',unsavedChangesTitleText:"Unsaved changes",workspaceHeader:"Workspace header",discardUnsavedChangesPromptBodyMultiple:"{{count}} workspaces have unsaved changes. Closing them will discard the changes:",discardUnsavedChangesPromptBodySingle:"<strong>{{workspaceTitle}}</strong> has unsaved changes. Closing it will discard them.",discardUnsavedChangesPromptTitle:"Discard unsaved changes?",keepEditing:"Keep editing",abnormalValue:"Abnormal value",actions:"Actions",actionableNotification:"Actionable notification",address:"Address",age:"Age",batchActionItemSelected:"{{totalSelected}} item selected",batchActionsItemsSelected:"{{totalSelected}} items selected",cancel:"Cancel",change:"Change",Clinic:"Clinic",close:"Close",closesActionableNotification:"Close actionable notification",closeSnackbar:"Close snackbar",confirm:"Confirm",contactAdministratorIfIssuePersists:"Contact your system administrator if the problem persists.",contactDetails:"Contact details",delete:"Delete",discardChanges:"Discard changes",edit:"Edit",emptyStateText:"There are no {{displayText}} to display",error:"Error",errorCopy:"Sorry, there was a problem displaying this information. You can try to reload this page, or contact the site administrator and quote the error code above.",errorLoadingLoginLocations:"Unable to load login locations. Please try again or contact support if the problem persists.",female:"Female",leftNavigation:"Left navigation",loading:"Loading",localVersion:"Local Build",male:"Male",noResultsToDisplay:"No results to display",notAvailable:"Not available",other:"Other",paginationItemsCount:"{{pageItemsCount}} / {{totalItems}} items",paginationOfPages:"of {{count}} pages",patientAvatarAlt:"Avatar for {{patientName}}",patientIdentifierSticker:"Patient identifier sticker",patientLists:"Patient lists",patientPhotoAlt:"Profile photo of {{patientName}}",patientPhotoPlaceholder:"Photo placeholder for {{patientName}}",prereleaseVersion:"Prerelease",print:"Print",printError:"Print error",printErrorExplainer:"An error occurred in {{errorLocation}}",printIdentifierSticker:"Print identifier sticker",printing:"Printing",recordNewEntry:"Record {{displayText}}",relationships:"Relationships",resetOverrides:"Reset overrides",save:"Save",scriptLoadingFailed:"Error: Script failed to load",scriptLoadingError:"Failed to load overridden script from {{url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",searchForLocation:"Search for a location",seeAll:"See all",seeMoreLists:"See {{count}} more lists",selectAll:"Select all",sex:"Sex",showLess:"Show less",showMore:"Show more",snackbarNotification:"Snackbar notification",toggleDevTools:"Toggle dev tools",unknown:"Unknown",yearAbbreviation:"yr",yearsAbbreviation:"yrs"},aN=e=>"string"==typeof e,aA=()=>{let e,t,r=new Promise((r,n)=>{e=r,t=n});return r.resolve=e,r.reject=t,r},a$=e=>null==e?"":""+e,aI=/###/g,aM=e=>e&&e.indexOf("###")>-1?e.replace(aI,"."):e,aL=e=>!e||aN(e),aF=(e,t,r)=>{let n=aN(t)?t.split("."):t,o=0;for(;o<n.length-1;){if(aL(e))return{};let t=aM(n[o]);!e[t]&&r&&(e[t]=new r),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return aL(e)?{}:{obj:e,k:aM(n[o])}},aB=(e,t,r)=>{let{obj:n,k:o}=aF(e,t,Object);if(void 0!==n||1===t.length){n[o]=r;return}let i=t[t.length-1],a=t.slice(0,t.length-1),s=aF(e,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,s=aF(e,a=a.slice(0,a.length-1),Object),s?.obj&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=r},aV=(e,t)=>{let{obj:r,k:n}=aF(e,t);if(r&&Object.prototype.hasOwnProperty.call(r,n))return r[n]},aU=(e,t,r)=>{for(let n in t)"__proto__"!==n&&"constructor"!==n&&(n in e?aN(e[n])||e[n]instanceof String||aN(t[n])||t[n]instanceof String?r&&(e[n]=t[n]):aU(e[n],t[n],r):e[n]=t[n]);return e};var aW={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};let az=e=>aN(e)?e.replace(/[&<>"'\/]/g,e=>aW[e]):e,aK=[" ",",","?","!",";"],aH=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(void 0!==t)return t;let r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}(20),aG=(e,t,r=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}let n=t.split(r),o=e;for(let e=0;e<n.length;){let t;if(!o||"object"!=typeof o)return;let i="";for(let a=e;a<n.length;++a)if(a!==e&&(i+=r),i+=n[a],void 0!==(t=o[i])){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<n.length-1)continue;e+=a-e+1;break}o=t}return o},aq=e=>e?.replace("_","-"),aZ={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class aY{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||aZ,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,r,n){return n&&!this.debug?null:(aN(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new aY(this.logger,{...{prefix:`${this.prefix}:${e}:`},...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new aY(this.logger,e)}}var aJ=new aY;class aX{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let r=this.observers[e].get(t)||0;this.observers[e].set(t,r+1)}),this}off(e,t){if(this.observers[e]){if(!t)return void delete this.observers[e];this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,r])=>{for(let n=0;n<r;n++)e(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([r,n])=>{for(let o=0;o<n;o++)r.apply(r,[e,...t])})}}class aQ extends aX{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,r,n={}){let o,i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,a=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],r&&(Array.isArray(r)?o.push(...r):aN(r)&&i?o.push(...r.split(i)):o.push(r)));let s=aV(this.data,o);return(!s&&!t&&!r&&e.indexOf(".")>-1&&(e=o[0],t=o[1],r=o.slice(2).join(".")),!s&&a&&aN(r))?aG(this.data?.[e]?.[t],r,i):s}addResource(e,t,r,n,o={silent:!1}){let i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,a=[e,t];r&&(a=a.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(a=e.split("."),n=t,t=a[1]),this.addNamespaces(t),aB(this.data,a,n),o.silent||this.emit("added",e,t,r,n)}addResources(e,t,r,n={silent:!1}){for(let n in r)(aN(r[n])||Array.isArray(r[n]))&&this.addResource(e,t,n,r[n],{silent:!0});n.silent||this.emit("added",e,t,r)}addResourceBundle(e,t,r,n,o,i={silent:!1,skipCopy:!1}){let a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),n=r,r=t,t=a[1]),this.addNamespaces(t);let s=aV(this.data,a)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),n?aU(s,r,o):s={...s,...r},aB(this.data,a,s),i.silent||this.emit("added",e,t,r)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var a0={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,n,o){return e.forEach(e=>{t=this.processors[e]?.process(t,r,n,o)??t}),t}};let a1=Symbol("i18next/PATH_KEY");function a2(e,t){let r,n,o,{[a1]:i}=e((n=[],(o=Object.create(null)).get=(e,t)=>(r?.revoke?.(),t===a1)?n:(n.push(t),(r=Proxy.revocable(e,o)).proxy),Proxy.revocable(Object.create(null),o).proxy));return i.join(t?.keySeparator??".")}let a4={},a3=e=>!aN(e)&&"boolean"!=typeof e&&"number"!=typeof e;class a6 extends aX{constructor(e,t={}){super(),((e,t,r)=>{e.forEach(e=>{t[e]&&(r[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=aJ.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let r={...t};if(null==e)return!1;let n=this.resolve(e,r);if(n?.res===void 0)return!1;let o=a3(n.res);return!1!==r.returnObjects||!o}extractFromKey(e,t){let r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");let n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],i=r&&e.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!((e,t,r)=>{t=t||"",r=r||"";let n=aK.filter(e=>0>t.indexOf(e)&&0>r.indexOf(e));if(0===n.length)return!0;let o=aH.getRegExp(`(${n.map(e=>"?"===e?"\\?":e).join("|")})`),i=!o.test(e);if(!i){let t=e.indexOf(r);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,r,n);if(i&&!a){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:aN(o)?[o]:o};let i=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(n)}return{key:e,namespaces:aN(o)?[o]:o}}translate(e,t,r){let n="object"==typeof t?{...t}:t;if("object"!=typeof n&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof n&&(n={...n}),n||(n={}),null==e)return"";"function"==typeof e&&(e=a2(e,{...this.options,...n})),Array.isArray(e)||(e=[String(e)]);let o=void 0!==n.returnDetails?n.returnDetails:this.options.returnDetails,i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(e[e.length-1],n),l=s[s.length-1],u=void 0!==n.nsSeparator?n.nsSeparator:this.options.nsSeparator;void 0===u&&(u=":");let c=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c?.toLowerCase()==="cimode")return d?o?{res:`${l}${u}${a}`,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${u}${a}`:o?{res:a,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:a;let p=this.resolve(e,n),f=p?.res,h=p?.usedKey||a,m=p?.exactUsedKey||a,y=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,g=!this.i18nFormat||this.i18nFormat.handleAsObject,b=void 0!==n.count&&!aN(n.count),v=a6.hasDefaultValue(n),w=b?this.pluralResolver.getSuffix(c,n.count,n):"",x=n.ordinal&&b?this.pluralResolver.getSuffix(c,n.count,{ordinal:!1}):"",E=b&&!n.ordinal&&0===n.count,S=E&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${w}`]||n[`defaultValue${x}`]||n.defaultValue,D=f;g&&!f&&v&&(D=S);let O=a3(D),P=Object.prototype.toString.apply(D);if(g&&D&&O&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(P)&&!(aN(y)&&Array.isArray(D))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,D,{...n,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return o?(p.res=e,p.usedParams=this.getUsedParamsDetails(n),p):e}if(i){let e=Array.isArray(D),t=e?[]:{},r=e?m:h;for(let e in D)if(Object.prototype.hasOwnProperty.call(D,e)){let o=`${r}${i}${e}`;v&&!f?t[e]=this.translate(o,{...n,defaultValue:a3(S)?S[e]:void 0,...{joinArrays:!1,ns:s}}):t[e]=this.translate(o,{...n,joinArrays:!1,ns:s}),t[e]===o&&(t[e]=D[e])}f=t}}else if(g&&aN(y)&&Array.isArray(f))(f=f.join(y))&&(f=this.extendTranslation(f,e,n,r));else{let t=!1,o=!1;!this.isValidLookup(f)&&v&&(t=!0,f=S),this.isValidLookup(f)||(o=!0,f=a);let s=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:f,d=v&&S!==f&&this.options.updateMissing;if(o||t||d){if(this.logger.log(d?"updateKey":"missingKey",c,l,a,d?S:f),i){let e=this.resolve(a,{...n,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let r=0;r<t.length;r++)e.push(t[r]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(n.lng||this.language):e.push(n.lng||this.language);let r=(e,t,r)=>{let o=v&&r!==f?r:s;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,o,d,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,o,d,n),this.emit("missingKey",e,l,t,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,n);E&&n[`defaultValue${this.options.pluralSeparator}zero`]&&0>t.indexOf(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{r([e],a+t,n[`defaultValue${t}`]||S)})}):r(e,a,S))}f=this.extendTranslation(f,e,n,p,r),o&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${l}${u}${a}`),(o||t)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${a}`:a,t?f:void 0,n))}return o?(p.res=f,p.usedParams=this.getUsedParamsDetails(n),p):f}extendTranslation(e,t,r,n,o){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){let i;r.interpolation&&this.interpolator.init({...r,...{interpolation:{...this.options.interpolation,...r.interpolation}}});let a=aN(e)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(a){let t=e.match(this.interpolator.nestingRegexp);i=t&&t.length}let s=r.replace&&!aN(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,r.lng||this.language||n.usedLng,r),a){let t=e.match(this.interpolator.nestingRegexp);i<(t&&t.length)&&(r.nest=!1)}!r.lng&&n&&n.res&&(r.lng=this.language||n.usedLng),!1!==r.nest&&(e=this.interpolator.nest(e,(...e)=>o?.[0]!==e[0]||r.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),r)),r.interpolation&&this.interpolator.reset()}let i=r.postProcess||this.options.postProcess,a=aN(i)?[i]:i;return null!=e&&a?.length&&!1!==r.applyPostProcessor&&(e=a0.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...n,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e,t={}){let r,n,o,i,a;return aN(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(r))return;let s=this.extractFromKey(e,t),l=s.key;n=l;let u=s.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));let c=void 0!==t.count&&!aN(t.count),d=c&&!t.ordinal&&0===t.count,p=void 0!==t.context&&(aN(t.context)||"number"==typeof t.context)&&""!==t.context,f=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(e=>{this.isValidLookup(r)||(a=e,!a4[`${f[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(a)&&(a4[`${f[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${f.join(", ")}" won't get resolved as namespace "${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!!!")),f.forEach(n=>{let a;if(this.isValidLookup(r))return;i=n;let s=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(s,l,n,e,t);else{let e;c&&(e=this.pluralResolver.getSuffix(n,t.count,t));let r=`${this.options.pluralSeparator}zero`,o=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(t.ordinal&&0===e.indexOf(o)&&s.push(l+e.replace(o,this.options.pluralSeparator)),s.push(l+e),d&&s.push(l+r)),p){let n=`${l}${this.options.contextSeparator||"_"}${t.context}`;s.push(n),c&&(t.ordinal&&0===e.indexOf(o)&&s.push(n+e.replace(o,this.options.pluralSeparator)),s.push(n+e),d&&s.push(n+r))}}for(;a=s.pop();)this.isValidLookup(r)||(o=a,r=this.getResource(n,e,a,t))}))})}),{res:r,usedKey:n,exactUsedKey:o,usedLng:i,usedNS:a}}isValidLookup(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}getResource(e,t,r,n={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}getUsedParamsDetails(e={}){let t=e.replace&&!aN(e.replace),r=t?e.replace:e;if(t&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!t)for(let e of(r={...r},["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"]))delete r[e];return r}static hasDefaultValue(e){let t="defaultValue";for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,t.length)&&void 0!==e[r])return!0;return!1}}class a5{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=aJ.create("languageUtils")}getScriptPartFromCode(e){if(!(e=aq(e))||0>e.indexOf("-"))return null;let t=e.split("-");return 2===t.length||(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(!(e=aq(e))||0>e.indexOf("-"))return e;let t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(aN(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)?t:this.options.lowerCaseLng?e.toLowerCase():e}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){let t;return e?(e.forEach(e=>{if(t)return;let r=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(r))&&(t=r)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let r=this.getScriptPartFromCode(e);if(this.isSupportedCode(r))return t=r;let n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(e=>{if(e===n||!(0>e.indexOf("-")&&0>n.indexOf("-"))&&(e.indexOf("-")>0&&0>n.indexOf("-")&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1))return e})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),aN(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let 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||[]}toResolveHierarchy(e,t){let r=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),n=[],o=e=>{e&&(this.isSupportedCode(e)?n.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return aN(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):aN(e)&&o(this.formatLanguageCode(e)),r.forEach(e=>{0>n.indexOf(e)&&o(this.formatLanguageCode(e))}),n}}let a7={zero:0,one:1,two:2,few:3,many:4,other:5},a9={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class a8{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=aJ.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let r,n=aq("dev"===e?"en":e),o=t.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:n,type:o});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];try{r=new Intl.PluralRules(n,{type:o})}catch(o){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),a9;if(!e.match(/-|_/))return a9;let n=this.languageUtils.getLanguagePartFromCode(e);r=this.getRule(n,t)}return this.pluralRulesCache[i]=r,r}needsPlural(e,t={}){let r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,r={}){return this.getSuffixes(e,r).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let r=this.getRule(e,t);return(r||(r=this.getRule("dev",t)),r)?r.resolvedOptions().pluralCategories.sort((e,t)=>a7[e]-a7[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,r={}){let n=this.getRule(e,r);return n?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${n.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,r))}}let se=(e,t,r,n=".",o=!0)=>{let i,a=void 0!==(i=aV(e,r))?i:aV(t,r);return!a&&o&&aN(r)&&void 0===(a=aG(e,r,n))&&(a=aG(t,r,n)),a};class st{constructor(e={}){this.logger=aJ.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});let{escape:t,escapeValue:r,useRawValueToEscape:n,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:s,formatSeparator:l,unescapeSuffix:u,unescapePrefix:c,nestingPrefix:d,nestingPrefixEscaped:p,nestingSuffix:f,nestingSuffixEscaped:h,nestingOptionsSeparator:m,maxReplaces:y,alwaysFormat:g}=e.interpolation;this.escape=void 0!==t?t:az,this.escapeValue=void 0===r||r,this.useRawValueToEscape=void 0!==n&&n,this.prefix=o?o.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):i||"{{",this.suffix=a?a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):s||"}}",this.formatSeparator=l||",",this.unescapePrefix=u?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=d?d.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):p||"$t(".replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),this.nestingSuffix=f?f.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):h||")".replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),this.nestingOptionsSeparator=m||",",this.maxReplaces=y||1e3,this.alwaysFormat=void 0!==g&&g,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,r,n){let o,i,a,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(0>e.indexOf(this.formatSeparator)){let o=se(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,r,{...n,...t,interpolationkey:e}):o}let o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(se(t,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,r,{...n,...t,interpolationkey:i})};this.resetRegExp();let u=n?.missingInterpolationHandler||this.options.missingInterpolationHandler,c=n?.interpolation?.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e.replace(/\$/g,"$$$$")},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e).replace(/\$/g,"$$$$"):e.replace(/\$/g,"$$$$")}].forEach(t=>{for(a=0;o=t.regex.exec(e);){let r=o[1].trim();if(void 0===(i=l(r)))if("function"==typeof u){let t=u(e,o,n);i=aN(t)?t:""}else if(n&&Object.prototype.hasOwnProperty.call(n,r))i="";else if(c){i=o[0];continue}else this.logger.warn(`missed to pass in variable ${r} for interpolating ${e}`),i="";else aN(i)||this.useRawValueToEscape||(i=a$(i));let s=t.safeValue(i);if(e=e.replace(o[0],s),c?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++a>=this.maxReplaces)break}}),e}nest(e,t,r={}){let n,o,i,a=(e,t)=>{let r=this.nestingOptionsSeparator;if(0>e.indexOf(r))return e;let n=e.split(RegExp(`${r}[ ]*{`)),o=`{${n[1]}`;e=n[0];let a=(o=this.interpolate(o,i)).match(/'/g),s=o.match(/"/g);((a?.length??0)%2!=0||s)&&s.length%2==0||(o=o.replace(/'/g,'"'));try{i=JSON.parse(o),t&&(i={...t,...i})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${r}${o}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let s=[];(i=(i={...r}).replace&&!aN(i.replace)?i.replace:i).applyPostProcessor=!1,delete i.defaultValue;let l=/{.*}/.test(n[1])?n[1].lastIndexOf("}")+1:n[1].indexOf(this.formatSeparator);if(-1!==l&&(s=n[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),n[1]=n[1].slice(0,l)),(o=t(a.call(this,n[1].trim(),i),i))&&n[0]===e&&!aN(o))return o;aN(o)||(o=a$(o)),o||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),o=""),s.length&&(o=s.reduce((e,t)=>this.format(e,t,r.lng,{...r,interpolationkey:n[1].trim()}),o.trim())),e=e.replace(n[0],o),this.regexp.lastIndex=0}return e}}let sr=e=>{let t={};return(r,n,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});let a=n+JSON.stringify(i),s=t[a];return s||(s=e(aq(n),o),t[a]=s),s(r)}},sn=e=>(t,r,n)=>e(aq(r),n)(t);class so{constructor(e={}){this.logger=aJ.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";let r=t.cacheInBuiltFormats?sr:sn;this.formats={number:r((e,t)=>{let r=new Intl.NumberFormat(e,{...t});return e=>r.format(e)}),currency:r((e,t)=>{let r=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>r.format(e)}),datetime:r((e,t)=>{let r=new Intl.DateTimeFormat(e,{...t});return e=>r.format(e)}),relativetime:r((e,t)=>{let r=new Intl.RelativeTimeFormat(e,{...t});return e=>r.format(e,t.range||"day")}),list:r((e,t)=>{let r=new Intl.ListFormat(e,{...t});return e=>r.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=sr(t)}format(e,t,r,n={}){let o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&0>o[0].indexOf(")")&&o.find(e=>e.indexOf(")")>-1)){let e=o.findIndex(e=>e.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}return o.reduce((e,t)=>{let{formatName:o,formatOptions:i}=(e=>{let t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){let n=e.split("(");t=n[0].toLowerCase().trim();let 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(e=>{if(e){let[t,...n]=e.split(":"),o=n.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();r[i]||(r[i]=o),"false"===o&&(r[i]=!1),"true"===o&&(r[i]=!0),isNaN(o)||(r[i]=parseInt(o,10))}})}return{formatName:t,formatOptions:r}})(t);if(this.formats[o]){let t=e;try{let a=n?.formatParams?.[n.interpolationkey]||{},s=a.locale||a.lng||n.locale||n.lng||r;t=this.formats[o](e,s,{...i,...n,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e},e)}}class si extends aX{constructor(e,t,r,n={}){super(),this.backend=e,this.store=t,this.services=r,this.languageUtils=r.languageUtils,this.options=n,this.logger=aJ.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=n.maxParallelReads||10,this.readingCalls=0,this.maxRetries=n.maxRetries>=0?n.maxRetries:5,this.retryTimeout=n.retryTimeout>=1?n.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,n.backend,n)}queueLoad(e,t,r,n){let o={},i={},a={},s={};return e.forEach(e=>{let n=!0;t.forEach(t=>{let a=`${e}|${t}`;!r.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===i[a]&&(i[a]=!0):(this.state[a]=1,n=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===s[t]&&(s[t]=!0)))}),n||(a[e]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,r){let n=e.split("|"),o=n[0],i=n[1];t&&this.emit("failedLoading",o,i,t),!t&&r&&this.store.addResourceBundle(o,i,r,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&r&&(this.state[e]=0);let a={};this.queue.forEach(r=>{((e,t,r,n)=>{let{obj:o,k:i}=aF(e,t,Object);o[i]=o[i]||[],o[i].push(r)})(r.loaded,[o],i),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(e=>{a[e]||(a[e]={});let t=r.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,r,n=0,o=this.retryTimeout,i){if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:r,tried:n,wait:o,callback:i});this.readingCalls++;let a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&n<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,r,n+1,2*o,i)},o):i(a,s)},s=this.backend[r].bind(this.backend);if(2===s.length){try{let r=s(e,t);r&&"function"==typeof r.then?r.then(e=>a(null,e)).catch(a):a(null,r)}catch(e){a(e)}return}return s(e,t,a)}prepareLoading(e,t,r={},n){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),n&&n();aN(e)&&(e=this.languageUtils.toResolveHierarchy(e)),aN(t)&&(t=[t]);let o=this.queueLoad(e,t,r,n);if(!o.toLoad.length)return o.pending.length||n(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,r){this.prepareLoading(e,t,{},r)}reload(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}loadOne(e,t=""){let r=e.split("|"),n=r[0],o=r[1];this.read(n,o,"read",void 0,void 0,(r,i)=>{r&&this.logger.warn(`${t}loading namespace ${o} for language ${n} failed`,r),!r&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${n}`,i),this.loaded(e,r,i)})}saveMissing(e,t,r,n,o,i={},a=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t))return void this.logger.warn(`did not save key "${r}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");if(null!=r&&""!==r){if(this.backend?.create){let s={...i,isUpdate:o},l=this.backend.create.bind(this.backend);if(l.length<6)try{let o;(o=5===l.length?l(e,t,r,n,s):l(e,t,r,n))&&"function"==typeof o.then?o.then(e=>a(null,e)).catch(a):a(null,o)}catch(e){a(e)}else l(e,t,r,n,a,s)}e&&e[0]&&this.store.addResource(e[0],t,r,n)}}}let sa=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),aN(e[1])&&(t.defaultValue=e[1]),aN(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){let r=e[3]||e[2];Object.keys(r).forEach(e=>{t[e]=r[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),ss=e=>(aN(e.ns)&&(e.ns=[e.ns]),aN(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),aN(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),sl=()=>{};class su extends aX{constructor(e={},t){if(super(),this.options=ss(e),this.services={},this.logger=aJ,this.modules={external:[]},(e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))})})(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(aN(e.ns)?e.defaultNS=e.ns:0>e.ns.indexOf("translation")&&(e.defaultNS=e.ns[0]));let r=sa();this.options={...r,...this.options,...ss(e)},this.options.interpolation={...r.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator);let n=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?aJ.init(n(this.modules.logger),this.options):aJ.init(null,this.options),e=this.modules.formatter?this.modules.formatter:so;let t=new a5(this.options);this.store=new aQ(this.options.resources,this.options);let o=this.services;o.logger=aJ,o.resourceStore=this.store,o.languageUtils=t,o.pluralResolver=new a8(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),e&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(o.formatter=n(e),o.formatter.init&&o.formatter.init(o,this.options),this.options.interpolation.format=o.formatter.format.bind(o.formatter)),o.interpolator=new st(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new si(n(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(o.languageDetector=n(this.modules.languageDetector),o.languageDetector.init&&o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=n(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new a6(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=sl),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let o=aA(),i=()=>{let e=(e,r)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(r),t(e,r)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?i():setTimeout(i,0),o}loadResources(e,t=sl){let r=t,n=aN(e)?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(n?.toLowerCase()==="cimode"&&(!this.options.preload||0===this.options.preload.length))return r();let e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&0>e.indexOf(t)&&e.push(t)})};n?t(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),r(e)})}else r(null)}reloadResources(e,t,r){let n=aA();return"function"==typeof e&&(r=e,e=void 0),"function"==typeof t&&(r=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),r||(r=sl),this.services.backendConnector.reload(e,t,e=>{n.resolve(),r(e)}),n}use(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&a0.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&0>this.languages.indexOf(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let r=aA();this.emit("languageChanging",e);let n=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(o,i)=>{i?this.isLanguageChangingTo===e&&(n(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,r.resolve((...e)=>this.t(...e)),t&&t(o,(...e)=>this.t(...e))},i=t=>{e||t||!this.services.languageDetector||(t=[]);let r=aN(t)?t:t&&t[0],i=this.store.hasLanguageSomeTranslations(r)?r:this.services.languageUtils.getBestMatchFromCodes(aN(t)?[t]:t);i&&(this.language||n(i),this.translator.language||this.translator.changeLanguage(i),this.services.languageDetector?.cacheUserLanguage?.(i)),this.loadResources(i,e=>{o(e,i)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),r}getFixedT(e,t,r){let n=(e,t,...o)=>{let i,a;(i="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(o)):{...t}).lng=i.lng||n.lng,i.lngs=i.lngs||n.lngs,i.ns=i.ns||n.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||r||n.keyPrefix);let s=this.options.keySeparator||".";return i.keyPrefix&&Array.isArray(e)?a=e.map(e=>("function"==typeof e&&(e=a2(e,{...this.options,...t})),`${i.keyPrefix}${s}${e}`)):("function"==typeof e&&(e=a2(e,{...this.options,...t})),a=i.keyPrefix?`${i.keyPrefix}${s}${e}`:e),this.t(a,i)};return aN(e)?n.lng=e:n.lngs=e,n.ns=t,n.keyPrefix=r,n}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;let r=t.lng||this.resolvedLanguage||this.languages[0],n=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;let i=(e,t)=>{let r=this.services.backendConnector.state[`${e}|${t}`];return -1===r||0===r||2===r};if(t.precheck){let e=t.precheck(this,i);if(void 0!==e)return e}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,e)&&(!n||i(o,e)))}loadNamespaces(e,t){let r=aA();return this.options.ns?(aN(e)&&(e=[e]),e.forEach(e=>{0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}),this.loadResources(e=>{r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}loadLanguages(e,t){let r=aA();aN(e)&&(e=[e]);let n=this.options.preload||[],o=e.filter(e=>0>n.indexOf(e)&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=n.concat(o),this.loadResources(e=>{r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}let t=this.services?.languageUtils||new a5(sa());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){return new su(e,t)}cloneInstance(e={},t=sl){let r=e.forkResourceStore;r&&delete e.forkResourceStore;let n={...this.options,...e,isClone:!0},o=new su(n);return(void 0!==e.debug||void 0!==e.prefix)&&(o.logger=o.logger.clone(e)),["store","services","language"].forEach(e=>{o[e]=this[e]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r&&(o.store=new aQ(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((r,n)=>(r[n]={...e[t][n]},r),e[t]),e),{}),n),o.services.resourceStore=o.store),o.translator=new a6(o.services,n),o.translator.on("*",(e,...t)=>{o.emit(e,...t)}),o.init(n,t),o.translator.options=n,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}let sc=su.createInstance();sc.createInstance=su.createInstance,sc.createInstance,sc.dir,sc.init,sc.loadResources,sc.reloadResources,sc.use,sc.changeLanguage,sc.getFixedT,sc.t,sc.exists,sc.setDefaultNamespace,sc.hasLoadedNamespace,sc.loadNamespaces,sc.loadLanguages;let sd=sc.default||sc;function sp(e,t,r,n){return sd.t(t,{ns:e,defaultValue:r,...n})}function sf(e,t,r){return aR[e]?sp("core",e,t??aR[e],r):(console.error(`O3 Core Translations does not provide key '${e}'. The key itself is being rendered as text.`),e)}sd.on("initialized",function(){window.i18next.loadNamespaces(["core"])});let sh="import-map-override:",sm="import-map-overrides-disabled",sy="import-map-overrides:change",sg=!1,sb=null,sv=null;async function sw(){return sv??(sv=s_().then(({map:e,complete:t})=>(t||(sv=null),e))),sv}async function s_(){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:sx(t),complete:r}}function sx(e){let t={imports:{}};for(let r of e)r?.imports&&Object.assign(t.imports,r.imports);return t}function sE(){let e={};try{let t=sk();for(let r=0;r<localStorage.length;r++){let n=localStorage.key(r);if(n?.startsWith(sh)){let r=n.slice(sh.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 sS(){let e=await sw();return sg?sx([e,sb??sE()]):e}async function sD(){return sw()}async function sO(){return sg?sx([await sw(),sE()]):sw()}function sP(e){if(!sg)return{imports:{}};if(e){let e={};for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);if(r?.startsWith(sh)){let t=localStorage.getItem(r);t&&(e[r.slice(sh.length)]=t)}}return{imports:e}}return sE()}function sk(){if(!sg)return[];try{let e=localStorage.getItem(sm);if(e){let t=JSON.parse(e);if(Array.isArray(t))return t}}catch{}return[]}function sC(e){return!!sg&&sk().includes(e)}function sj(e,t){if(!sg)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.setItem(sh+e,t),window.dispatchEvent(new CustomEvent(sy))}catch(e){console.warn("[import-maps] Failed to write import-map override to localStorage",e)}}function sT(e){if(!sg)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.removeItem(sh+e);let t=sk().filter(t=>t!==e);t.length>0?localStorage.setItem(sm,JSON.stringify(t)):localStorage.removeItem(sm),window.dispatchEvent(new CustomEvent(sy))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}function sR(){if(!sg)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(sh)&&e.push(r)}e.forEach(e=>localStorage.removeItem(e)),localStorage.removeItem(sm),window.dispatchEvent(new CustomEvent(sy))}catch(e){console.warn("[import-maps] Failed to clear import-map overrides from localStorage",e)}}function sN(e){if(!sg)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{let t=sk().filter(t=>t!==e);t.length>0?localStorage.setItem(sm,JSON.stringify(t)):localStorage.removeItem(sm),window.dispatchEvent(new CustomEvent(sy))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}let sA=!1;function s$(){!sA&&(sA=!0,(sg="development"===window.spaEnv)&&(sb=sE()))}function sI(e){return e.replace(/[\/\-@]/g,"_")}async function sM(e,t="./start",n){var o;let i,a=!n?.maxLoadingTime||n.maxLoadingTime<=0?6e5:n.maxLoadingTime;await Promise.race([sL(e,n?.importMap),new Promise((t,r)=>{i=setTimeout(()=>{var t;r(Error(`Could not resolve requested script, ${e}, within ${(t=a)<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`}.`))},a)})]),i&&clearTimeout(i);let s=sI(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 sL(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=sI(e);if(!window[r]){let r=t??await sF();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 sP().imports;try{return await function(e){var t;let r=(t=window)[sB]??(t[sB]=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 i=new Promise((t,n)=>{let i=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 a(){clearTimeout(i),o.removeEventListener("load",s),o.removeEventListener("error",l)}function s(){a(),t()}function l(t){a(),r.delete(e),o.remove();let i=`Failed to load script from ${e}`;console.error(i,t),n(t.message??i)}o.addEventListener("load",s),o.addEventListener("error",l),document.head.appendChild(o)});return r.set(e,i),i}(n)}catch(e){return o&&j({kind:"error",title:sf("scriptLoadingFailed","Error: Script failed to load"),description:sf("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:sf("resetOverrides","Reset overrides"),onActionButtonClick(){sR(),window.location.reload()}}),Promise.reject(e)}}return Promise.resolve()}async function sF(){return sS()}let sB=Symbol.for("__openmrs_script_loading");function sV(e){return!!e&&"object"==typeof e&&!(Object.hasOwn(e,"pages")&&(!e.pages||!Array.isArray(e.pages))||Object.hasOwn(e,"extensions")&&(!e.extensions||!Array.isArray(e.extensions))||Object.hasOwn(e,"workspaces")&&(!e.workspaces||!Array.isArray(e.workspaces))||Object.hasOwn(e,"modals")&&(!e.modals||!Array.isArray(e.modals)))}function sU(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&&sV(t))}let sW="openmrs-routes:",sz="openmrs-routes:change",sK=!1,sH=null,sG=null;async function sq(){return sG??(sG=sZ().then(({map:e,complete:t})=>(t||(sG=null),e))),sG}async function sZ(){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&&sU(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:sY(t),complete:r}}function sY(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 sJ(){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(sW)){let e=localStorage.getItem(r);e&&t.push({moduleName:r.slice(sW.length),raw:e})}}for(let r of(await Promise.allSettled(t.map(async({moduleName:e,raw:t})=>{let r=JSON.parse(t);if(sV(r))return{moduleName:e,routes:r};if("string"==typeof r&&r.startsWith("http")){let t=await fetch(r),n=await t.json();if(sV(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 sX(){let e=await sq();return sK?sY([e,sH??await sJ()]):e}async function sQ(){return sq()}async function s0(){return sK?sY([await sq(),await sJ()]):sq()}function s1(){if(!sK)return{};let e={};try{for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);if(r?.startsWith(sW)){let t=localStorage.getItem(r);t&&(e[r.slice(sW.length)]=t)}}}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}function s2(e,t){if(!sK)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{if("string"==typeof t)if(t.startsWith("http"))localStorage.setItem(sW+e,JSON.stringify(t));else{let r=JSON.parse(t);if(!sV(r))return void console.error(`The supplied routes for ${e} is not a valid OpenmrsAppRoutes object`,t);localStorage.setItem(sW+e,JSON.stringify(r))}else if(t instanceof URL)localStorage.setItem(sW+e,JSON.stringify(t.toString()));else{if(!sV(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(sW+e,JSON.stringify(t))}window.dispatchEvent(new CustomEvent(sz))}catch(e){console.warn("[route-maps] Failed to write route override to localStorage",e)}}function s4(e){if(!sK)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{localStorage.removeItem(sW+e),window.dispatchEvent(new CustomEvent(sz))}catch(e){console.warn("[route-maps] Failed to remove route override from localStorage",e)}}function s3(){if(!sK)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(sW)&&e.push(r)}e.forEach(e=>localStorage.removeItem(e)),window.dispatchEvent(new CustomEvent(sz))}catch(e){console.warn("[route-maps] Failed to clear route overrides from localStorage",e)}}let s6=null;function s5(){return s6||(s6=(sK="development"===window.spaEnv)?sJ().then(e=>{sH=e}):Promise.resolve())}let s7=`${au}/attachment`;function s9(e,t){return af(`${s7}/${e}`,{signal:t.signal})}function s8(e,t,r){return af(`${s7}?patient=${e}&includeEncounterless=${t}`,{signal:r.signal})}async function le(e,t){let r=new FormData;return r.append("fileCaption",t.fileDescription),r.append("patient",e),t.file?r.append("file",t.file,t.fileName):(r.append("file",new File([""],t.fileName),t.fileName),r.append("base64Content",t.base64Content)),af(`${s7}`,{method:"POST",body:r})}function lt(e,t){return af(`${s7}/${e}`,{method:"DELETE",signal:t.signal})}try{self["workbox:window:6.5.4"]&&_()}catch(e){}function lr(e,t){return new Promise(function(r){var n=new MessageChannel;n.port1.onmessage=function(e){r(e.data)},e.postMessage(t,[n.port2])})}function ln(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 lo(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}try{self["workbox:core:6.5.4"]&&_()}catch(e){}var li=function(){var e=this;this.promise=new Promise(function(t,r){e.resolve=t,e.reject=r})};function la(e,t){var r=location.href;return new URL(e,r).href===new URL(t,r).href}var ls=function(e,t){this.type=e,Object.assign(this,t)};function ll(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function lu(){}var lc={type:"SKIP_WAITING"};function ld(e,t){if(!t)return e&&e.then?e.then(lu):Promise.resolve()}var lp=function(e){function t(t,r){var n,o;return void 0===r&&(r={}),(n=e.call(this)||this).nn={},n.tn=0,n.rn=new li,n.en=new li,n.on=new li,n.un=0,n.an=new Set,n.cn=function(){var e=n.fn,t=e.installing;n.tn>0||!la(t.scriptURL,n.sn.toString())||performance.now()>n.un+6e4?(n.vn=t,e.removeEventListener("updatefound",n.cn)):(n.hn=t,n.an.add(t),n.rn.resolve(t)),++n.tn,t.addEventListener("statechange",n.ln)},n.ln=function(e){var t=n.fn,r=e.target,o=r.state,i=r===n.vn,a={sw:r,isExternal:i,originalEvent:e};!i&&n.mn&&(a.isUpdate=!0),n.dispatchEvent(new ls(o,a)),"installed"===o?n.wn=self.setTimeout(function(){"installed"===o&&t.waiting===r&&n.dispatchEvent(new ls("waiting",a))},200):"activating"===o&&(clearTimeout(n.wn),i||n.en.resolve(r))},n.dn=function(e){var t=n.hn,r=t!==navigator.serviceWorker.controller;n.dispatchEvent(new ls("controlling",{isExternal:r,originalEvent:e,sw:t,isUpdate:n.mn})),r||n.on.resolve(t)},o=function(e){var t=e.data,r=e.ports,o=e.source;return ll(n.getSW(),function(){n.an.has(o)&&n.dispatchEvent(new ls("message",{data:t,originalEvent:e,ports:r,sw:o}))})},n.gn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(o.apply(this,e))}catch(e){return Promise.reject(e)}},n.sn=t,n.nn=r,navigator.serviceWorker.addEventListener("message",n.gn),n}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e;var r,n,o=t.prototype;return o.register=function(e){var t=(void 0===e?{}:e).immediate,r=void 0!==t&&t;try{var n,o,i,a=this;return n=function(){if(!r&&"complete"!==document.readyState)return ld(new Promise(function(e){return window.addEventListener("load",e)}))},o=function(){return a.mn=!!navigator.serviceWorker.controller,a.yn=a.pn(),ll(a.bn(),function(e){a.fn=e,a.yn&&(a.hn=a.yn,a.en.resolve(a.yn),a.on.resolve(a.yn),a.yn.addEventListener("statechange",a.ln,{once:!0}));var t=a.fn.waiting;return t&&la(t.scriptURL,a.sn.toString())&&(a.hn=t,Promise.resolve().then(function(){a.dispatchEvent(new ls("waiting",{sw:t,wasWaitingBeforeRegister:!0}))}).then(function(){})),a.hn&&(a.rn.resolve(a.hn),a.an.add(a.hn)),a.fn.addEventListener("updatefound",a.cn),navigator.serviceWorker.addEventListener("controllerchange",a.dn),a.fn})},(i=n())&&i.then?i.then(o):o(i)}catch(e){return Promise.reject(e)}},o.update=function(){try{return this.fn?ld(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},o.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},o.messageSW=function(e){try{return ll(this.getSW(),function(t){return lr(t,e)})}catch(e){return Promise.reject(e)}},o.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&lr(this.fn.waiting,lc)},o.pn=function(){var e=navigator.serviceWorker.controller;return e&&la(e.scriptURL,this.sn.toString())?e:void 0},o.bn=function(){try{var e=this;return function(e,t){try{var r=e()}catch(e){return t(e)}return r&&r.then?r.then(void 0,t):r}(function(){return ll(navigator.serviceWorker.register(e.sn,e.nn),function(t){return e.un=performance.now(),t})},function(e){throw e})}catch(e){return Promise.reject(e)}},r=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}],ln(t.prototype,r),n&&ln(t,n),t}(function(){function e(){this.Pn=new Map}var t=e.prototype;return t.addEventListener=function(e,t){this.Sn(e).add(t)},t.removeEventListener=function(e,t){this.Sn(e).delete(t)},t.dispatchEvent=function(e){e.target=this;for(var t,r=function(e){var t;if("u"<typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=function(e){if(e){if("string"==typeof e)return lo(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?lo(e,void 0):void 0}}(e))){t&&(e=t);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}(this.Sn(e.type));!(t=r()).done;)(0,t.value)(e)},t.Sn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}());function lf(e,t){if(void 0!==p)return console.warn(`The application's Service Worker has already been registered. The new service worker at ${e} will not be registered.`),p;if(!("serviceWorker"in navigator))throw Error("Registering the Service Worker is not possible due to missing browser capabilities.");let r=new lp(e,t);return p=r.register().then(()=>r.controlling.then(()=>r))}function lh(){return p??Promise.resolve(void 0)}let lm="x-omrs-offline-response-body",ly="x-omrs-offline-response-status",lg="x-omrs-offline-caching-strategy";async function lb(e){let t=await lh();return t?await t.messageSW(e):{success:!1,result:void 0,error:"No service worker has been registered. This is typically the case when the application has been built without offline-related features."}}async function lv(){let e=window.sessionStorage;try{e.setItem("someKeyHere","test"),e.removeItem("someKeyHere")}catch(t){if(t.code===DOMException.QUOTA_EXCEEDED_ERR&&0===e.length)return!0}return!1}async function lw(){return!window.indexedDB}async function l_(){return new Promise(e=>{let t=indexedDB.open("test");t.onerror=()=>e(!0),t.onsuccess=()=>e(!1)})}async function lx(){return await l_()||await lw()||await lv()}let lE="openmrs3:offline-mode",lS="unavailable";function lD(){return{current:lS,notAvailable:"unavailable"===lS,active:"on"===lS}}function lO(e){"unavailable"!==lS&&"unavailable"!==e&&(localStorage.setItem(lE,"on"===e?"active":"disabled"),lS=e)}async function lP(){await lx()||(lS="active"===localStorage.getItem(lE)?"on":"off"),navigator.onLine}let lk="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:global,lC=Object.keys,lj=Array.isArray;function lT(e,t){return"object"!=typeof t||lC(t).forEach(function(r){e[r]=t[r]}),e}"u"<typeof Promise||lk.Promise||(lk.Promise=Promise);let lR=Object.getPrototypeOf,lN={}.hasOwnProperty;function lA(e,t){return lN.call(e,t)}function l$(e,t){"function"==typeof t&&(t=t(lR(e))),("u"<typeof Reflect?lC:Reflect.ownKeys)(t).forEach(r=>{lM(e,r,t[r])})}let lI=Object.defineProperty;function lM(e,t,r,n){lI(e,t,lT(r&&lA(r,"get")&&"function"==typeof r.get?{get:r.get,set:r.set,configurable:!0}:{value:r,configurable:!0,writable:!0},n))}function lL(e){return{from:function(t){return e.prototype=Object.create(t.prototype),lM(e.prototype,"constructor",e),{extend:l$.bind(null,e.prototype)}}}}let lF=Object.getOwnPropertyDescriptor;function lB(e,t){let r;return lF(e,t)||(r=lR(e))&&lB(r,t)}let lV=[].slice;function lU(e,t,r){return lV.call(e,t,r)}function lW(e,t){return t(e)}function lz(e){if(!e)throw Error("Assertion Failed")}function lK(e){lk.setImmediate?setImmediate(e):setTimeout(e,0)}function lH(e,t){return e.reduce((e,r,n)=>{var o=t(r,n);return o&&(e[o[0]]=o[1]),e},{})}function lG(e,t){if(lA(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var r=[],n=0,o=t.length;n<o;++n){var i=lG(e,t[n]);r.push(i)}return r}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return void 0===s?void 0:lG(s,t.substr(a+1))}}function lq(e,t,r){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){lz("string"!=typeof r&&"length"in r);for(var n=0,o=t.length;n<o;++n)lq(e,t[n],r[n])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),s=t.substr(i+1);if(""===s)void 0===r?lj(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=r;else{var l=e[a];l&&lA(e,a)||(l=e[a]={}),lq(l,s,r)}}else void 0===r?lj(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=r}}function lZ(e){var t={};for(var r in e)lA(e,r)&&(t[r]=e[r]);return t}let lY=[].concat;function lJ(e){return lY.apply([],e)}let lX="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(lJ([8,16,32,64].map(e=>["Int","Uint","Float"].map(t=>t+e+"Array")))).filter(e=>lk[e]),lQ=lX.map(e=>lk[e]);lH(lX,e=>[e,!0]);let l0=null;function l1(e){l0="u">typeof WeakMap&&new WeakMap;let t=function e(t){if(!t||"object"!=typeof t)return t;let r=l0&&l0.get(t);if(r)return r;if(lj(t)){r=[],l0&&l0.set(t,r);for(var n=0,o=t.length;n<o;++n)r.push(e(t[n]))}else if(lQ.indexOf(t.constructor)>=0)r=t;else{let n=lR(t);for(var i in r=n===Object.prototype?{}:Object.create(n),l0&&l0.set(t,r),t)lA(t,i)&&(r[i]=e(t[i]))}return r}(e);return l0=null,t}let{toString:l2}={};function l4(e){return l2.call(e).slice(8,-1)}let l3="u">typeof Symbol?Symbol.iterator:"@@iterator",l6="symbol"==typeof l3?function(e){var t;return null!=e&&(t=e[l3])&&t.apply(e)}:function(){return null},l5={};function l7(e){var t,r,n,o;if(1==arguments.length){if(lj(e))return e.slice();if(this===l5&&"string"==typeof e)return[e];if(o=l6(e)){for(r=[];!(n=o.next()).done;)r.push(n.value);return r}if(null==e)return[e];if("number"==typeof(t=e.length)){for(r=Array(t);t--;)r[t]=e[t];return r}return[e]}for(t=arguments.length,r=Array(t);t--;)r[t]=arguments[t];return r}let l9="u">typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var l8="u">typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),ue=()=>!0;let ut=!Error("").stack;function ur(){if(ut)try{throw ur.arguments,Error()}catch(e){return e}return Error()}function un(e,t){var r=e.stack;return r?(t=t||0,0===r.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),r.split("\n").slice(t).filter(ue).map(e=>"\n"+e).join("")):""}var uo=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],ui=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(uo),ua={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function us(e,t){this._e=ur(),this.name=e,this.message=t}function ul(e,t){return e+". Errors: "+Object.keys(t).map(e=>t[e].toString()).filter((e,t,r)=>r.indexOf(e)===t).join("\n")}function uu(e,t,r,n){this._e=ur(),this.failures=t,this.failedKeys=n,this.successCount=r,this.message=ul(e,t)}function uc(e,t){this._e=ur(),this.name="BulkError",this.failures=Object.keys(t).map(e=>t[e]),this.failuresByPos=t,this.message=ul(e,t)}lL(us).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+un(this._e,2))}},toString:function(){return this.name+": "+this.message}}),lL(uu).from(us),lL(uc).from(us);var ud=ui.reduce((e,t)=>(e[t]=t+"Error",e),{}),up=ui.reduce((e,t)=>{var r=t+"Error";function n(e,n){this._e=ur(),this.name=r,e?"string"==typeof e?(this.message=`${e}${n?"\n "+n:""}`,this.inner=n||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=ua[t]||r,this.inner=null)}return lL(n).from(us),e[t]=n,e},{});up.Syntax=SyntaxError,up.Type=TypeError,up.Range=RangeError;var uf=uo.reduce((e,t)=>(e[t+"Error"]=up[t],e),{}),uh=ui.reduce((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=up[t]),e),{});function um(){}function uy(e){return e}function ug(e,t){return null==e||e===uy?t:function(r){return t(e(r))}}function ub(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function uv(e,t){return e===um?t:function(){var r=e.apply(this,arguments);void 0!==r&&(arguments[0]=r);var n=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=t.apply(this,arguments);return n&&(this.onsuccess=this.onsuccess?ub(n,this.onsuccess):n),o&&(this.onerror=this.onerror?ub(o,this.onerror):o),void 0!==i?i:r}}function uw(e,t){return e===um?t:function(){e.apply(this,arguments);var r=this.onsuccess,n=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),r&&(this.onsuccess=this.onsuccess?ub(r,this.onsuccess):r),n&&(this.onerror=this.onerror?ub(n,this.onerror):n)}}function u_(e,t){return e===um?t:function(r){var n=e.apply(this,arguments);lT(r,n);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?ub(o,this.onsuccess):o),i&&(this.onerror=this.onerror?ub(i,this.onerror):i),void 0===n?void 0===a?void 0:a:lT(n,a)}}function ux(e,t){return e===um?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function uE(e,t){return e===um?t:function(){var r=e.apply(this,arguments);if(r&&"function"==typeof r.then){for(var n=this,o=arguments.length,i=Array(o);o--;)i[o]=arguments[o];return r.then(function(){return t.apply(n,i)})}return t.apply(this,arguments)}}uh.ModifyError=uu,uh.DexieError=us,uh.BulkError=uc;var uS={};let[uD,uO,uP]="u"<typeof Promise?[]:(()=>{let e=Promise.resolve();if("u"<typeof crypto||!crypto.subtle)return[e,lR(e),e];let t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,lR(t),e]})(),uk=uO&&uO.then,uC=uD&&uD.constructor,uj=!!uP;var uT=!1,uR=uP?()=>{uP.then(uQ)}:lk.setImmediate?setImmediate.bind(null,uQ):lk.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver(()=>{uQ(),e=null}).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(uQ,0)},uN=function(e,t){uU.push([e,t]),u$&&(uR(),u$=!1)},uA=!0,u$=!0,uI=[],uM=[],uL=null,uF=uy,uB={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:cf,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(e=>{try{cf(e[0],e[1])}catch(e){}})}},uV=uB,uU=[],uW=0,uz=[];function uK(e){if("object"!=typeof this)throw TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=um,this._lib=!1;var t=this._PSD=uV;if(l8&&(this._stackHolder=ur(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==uS)throw TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&uq(this,this._value))}this._state=null,this._value=null,++t.ref,function e(t,r){try{r(r=>{if(null===t._state){if(r===t)throw TypeError("A promise cannot be resolved with itself.");var n=t._lib&&u0();r&&"function"==typeof r.then?e(t,(e,t)=>{r instanceof uK?r._then(e,t):r.then(e,t)}):(t._state=!0,t._value=r,uZ(t)),n&&u1()}},uq.bind(null,t))}catch(e){uq(t,e)}}(this,e)}let uH={get:function(){var e=uV,t=u8;function r(r,n){var o=!e.global&&(e!==uV||t!==u8);let i=o&&!cn();var a=new uK((t,a)=>{uY(this,new uG(cc(r,e,o,i),cc(n,e,o,i),t,a,e))});return l8&&uX(a,this),a}return r.prototype=uS,r},set:function(e){lM(this,"then",e&&e.prototype===uS?uH:{get:function(){return e},set:uH.set})}};function uG(e,t,r,n,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=r,this.reject=n,this.psd=o}function uq(e,t){if(uM.push(t),null===e._state){var r=e._lib&&u0();t=uF(t),e._state=!1,e._value=t,l8&&null!==t&&"object"==typeof t&&!t._promise&&function(e){try{e.apply(null,void 0)}catch(e){}}(()=>{var r=lB(t,"stack");t._promise=e,lM(t,"stack",{get:()=>uT?r&&(r.get?r.get.apply(t):r.value):e.stack})}),uI.some(t=>t._value===e._value)||uI.push(e),uZ(e),r&&u1()}}function uZ(e){var t=e._listeners;e._listeners=[];for(var r=0,n=t.length;r<n;++r)uY(e,t[r]);var o=e._PSD;--o.ref||o.finalize(),0===uW&&(++uW,uN(()=>{0==--uW&&u2()},[]))}function uY(e,t){if(null!==e._state){var r=e._state?t.onFulfilled:t.onRejected;if(null===r)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++uW,uN(uJ,[r,e,t])}else e._listeners.push(t)}function uJ(e,t,r){try{uL=t;var n,o=t._value;t._state?n=e(o):(uM.length&&(uM=[]),n=e(o),-1===uM.indexOf(o)&&function(e){for(var t=uI.length;t;)if(uI[--t]._value===e._value)return void uI.splice(t,1)}(t)),r.resolve(n)}catch(e){r.reject(e)}finally{uL=null,0==--uW&&u2(),--r.psd.ref||r.psd.finalize()}}function uX(e,t){var r=t?t._numPrev+1:0;r<100&&(e._prev=t,e._numPrev=r)}function uQ(){u0()&&u1()}function u0(){var e=uA;return uA=!1,u$=!1,e}function u1(){var e,t,r;do for(;uU.length>0;)for(e=uU,uU=[],r=e.length,t=0;t<r;++t){var n=e[t];n[0].apply(null,n[1])}while(uU.length>0);uA=!0,u$=!0}function u2(){var e=uI;uI=[],e.forEach(e=>{e._PSD.onunhandled.call(null,e._value,e)});for(var t=uz.slice(0),r=t.length;r;)t[--r]()}function u4(e){return new uK(uS,!1,e)}function u3(e,t){var r=uV;return function(){var n=u0(),o=uV;try{return cs(r,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{cs(o,!1),n&&u1()}}}l$(uK.prototype,{then:uH,_then:function(e,t){uY(this,new uG(null,null,e,t,uV))},catch:function(e){if(1==arguments.length)return this.then(null,e);var t=arguments[0],r=arguments[1];return"function"==typeof t?this.then(null,e=>e instanceof t?r(e):u4(e)):this.then(null,e=>e&&e.name===t?r(e):u4(e))},finally:function(e){return this.then(t=>(e(),t),t=>(e(),u4(t)))},stack:{get:function(){if(this._stack)return this._stack;try{uT=!0;var e=(function e(t,r,n){if(r.length===n)return r;var o="";if(!1===t._state){var i,a,s=t._value;null!=s?(i=s.name||"Error",a=s.message||s,o=un(s,0)):(i=s,a=""),r.push(i+(a?": "+a:"")+o)}return l8&&((o=un(t._stackHolder,2))&&-1===r.indexOf(o)&&r.push(o),t._prev&&e(t._prev,r,n)),r})(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{uT=!1}}},timeout:function(e,t){return e<1/0?new uK((r,n)=>{var o=setTimeout(()=>n(new up.Timeout(t)),e);this.then(r,n).finally(clearTimeout.bind(null,o))}):this}}),"u">typeof Symbol&&Symbol.toStringTag&&lM(uK.prototype,Symbol.toStringTag,"Dexie.Promise"),uB.env=cl(),l$(uK,{all:function(){var e=l7.apply(null,arguments).map(co);return new uK(function(t,r){0===e.length&&t([]);var n=e.length;e.forEach((o,i)=>uK.resolve(o).then(r=>{e[i]=r,--n||t(e)},r))})},resolve:e=>{if(e instanceof uK)return e;if(e&&"function"==typeof e.then)return new uK((t,r)=>{e.then(t,r)});var t=new uK(uS,!0,e);return uX(t,uL),t},reject:u4,race:function(){var e=l7.apply(null,arguments).map(co);return new uK((t,r)=>{e.map(e=>uK.resolve(e).then(t,r))})},PSD:{get:()=>uV,set:e=>uV=e},totalEchoes:{get:()=>u8},newPSD:ct,usePSD:cu,scheduler:{get:()=>uN,set:e=>{uN=e}},rejectionMapper:{get:()=>uF,set:e=>{uF=e}},follow:(e,t)=>new uK((r,n)=>ct((t,r)=>{var n=uV;n.unhandleds=[],n.onunhandled=r,n.finalize=ub(function(){var e;e=()=>{0===this.unhandleds.length?t():r(this.unhandleds[0])},uz.push(function t(){e(),uz.splice(uz.indexOf(t),1)}),++uW,uN(()=>{0==--uW&&u2()},[])},n.finalize),e()},t,r,n))}),uC&&(uC.allSettled&&lM(uK,"allSettled",function(){let e=l7.apply(null,arguments).map(co);return new uK(t=>{0===e.length&&t([]);let r=e.length,n=Array(r);e.forEach((e,o)=>uK.resolve(e).then(e=>n[o]={status:"fulfilled",value:e},e=>n[o]={status:"rejected",reason:e}).then(()=>--r||t(n)))})}),uC.any&&"u">typeof AggregateError&&lM(uK,"any",function(){let e=l7.apply(null,arguments).map(co);return new uK((t,r)=>{0===e.length&&r(AggregateError([]));let n=e.length,o=Array(n);e.forEach((e,i)=>uK.resolve(e).then(e=>t(e),e=>{o[i]=e,--n||r(AggregateError(o))}))})}));let u6={awaits:0,echoes:0,id:0};var u5=0,u7=[],u9=0,u8=0,ce=0;function ct(e,t,r,n){var o=uV,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++ce;var a=uB.env;i.env=uj?{Promise:uK,PromiseProp:{value:uK,configurable:!0,writable:!0},all:uK.all,race:uK.race,allSettled:uK.allSettled,any:uK.any,resolve:uK.resolve,reject:uK.reject,nthen:cd(a.nthen,i),gthen:cd(a.gthen,i)}:{},t&&lT(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=cu(i,e,r,n);return 0===i.ref&&i.finalize(),s}function cr(){return u6.id||(u6.id=++u5),++u6.awaits,u6.echoes+=100,u6.id}function cn(){return!!u6.awaits&&(0==--u6.awaits&&(u6.id=0),u6.echoes=100*u6.awaits,!0)}function co(e){return u6.echoes&&e&&e.constructor===uC?(cr(),e.then(e=>(cn(),e),e=>(cn(),ch(e)))):e}function ci(e){++u8,u6.echoes&&0!=--u6.echoes||(u6.echoes=u6.id=0),u7.push(uV),cs(e,!0)}function ca(){var e=u7[u7.length-1];u7.pop(),cs(e,!1)}function cs(e,t){var r,n=uV;if((t?!u6.echoes||u9++&&e===uV:!u9||--u9&&e===uV)||(r=t?ci.bind(null,e):ca,uk.call(uD,r)),e!==uV&&(uV=e,n===uB&&(uB.env=cl()),uj)){var o=uB.env.Promise,i=e.env;uO.then=i.nthen,o.prototype.then=i.gthen,(n.global||e.global)&&(Object.defineProperty(lk,"Promise",i.PromiseProp),o.all=i.all,o.race=i.race,o.resolve=i.resolve,o.reject=i.reject,i.allSettled&&(o.allSettled=i.allSettled),i.any&&(o.any=i.any))}}function cl(){var e=lk.Promise;return uj?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(lk,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:uO.then,gthen:e.prototype.then}:{}}function cu(e,t,r,n,o){var i=uV;try{return cs(e,!0),t(r,n,o)}finally{cs(i,!1)}}function cc(e,t,r,n){return"function"!=typeof e?e:function(){var o,i=uV;r&&cr(),cs(t,!0);try{return e.apply(this,arguments)}finally{cs(i,!1),n&&(o=cn,uk.call(uD,o))}}}function cd(e,t){return function(r,n){return e.call(this,cc(r,t),cc(n,t))}}-1===(""+uk).indexOf("[native code]")&&(cr=cn=um);let cp="unhandledrejection";function cf(e,t){var r;try{r=t.onuncatched(e)}catch(e){}if(!1!==r)try{var n,o={promise:t,reason:e};if(lk.document&&document.createEvent?((n=document.createEvent("Event")).initEvent(cp,!0,!0),lT(n,o)):lk.CustomEvent&&lT(n=new CustomEvent(cp,{detail:o}),o),n&&lk.dispatchEvent&&(dispatchEvent(n),!lk.PromiseRejectionEvent&&lk.onunhandledrejection))try{lk.onunhandledrejection(n)}catch(e){}l8&&n&&!n.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}var ch=uK.reject;let cm="3.2.4",cy=String.fromCharCode(65535),cg=-1/0,cb="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",cv="String expected.",cw=[],c_="u">typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),cx=e=>!/(dexie\.js|dexie\.min\.js)/.test(e),cE="__dbnames",cS="readonly",cD="readwrite";function cO(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}let cP={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function ck(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=l1(t))[e],t)}class cC{_trans(e,t,r){let n=this._tx||uV.trans,o=this.name;function i(e,r,n){if(!n.schema[o])throw new up.NotFound("Table "+o+" not part of transaction");return t(n.idbtrans,n)}let a=u0();try{return n&&n.db===this.db?n===uV.trans?n._promise(e,i,r):ct(()=>n._promise(e,i,r),{trans:n,transless:uV.transless||uV}):function e(t,r,n,o){if(t.idbdb&&(t._state.openComplete||uV.letThrough||t._vip)){var i=t._createTransaction(r,n,t._dbSchema);try{i.create(),t._state.PR1398_maxLoop=3}catch(i){return i.name===ud.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>e(t,r,n,o))):ch(i)}return i._promise(r,(e,t)=>ct(()=>(uV.trans=i,o(e,t,i)))).then(e=>i._completion.then(()=>e))}if(t._state.openComplete)return ch(new up.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return ch(new up.DatabaseClosed);t.open().catch(um)}return t._state.dbReadyPromise.then(()=>e(t,r,n,o))}(this.db,e,[this.name],i)}finally{a&&u1()}}get(e,t){return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",t=>this.core.get({trans:t,key:e}).then(e=>this.hook.reading.fire(e))).then(t)}where(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(lj(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);let t=lC(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);let r=this.schema.indexes.concat(this.schema.primKey).filter(e=>e.compound&&t.every(t=>e.keyPath.indexOf(t)>=0)&&e.keyPath.every(e=>t.indexOf(e)>=0))[0];if(r&&this.db._maxKey!==cy)return this.where(r.name).equals(r.keyPath.map(t=>e[t]));!r&&l8&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);let{idxByName:n}=this.schema,o=this.db._deps.indexedDB;function i(e,t){try{return 0===o.cmp(e,t)}catch(e){return!1}}let[a,s]=t.reduce(([t,r],o)=>{let a=n[o],s=e[o];return[t||a,t||!a?cO(r,a&&a.multi?e=>{let t=lG(e,o);return lj(t)&&t.some(e=>i(s,e))}:e=>i(s,lG(e,o))):r]},[null,null]);return a?this.where(a.name).equals(e[a.keyPath]).filter(s):r?this.filter(s):this.where(t).equals("")}filter(e){return this.toCollection().and(e)}count(e){return this.toCollection().count(e)}offset(e){return this.toCollection().offset(e)}limit(e){return this.toCollection().limit(e)}each(e){return this.toCollection().each(e)}toArray(e){return this.toCollection().toArray(e)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(e){return new this.db.Collection(new this.db.WhereClause(this,lj(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;let t=t=>{if(!t)return t;let r=Object.create(e.prototype);for(var n in t)if(lA(t,n))try{r[n]=t[n]}catch(e){}return r};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}defineClass(){return this.mapToClass(function(e){lT(this,e)})}add(e,t){let{auto:r,keyPath:n}=this.schema.primKey,o=e;return n&&r&&(o=ck(n)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[o]})).then(e=>e.numFailures?uK.reject(e.failures[0]):e.lastResult).then(t=>{if(n)try{lq(e,n,t)}catch(e){}return t})}update(e,t){if("object"!=typeof e||lj(e))return this.where(":id").equals(e).modify(t);{let r=lG(e,this.schema.primKey.keyPath);if(void 0===r)return ch(new up.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?lC(t).forEach(r=>{lq(e,r,t[r])}):t(e,{value:e,primKey:r})}catch(e){}return this.where(":id").equals(r).modify(t)}}put(e,t){let{auto:r,keyPath:n}=this.schema.primKey,o=e;return n&&r&&(o=ck(n)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=t?[t]:null})).then(e=>e.numFailures?uK.reject(e.failures[0]):e.lastResult).then(t=>{if(n)try{lq(e,n,t)}catch(e){}return t})}delete(e){return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"delete",keys:[e]})).then(e=>e.numFailures?uK.reject(e.failures[0]):void 0)}clear(){return this._trans("readwrite",e=>this.core.mutate({trans:e,type:"deleteRange",range:cP})).then(e=>e.numFailures?uK.reject(e.failures[0]):void 0)}bulkGet(e){return this._trans("readonly",t=>this.core.getMany({keys:e,trans:t}).then(e=>e.map(e=>this.hook.reading.fire(e))))}bulkAdd(e,t,r){let n=Array.isArray(t)?t:void 0,o=(r=r||(n?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",t=>{let{auto:r,keyPath:i}=this.schema.primKey;if(i&&n)throw new up.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(n&&n.length!==e.length)throw new up.InvalidArgument("Arguments objects and keys must have the same length");let a=e.length,s=i&&r?e.map(ck(i)):e;return this.core.mutate({trans:t,type:"add",keys:n,values:s,wantResults:o}).then(({numFailures:e,results:t,lastResult:r,failures:n})=>{if(0===e)return o?t:r;throw new uc(`${this.name}.bulkAdd(): ${e} of ${a} operations failed`,n)})})}bulkPut(e,t,r){let n=Array.isArray(t)?t:void 0,o=(r=r||(n?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",t=>{let{auto:r,keyPath:i}=this.schema.primKey;if(i&&n)throw new up.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(n&&n.length!==e.length)throw new up.InvalidArgument("Arguments objects and keys must have the same length");let a=e.length,s=i&&r?e.map(ck(i)):e;return this.core.mutate({trans:t,type:"put",keys:n,values:s,wantResults:o}).then(({numFailures:e,results:t,lastResult:r,failures:n})=>{if(0===e)return o?t:r;throw new uc(`${this.name}.bulkPut(): ${e} of ${a} operations failed`,n)})})}bulkDelete(e){let t=e.length;return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"delete",keys:e})).then(({numFailures:e,lastResult:r,failures:n})=>{if(0===e)return r;throw new uc(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,n)})}}function cj(e){var t={},r=function(r,n){if(n){for(var o=arguments.length,i=Array(o-1);--o;)i[o-1]=arguments[o];return t[r].subscribe.apply(null,i),e}if("string"==typeof r)return t[r]};r.addEventType=i;for(var n=1,o=arguments.length;n<o;++n)i(arguments[n]);return r;function i(e,n,o){if("object"!=typeof e){n||(n=ux),o||(o=um);var a={subscribers:[],fire:o,subscribe:function(e){-1===a.subscribers.indexOf(e)&&(a.subscribers.push(e),a.fire=n(a.fire,e))},unsubscribe:function(e){a.subscribers=a.subscribers.filter(function(t){return t!==e}),a.fire=a.subscribers.reduce(n,o)}};return t[e]=r[e]=a,a}lC(e).forEach(function(t){var r=e[t];if(lj(r))i(t,e[t][0],e[t][1]);else{if("asap"!==r)throw new up.InvalidArgument("Invalid event config");var n=i(t,uy,function(){for(var e=arguments.length,t=Array(e);e--;)t[e]=arguments[e];n.subscribers.forEach(function(e){lK(function(){e.apply(null,t)})})})}})}}function cT(e,t){return lL(t).from({prototype:e}),t}function cR(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function cN(e,t){e.filter=cO(e.filter,t)}function cA(e,t,r){var n=e.replayFilter;e.replayFilter=n?()=>cO(n(),t()):t,e.justLimit=r&&!n}function c$(e,t){if(e.isPrimKey)return t.primaryKey;let r=t.getIndexByKeyPath(e.index);if(!r)throw new up.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return r}function cI(e,t,r){let n=c$(e,t.schema);return t.openCursor({trans:r,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:n,range:e.range}})}function cM(e,t,r,n){let o=e.replayFilter?cO(e.filter,e.replayFilter()):e.filter;if(e.or){let i={},a=(e,r,n)=>{if(!o||o(r,n,e=>r.stop(e),e=>r.fail(e))){var a=r.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),lA(i,s)||(i[s]=!0,t(e,r,n))}};return Promise.all([e.or._iterate(a,r),cL(cI(e,n,r),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return cL(cI(e,n,r),cO(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)}function cL(e,t,r,n){var o=u3(n?(e,t,o)=>r(n(e),t,o):r);return e.then(e=>{if(e)return e.start(()=>{var r=()=>e.continue();t&&!t(e,e=>r=e,t=>{e.stop(t),r=um},t=>{e.fail(t),r=um})||o(e.value,e,e=>r=e),r()})})}function cF(e,t){try{let r=cB(e),n=cB(t);if(r!==n)return"Array"===r?1:"Array"===n?-1:"binary"===r?1:"binary"===n?-1:"string"===r?1:"string"===n?-1:"Date"===r?1:"Date"!==n?NaN:-1;switch(r){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){let r=e.length,n=t.length,o=r<n?r:n;for(let r=0;r<o;++r)if(e[r]!==t[r])return e[r]<t[r]?-1:1;return r===n?0:r<n?-1:1}(cV(e),cV(t));case"Array":return function(e,t){let r=e.length,n=t.length,o=r<n?r:n;for(let r=0;r<o;++r){let n=cF(e[r],t[r]);if(0!==n)return n}return r===n?0:r<n?-1:1}(e,t)}}catch(e){}return NaN}function cB(e){let t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";let r=l4(e);return"ArrayBuffer"===r?"binary":r}function cV(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class cU{_read(e,t){var r=this._ctx;return r.error?r.table._trans(null,ch.bind(null,r.error)):r.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,ch.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=cO(t.algorithm,e)}_iterate(e,t){return cM(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),r=Object.create(this._ctx);return e&&lT(r,e),t._ctx=r,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read(r=>cM(t,e,r,t.table.core))}count(e){return this._read(e=>{let t=this._ctx,r=t.table.core;if(cR(t,!0))return r.count({trans:e,query:{index:c$(t,r.schema),range:t.range}}).then(e=>Math.min(e,t.limit));var n=0;return cM(t,()=>(++n,!1),e,r).then(()=>n)}).then(e)}sortBy(e,t){let r=e.split(".").reverse(),n=r[0],o=r.length-1;function i(e,t){return t?i(e[r[t]],t-1):e[n]}var a="next"===this._ctx.dir?1:-1;function s(e,t){var r=i(e,o),n=i(t,o);return r<n?-a:r>n?a:0}return this.toArray(function(e){return e.sort(s)}).then(t)}toArray(e){return this._read(e=>{var t=this._ctx;if("next"===t.dir&&cR(t,!0)&&t.limit>0){let{valueMapper:r}=t,n=c$(t,t.table.core.schema);return t.table.core.query({trans:e,limit:t.limit,values:!0,query:{index:n,range:t.range}}).then(({result:e})=>r?e.map(r):e)}{let r=[];return cM(t,e=>r.push(e),e,t.table.core).then(()=>r)}},e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,cR(t)?cA(t,()=>{var t=e;return(e,r)=>0===t||(1===t?--t:r(()=>{e.advance(t),t=0}),!1)}):cA(t,()=>{var t=e;return()=>--t<0})),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),cA(this._ctx,()=>{var t=e;return function(e,r,n){return--t<=0&&r(n),t>=0}},!0),this}until(e,t){return cN(this._ctx,function(r,n,o){return!e(r.value)||(n(o),t)}),this}first(e){return this.limit(1).toArray(function(e){return e[0]}).then(e)}last(e){return this.reverse().first(e)}filter(e){var t;return cN(this._ctx,function(t){return e(t.value)}),(t=this._ctx).isMatch=cO(t.isMatch,e),this}and(e){return this.filter(e)}or(e){return new this.db.WhereClause(this._ctx.table,e,this)}reverse(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,r){e(r.key,r)})}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,r){e(r.primaryKey,r)})}keys(e){var t=this._ctx;t.keysOnly=!t.isMatch;var r=[];return this.each(function(e,t){r.push(t.key)}).then(function(){return r}).then(e)}primaryKeys(e){var t=this._ctx;if("next"===t.dir&&cR(t,!0)&&t.limit>0)return this._read(e=>{var r=c$(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:r,range:t.range}})}).then(({result:e})=>e).then(e);t.keysOnly=!t.isMatch;var r=[];return this.each(function(e,t){r.push(t.primaryKey)}).then(function(){return r}).then(e)}uniqueKeys(e){return this._ctx.unique="unique",this.keys(e)}firstKey(e){return this.limit(1).keys(function(e){return e[0]}).then(e)}lastKey(e){return this.reverse().firstKey(e)}distinct(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var r={};return cN(this._ctx,function(e){var t=e.primaryKey.toString(),n=lA(r,t);return r[t]=!0,!n}),this}modify(e){var t=this._ctx;return this._write(r=>{var n;if("function"==typeof e)n=e;else{var o=lC(e),i=o.length;n=function(t){for(var r=!1,n=0;n<i;++n){var a=o[n],s=e[a];lG(t,a)!==s&&(lq(t,a,s),r=!0)}return r}}let a=t.table.core,{outbound:s,extractKey:l}=a.schema.primaryKey,u=this.db._options.modifyChunkSize||200,c=[],d=0,p=[],f=(e,t)=>{let{failures:r,numFailures:n}=t;for(let t of(d+=e-n,lC(r)))c.push(r[t])};return this.clone().primaryKeys().then(o=>{let i=c=>{let d=Math.min(u,o.length-c);return a.getMany({trans:r,keys:o.slice(c,c+d),cache:"immutable"}).then(p=>{let h=[],m=[],y=s?[]:null,g=[];for(let e=0;e<d;++e){let t=p[e],r={value:l1(t),primKey:o[c+e]};!1!==n.call(r,r.value,r)&&(null==r.value?g.push(o[c+e]):s||0===cF(l(t),l(r.value))?(m.push(r.value),s&&y.push(o[c+e])):(g.push(o[c+e]),h.push(r.value)))}let b=cR(t)&&t.limit===1/0&&("function"!=typeof e||e===cW)&&{index:t.index,range:t.range};return Promise.resolve(h.length>0&&a.mutate({trans:r,type:"add",values:h}).then(e=>{for(let t in e.failures)g.splice(parseInt(t),1);f(h.length,e)})).then(()=>(m.length>0||b&&"object"==typeof e)&&a.mutate({trans:r,type:"put",keys:y,values:m,criteria:b,changeSpec:"function"!=typeof e&&e}).then(e=>f(m.length,e))).then(()=>(g.length>0||b&&e===cW)&&a.mutate({trans:r,type:"delete",keys:g,criteria:b}).then(e=>f(g.length,e))).then(()=>o.length>c+d&&i(c+u))})};return i(0).then(()=>{if(c.length>0)throw new uu("Error modifying one or more objects",c,d,p);return o.length})})})}delete(){var e=this._ctx,t=e.range;return cR(e)&&(e.isPrimKey&&!c_||3===t.type)?this._write(r=>{let{primaryKey:n}=e.table.core.schema;return e.table.core.count({trans:r,query:{index:n,range:t}}).then(n=>e.table.core.mutate({trans:r,type:"deleteRange",range:t}).then(({failures:e,lastResult:t,results:r,numFailures:o})=>{if(o)throw new uu("Could not delete some values",Object.keys(e).map(t=>e[t]),n-o);return n-o}))}):this.modify(cW)}}let cW=(e,t)=>t.value=null;function cz(e,t){return e<t?-1:+(e!==t)}function cK(e,t){return e>t?-1:+(e!==t)}function cH(e,t,r){var n=e instanceof cJ?new e.Collection(e):e;return n._ctx.error=r?new r(t):TypeError(t),n}function cG(e){return new e.Collection(e,()=>cY("")).limit(0)}function cq(e,t,r,n){var o,i,a,s,l,u,c,d=r.length;if(!r.every(e=>"string"==typeof e))return cH(e,cv);function p(e){o="next"===e?e=>e.toUpperCase():e=>e.toLowerCase(),i="next"===e?e=>e.toLowerCase():e=>e.toUpperCase(),a="next"===e?cz:cK;var t=r.map(function(e){return{lower:i(e),upper:o(e)}}).sort(function(e,t){return a(e.lower,t.lower)});s=t.map(function(e){return e.upper}),l=t.map(function(e){return e.lower}),u=e,c="next"===e?"":n}p("next");var f=new e.Collection(e,()=>cZ(s[0],l[d-1]+n));f._ondirectionchange=function(e){p(e)};var h=0;return f._addAlgorithm(function(e,r,n){var o=e.key;if("string"!=typeof o)return!1;var p=i(o);if(t(p,l,h))return!0;for(var f=null,m=h;m<d;++m){var y=function(e,t,r,n,o,i){for(var a=Math.min(e.length,n.length),s=-1,l=0;l<a;++l){var u=t[l];if(u!==n[l])return 0>o(e[l],r[l])?e.substr(0,l)+r[l]+r.substr(l+1):0>o(e[l],n[l])?e.substr(0,l)+n[l]+r.substr(l+1):s>=0?e.substr(0,s)+t[s]+r.substr(s+1):null;0>o(e[l],u)&&(s=l)}return a<n.length&&"next"===i?e+r.substr(e.length):a<e.length&&"prev"===i?e.substr(0,r.length):s<0?null:e.substr(0,s)+n[s]+r.substr(s+1)}(o,p,s[m],l[m],a,u);null===y&&null===f?h=m+1:(null===f||a(f,y)>0)&&(f=y)}return r(null!==f?function(){e.continue(f+c)}:n),!1}),f}function cZ(e,t,r,n){return{type:2,lower:e,upper:t,lowerOpen:r,upperOpen:n}}function cY(e){return{type:1,lower:e,upper:e}}class cJ{get Collection(){return this._ctx.table.db.Collection}between(e,t,r,n){r=!1!==r,n=!0===n;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(r||n)&&(!r||!n)?cG(this):new this.Collection(this,()=>cZ(e,t,!r,!n))}catch(e){return cH(this,cb)}}equals(e){return null==e?cH(this,cb):new this.Collection(this,()=>cY(e))}above(e){return null==e?cH(this,cb):new this.Collection(this,()=>cZ(e,void 0,!0))}aboveOrEqual(e){return null==e?cH(this,cb):new this.Collection(this,()=>cZ(e,void 0,!1))}below(e){return null==e?cH(this,cb):new this.Collection(this,()=>cZ(void 0,e,!1,!0))}belowOrEqual(e){return null==e?cH(this,cb):new this.Collection(this,()=>cZ(void 0,e))}startsWith(e){return"string"!=typeof e?cH(this,cv):this.between(e,e+cy,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):cq(this,(e,t)=>0===e.indexOf(t[0]),[e],cy)}equalsIgnoreCase(e){return cq(this,(e,t)=>e===t[0],[e],"")}anyOfIgnoreCase(){var e=l7.apply(l5,arguments);return 0===e.length?cG(this):cq(this,(e,t)=>-1!==t.indexOf(e),e,"")}startsWithAnyOfIgnoreCase(){var e=l7.apply(l5,arguments);return 0===e.length?cG(this):cq(this,(e,t)=>t.some(t=>0===e.indexOf(t)),e,cy)}anyOf(){let e=l7.apply(l5,arguments),t=this._cmp;try{e.sort(t)}catch(e){return cH(this,cb)}if(0===e.length)return cG(this);let r=new this.Collection(this,()=>cZ(e[0],e[e.length-1]));r._ondirectionchange=r=>{t="next"===r?this._ascending:this._descending,e.sort(t)};let n=0;return r._addAlgorithm((r,o,i)=>{let a=r.key;for(;t(a,e[n])>0;)if(++n===e.length)return o(i),!1;return 0===t(a,e[n])||(o(()=>{r.continue(e[n])}),!1)}),r}notEqual(e){return this.inAnyRange([[cg,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){let e=l7.apply(l5,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return cH(this,cb)}let t=e.reduce((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[cg,t]],null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,t){let r=this._cmp,n=this._ascending,o=this._descending,i=this._min,a=this._max;if(0===e.length)return cG(this);if(!e.every(e=>void 0!==e[0]&&void 0!==e[1]&&0>=n(e[0],e[1])))return cH(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",up.InvalidArgument);let s=!t||!1!==t.includeLowers,l=t&&!0===t.includeUppers,u,c=n;function d(e,t){return c(e[0],t[0])}try{(u=e.reduce(function(e,t){let n=0,o=e.length;for(;n<o;++n){let o=e[n];if(0>r(t[0],o[1])&&r(t[1],o[0])>0){o[0]=i(o[0],t[0]),o[1]=a(o[1],t[1]);break}}return n===o&&e.push(t),e},[])).sort(d)}catch(e){return cH(this,cb)}let p=0,f=l?e=>n(e,u[p][1])>0:e=>n(e,u[p][1])>=0,h=s?e=>o(e,u[p][0])>0:e=>o(e,u[p][0])>=0,m=f,y=new this.Collection(this,()=>cZ(u[0][0],u[u.length-1][1],!s,!l));return y._ondirectionchange=e=>{"next"===e?(m=f,c=n):(m=h,c=o),u.sort(d)},y._addAlgorithm((e,t,r)=>{for(var o=e.key;m(o);)if(++p===u.length)return t(r),!1;return!!(!f(o)&&!h(o))||(0===this._cmp(o,u[p][1])||0===this._cmp(o,u[p][0])||t(()=>{c===n?e.continue(u[p][0]):e.continue(u[p][1])}),!1)}),y}startsWithAnyOf(){let e=l7.apply(l5,arguments);return e.every(e=>"string"==typeof e)?0===e.length?cG(this):this.inAnyRange(e.map(e=>[e,e+cy])):cH(this,"startsWithAnyOf() only works with strings")}}function cX(e){return u3(function(t){return cQ(t),e(t.target.error),!1})}function cQ(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}let c0="storagemutated",c1="x-storagemutated-1",c2=cj(null,c0);class c4{_lock(){return lz(!uV.global),++this._reculock,1!==this._reculock||uV.global||(uV.lockOwnerFor=this),this}_unlock(){if(lz(!uV.global),0==--this._reculock)for(uV.global||(uV.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{cu(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&uV.lockOwnerFor!==this}create(e){if(!this.mode)return this;let t=this.db.idbdb,r=this.db._state.dbOpenError;if(lz(!this.idbtrans),!e&&!t)switch(r&&r.name){case"DatabaseClosedError":throw new up.DatabaseClosed(r);case"MissingAPIError":throw new up.MissingAPI(r.message,r);default:throw new up.OpenFailed(r)}if(!this.active)throw new up.TransactionInactive;return lz(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):t.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=u3(t=>{cQ(t),this._reject(e.error)}),e.onabort=u3(t=>{cQ(t),this.active&&this._reject(new up.Abort(e.error)),this.active=!1,this.on("abort").fire(t)}),e.oncomplete=u3(()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&c2.storagemutated.fire(e.mutatedParts)}),this}_promise(e,t,r){if("readwrite"===e&&"readwrite"!==this.mode)return ch(new up.ReadOnly("Transaction is readonly"));if(!this.active)return ch(new up.TransactionInactive);if(this._locked())return new uK((n,o)=>{this._blockedFuncs.push([()=>{this._promise(e,t,r).then(n,o)},uV])});if(r)return ct(()=>{var e=new uK((e,r)=>{this._lock();let n=t(e,r,this);n&&n.then&&n.then(e,r)});return e.finally(()=>this._unlock()),e._lib=!0,e});var n=new uK((e,r)=>{var n=t(e,r,this);n&&n.then&&n.then(e,r)});return n._lib=!0,n}_root(){return this.parent?this.parent._root():this}waitFor(e){var t=this._root();let r=uK.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then(()=>r);else{t._waitingFor=r,t._waitingQueue=[];var n=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(n.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new uK((e,n)=>{r.then(r=>t._waitingQueue.push(u3(e.bind(null,r))),e=>t._waitingQueue.push(u3(n.bind(null,e)))).finally(()=>{t._waitingFor===o&&(t._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new up.Abort))}table(e){let t=this._memoizedTables||(this._memoizedTables={});if(lA(t,e))return t[e];let r=this.schema[e];if(!r)throw new up.NotFound("Table "+e+" not part of transaction");let n=new this.db.Table(e,r,this);return n.core=this.db.core.table(e),t[e]=n,n}}function c3(e,t,r,n,o,i,a){return{name:e,keyPath:t,unique:r,multi:n,auto:o,compound:i,src:(r&&!a?"&":"")+(n?"*":"")+(o?"++":"")+c6(t)}}function c6(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function c5(e,t,r){return{name:e,primKey:t,indexes:r,mappedClass:null,idxByName:lH(r,e=>[e.name,e])}}let c7=e=>{try{return e.only([[]]),c7=()=>[[]],[[]]}catch(e){return c7=()=>cy,cy}};function c9(e){return null==e?()=>{}:"string"==typeof e?1===e.split(".").length?t=>t[e]:t=>lG(t,e):t=>lG(t,e)}function c8(e){return[].slice.call(e)}let de=0;function dt(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function dr({_novip:e},t){let r=t.db,n=function(e,t,{IDBKeyRange:r,indexedDB:n},o){var i;return{dbcore:(i=function(e,t,r){let n;function o(e){if(3===e.type)return null;if(4===e.type)throw Error("Cannot convert never type to IDBKeyRange");let{lower:r,upper:n,lowerOpen:o,upperOpen:i}=e;return void 0===r?void 0===n?null:t.upperBound(n,!!i):void 0===n?t.lowerBound(r,!!o):t.bound(r,n,!!o,!!i)}let{schema:i,hasGetAll:a}=(n=c8(e.objectStoreNames),{schema:{name:e.name,tables:n.map(e=>r.objectStore(e)).map(e=>{let{keyPath:t,autoIncrement:r}=e,n=lj(t),o=null==t,i={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:n,keyPath:t,autoIncrement:r,unique:!0,extractKey:c9(t)},indexes:c8(e.indexNames).map(t=>e.index(t)).map(e=>{let{name:t,unique:r,multiEntry:n,keyPath:o}=e,a={name:t,compound:lj(o),keyPath:o,unique:r,multiEntry:n,extractKey:c9(o)};return i[dt(o)]=a,a}),getIndexByKeyPath:e=>i[dt(e)]};return i[":id"]=a.primaryKey,null!=t&&(i[dt(t)]=a.primaryKey),a})},hasGetAll:n.length>0&&"getAll"in r.objectStore(n[0])&&!("u">typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),s=i.tables.map(e=>{let t;return{name:t=e.name,schema:e,mutate:function({trans:e,type:r,keys:n,values:i,range:a}){return new Promise((s,l)=>{let u;s=u3(s);let c=e.objectStore(t),d=null==c.keyPath,p="put"===r||"add"===r;if(!p&&"delete"!==r&&"deleteRange"!==r)throw Error("Invalid operation type: "+r);let{length:f}=n||i||{length:1};if(n&&i&&n.length!==i.length)throw Error("Given keys array must have same length as given values array.");if(0===f)return s({numFailures:0,failures:{},results:[],lastResult:void 0});let h=[],m=[],y=0,g=e=>{++y,cQ(e)};if("deleteRange"===r){if(4===a.type)return s({numFailures:y,failures:m,results:[],lastResult:void 0});3===a.type?h.push(u=c.clear()):h.push(u=c.delete(o(a)))}else{let[e,t]=p?d?[i,n]:[i,null]:[n,null];if(p)for(let n=0;n<f;++n)h.push(u=t&&void 0!==t[n]?c[r](e[n],t[n]):c[r](e[n])),u.onerror=g;else for(let t=0;t<f;++t)h.push(u=c[r](e[t])),u.onerror=g}let b=e=>{let t=e.target.result;h.forEach((e,t)=>null!=e.error&&(m[t]=e.error)),s({numFailures:y,failures:m,results:"delete"===r?n:h.map(e=>e.result),lastResult:t})};u.onerror=e=>{g(e),b(e)},u.onsuccess=b})},getMany:({trans:e,keys:r})=>new Promise((n,o)=>{n=u3(n);let i=e.objectStore(t),a=r.length,s=Array(a),l,u=0,c=0,d=e=>{let t=e.target;s[t._pos]=t.result,++c===u&&n(s)},p=cX(o);for(let e=0;e<a;++e)null!=r[e]&&((l=i.get(r[e]))._pos=e,l.onsuccess=d,l.onerror=p,++u);0===u&&n(s)}),get:({trans:e,key:r})=>new Promise((n,o)=>{n=u3(n);let i=e.objectStore(t).get(r);i.onsuccess=e=>n(e.target.result),i.onerror=cX(o)}),query:e=>new Promise((r,n)=>{r=u3(r);let{trans:i,values:s,limit:l,query:u}=e,c=l===1/0?void 0:l,{index:d,range:p}=u,f=i.objectStore(t),h=d.isPrimaryKey?f:f.index(d.name),m=o(p);if(0===l)return r({result:[]});if(a){let e=s?h.getAll(m,c):h.getAllKeys(m,c);e.onsuccess=e=>r({result:e.target.result}),e.onerror=cX(n)}else{let e=0,t=!s&&"openKeyCursor"in h?h.openKeyCursor(m):h.openCursor(m),o=[];t.onsuccess=n=>{let i=t.result;return i?(o.push(s?i.value:i.primaryKey),++e===l?r({result:o}):void i.continue()):r({result:o})},t.onerror=cX(n)}}),openCursor:function({trans:e,values:r,query:n,reverse:i,unique:a}){return new Promise((s,l)=>{s=u3(s);let{index:u,range:c}=n,d=e.objectStore(t),p=u.isPrimaryKey?d:d.index(u.name),f=i?a?"prevunique":"prev":a?"nextunique":"next",h=!r&&"openKeyCursor"in p?p.openKeyCursor(o(c),f):p.openCursor(o(c),f);h.onerror=cX(l),h.onsuccess=u3(t=>{let r=h.result;if(!r)return void s(null);r.___id=++de,r.done=!1;let n=r.continue.bind(r),o=r.continuePrimaryKey;o&&(o=o.bind(r));let i=r.advance.bind(r),a=()=>{throw Error("Cursor not stopped")};r.trans=e,r.stop=r.continue=r.continuePrimaryKey=r.advance=()=>{throw Error("Cursor not started")},r.fail=u3(l),r.next=function(){let e=1;return this.start(()=>e--?this.continue():this.stop()).then(()=>this)},r.start=e=>{let t=new Promise((e,t)=>{e=u3(e),h.onerror=cX(t),r.fail=t,r.stop=t=>{r.stop=r.continue=r.continuePrimaryKey=r.advance=a,e(t)}}),s=()=>{if(h.result)try{e()}catch(e){r.fail(e)}else r.done=!0,r.start=()=>{throw Error("Cursor behind last entry")},r.stop()};return h.onsuccess=u3(e=>{h.onsuccess=s,s()}),r.continue=n,r.continuePrimaryKey=o,r.advance=i,s(),t},s(r)},l)})},count({query:e,trans:r}){let{index:n,range:i}=e;return new Promise((e,a)=>{let s=r.objectStore(t),l=n.isPrimaryKey?s:s.index(n.name),u=o(i),c=u?l.count(u):l.count();c.onsuccess=u3(t=>e(t.target.result)),c.onerror=cX(a)})}}}),l={};return s.forEach(e=>l[e.name]=e),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!l[e])throw Error(`Table '${e}' not found`);return l[e]},MIN_KEY:-1/0,MAX_KEY:c7(t),schema:i}}(t,r,o),e.dbcore.reduce((e,{create:t})=>({...e,...t(e)}),i))}}(e._middlewares,r,e._deps,t);e.core=n.dbcore,e.tables.forEach(t=>{let r=t.name;e.core.schema.tables.some(e=>e.name===r)&&(t.core=e.core.table(r),e[r]instanceof e.Table&&(e[r].core=t.core))})}function dn({_novip:e},t,r,n){r.forEach(r=>{let o=n[r];t.forEach(t=>{let n=lB(t,r);(!n||"value"in n&&void 0===n.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?lM(t,r,{get(){return this.table(r)},set(e){lI(this,r,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[r]=new e.Table(r,o))})})}function di({_novip:e},t){t.forEach(t=>{for(let r in t)t[r]instanceof e.Table&&delete t[r]})}function da(e,t){return e._cfg.version-t._cfg.version}function ds(e,t){let r,n={del:[],add:[],change:[]};for(r in e)t[r]||n.del.push(r);for(r in t){let o=e[r],i=t[r];if(o){let e={name:r,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")==""+(i.primKey.keyPath||"")&&(o.primKey.auto===i.primKey.auto||c_)){let t,r=o.idxByName,a=i.idxByName;for(t in r)a[t]||e.del.push(t);for(t in a){let n=r[t],o=a[t];n?n.src!==o.src&&e.change.push(o):e.add.push(o)}(e.del.length>0||e.add.length>0||e.change.length>0)&&n.change.push(e)}else e.recreate=!0,n.change.push(e)}else n.add.push([r,i])}return n}function dl(e,t,r,n){let o=e.db.createObjectStore(t,r.keyPath?{keyPath:r.keyPath,autoIncrement:r.auto}:{autoIncrement:r.auto});return n.forEach(e=>du(o,e)),o}function du(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function dc(e,t,r){let n={};return lU(t.objectStoreNames,0).forEach(e=>{let t=r.objectStore(e),o=t.keyPath,i=c3(c6(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[];for(let e=0;e<t.indexNames.length;++e){let r=t.index(t.indexNames[e]);o=r.keyPath;var s=c3(r.name,o,!!r.unique,!!r.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}n[e]=c5(e,i,a)}),n}function dd({_novip:e},t,r){let n=r.db.objectStoreNames;for(let o=0;o<n.length;++o){let i=n[o],a=r.objectStore(i);e._hasGetAll="getAll"in a;for(let e=0;e<a.indexNames.length;++e){let r=a.indexNames[e],n=a.index(r).keyPath,o="string"==typeof n?n:"["+lU(n).join("+")+"]";if(t[i]){let e=t[i].idxByName[o];e&&(e.name=r,delete t[i].idxByName[o],t[i].idxByName[r]=e)}}}"u">typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&lk.WorkerGlobalScope&&lk instanceof lk.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class dp{_parseStoresSpec(e,t){lC(e).forEach(r=>{if(null!==e[r]){var n=e[r].split(",").map((e,t)=>{let r=(e=e.trim()).replace(/([&*]|\+\+)/g,""),n=/^\[/.test(r)?r.match(/^\[(.*)\]$/)[1].split("+"):r;return c3(r,n||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),lj(n),0===t)}),o=n.shift();if(o.multi)throw new up.Schema("Primary key cannot be multi-valued");n.forEach(e=>{if(e.auto)throw new up.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new up.Schema("Index must have a name and cannot be an empty string")}),t[r]=c5(r,o,n)}})}stores(e){let t=this.db;this._cfg.storesSource=this._cfg.storesSource?lT(this._cfg.storesSource,e):e;let r=t._versions,n={},o={};return r.forEach(e=>{lT(n,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(n,o)}),t._dbSchema=o,di(t,[t._allTables,t,t.Transaction.prototype]),dn(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],lC(o),o),t._storeNames=lC(o),this}upgrade(e){return this._cfg.contentUpgrade=uE(this._cfg.contentUpgrade||um,e),this}}function df(e,t){let r=e._dbNamesDB;return r||(r=e._dbNamesDB=new dR(cE,{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),r.table("dbnames")}function dh(e){return e&&"function"==typeof e.databases}function dm(e){return ct(function(){return uV.letThrough=!0,e()})}function dy(e){var t=t=>e.next(t),r=o(t),n=o(t=>e.throw(t));function o(e){return t=>{var o=e(t),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(r,n):lj(i)?Promise.all(i).then(r,n):r(i)}}return o(t)()}function dg(e,t,r){var n=arguments.length;if(n<2)throw new up.InvalidArgument("Too few arguments");for(var o=Array(n-1);--n;)o[n-1]=arguments[n];return r=o.pop(),[e,lJ(o),r]}function db(e,t,r){let n=lj(e)?e.slice():[e];for(let e=0;e<r;++e)n.push(t);return n}let dv={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){let r=e.table(t),{schema:n}=r,o={},i=[];function a(e,t,r){let n=dt(e),s=o[n]=o[n]||[],l=null==e?0:"string"==typeof e?1:e.length,u=t>0,c={...r,isVirtual:u,keyTail:t,keyLength:l,extractKey:c9(e),unique:!u&&r.unique};return s.push(c),c.isPrimaryKey||i.push(c),l>1&&a(2===l?e[0]:e.slice(0,l-1),t+1,r),s.sort((e,t)=>e.keyTail-t.keyTail),c}let s=a(n.primaryKey.keyPath,0,n.primaryKey);for(let e of(o[":id"]=[s],n.indexes))a(e.keyPath,0,e);function l(t){var r,n;let o=t.query.index;return o.isVirtual?{...t,query:{index:o,range:(r=t.query.range,n=o.keyTail,{type:1===r.type?2:r.type,lower:db(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,n),lowerOpen:!0,upper:db(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,n),upperOpen:!0})}}:t}return{...r,schema:{...n,primaryKey:s,indexes:i,getIndexByKeyPath:function(e){let t=o[dt(e)];return t&&t[0]}},count:e=>r.count(l(e)),query:e=>r.query(l(e)),openCursor(t){let{keyTail:n,isVirtual:o,keyLength:i}=t.query.index;return o?r.openCursor(l(t)).then(r=>r&&Object.create(r,{continue:{value:function(o){null!=o?r.continue(db(o,t.reverse?e.MAX_KEY:e.MIN_KEY,n)):t.unique?r.continue(r.key.slice(0,i).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,n)):r.continue()}},continuePrimaryKey:{value(t,o){r.continuePrimaryKey(db(t,e.MAX_KEY,n),o)}},primaryKey:{get:()=>r.primaryKey},key:{get(){let e=r.key;return 1===i?e[0]:e.slice(0,i)}},value:{get:()=>r.value}})):r.openCursor(t)}}}}}};function dw(e,t,r,n){return r=r||{},n=n||"",lC(e).forEach(o=>{if(lA(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){let e=l4(i);e!==l4(a)?r[n+o]=t[o]:"Object"===e?dw(i,a,r,n+o+"."):i!==a&&(r[n+o]=t[o])}else i!==a&&(r[n+o]=t[o])}else r[n+o]=void 0}),lC(t).forEach(o=>{lA(e,o)||(r[n+o]=t[o])}),r}let d_={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){let r=e.table(t),{primaryKey:n}=r.schema;return{...r,mutate(e){let o=uV.trans,{deleting:i,creating:a,updating:s}=o.table(t).hook;switch(e.type){case"add":if(a.fire===um)break;return o._promise("readwrite",()=>l(e),!0);case"put":if(a.fire===um&&s.fire===um)break;return o._promise("readwrite",()=>l(e),!0);case"delete":if(i.fire===um)break;return o._promise("readwrite",()=>l(e),!0);case"deleteRange":if(i.fire===um)break;return o._promise("readwrite",()=>(function e(t,o,i){return r.query({trans:t,values:!1,query:{index:n,range:o},limit:i}).then(({result:r})=>l({type:"delete",keys:r,trans:t}).then(n=>n.numFailures>0?Promise.reject(n.failures[0]):r.length<i?{failures:[],numFailures:0,lastResult:void 0}:e(t,{...o,lower:r[r.length-1],lowerOpen:!0},i)))})(e.trans,e.range,1e4),!0)}return r.mutate(e);function l(e){var t,o;let l=uV.trans,u=e.keys||("delete"===(t=e).type?t.keys:t.keys||t.values.map(n.extractKey));if(!u)throw Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:u}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),("add"===(o=e).type?Promise.resolve([]):r.getMany({trans:o.trans,keys:u,cache:"immutable"})).then(t=>{let o=u.map((r,o)=>{let u=t[o],c={onerror:null,onsuccess:null};if("delete"===e.type)i.fire.call(c,r,u,l);else if("add"===e.type||void 0===u){let t=a.fire.call(c,r,e.values[o],l);null==r&&null!=t&&(r=t,e.keys[o]=r,n.outbound||lq(e.values[o],n.keyPath,r))}else{let t=dw(u,e.values[o]),n=s.fire.call(c,t,r,u,l);if(n){let t=e.values[o];Object.keys(n).forEach(e=>{lA(t,e)?t[e]=n[e]:lq(t,e,n[e])})}}return c});return r.mutate(e).then(({failures:r,results:n,numFailures:i,lastResult:a})=>{for(let i=0;i<u.length;++i){let a=n?n[i]:u[i],s=o[i];null==a?s.onerror&&s.onerror(r[i]):s.onsuccess&&s.onsuccess("put"===e.type&&t[i]?e.values[i]:a)}return{failures:r,results:n,numFailures:i,lastResult:a}}).catch(e=>(o.forEach(t=>t.onerror&&t.onerror(e)),Promise.reject(e)))})}}}}})};function dx(e,t,r){try{if(!t||t.keys.length<e.length)return null;let n=[];for(let o=0,i=0;o<t.keys.length&&i<e.length;++o)0===cF(t.keys[o],e[i])&&(n.push(r?l1(t.values[o]):t.values[o]),++i);return n.length===e.length?n:null}catch(e){return null}}let dE={stack:"dbcore",level:-1,create:e=>({table:t=>{let r=e.table(t);return{...r,getMany:e=>{if(!e.cache)return r.getMany(e);let t=dx(e.keys,e.trans._cache,"clone"===e.cache);return t?uK.resolve(t):r.getMany(e).then(t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?l1(t):t},t))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),r.mutate(e))}}})};function dS(e){return!("from"in e)}let dD=function(e,t){if(!this){let t=new dD;return e&&"d"in e&&lT(t,e),t}lT(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function dO(e,t,r){let n=cF(t,r);if(isNaN(n))return;if(n>0)throw RangeError();if(dS(e))return lT(e,{from:t,to:r,d:1});let o=e.l,i=e.r;if(0>cF(r,e.from))return o?dO(o,t,r):e.l={from:t,to:r,d:1,l:null,r:null},dC(e);if(cF(t,e.to)>0)return i?dO(i,t,r):e.r={from:t,to:r,d:1,l:null,r:null},dC(e);0>cF(t,e.from)&&(e.from=t,e.l=null,e.d=i?i.d+1:1),cF(r,e.to)>0&&(e.to=r,e.r=null,e.d=e.l?e.l.d+1:1);let a=!e.r;o&&!e.l&&dP(e,o),i&&a&&dP(e,i)}function dP(e,t){dS(t)||function e(t,{from:r,to:n,l:o,r:i}){dO(t,r,n),o&&e(t,o),i&&e(t,i)}(e,t)}function dk(e){let t=dS(e)?null:{s:0,n:e};return{next(e){let r=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,r)for(;t.n.l&&0>cF(e,t.n.from);)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!r||0>=cF(e,t.n.to))return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function dC(e){var t,r;let n=((null==(t=e.r)?void 0:t.d)||0)-((null==(r=e.l)?void 0:r.d)||0),o=n>1?"r":n<-1?"l":"";if(o){let t="r"===o?"l":"r",r={...e},n=e[o];e.from=n.from,e.to=n.to,e[o]=n[o],r[o]=n[t],e[t]=r,r.d=dj(r)}e.d=dj(e)}function dj({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}l$(dD.prototype,{add(e){return dP(this,e),this},addKey(e){return dO(this,e,e),this},addKeys(e){return e.forEach(e=>dO(this,e,e)),this},[l3](){return dk(this)}});let dT={stack:"dbcore",level:0,create:e=>{let t=e.schema.name,r=new dD(e.MIN_KEY,e.MAX_KEY);return{...e,table:n=>{let o=e.table(n),{schema:i}=o,{primaryKey:a}=i,{extractKey:s,outbound:l}=a,u={...o,mutate:e=>{let a=e.trans,s=a.mutatedParts||(a.mutatedParts={}),l=e=>{let r=`idb://${t}/${n}/${e}`;return s[r]||(s[r]=new dD)},u=l(""),c=l(":dels"),{type:d}=e,[p,f]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[],h=e.trans._cache;return o.mutate(e).then(e=>{if(lj(p)){"delete"!==d&&(p=e.results),u.addKeys(p);let t=dx(p,h);t||"add"===d||c.addKeys(p),(t||f)&&i.indexes.forEach(function(e){let r=l(e.name||"");function n(t){return null!=t?e.extractKey(t):null}let o=t=>e.multiEntry&&lj(t)?t.forEach(e=>r.addKey(e)):r.addKey(t);(t||f).forEach((e,r)=>{let i=t&&n(t[r]),a=f&&n(f[r]);0!==cF(i,a)&&(null!=i&&o(i),null!=a&&o(a))})})}else if(p){let e={from:p.lower,to:p.upper};c.add(e),u.add(e)}else u.add(r),c.add(r),i.indexes.forEach(e=>l(e.name).add(r));return e})}},c=({query:{index:t,range:r}})=>{var n,o;return[t,new dD(null!=(n=r.lower)?n:e.MIN_KEY,null!=(o=r.upper)?o:e.MAX_KEY)]},d={get:e=>[a,new dD(e.key)],getMany:e=>[a,(new dD).addKeys(e.keys)],count:c,query:c,openCursor:c};return lC(d).forEach(e=>{u[e]=function(i){let{subscr:a}=uV;if(a){let u=e=>{let r=`idb://${t}/${n}/${e}`;return a[r]||(a[r]=new dD)},c=u(""),p=u(":dels"),[f,h]=d[e](i);if(u(f.name||"").add(h),!f.isPrimaryKey){if("count"!==e){let t="query"===e&&l&&i.values&&o.query({...i,values:!1});return o[e].apply(this,arguments).then(r=>{if("query"===e){if(l&&i.values)return t.then(({result:e})=>(c.addKeys(e),r));let e=i.values?r.result.map(s):r.result;i.values?c.addKeys(e):p.addKeys(e)}else if("openCursor"===e){let e=i.values;return r&&Object.create(r,{key:{get:()=>(p.addKey(r.primaryKey),r.key)},primaryKey:{get(){let e=r.primaryKey;return p.addKey(e),e}},value:{get:()=>(e&&c.addKey(r.primaryKey),r.value)}})}return r})}p.add(r)}}return o[e].apply(this,arguments)}}),u}}}};class dR{constructor(e,t){var r;this._middlewares={},this.verno=0;const n=dR.dependencies;this._options=t={addons:dR.addons,autoOpen:!0,indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange,...t},this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange};const{addons:o}=t;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const i={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:um,dbReadyPromise:null,cancelOpen:um,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};i.dbReadyPromise=new uK(e=>{i.dbReadyResolve=e}),i.openCanceller=new uK((e,t)=>{i.cancelOpen=t}),this._state=i,this.name=e,this.on=cj(this,"populate","blocked","versionchange","close",{ready:[uE,um]}),this.on.ready.subscribe=lW(this.on.ready.subscribe,e=>(t,r)=>{dR.vip(()=>{let n=this._state;if(n.openComplete)n.dbOpenError||uK.resolve().then(t),r&&e(t);else if(n.onReadyBeingFired)n.onReadyBeingFired.push(t),r&&e(t);else{e(t);let n=this;r||e(function e(){n.on.ready.unsubscribe(t),n.on.ready.unsubscribe(e)})}})}),this.Collection=(r=this,cT(cU.prototype,function(e,t){this.db=r;let n=cP,o=null;if(t)try{n=t()}catch(e){o=e}let i=e._ctx,a=i.table,s=a.hook.reading.fire;this._ctx={table:a,index:i.index,isPrimKey:!i.index||a.schema.primKey.keyPath&&i.index===a.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:o,or:i.or,valueMapper:s!==uy?s:null}})),this.Table=function(e){return cT(cC.prototype,function(t,r,n){this.db=e,this._tx=n,this.name=t,this.schema=r,this.hook=e._allTables[t]?e._allTables[t].hook:cj(null,{creating:[uv,um],reading:[ug,uy],updating:[u_,um],deleting:[uw,um]})})}(this),this.Transaction=function(e){return cT(c4.prototype,function(t,r,n,o,i){this.db=e,this.mode=t,this.storeNames=r,this.schema=n,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=cj(this,"complete","error","abort"),this.parent=i||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new uK((e,t)=>{this._resolve=e,this._reject=t}),this._completion.then(()=>{this.active=!1,this.on.complete.fire()},e=>{var t=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):t&&this.idbtrans&&this.idbtrans.abort(),ch(e)})})}(this),this.Version=function(e){return cT(dp.prototype,function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}(this),this.WhereClause=function(e){return cT(cJ.prototype,function(t,r,n){this.db=e,this._ctx={table:t,index:":id"===r?null:r,or:n};let o=e._deps.indexedDB;if(!o)throw new up.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=(e,t)=>o.cmp(t,e),this._max=(e,t)=>o.cmp(e,t)>0?e:t,this._min=(e,t)=>0>o.cmp(e,t)?e:t,this._IDBKeyRange=e._deps.IDBKeyRange})}(this),this.on("versionchange",e=>{e.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()}),this.on("blocked",e=>{!e.newVersion||e.newVersion<e.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${e.oldVersion/10}`)}),this._maxKey=c7(t.IDBKeyRange),this._createTransaction=(e,t,r,n)=>new this.Transaction(e,t,r,this._options.chromeTransactionDurability,n),this._fireOnBlocked=e=>{this.on("blocked").fire(e),cw.filter(e=>e.name===this.name&&e!==this&&!e._state.vcFired).map(t=>t.on("versionchange").fire(e))},this.use(dv),this.use(d_),this.use(dT),this.use(dE),this.vip=Object.create(this,{_vip:{value:!0}}),o.forEach(e=>e(this))}version(e){if(isNaN(e)||e<.1)throw new up.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new up.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);let t=this._versions;var r=t.filter(t=>t._cfg.version===e)[0];return r||(r=new this.Version(e),t.push(r),t.sort(da),r.stores({}),this._state.autoSchema=!1,r)}_whenReady(e){return this.idbdb&&(this._state.openComplete||uV.letThrough||this._vip)?e():new uK((e,t)=>{if(this._state.openComplete)return t(new up.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new up.DatabaseClosed);this.open().catch(um)}this._state.dbReadyPromise.then(e,t)}).then(e)}use({stack:e,create:t,level:r,name:n}){n&&this.unuse({stack:e,name:n});let o=this._middlewares[e]||(this._middlewares[e]=[]);return o.push({stack:e,create:t,level:null==r?10:r,name:n}),o.sort((e,t)=>e.level-t.level),this}unuse({stack:e,name:t,create:r}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter(e=>r?e.create!==r:!!t&&e.name!==t)),this}open(){return function(e){var t;let r=e._state,{indexedDB:n}=e._deps;if(r.isBeingOpened||e.idbdb)return r.dbReadyPromise.then(()=>r.dbOpenError?ch(r.dbOpenError):e);l8&&(r.openCanceller._stackHolder=ur()),r.isBeingOpened=!0,r.dbOpenError=null,r.openComplete=!1;let o=r.openCanceller;function i(){if(r.openCanceller!==o)throw new up.DatabaseClosed("db.open() was cancelled")}let a=r.dbReadyResolve,s=null,l=!1;return uK.race([o,("u"<typeof navigator?uK.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(e){var r=function(){return indexedDB.databases().finally(e)};t=setInterval(r,100),r()}).finally(function(){return clearInterval(t)}):Promise.resolve()).then(()=>new uK((t,o)=>{if(i(),!n)throw new up.MissingAPI;let a=e.name,u=r.autoSchema?n.open(a):n.open(a,Math.round(10*e.verno));if(!u)throw new up.MissingAPI;u.onerror=cX(o),u.onblocked=u3(e._fireOnBlocked),u.onupgradeneeded=u3(t=>{if(s=u.transaction,r.autoSchema&&!e._options.allowEmptyDB){u.onerror=cQ,s.abort(),u.result.close();let e=n.deleteDatabase(a);e.onsuccess=e.onerror=u3(()=>{o(new up.NoSuchDatabase(`Database ${a} doesnt exist`))})}else{let r,n,a,p;s.onerror=cX(o);var i,c,d=t.oldVersion>0x4000000000000000?0:t.oldVersion;l=d<1,e._novip.idbdb=u.result,i=d/10,c=s,r=e._dbSchema,(n=e._createTransaction("readwrite",e._storeNames,r)).create(c),n._completion.catch(o),a=n._reject.bind(n),p=uV.transless||uV,ct(()=>{uV.trans=n,uV.transless=p,0===i?(lC(r).forEach(e=>{dl(c,e,r[e].primKey,r[e].indexes)}),dr(e,c),uK.follow(()=>e.on.populate.fire(n)).catch(a)):(function({_novip:e},t,r,n){let o=[],i=e._versions,a=e._dbSchema=dc(e,e.idbdb,n),s=!1;return i.filter(e=>e._cfg.version>=t).forEach(i=>{o.push(()=>{let o=a,l=i._cfg.dbschema;dd(e,o,n),dd(e,l,n),a=e._dbSchema=l;let u=ds(o,l);u.add.forEach(e=>{dl(n,e[0],e[1].primKey,e[1].indexes)}),u.change.forEach(e=>{if(e.recreate)throw new up.Upgrade("Not yet support for changing primary key");{let t=n.objectStore(e.name);e.add.forEach(e=>du(t,e)),e.change.forEach(e=>{t.deleteIndex(e.name),du(t,e)}),e.del.forEach(e=>t.deleteIndex(e))}});let c=i._cfg.contentUpgrade;if(c&&i._cfg.version>t){let t;dr(e,n),r._memoizedTables={},s=!0;let i=lZ(l);u.del.forEach(e=>{i[e]=o[e]}),di(e,[e.Transaction.prototype]),dn(e,[e.Transaction.prototype],lC(i),i),r.schema=i;let a=l9(c);a&&cr();let d=uK.follow(()=>{if((t=c(r))&&a){var e=cn.bind(null,null);t.then(e,e)}});return t&&"function"==typeof t.then?uK.resolve(t):d.then(()=>t)}}),o.push(t=>{var n;s&&c_||(n=i._cfg.dbschema,[].slice.call(t.db.objectStoreNames).forEach(e=>null==n[e]&&t.db.deleteObjectStore(e))),di(e,[e.Transaction.prototype]),dn(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),r.schema=e._dbSchema})}),(function e(){return o.length?uK.resolve(o.shift()(r.idbtrans)).then(e):uK.resolve()})().then(()=>{var e;lC(e=a).forEach(t=>{n.db.objectStoreNames.contains(t)||dl(n,t,e[t].primKey,e[t].indexes)})})})(e,i,n,c).catch(a)})}},o),u.onsuccess=u3(()=>{s=null;let n=e._novip.idbdb=u.result,o=lU(n.objectStoreNames);if(o.length>0)try{let t,i=n.transaction(1===o.length?o[0]:o,"readonly");r.autoSchema?function({_novip:e},t,r){e.verno=t.version/10;let n=e._dbSchema=dc(0,t,r);e._storeNames=lU(t.objectStoreNames,0),dn(e,[e._allTables],lC(n),n)}(e,n,i):(dd(e,e._dbSchema,i),((t=ds(dc(0,e.idbdb,i),e._dbSchema)).add.length||t.change.some(e=>e.add.length||e.change.length))&&console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),dr(e,i)}catch(e){}cw.push(e),n.onversionchange=u3(t=>{r.vcFired=!0,e.on("versionchange").fire(t)}),n.onclose=u3(t=>{e.on("close").fire(t)}),l&&function({indexedDB:e,IDBKeyRange:t},r){dh(e)||r===cE||df(e,t).put({name:r}).catch(um)}(e._deps,a),t()},o)}))]).then(()=>(i(),r.onReadyBeingFired=[],uK.resolve(dm(()=>e.on.ready.fire(e.vip))).then(function t(){if(r.onReadyBeingFired.length>0){let n=r.onReadyBeingFired.reduce(uE,um);return r.onReadyBeingFired=[],uK.resolve(dm(()=>n(e.vip))).then(t)}}))).finally(()=>{r.onReadyBeingFired=null,r.isBeingOpened=!1}).then(()=>e).catch(t=>{r.dbOpenError=t;try{s&&s.abort()}catch(e){}return o===r.openCanceller&&e._close(),ch(t)}).finally(()=>{r.openComplete=!0,a()})}(this)}_close(){let e=this._state,t=cw.indexOf(this);if(t>=0&&cw.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new uK(t=>{e.dbReadyResolve=t}),e.openCanceller=new uK((t,r)=>{e.cancelOpen=r})}close(){this._close();let e=this._state;this._options.autoOpen=!1,e.dbOpenError=new up.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){let e=arguments.length>0,t=this._state;return new uK((r,n)=>{let o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=u3(()=>{!function({indexedDB:e,IDBKeyRange:t},r){dh(e)||r===cE||df(e,t).delete(r).catch(um)}(this._deps,this.name),r()}),e.onerror=cX(n),e.onblocked=this._fireOnBlocked};if(e)throw new up.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(o):o()})}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){let e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return lC(this._allTables).map(e=>this._allTables[e])}transaction(){let e=dg.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,r){let n,o,i=uV.trans;i&&i.db===this&&-1===e.indexOf("!")||(i=null);let a=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{if(o=t.map(e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t}),"r"==e||e===cS)n=cS;else{if("rw"!=e&&e!=cD)throw new up.InvalidArgument("Invalid transaction mode: "+e);n=cD}if(i){if(i.mode===cS&&n===cD){if(!a)throw new up.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");i=null}i&&o.forEach(e=>{if(i&&-1===i.storeNames.indexOf(e)){if(!a)throw new up.SubTransaction("Table "+e+" not included in parent transaction.");i=null}}),a&&i&&!i.active&&(i=null)}}catch(e){return i?i._promise(null,(t,r)=>{r(e)}):ch(e)}let s=(function e(t,r,n,o,i){return uK.resolve().then(()=>{let a,s=uV.transless||uV,l=t._createTransaction(r,n,t._dbSchema,o);if(o)l.idbtrans=o.idbtrans;else try{l.create(),t._state.PR1398_maxLoop=3}catch(o){return o.name===ud.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>e(t,r,n,null,i))):ch(o)}let u=l9(i);u&&cr();let c=uK.follow(()=>{if(a=i.call(l,l))if(u){var e=cn.bind(null,null);a.then(e,e)}else"function"==typeof a.next&&"function"==typeof a.throw&&(a=dy(a))},{trans:l,transless:s});return(a&&"function"==typeof a.then?uK.resolve(a).then(e=>l.active?e:ch(new up.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))):c.then(()=>a)).then(e=>(o&&l._resolve(),l._completion.then(()=>e))).catch(e=>(l._reject(e),ch(e)))})}).bind(null,this,n,o,i,r);return i?i._promise(n,s,"lock"):uV.trans?cu(uV.transless,()=>this._whenReady(s)):this._whenReady(s)}table(e){if(!lA(this._allTables,e))throw new up.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}let dN="u">typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class dA{constructor(e){this._subscribe=e}subscribe(e,t,r){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:r})}[dN](){return this}}function d$(e,t){return lC(t).forEach(r=>{dP(e[r]||(e[r]=new dD),t[r])}),e}try{i={indexedDB:lk.indexedDB||lk.mozIndexedDB||lk.webkitIndexedDB||lk.msIndexedDB,IDBKeyRange:lk.IDBKeyRange||lk.webkitIDBKeyRange}}catch(e){i={indexedDB:null,IDBKeyRange:null}}function dI(e){let t=dM;try{dM=!0,c2.storagemutated.fire(e)}finally{dM=t}}l$(dR,{...uh,delete:e=>new dR(e,{addons:[]}).delete(),exists:e=>new dR(e,{addons:[]}).open().then(e=>(e.close(),!0)).catch("NoSuchDatabaseError",()=>!1),getDatabaseNames(e){try{return(function({indexedDB:e,IDBKeyRange:t}){return dh(e)?Promise.resolve(e.databases()).then(e=>e.map(e=>e.name).filter(e=>e!==cE)):df(e,t).toCollection().primaryKeys()})(dR.dependencies).then(e)}catch(e){return ch(new up.MissingAPI)}},defineClass:()=>function(e){lT(this,e)},ignoreTransaction:e=>uV.trans?cu(uV.transless,e):e(),vip:dm,async:function(e){return function(){try{var t=dy(e.apply(this,arguments));return t&&"function"==typeof t.then?t:uK.resolve(t)}catch(e){return ch(e)}}},spawn:function(e,t,r){try{var n=dy(e.apply(r,t||[]));return n&&"function"==typeof n.then?n:uK.resolve(n)}catch(e){return ch(e)}},currentTransaction:{get:()=>uV.trans||null},waitFor:function(e,t){let r=uK.resolve("function"==typeof e?dR.ignoreTransaction(e):e).timeout(t||6e4);return uV.trans?uV.trans.waitFor(r):r},Promise:uK,debug:{get:()=>l8,set:e=>{l8=e,ue="dexie"===e?()=>!0:cx}},derive:lL,extend:lT,props:l$,override:lW,Events:cj,on:c2,liveQuery:function(e){let t,r=!1,n=new dA(n=>{let o=l9(e),i=!1,a={},s={},l={get closed(){return i},unsubscribe:()=>{i=!0,c2.storagemutated.unsubscribe(p)}};n.start&&n.start(l);let u=!1,c=!1;function d(){return lC(s).some(e=>a[e]&&function(e,t){let r=dk(t),n=r.next();if(n.done)return!1;let o=n.value,i=dk(e),a=i.next(o.from),s=a.value;for(;!n.done&&!a.done;){if(0>=cF(s.from,o.to)&&cF(s.to,o.from)>=0)return!0;0>cF(o.from,s.from)?o=(n=r.next(s.from)).value:s=(a=i.next(o.from)).value}return!1}(a[e],s[e]))}let p=e=>{d$(a,e),d()&&f()},f=()=>{let h,m;if(u||i)return;a={};let y={},g=(o&&cr(),h=()=>ct(e,{subscr:y,trans:null}),m=uV.trans?cu(uV.transless,h):h(),o&&m.then(cn,cn),m);c||(c2(c0,p),c=!0),u=!0,Promise.resolve(g).then(e=>{r=!0,t=e,u=!1,i||(d()?f():(a={},s=y,n.next&&n.next(e)))},e=>{u=!1,r=!1,n.error&&n.error(e),l.unsubscribe()})};return f(),l});return n.hasValue=()=>r,n.getValue=()=>t,n},extendObservabilitySet:d$,getByKeyPath:lG,setByKeyPath:lq,delByKeyPath:function(e,t){"string"==typeof t?lq(e,t,void 0):"length"in t&&[].map.call(t,function(t){lq(e,t,void 0)})},shallowClone:lZ,deepClone:l1,getObjectDiff:dw,cmp:cF,asap:lK,minKey:cg,addons:[],connections:cw,errnames:ud,dependencies:i,semVer:cm,version:cm.split(".").map(e=>parseInt(e)).reduce((e,t,r)=>e+t/Math.pow(10,2*r))}),dR.maxKey=c7(dR.dependencies.IDBKeyRange),"u">typeof dispatchEvent&&"u">typeof addEventListener&&(c2(c0,e=>{if(!dM){let t;c_?(t=document.createEvent("CustomEvent")).initCustomEvent(c1,!0,!0,e):t=new CustomEvent(c1,{detail:e}),dM=!0,dispatchEvent(t),dM=!1}}),addEventListener(c1,({detail:e})=>{dM||dI(e)}));let dM=!1;if("u">typeof BroadcastChannel){let e=new BroadcastChannel(c1);"function"==typeof e.unref&&e.unref(),c2(c0,t=>{dM||e.postMessage(t)}),e.onmessage=e=>{e.data&&dI(e.data)}}else if("u">typeof self&&"u">typeof navigator){c2(c0,e=>{try{dM||("u">typeof localStorage&&localStorage.setItem(c1,JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(t=>t.postMessage({type:c1,changedParts:e})))}catch(e){}}),"u">typeof addEventListener&&addEventListener("storage",e=>{if(e.key===c1){let t=JSON.parse(e.newValue);t&&dI(t.changedParts)}});let e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",function({data:e}){e&&e.type===c1&&dI(e.changedParts)})}function dL(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}uK.rejectionMapper=function(e,t){if(!e||e instanceof us||e instanceof TypeError||e instanceof SyntaxError||!e.name||!uf[e.name])return e;var r=new uf[e.name](t||e.message,e);return"stack"in e&&lM(r,"stack",{get:function(){return this.inner.stack}}),r},ue=cx;class dF extends dR{constructor(){super("EsmOffline"),dL(this,"syncQueue",void 0),dL(this,"dynamicOfflineData",void 0),this.version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),this.syncQueue=this.table("syncQueue"),this.dynamicOfflineData=this.table("dynamicOfflineData")}}function dB(){return new dF}let dV=new dF,dU={},dW=q("offline-synchronization",{});function dz(){return dW}async function dK(){if(dW.getState().synchronization)return;let e=await dV.syncQueue.count(),t={},r=Object.entries(dU),n=r.length,o={},i=new AbortController,a=()=>{let e=dW.getState().synchronization;dW.setState({synchronization:{...e,pendingCount:e.pendingCount-1}})};try{dW.setState({synchronization:{totalCount:e,pendingCount:e,abortController:i}});for(let e=0;e<n&&r.length>0;e++)for(let e=r.length;e--;){let[n,s]=r[e],l=s.dependsOn.map(e=>t[e]);l.every(Boolean)&&(o[n]={},await Promise.all(l),t[n]=dH(s,o,i,a),r.splice(e,1))}await Promise.allSettled(Object.values(t))}finally{dW.setState({synchronization:void 0})}}async function dH({type:e,dependsOn:t,process:r},n,o,i){let a=[],s=[],l=await dG();await dV.syncQueue.where({type:e,userId:l}).each((e,t)=>{a.push([t.primaryKey,e.content,e.descriptor]),s.push(e.content)});for(let u=0;u<a.length;u++){let[c,d,{id:p,dependencies:f=[]}]=a[u];try{let i=await r(d,{abort:o,index:u,items:s,userId:l,dependencies:f.map(({id:e,type:r})=>t.includes(r)?n[r][e]:void 0)});void 0!==p&&(n[e][p]=i),await dV.syncQueue.delete(c)}catch(e){await dV.syncQueue.update(c,{lastError:{name:e?.name,message:e?.message??e?.toString()}})}finally{i()}}}async function dG(){let e=await aS();return e?.uuid||"*"}async function dq(e,t,r,n){let o=n&&n.id;return void 0!==o&&await dV.syncQueue.where({type:t,userId:e}).filter(e=>e?.descriptor.id===o).delete().catch(dR.errnames.DatabaseClosed),await dV.syncQueue.add({type:t,content:r,userId:e,descriptor:n||{},createdOn:new Date}).catch(dR.errnames.DatabaseClosed,()=>-1)}async function dZ(e,t,r){let n=await dG();return await dq(n,e,t,r)}async function dY(e,t){return(await dJ(e,t)).map(e=>e.content)}async function dJ(e,t){return await dV.syncQueue.where(t?{type:t,userId:e}:{userId:e}).toArray().catch(dR.errnames.DatabaseClosed,()=>[])}async function dX(e){let t=await dG();return await dY(t,e)}async function dQ(e){let t=await dG();return await dJ(t,e)}async function d0(e){return await dV.syncQueue.get(e).catch(dR.errnames.DatabaseClosed,()=>void 0)}function d1(e){return!!dU[e]?.options.onBeginEditSyncItem}async function d2(e){let t=await d0(e);if(!t)throw Error(`No sync item with the ID ${e} exists.`);let r=dU[t.type]?.options.onBeginEditSyncItem;if(!r)throw Error(`A sync item with the ID ${e} exists, but the associated handler (if one exists) doesn't support editing the item. You can avoid this error by either verifying that sync items of this type can be edited via the "canEditSynchronizationItemsOfType(type: string)" function or alternatively ensure that the synchronizaton handler for sync items of type "${t.type}" supports editing items.`);r(t)}async function d4(e){await dV.syncQueue.delete(e).catch(dR.errnames.DatabaseClosed)}function d3(e,t,r,n={}){dU[e]={type:e,dependsOn:t,process:r,options:n}}let d6="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),d5=new Uint8Array(16),d7=[];for(let e=0;e<256;++e)d7.push((e+256).toString(16).slice(1));let d9=function(e,t,r){if(d6&&!t&&!e)return d6();let n=(e=e||{}).random||(e.rng||function(){if(!a&&!(a="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return a(d5)})();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return d7[e[t+0]]+d7[e[t+1]]+d7[e[t+2]]+d7[e[t+3]]+"-"+d7[e[t+4]]+d7[e[t+5]]+"-"+d7[e[t+6]]+d7[e[t+7]]+"-"+d7[e[t+8]]+d7[e[t+9]]+"-"+d7[e[t+10]]+d7[e[t+11]]+d7[e[t+12]]+d7[e[t+13]]+d7[e[t+14]]+d7[e[t+15]]}(n)},d8="OFFLINE+";function pe(){return d8+d9()}function pt(e){return e.startsWith(d8)}let pr={};function pn(){return Object.values(pr)}function po(e){pr[e.id]&&console.warn(`[setupDynamicOfflineDataHandler] Another second handler with the ID "${e.id}" was registered. This handler will override the previous one. This could be unintended as the previous handler might run different flows than the newly registered one. If this is the case, ensure that you are setting up the handlers with different IDs.`),pr[e.id]=e}async function pi(e){let t=await pf();return await pa(t,e)}async function pa(e,t){let r=new dF;return await r.dynamicOfflineData.where(t?{type:t,users:e}:{users:e}).toArray().catch(dR.errnames.DatabaseClosed,()=>[])}async function ps(e,t){let r=await pf();return await pl(r,e,t)}async function pl(e,t,r){let n=new dF,o=await n.dynamicOfflineData.get({type:t,identifier:r}).catch(dR.errnames.DatabaseClosed,()=>void 0);o?o.users.includes(e)||await n.dynamicOfflineData.update(o.id,{users:[...o.users,e]}).catch(dR.errnames.DatabaseClosed):await n.dynamicOfflineData.add({users:[e],type:t,identifier:r}).catch(dR.errnames.DatabaseClosed)}async function pu(e,t){let r=await pf();return await pc(r,e,t)}async function pc(e,t,r){let n=new dF,o=await n.dynamicOfflineData.get({type:t,identifier:r,users:e}).catch(dR.errnames.DatabaseClosed,()=>void 0);o&&(o.users.length>1?await n.dynamicOfflineData.update(o.id,{users:o.users.filter(t=>t!==e)}).catch(dR.errnames.DatabaseClosed):await n.dynamicOfflineData.delete(o.id).catch(dR.errnames.DatabaseClosed))}async function pd(e,t){let r=await pi(e);await Promise.all(r.map(async e=>pp(e.type,e.identifier,t)))}async function pp(e,t,r){await ps(e,t);let n=new dF,o=await pf(),i=await n.dynamicOfflineData.get({type:e,identifier:t}).catch(dR.errnames.DatabaseClosed,()=>void 0),a=pn().filter(t=>t.type===e);if(!i)return;let s=await Promise.all(a.map(async e=>{try{return e.sync(t,r),{id:e.id,error:void 0}}catch(r){let t=r.message?.toString()??r.toString();return{id:e.id,error:t}}})),l=s.filter(e=>!e.error).map(e=>e.id),u=s.filter(e=>e.error).map(e=>e.id),c=s.filter(e=>e.error).map(e=>({handlerId:e.id,message:e.error})),d={syncedOn:new Date,syncedBy:o,succeededHandlers:l,erroredHandlers:u,errors:c};i.id&&await n.dynamicOfflineData.update(i.id,{syncState:d}).catch(dR.errnames.DatabaseClosed)}async function pf(){let e=(await aS()).uuid;if(!e)throw Error("Using the dynamic offline data API requires a logged in user.");return e}let ph=q("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function pm(){return pb(),ph}function py(e,t){pb(),po({type:"patient",displayName:t.displayName,id:e,isSynced:()=>Promise.resolve(!0),sync:(e,r)=>t.onOfflinePatientAdded({patientUuid:e,signal:r??new AbortController().signal})})}async function pg(e){pb(),await pp("patient",e)}function pb(){console.warn("The offline patient API has been deprecated and will be removed in a future release. To prevent future crashes, the functions remain available for the moment, but any invocations should be migrated ASAP.")}async function pv(e,t,r=!0){if(e){let n=null,[o,i]=await Promise.all([af(`${ac}/Patient/${e}`,t).catch(e=>n=e),r?pw(e):Promise.resolve(null)]);if(o.ok)return o.data;if(i)return i;if(n)throw n}return null}async function pw(e){let t=(await dX("patient-registration")).find(t=>t.fhirPatient.id===e);return t?.fhirPatient??null}function p_(e,t){let r=new CustomEvent(`openmrs:${e}`,{detail:t??void 0,cancelable:!0,bubbles:!0});return window.dispatchEvent(r)}function px(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)}}var pE=r(9549);function pS(e){return{uuid:e.uuid,display:e.display}}function pD(e=null,t=null){let r=new URLSearchParams;e&&r.set("tag",e),t&&r.set("q",t);let n=r.toString();return ah(`${au}/location${n?"?"+n:""}`).pipe((0,pE.map)(e=>e.data.results.map(pS))).pipe((0,pE.take)(1))}function pO(e){return{uuid:e.uuid,display:e.display,name:e.name}}function pP(){return ah(`${au}/visittype`).pipe((0,pE.map)(e=>e.data.results.map(pO))).pipe((0,pE.take)(1))}var pk=((el={}).NEWVISIT="startVisit",el.EDITVISIT="editVisit",el.LOADING="loadingVisit",el),pC=((eu={}).NOTSTARTED="notStarted",eu.ONGOING="ongoing",eu);let pj="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))",pT=function(){try{return JSON.parse(sessionStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null};function pR(){return Y("visit",pT)}function pN(e,t){pR().setState({patientUuid:e,manuallySetVisitUuid:t})}function pA(e,t){return af(`${au}/visit`,{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function p$(e,t,r){return af(`${au}/visit/${e}`,{signal:r.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}function pI(e,t,r){return af(`${au}/visit?patient=${e}&v=${r??pj}`,{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}})}pR().subscribe(e=>{var t;t=e,sessionStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))});let pM=new ep.BehaviorSubject(null);class pL{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+pL.version}static addUnaryOp(e){return pL.max_unop_len=Math.max(e.length,pL.max_unop_len),pL.unary_ops[e]=1,pL}static addBinaryOp(e,t,r){return pL.max_binop_len=Math.max(e.length,pL.max_binop_len),pL.binary_ops[e]=t,r?pL.right_associative.add(e):pL.right_associative.delete(e),pL}static addIdentifierChar(e){return pL.additional_identifier_chars.add(e),pL}static addLiteral(e,t){return pL.literals[e]=t,pL}static removeUnaryOp(e){return delete pL.unary_ops[e],e.length===pL.max_unop_len&&(pL.max_unop_len=pL.getMaxKeyLen(pL.unary_ops)),pL}static removeAllUnaryOps(){return pL.unary_ops={},pL.max_unop_len=0,pL}static removeIdentifierChar(e){return pL.additional_identifier_chars.delete(e),pL}static removeBinaryOp(e){return delete pL.binary_ops[e],e.length===pL.max_binop_len&&(pL.max_binop_len=pL.getMaxKeyLen(pL.binary_ops)),pL.right_associative.delete(e),pL}static removeAllBinaryOps(){return pL.binary_ops={},pL.max_binop_len=0,pL}static removeLiteral(e){return delete pL.literals[e],pL}static removeAllLiterals(){return pL.literals={},pL}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 pL(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 pL.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!pL.binary_ops[String.fromCharCode(e)]||pL.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return pL.isIdentifierStart(e)||pL.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(pL.hooks[e]){let r={context:this,node:t};return pL.hooks.run(e,r),r.node}return t}searchHook(e){if(pL.hooks[e]){let t={context:this};return pL.hooks[e].find(function(e){return e.call(t.context,t),t.node}),t.node}}gobbleSpaces(){let e=this.code;for(;e===pL.SPACE_CODE||e===pL.TAB_CODE||e===pL.LF_CODE||e===pL.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:pL.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)===pL.SEMCOL_CODE||r===pL.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,pL.max_binop_len),t=e.length;for(;t>0;){if(pL.binary_ops.hasOwnProperty(e)&&(!pL.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!pL.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,i,a,s,l;if(!(i=this.gobbleToken())||!(t=this.gobbleBinaryOp()))return i;for(o={value:t,prec:pL.binaryPrecedence(t),right_a:pL.right_associative.has(t)},(a=this.gobbleToken())||this.throwError("Expected expression after "+t),n=[i,o,a];t=this.gobbleBinaryOp();){if(0===(r=pL.binaryPrecedence(t))){this.index-=t.length;break}o={value:t,prec:r,right_a:pL.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]);)a=n.pop(),t=n.pop().value,i=n.pop(),e={type:pL.BINARY_EXP,operator:t,left:i,right:a},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:pL.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,pL.isDecimalDigit(e)||e===pL.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===pL.SQUOTE_CODE||e===pL.DQUOTE_CODE)n=this.gobbleStringLiteral();else if(e===pL.OBRACK_CODE)n=this.gobbleArray();else{for(r=(t=this.expr.substr(this.index,pL.max_unop_len)).length;r>0;){if(pL.unary_ops.hasOwnProperty(t)&&(!pL.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!pL.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:pL.UNARY_EXP,operator:t,argument:e,prefix:!0})}t=t.substr(0,--r)}pL.isIdentifierStart(e)?(n=this.gobbleIdentifier(),pL.literals.hasOwnProperty(n.name)?n={type:pL.LITERAL,value:pL.literals[n.name],raw:n.name}:n.name===pL.this_str&&(n={type:pL.THIS_EXP})):e===pL.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===pL.PERIOD_CODE||t===pL.OBRACK_CODE||t===pL.OPAREN_CODE||t===pL.QUMARK_CODE;){let r;if(t===pL.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==pL.PERIOD_CODE)break;r=!0,this.index+=2,this.gobbleSpaces(),t=this.code}this.index++,t===pL.OBRACK_CODE?((e={type:pL.MEMBER_EXP,computed:!0,object:e,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),(t=this.code)!==pL.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):t===pL.OPAREN_CODE?e={type:pL.CALL_EXP,arguments:this.gobbleArguments(pL.CPAREN_CODE),callee:e}:(t===pL.PERIOD_CODE||r)&&(r&&this.index--,this.gobbleSpaces(),e={type:pL.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(;pL.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(this.code===pL.PERIOD_CODE)for(e+=this.expr.charAt(this.index++);pL.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++));pL.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);pL.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+e+this.char+")")}return r=this.code,pL.isIdentifierStart(r)?this.throwError("Variable names cannot start with a number ("+e+this.char+")"):(r===pL.PERIOD_CODE||1===e.length&&e.charCodeAt(0)===pL.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:pL.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:pL.LITERAL,value:e,raw:this.expr.substring(t,this.index)}}gobbleIdentifier(){let e=this.code,t=this.index;for(pL.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length;)if(e=this.code,pL.isIdentifierPart(e))this.index++;else break;return{type:pL.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===pL.CPAREN_CODE&&n&&n>=t.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}if(o===pL.COMMA_CODE){if(this.index++,++n!==t.length){if(e===pL.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===pL.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!==pL.COMPOUND||this.throwError("Expected comma"),t.push(e)}}return r||this.throwError("Expected "+String.fromCharCode(e)),t}gobbleGroup(){this.index++;let e=this.gobbleExpressions(pL.CPAREN_CODE);if(this.code===pL.CPAREN_CODE)return(this.index++,1===e.length)?e[0]:!!e.length&&{type:pL.SEQUENCE_EXP,expressions:e};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:pL.ARRAY_EXP,elements:this.gobbleArguments(pL.CBRACK_CODE)}}}Object.assign(pL,{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)})}}(pL),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"}),pL.max_unop_len=pL.getMaxKeyLen(pL.unary_ops),pL.max_binop_len=pL.getMaxKeyLen(pL.binary_ops);let pF=e=>new pL(e).parse(),pB=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(pL).filter(e=>!pB.includes(e)&&void 0===pF[e]).forEach(e=>{pF[e]=pL[e]}),pF.Jsep=pL,pF.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 pV="ArrowFunctionExpression",pU={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)}},pW={...pU,Promise};function pz(e,t={}){return pY(e,t,pQ)}async function pK(e,t={}){return pJ(e,t,pQ)}function pH(e,t={}){return pY(e,t,p0)}function pG(e,t={}){return pJ(e,t,p0)}function pq(e,t={}){return pY(e,t,p1)}function pZ(e,t={}){return pJ(e,t,p1)}function pY(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=p5(t,pU),o=p2("string"==typeof e?pF(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 pJ(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=p5(t,pW);return Promise.resolve(p2("string"==typeof e?pF(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 pX(e){return pF(e)}function pQ(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||e instanceof Date}function p0(e){return"boolean"==typeof e}function p1(e){return"number"==typeof e}function p2(e,t){switch(e.type){case"UnaryExpression":var r,n,o,i,a,s,l,u,c,d,p,f,h,m=e,y=t;let g=p2(m.argument,y);switch(m.operator){case"+":return+g;case"-":return-g;case"~":return~g;case"!":return!g;default:throw`Expression evaluator does not support operator '${m.operator}''`}case"BinaryExpression":var b=e,v=t;switch(b.operator){case"&&":return p2(b.left,v)&&p2(b.right,v);case"||":return p2(b.left,v)||p2(b.right,v);case"??":return p2(b.left,v)??p2(b.right,v)}let w=p2(b.left,v),x=p2(b.right,v);switch(b.operator){case"+":return w+x;case"-":return w-x;case"*":return w*x;case"/":return w/x;case"%":return w%x;case"**":return w**x;case"==":return w==x;case"===":return w===x;case"!=":return w!=x;case"!==":return w!==x;case">":return w>x;case">=":return w>=x;case"<":return w<x;case"<=":return w<=x;case"in":return w in x;default:throw`Expression evaluator does not support operator '${b.operator}' operator`}case"ConditionalExpression":return r=e,n=t,p2(r.test,n)?p2(r.consequent,n):p2(r.alternate,n);case"CallExpression":return p8(p3(e,t));case"ArrowFunctionExpression":let E;return o=e,i=t,E=o.params?.map(e=>{if("Identifier"===e.type)return e.name;throw`Cannot handle parameter of type ${e.type}`})??[],(function(...e){if(e.length<E.length)throw`Required argument(s) ${E.slice(e.length,-1).join(", ")} were not provided`;let t=Object.fromEntries(E.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 p2(o.body,i.addVariables(t))}).bind(null);case"MemberExpression":return p8(p6(e,t));case"ArrayExpression":return a=e,s=t,a.elements?.map(fe(s));case"SequenceExpression":let S;return l=e,u=t,(S=l.expressions.map(fe(u)))[S.length-1];case"NewExpression":var D=e,O=t;if(D.callee&&"Identifier"===D.callee.type){let e=D.arguments?.map(fe(O));switch(D.callee.name){case"Date":return new Date(...e);case"RegExp":return new RegExp(...e);default:throw`Cannot instantiate object of type ${D.callee.name}`}}if(D.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,(ft(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 P,k;return p=e,f=t,P=p.expressions?.map(fe(f))??[],(k=p.quasis?.map(fe(f))??[]).filter(e=>!e.tail).map(e=>e.value).join("")+P.join("")+k.filter(e=>e.tail).map(e=>e.value).join("");case"TemplateElement":return{value:(h=e).cooked,tail:h.tail};default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function p4(e,t){switch(e.type){case"Literal":return e.value;case"Identifier":return e.name;case"MemberExpression":return p4(e.property,t);default:throw`VisitExpressionName does not support expression of type '${e.type}'`}}function p3(e,t){let r=p9(e.callee,t);if(r===p7||e.optional&&null==r)return p7;let n=e.arguments?.map(fe(t));if(r){if("function"!=typeof r)throw`${fo(e.callee)} is not a function`}else throw`No function named ${fo(e.callee)} is defined in this context`;return r(...n)}function p6(e,t){let r=p9(e.object,t);if(r===p7||e.optional&&null==r)return p7;if(null===r)throw TypeError(`TypeError: cannot read properties of null (reading '${fn(e.property,t)}')`);if(void 0===r)switch(e.object.type){case"Identifier":{let r=p4(e.object,t);throw ReferenceError(`ReferenceError: ${r} is not defined`)}case"MemberExpression":throw TypeError(`TypeError: cannot read properties of undefined (reading '${fn(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}(p2(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);ft(n),function(e,t){if(fr.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 p5(e,t){let r={variables:{...e},globals:{...t},addVariables(e){return this.variables={...this.variables,...e},this}};return r.addVariables.bind(r),r}pF.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:pV,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=pV,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)})}}),pF.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"}})}}),pF.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 i=this.char;("e"===i||"E"===i)&&(n+=this.expr.charAt(this.index++),("+"===(i=this.char)||"-"===i)&&(n+=this.expr.charAt(this.index++)),o(),e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+n+this.char+")"));let a=this.code;if(e.isIdentifierStart(a))this.throwError("Variable names cannot start with a number ("+n+this.char+")");else if(a===e.PERIOD_CODE){n.length>1&&this.throwError(`Unexpected period ${JSON.stringify({chCode:a,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,i,a;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,i=u,95===o||i.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"===(a=l)||"X"===a?16:"b"===a||"B"===a?2:8),raw:this.expr.substring(s,this.index)}}else(e.isDecimalDigit(this.code)||this.code===e.PERIOD_CODE)&&r.call(this,n)})}}),pF.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),i="";for(;++this.index<this.expr.length;){let e=this.code;if(e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57)i+=this.char;else break}try{n=new RegExp(o,i)}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")}})}}),pF.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 :")}})}}),pF.plugins.register({name:"jsepTemplateLiteral",init(e){function t(e,r=!0){if(96===this.code){let t={type:"TemplateLiteral",quasis:[],expressions:[]},n="",o="",i=!1,a=this.expr.length,s=()=>t.quasis.push({type:"TemplateElement",value:{raw:o,cooked:n},tail:i});for(;this.index<a;){let a=this.expr.charAt(++this.index);if("`"===a)return this.index+=1,i=!0,s(),e.node=t,r&&(e.node=this.gobbleTokenProperty(e.node)),e.node;if("$"===a&&"{"===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("\\"===a)switch(o+=a,a=this.expr.charAt(++this.index),o+=a,a){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+=a}else n+=a,o+=a}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})}}),pF.addBinaryOp("in",7),pF.addBinaryOp("??",1);let p7=Symbol("optional chain short-circuited");function p9(e,t){switch(e.type){case"MemberExpression":return p6(e,t);case"CallExpression":return p3(e,t);default:return p2(e,t)}}function p8(e){return e===p7?void 0:e}function fe(e){return function(t){return null===t?null:p2(t,e)}}function ft(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:`Cannot access the ${e} property of objects`}}let fr=new Set(["toString","valueOf","hasOwnProperty"]);function fn(e,t){try{return p4(e,t)}catch{return"<computed>"}}function fo(e){return e?"MemberExpression"===e.type?e.property?.name:e.name:null}function fi(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:{...pW},isLocalExpression:!1,variables:new Set};return fa("string"==typeof e?pF(e):e,t),[...t.variables]}function fa(e,t){switch(e.type){case"UnaryExpression":return n=e,o=t,fa(n.argument,o);case"BinaryExpression":return i=e,a=t,[fa(i.left,a),fa(i.right,a)].filter(Boolean);case"ConditionalExpression":return s=e,l=t,[fa(s.consequent,l),fa(s.test,l),fa(s.alternate,l)].filter(Boolean);case"CallExpression":let r;return u=e,c=t,r=fa(u.callee,c),u.arguments?.map(fs(c)),r;case"ArrowFunctionExpression":var n,o,i,a,s,l,u,c,d,p,f,h,m,y,g,b,v=e,w=t;let x={...w};x.isLocalExpression=!0;let E=v.params?.map(fs(x))??[],S=fa(v.body,x)??[];if(S&&Array.isArray(S))for(let e of S)E.includes(e)||w.variables.add(e);return;case"MemberExpression":var D=e,O=t;if(fa(D.object,O),D.computed)return void fa(D.property,O);let P={...O};P.isLocalExpression=!0,fa(D.property,P);return;case"ArrayExpression":return d=e,p=t,void d.elements?.map(fs(p));case"SequenceExpression":return f=e,h=t,void f.expressions?.map(fs(h));case"NewExpression":return m=e,y=t,void m.arguments?.map(fs(y));case"Literal":case"TemplateElement":return;case"Identifier":var k=e,C=t;if(!(k.name in C.globals))if(C.isLocalExpression)return k.name;else C.variables.add(k.name);return;case"TemplateLiteral":return g=e,b=t,void(g.expressions?.map(fs(b)),g.quasis?.map(fs(b)));default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function fs(e){return function(t){return null===t?null:fa(t,e)}}let fl=Y("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 fu(e,t,r){fl.setState(n=>({flags:{...n.flags,[e]:{enabled:n.flags[e]?.enabled??!1,label:t,description:r}}}))}function fc(){let e=fl.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 fd(e){return fl.getState().flags[e].enabled}function fp(e,t){fl.subscribe(r=>{t(r.flags[e].enabled)})}function ff(e,t){fl.setState(r=>({flags:{...r.flags,[e]:{...r.flags[e],enabled:t}}}))}function fh(e){return!window.offlineEnabled||(e??navigator.onLine)}fl.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 fm=t1(function(e,t,r){tG(e,t,r)});function fy(e=!0,t=!1){return fg(fh(),e,t)}function fg(e,t=!0,r=!1){return!!(e?t:r)}let fb=q("extensionsInternal",{slots:{},extensions:{}}),fv=q("extensionRenderings",{renderings:new Map}),fw=()=>Y("extensionsInternal",{slots:{},extensions:{}}),f_=()=>Y("extensionRenderings",{renderings:new Map});function fx(e){let t=fb.getState(),r=e(t);r!==t&&fb.setState(r)}let fE=null,fS=null;function fD(){let e=fv.getState();return fE&&e===fS||(fE=new Map(e.renderings),fS=e,function(e){for(let t of(f$.clear(),e.values()))fM(t,1);fI=!0}(fE)),fE}function fO(e){fS={renderings:e},fv.setState(fS,!0)}function fP(e){let t=fD();t.has(e.renderingId)||(t.set(e.renderingId,e),fM(e,1),fO(t))}function fk(e){let t=fD(),r=t.get(e);r&&(t.delete(e),fM(r,-1),fO(t))}let fC=()=>Y("extensions",{slots:{}}),fj=0,fT=new Set;function fR(e){fj++;try{return e()}finally{if(0==--fj&&fT.size>0){let e=Array.from(fT);for(let t of(fT.clear(),e))fN(t)}}}function fN(e){try{e()}catch(t){console.error(`The extension system's '${e.name}' recomputation failed`,t)}}function fA(e){fj>0?fT.add(e):fN(e)}let f$=new Map,fI=!1;function fM(e,t){let r=JSON.stringify([e.slotName,e.extensionId,e.slotModuleName,e.extensionModuleName]),n=f$.get(r);if(!n){if(t<0)return;f$.set(r,{count:1,record:{slotModuleName:e.slotModuleName,extensionModuleName:e.extensionModuleName,slotName:e.slotName,extensionId:e.extensionId}}),fI=!0;return}n.count+=t,n.count<1&&(f$.delete(r),fI=!0)}function fL(){var e,t;if(fD(),!fI)return;fI=!1;let r=Array.from(f$.values(),({record:e})=>e);r.sort(fF),e=nC.getState().mountedExtensions,t=r,e.length===t.length&&e.every((e,r)=>0===fF(e,t[r]))||nC.setState({mountedExtensions:r})}function fF(e,t){return fB(e.slotName,t.slotName)||fB(e.extensionId,t.extensionId)||fB(e.slotModuleName,t.slotModuleName)||fB(e.extensionModuleName,t.extensionModuleName)}function fB(e,t){return e===t?0:e<t?-1:1}fL(),fv.subscribe(()=>fA(fL));let fV=fw(),fU=fC(),fW=nT(),fz=nA(),fK=new Set,fH=!1;function fG(e){if(null===e)fK=null;else if(null!==fK)for(let t of e)fK.add(t);fA(fq)}function fq(){if(!fH){fH=!0;try{for(let e=1;;e++){let t=fK;if(null!==t&&0===t.size)return;fK=new Set;try{!function(e,t,r,n,o,i=null){let a=fU.getState().slots,s={},l=!1,u=fh(),c=Object.entries(n.flags).filter(([,{enabled:e}])=>e).map(([e])=>e);for(let[n,d]of Object.entries(e.slots)){let p=a[n];if(p&&i&&!i.has(n)){s[n]=p;continue}let{config:f}=nN(t,d.name),h=function(e,t,r,n,o,i,a){let s=function(e,t){let r=e.add||[],n=e.remove||[],o=e.order||[],{extensions:i}=fV.getState();return[...t,...r].filter(e=>!n.includes(e)).sort((e,r)=>f6(e,o,i[fX(e)]?.order,t)-f6(r,o,i[fX(r)]?.order,t))}(r,t.slots[e].attachedIds),l=[];for(let u of s){let{config:s}=nI(n,e,u),c=nM(r,e,u),d=c?fm({},s,c):s,p=fX(u),f=t.extensions[p];if(f){let e=d?.["Display conditions"]?.privileges??f.privileges??[];if(e&&("string"==typeof e||Array.isArray(e)&&e.length>0)&&(!a?.user||!aE(e,a.user))||f.featureFlag&&!o.includes(f.featureFlag)||window.offlineEnabled&&!fg(i,f.online,f.offline))continue;l.push({id:u,name:p,moduleName:f.moduleName,config:d,featureFlag:f.featureFlag,meta:f.meta,online:d?.["Display conditions"]?.online??f.online??!0,offline:d?.["Display conditions"]?.offline??f.offline??!1,displayConditionExpression:d?.["Display conditions"]?.expression||f.displayExpression})}}return l}(n,e,f,r,c,u,o.session);p&&p.moduleName===d.moduleName&&rI(p.candidateExtensions,h)?s[n]=p:(s[n]={moduleName:d.moduleName,candidateExtensions:h},l=!0)}(l||Object.keys(a).length!==Object.keys(s).length)&&fU.setState({slots:s})}(fV.getState(),fW.getState(),fz.getState(),fl.getState(),ay.getState(),t)}catch(e){throw fK=null===t||null===fK?null:new Set([...t,...fK]),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{fH=!1}}}function fZ(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 fY(){fG(null)}function fJ(e,t){return{moduleName:t,name:e,attachedIds:[]}}function fX(e){let[t]=e.split("#");return t}function fQ(e,t){let r=fX(t);return e.extensions[r]}function f0(e){return fQ(fV.getState(),e)}fV.subscribe((e,t)=>{fG(e.extensions!==t.extensions?null:fZ(e.slots,t.slots))}),fW.subscribe((e,t)=>{fG(fZ(e.slots,t.slots))}),fz.subscribe((e,t)=>{fG(fZ(e.configs,t.configs))}),fl.subscribe(()=>fG(null)),ay.subscribe(()=>fG(null)),fY(),g(fY);let f1=e=>fx(t=>({...t,extensions:{...t.extensions,[e.name]:{...e}}}));function f2(e,t){fx(r=>{let n=r.slots[e];return n?{...r,slots:{...r.slots,[e]:{...n,attachedIds:[...n.attachedIds,t]}}}:{...r,slots:{...r.slots,[e]:{...fJ(e),attachedIds:[t]}}}})}function f4(e,t){fx(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 f3(e){fx(t=>{let r=t.slots[e];return r?{...t,slots:{...t.slots,[e]:{...r,attachedIds:[]}}}:t})}function f6(e,t,r,n){let o=t.indexOf(e);if(-1!==o)return o;{if(void 0!==r)return 1e3+r;let t=n.indexOf(e);return -1!==t?2e3+t:3e3}}function f5(e,t){return function(e,t,r=null,n){let o;return e.filter(e=>{let i=e.displayConditionExpression;if("string"!=typeof i||0===i.trim().length)return!0;o??(o=t&&"object"==typeof t?{session:r,...t}:{session:r});try{return!!pH(i,o)}catch(t){return console.error(`Error while evaluating expression '${i}' for ${e.id}`+(n?` in ${n}`:""),t),!1}})}(f7(e),t,ay.getState().session,e)}function f7(e){return fU.getState().slots[e]?.candidateExtensions??[]}let f9=(e,t)=>fV.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=fJ(t,e);return{...r,slots:{...r.slots,[t]:{...o}}}}),f8=()=>{fK=null,fx(()=>({slots:{},extensions:{}})),f_().setState({renderings:new Map}),fU.setState({slots:{}})},he=q("left-nav",{slotName:null,basePath:window.spaBase,mode:"normal"});function ht({name:e,basePath:t,mode:r,componentContext:n,state:o}){he.setState({slotName:e,basePath:t,mode:r??"normal",componentContext:n,state:o})}function hr(e){he.getState().slotName===e&&he.setState(he.getInitialState(),!0)}let hn=q("modalRegistry",{modals:{}});function ho(e){hn.setState(t=>(t.modals[e.name]=e,t))}function hi(e){let t=hn.getState().modals[e];if(!t){let r=f0(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.`),ho(t))}return t}let ha=q("workspaceRegistrations",{workspaces:{}}),hs=q("workspaceGroups",{workspaceGroups:{}});function hl(e){ha.setState(t=>({workspaces:{...t.workspaces,[e.name]:{...e,load:e.load,preferredWindowSize:e.preferredWindowSize??"normal",type:e.type??"form",canHide:e.canHide??!1,canMaximize:e.canMaximize??!1,width:e.width??"narrow",groups:e.groups??[]}}}))}function hu(e){hs.setState(t=>{let r=t.workspaceGroups[e.name];return r?{workspaceGroups:{...t.workspaceGroups,[e.name]:{...r,members:Array.from(new Set([...r.members,...e.members]))}}}:{workspaceGroups:{...t.workspaceGroups,[e.name]:{name:e.name,members:e.members}}}})}let hc=new Set;function hd(e){let t=ha.getState().workspaces;if(t[e])return t[e];{let t=f0(e);if(t){var r;let n;return hc.has(e)||(console.warn(`The workspace '${e}' is registered as an extension. This is deprecated. Please register it in the "workspaces" section of the routes.json file.`),hc.add(e)),{name:t.name,title:(r=t,"string"==typeof(n=r?.meta?.title)?n:n&&"object"==typeof n?sp(r.moduleName,n.key,n.default):r.name),moduleName:t.moduleName,preferredWindowSize:t.meta?.screenSize??"normal",load:t.load,type:t.meta?.type??"form",canHide:t.meta?.canHide??!1,canMaximize:t.meta?.canMaximize??!1,width:t.meta?.width??"narrow",groups:t.meta?.groups??[]}}throw Error(`No workspace named '${e}' has been registered.`)}}function hp(e){let t=hs.getState().workspaceGroups;if(t[e])return t[e];throw Error(`No workspace group named '${e}' has been registered.`)}let hf=q("workspace2",{registeredGroupsByName:{},registeredWindowsByName:{},registeredWorkspacesByName:{},openedGroup:null,openedWindows:[],workspaceTitleByWorkspaceName:{},isMostRecentlyOpenedWindowHidden:!1});function hh(e){let{registeredWorkspacesByName:t,registeredWindowsByName:r}=hf.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 hm(e){let{registeredGroupsByName:t,registeredWindowsByName:r}=hf.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 hy(e){let{openedWindows:t}=hf.getState();return t.findIndex(t=>t.openedWorkspaces.find(t=>t.workspaceName===e))}function hg(e,t){if(0==t.length)return;let{registeredGroupsByName:r}=hf.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}}hf.setState({registeredGroupsByName:n})}function hb(e,t){if(0==t.length)return;let{registeredWindowsByName:r}=hf.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}hf.setState({registeredWindowsByName:n})}function hv(e,t){if(0==t.length)return;let{registeredWorkspacesByName:r}=hf.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}hf.setState({registeredWorkspacesByName:n})}let hw=0,h_=null,hx={bootstrap:15e3,mount:15e3,unmount:15e3};function hE(e,t){if(e.timeouts)return e;let r=e.name??"parcel",n=Object.fromEntries(Object.keys(hx).filter(t=>e[t]).map(n=>{var o,i;let a,s;return[n,(o=e[n],i=hx[n],a=Array.isArray(o)?o:[o],s=e=>a.reduce((t,o,i)=>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 ${i} for parcel ${r} did not return a promise`))}),Promise.resolve(void 0)),e=>{let o,a=new Promise((e,t)=>{o=setTimeout(()=>t(Error(`Lifecycle function ${n} for parcel ${r} did not settle within ${i}ms`)),i)});return Promise.race([s(e),a]).finally(()=>clearTimeout(o)).then(e=>(t(n,!1),e),e=>{throw t(n,!0),e})})]}));return{...e,...n}}async function hS(e,t){var r,n;let o,i,a,s,l,u=await (h_??(h_=new Promise((e,t)=>{ic({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),ic))),h_),c={...t},d=(o=c,i=!1,{retarget:e=>o={...e},release:a=()=>(function(e){for(let t of Object.keys(e))delete e[t]})(o),onSettled(e,t){switch(e){case"bootstrap":t&&a();return;case"mount":i||(i=t);return;case"unmount":(t||i)&&a();return}}});return n=u((r=d.onSettled,"function"==typeof e?()=>e().then(e=>hE(e,r)):hE(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 hD(){return hO}function hO(e,t){let r,n=hS(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 hP(e,t,r,n,o=e=>e,i={}){let a=fX(n),s=f0(n),l=null;if(e){if(!s)throw Error(`Couldn't find extension '${a}' to attach to '${t}'`);let{meta:u,moduleName:c,online:d,offline:p,load:f}=s;if(fy(d,p)){let s,d=hw++,p=`${t}/${n}-${d}`;e.dataset.extensionRenderingId=p;let h=e=>{try{fk(p)}catch(t){console.error(e,t)}};try{fP({renderingId:p,extensionName:a,extensionModuleName:c,extensionId:n,slotName:t,slotModuleName:r})}catch(e){throw h(`Recomputing configuration after registering '${n}' failed also failed`),e}try{s=await f()}catch(e){throw h(`Recomputing configuration after '${n}' failed to load also failed`),e}try{l=await hS(o({...s,name:`${t}/${a}-${d}`}),{...i,_meta:u,_extensionContext:{extensionId:n,extensionSlotName:t,extensionSlotModuleName:r,extensionModuleName: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 hk=r(2491),hC=r.n(hk);let hj=(0,hk.createContext)({moduleName:"",featureName:""});function hT({to:e,templateParams:t,onBeforeNavigate:r,children:n,...o}){return(0,hk.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}`)},[]),hC().createElement("a",{onClick:n=>{0===n.button&&!n.ctrlKey&&!n.shiftKey&&!n.altKey&&!n.metaKey&&(n.preventDefault(),r?.(n),i8({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:i7(e,t),...o},n)}let hR=({state:e,children:t,...r})=>{let{extension:n}=(0,hk.useContext)(hj),o=(0,hk.useRef)(null),i=(0,hk.useRef)(Promise.resolve()),a=(0,hk.useRef)(!1),s=(0,hk.useRef)(!1),l=(0,hk.useRef)(e),u=(0,hk.useCallback)(e=>{if(!e)return;let t=()=>{"MOUNTED"===e.getStatus()&&e.unmount()};switch(e.getStatus()){case"MOUNTED":e.unmount();break;case"UPDATING":i.current?.then(t,t);break;default:e.mountPromise.then(t,()=>{})}},[]),c=(0,hk.useCallback)((e,t)=>{e.update&&"UNMOUNTING"!==e.getStatus()&&(i.current=Promise.all([e.mountPromise,i.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,hk.useCallback)(t=>{t&&!o.current&&!s.current&&n?.extensionSlotName&&n.extensionSlotModuleName&&(s.current=!0,hP(t,n.extensionSlotName,n.extensionSlotModuleName,n.extensionId,void 0,e).then(t=>{(s.current=!1,o.current=t,a.current)?u(t):t&&l.current!==e&&c(t,l.current)},()=>{s.current=!1}))},[]);return(0,hk.useEffect)(()=>(a.current=!1,()=>{a.current=!0,u(o.current)}),[]),(0,hk.useEffect)(()=>{l.current=e,o.current&&c(o.current,e)},[e]),n?hC().createElement("div",{ref:d,"data-extension-id":n?.extensionId,style:{position:"relative"},...r}):null};function hN(e){let t=(0,hk.useRef)(e);return L(t.current,e)||(t.current=e),t.current}function hA(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 h$=e=>e;function hI(e,t=h$,r){let n=(0,hk.useCallback)(t=>e.subscribe(t),[e]),o=(0,hk.useCallback)(()=>t(e.getState()),[e,t]),i=(0,hk.useSyncExternalStore)(n,o,o),a=(0,hk.useMemo)(()=>r?hA(e,r):null,[e,r]);return(0,hk.useMemo)(()=>a?{...i,...a}:i,[i,a])}function hM(e,t){return hI(e,h$,t)}function hL(e){return function(t){let r=(0,hk.useCallback)(t=>e.subscribe(t),[]),n=(0,hk.useCallback)(()=>e.getState(),[]),o=(0,hk.useSyncExternalStore)(r,n,n),i=(0,hk.useMemo)(()=>t?hA(e,t):null,[t]);return(0,hk.useMemo)(()=>i?{...o,...i}:o,[o,i])}}let hF=[];Object.freeze(hF);let hB={candidateExtensions:hF};Object.freeze(hB);let hV=e=>{let t=(0,hk.useCallback)(t=>t.slots?.[e]??hB,[e]);return hI(fC(),t)},hU=e=>e.session;function hW(e,t){let{candidateExtensions:r}=hV(e),n=hI(ay,hU),o=hN(t);return(0,hk.useMemo)(()=>f5(e,o),[e,o,n,r])}function hz(e,t){let{moduleName:r}=(0,hk.useContext)(hj);if(!r)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,hk.useEffect)(()=>{f9(r,e)},[r,e]),{extensions:hW(e,t),extensionSlotName:e,extensionSlotModuleName:r}}function hK(e){return e}function hH({name:e,extensionSlotName:t,select:r=hK,children:n,state:o,style:i,...a}){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,hk.useRef)(null),{extensions:u,extensionSlotModuleName:c}=hz(s,o),d=(0,hk.useMemo)(()=>r(u),[r,u]),p=(0,hk.useMemo)(()=>{if("function"==typeof n&&!hC().isValidElement(n))return d.map(e=>n(e,o))},[n,d]);return hC().createElement("div",{ref:l,"data-extension-slot-name":s,"data-extension-slot-module-name":c,style:{...i,position:"relative"},...a},s&&d?.map((e,t)=>hC().createElement(hj.Provider,{key:e.id,value:{moduleName:c,featureName:"",extension:{extensionId:e.id,extensionSlotName:s,extensionSlotModuleName:c}}},p?.[t]??("function"!=typeof n?n:null)??hC().createElement(hR,{state:o}))))}var hG=r(5873);function hq(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 hZ(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?hq(Object(r),!0).forEach(function(t){var n,o,i;n=e,o=t,i=r[t],o in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hq(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function hY(e){return(hY="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 hJ(e){return(hJ="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 hX(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(hJ(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(hJ(e)));return e}}var hQ=null;try{hQ=require("react").createContext()}catch(e){}var h0={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 h1(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then(function(t){e.rootComponent=t})}function h2(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,i=h5(e,t,function(){r(this)}),a=hX(e,t)(),s=function(e){var t=e.reactDom,r=e.renderType,n=e.elementToRender,o=e.domElement,i=t[r];if("function"!=typeof i)throw Error('renderType "'.concat(r,'" did not return a function.'));switch(r){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var a=i(o);return a.render(n),a;case"hydrateRoot":return i(o,n);default:return i(n,o),null}}({elementToRender:i,domElement:a,reactDom:h6(e),renderType:"function"==typeof(o=e).renderType?o.renderType():o.renderType});e.domElements[t.name]=a,e.renderResults[t.name]=s})}function h4(e,t){return new Promise(function(r){e.unmountResolves[t.name]=r;var n=e.renderResults[t.name];n&&n.unmount?n.unmount():h6(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]})}function h3(e,t){return new Promise(function(r){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(r);var n=h5(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(n);else{var i=hX(e,t)();h6(e).render(n,i)}})}function h6(e){return e.ReactDOMClient||e.ReactDOM}function h5(e,t,r){var n=e.React.createElement(e.rootComponent,t),o=hQ?e.React.createElement(hQ.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,hZ(hZ({},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 h7=r(4011),h9=r(6802),h8=r.n(h9),me=r(3780);let mt={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},mr=new Map;(0,me.initCache)(mr);let mn={errorRetryCount:3,fetcher:af,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,shouldRetryOnError:e=>{if(e instanceof am){let t=e.response.status;return!!(t>=500)||401===t||403===t||429===t}return!0},provider:()=>mr};function mo(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw Error("Invalid options");let t=Object.assign({},mt,e),r={...mn,...t.swrConfig};return function(e){var n,o,i,a,s;return i=o=class extends(n=hC().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 hC().createElement("div",null,"An error has occurred. Please try reloading the page.");{let n=hC().createElement(hk.Suspense,{fallback:null},hC().createElement(h9.SWRConfig,{value:r},hC().createElement(hj.Provider,{value:this.state.config},t.disableTranslations?hC().createElement(e,this.props):hC().createElement(h7.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},hC().createElement(e,this.props)))));return t.strictMode&&hC().StrictMode?hC().createElement(hC().StrictMode,null,n):n}}constructor(e){super(e),this.state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,featureName:t.featureName,extension:e._extensionContext}}}},a="displayName",s=`OpenmrsReactComponent(${t.featureName})`,a in i?Object.defineProperty(i,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):i[a]=s,o}}function mi(e,t){return function(e){if("object"!==hY(e))throw Error("single-spa-react requires a configuration object");var t,r=hZ(hZ({},h0),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");!hQ&&r.React.createContext&&(hQ=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:h1.bind(null,r),mount:h2.bind(null,r),unmount:h4.bind(null,r)};return r.parcelCanUpdate&&(n.update=h3.bind(null,r)),n}({React:hC(),ReactDOMClient:hG,rootComponent:mo(t)(e)})}function ma(e,t){return()=>e().then(({default:e})=>mi(e,t))}function ms(e,t){return()=>Promise.resolve(mi(e,t))}let ml=ma,mu=U()(()=>({}));Z("openmrs-app-context",mu);let mc={};function md(e,t=e=>e){let r=mu.getState();return e in r?Object.freeze(Object.assign({},t?t(r[e]):r[e])):null}function mp(e,t){mu.setState(r=>(e in r||(r[e]={}),r[e]=t(r[e]),Object.assign({},r)))}function mf(e){return null===e?null:Object.freeze(Object.assign({},e))}let mh=new Map;function mm(e,t){let r=(0,hk.useRef)(t??{}),n=(0,hk.useRef)(t=>mp(e,t)),o=(0,hk.useRef)(Symbol());return(0,hk.useEffect)(()=>{let r=t??{},n=o.current;return null===md(e)?!function(e,t=mc){mu.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===mc?{}: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.`),mp(e,()=>r)),mh.set(e,n),()=>{mh.get(e)===n&&(mu.setState(t=>(e in t&&delete t[e],t)),mh.delete(e))}},[e]),(0,hk.useEffect)(()=>{let n=t??{};L(r.current,n)||(mp(e,()=>n),r.current=n)},[t]),n.current}function my({namespace:e,value:t}){return mm(e,t),null}let mg=({children:e,value:t,fallback:r})=>t?hC().createElement(hC().Fragment,null,e):r?hC().createElement(hC().Fragment,null,r):null;function mb(){let e=(0,hk.useRef)();return(!e.current||e.current.signal.aborted)&&(e.current=new AbortController),(0,hk.useEffect)(()=>{let t=e.current;return()=>t?.abort()},[]),e.current}function mv(e,t=e=>e??{}){let[r,n]=(0,hk.useState)(()=>{if(mw(e))return;let r=md(e);if(null!==r)return t?t(r):r});return(0,hk.useEffect)(()=>{if(mw(e))throw Error(`The namespace supplied to useAppContext must be a non-empty string, but was "${e}".`)},[e]),(0,hk.useEffect)(()=>{var r;let o;return(r=e=>{if(null==e)return void n(void 0);let r=t?t(e):e;n(e=>L(e,r)?e:r)})(mf(o=md(e))),mu.subscribe(t=>{let n=e in t?t[e]:null;n!==o&&(o=n,r(mf(n)))})},[e,t]),r}function mw(e){return"string"!=typeof e||0===e.trim().length}function m_(e){let t=hW(e);return(0,hk.useMemo)(()=>t.map(e=>e.id),[t])}function mx(e){return hV(e).candidateExtensions}function mE(e,t){let{data:r,error:n,mutate:o,isLoading:i,isValidating:a}=h8()(`${s7}?patient=${e}&includeEncounterless=${t}`,af);return(0,hk.useMemo)(()=>({isLoading:i,data:r?.data.results??[],error:n,mutate:o,isValidating:a}),[r,n,i,a,o])}function mS(e){(0,hk.useEffect)(()=>{if(e){let e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])}let mD={},mO=`No ComponentContext has been provided. This should come from "openmrsComponentDecorator".
|
|
16
|
-
Usually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".`;function mP(e){let{moduleName:t,extension:r}=(0,hk.useContext)(hj),n=e?.externalModuleName??t;if(!n&&!r)throw Error(mO);let o=function(e){let t=(0,hk.useMemo)(()=>nj(e),[e]),r=function(e){let[t,r]=(0,hk.useState)(()=>{let t=e.getState();return t.loaded&&t.config?t.config:null});return(0,hk.useEffect)(()=>e?.subscribe(e=>{e.loaded&&e.config&&r(e.config)}),[e]),t}(t);if(!r)throw mD[e]||(mD[e]=new Promise(e=>{let r=t.subscribe(t=>{t.loaded&&t.config&&(e(t.config),r())})})),mD[e];return r}(n),i=function(e){let t=(0,hk.useMemo)(nA,[]),r=function(e,t){let[r,n]=(0,hk.useState)(t?()=>{let r=nI(e.getState(),t.extensionSlotName,t.extensionId);if(r.loaded&&r.config)return r.config}:null);return(0,hk.useEffect)(()=>{if(t)return e.subscribe(e=>{let o=nI(e,t.extensionSlotName,t.extensionId);o.loaded&&o.config&&!rI(o.config,r)&&n(o.config)})},[e,t,r]),r}(t,e);if(!r&&e){let r=`${e.extensionSlotName}-${e.extensionId}`;throw!mD[r]&&t&&(mD[r]=new Promise(r=>{let n=t.subscribe(t=>{let o=nI(t,e.extensionSlotName,e.extensionId);o.loaded&&o.config&&(r(o.config),n())})})),mD[r]}return r||{}}(r);return(0,hk.useMemo)(()=>e?.externalModuleName&&n===e.externalModuleName?{...o}:{...o,...i},[n,e?.externalModuleName,o,i])}let mk=hW;function mC(){let[e,t]=(0,hk.useState)(fh());return(0,hk.useEffect)(()=>g(({online:e})=>t(e)),[]),e}function mj(e,t=300){let[r,n]=(0,hk.useState)(e);return(0,hk.useEffect)(()=>{let r=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(r)}},[e,t]),r}var mT=r(9256),mR=r.n(mT);let mN=`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 mA(){let e=`${au}/emrapi/configuration?v=${mN}`,t=mR()(e,af);return(0,hk.useMemo)(()=>({emrConfiguration:t.data?.data,isLoadingEmrConfiguration:t.isLoading,mutateEmrConfiguration:t.mutate,errorFetchingEmrConfiguration:t.error}),[t])}let m$=hL(fw());function mI(e){let t=hW(e);return(0,hk.useMemo)(()=>Object.fromEntries(t.map(e=>[e.name,e.meta])),[t])}let mM=hL(fC());function mL(e){let{flags:t}=hI(fl);return t[e]?.enabled??!1}function mF(){let[,e]=(0,hk.useState)(0);return(0,hk.useCallback)(()=>{e(e=>e+1)},[])}function mB(e,t,r={}){return mU(e,t,mV,r)}let mV={getPaginatedUrl:(e,t,r)=>{if(!e)return null;{let n=new URL(ap(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 mU(e,t,r,n={}){let{getPaginatedUrl:o,getTotalCount:i,getCurrentPageSize:a,getData:s}=r,{immutable:l,swrConfig:u}=n,c=n.fetcher??af,[d,p]=(0,hk.useState)(1),f=(0,hk.useRef)(NaN),h=(0,hk.useRef)(NaN),m=(0,hk.useRef)(d),y=(0,hk.useRef)(!1),g=(0,hk.useRef)(!1),b=e?.toString()??"",[v,w]=(0,hk.useState)(b);b!==v&&(w(b),p(1),m.current=1,f.current=NaN,h.current=NaN,y.current=!1,g.current=!1);let x=(d-1)*t,E=(0,hk.useMemo)(()=>o(e,t,x),[e,t,x]),{data:S,...D}=(l?mR():h8())(E,c,u);S?.data&&(f.current=i(S?.data),h.current=a(S?.data),y.current=!0);let O=Math.ceil(f.current/t),P=(0,hk.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(f.current/t);!y.current||Number.isNaN(r)||e<=r?(m.current=e,p(e)):console.warn("Invalid attempt to go to out of bounds page: "+e)},[t]);(0,hk.useEffect)(()=>{if(!y.current)return;if(Number.isNaN(f.current)){g.current||(g.current=!0,console.warn(`useServerPagination: ${b} returned no total count, so out-of-range pages cannot be detected.`));return}let e=Math.max(1,Math.ceil(f.current/t));d>e&&(console.warn(`Invalid attempt to go to out of bounds page: ${d}; returning to page ${e}.`),m.current=e,p(e))},[d,t,b,S]);let k=(0,hk.useCallback)(()=>{P(m.current+1)},[P]),C=(0,hk.useCallback)(()=>{P(m.current-1)},[P]);return{data:s(S?.data),totalPages:O,totalCount:f.current,currentPage:d,currentPageSize:h.current,paginated:O>1,showNextButton:d<O,showPreviousButton:d>1,goTo:P,goToNext:k,goToPrevious:C,...D}}function mW(e,t,r={}){return mU(e,t,mz(),r)}function mz(){return{getPaginatedUrl:(e,t,r)=>{if(!e)return null;{let n=new URL(ap(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 mK=r(6038),mH=r.n(mK);function mG(e,t={}){return mq(e,mV,t)}function mq(e,t,r={}){let{swrInfiniteConfig:n,immutable:o}=r,{getNextUrl:i,getTotalCount:a,getData:s}=t,l=r.fetcher??af,u=(0,hk.useCallback)((r,n)=>0==r?e?.toString()??null:t.getNextUrl(n.data),[e]),{data:c,size:d,setSize:p,...f}=mH()(u,l,{...n,...o?{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1}:{}}),h=i(c?.[c.length-1].data),m=a(c?.[0]?.data);return{data:c?.flatMap(e=>s(e.data)),totalCount:m,hasMore:null!=h,loadMore:()=>{p((c?.length??0)+1)},nextUri:h,...f}}function mZ(e,t={}){return mY(e,mV,t)}function mY(e,t,r={}){let n=mq(e,t,r),{hasMore:o,error:i,data:a,loadMore:s,isLoading:l,nextUri:u}=n;return((0,hk.useEffect)(()=>{o&&!i&&s()},[o,u]),r.partialData)?n:{...n,data:o||i?void 0:a,isLoading:l||o}}function mJ(e,t={}){return mY(e,mz(),t)}function mX(e,t={}){return mq(e,mz(),t)}function mQ(){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 m0(){let[e,t]=(0,hk.useState)(mQ);return(0,hk.useEffect)(()=>{let e=()=>{t(mQ())};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}let m1=e=>"small-desktop"===e||"large-desktop"===e;function m2(e){let t=(0,hk.useContext)(hj);(0,hk.useEffect)(()=>(t&&t.moduleName&&(e.componentContext=t),ht(e),()=>{hr(e.name)}),[t,e])}function m4(){return hI(he)}function m3(e=null,t=null){let[r,n]=(0,hk.useState)([]);return(0,hk.useEffect)(()=>{let r=pD(e,t).subscribe(e=>{n(e)},e=>{console.error(e)});return()=>r.unsubscribe()},[e,t]),r}function m6(e,t=!0){let r=(0,hk.useRef)(null);return(0,hk.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 m5(e){let t=(0,hk.useRef)();return(0,hk.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 m7(e,t={}){let{abortController:r,fetchInit:n,url:o,swrConfig:i}=t,a=mb(),s=(0,hk.useMemo)(()=>n?.signal??r?.signal??a.signal,[r?.signal,n?.signal,a.signal]),l=(0,hk.useCallback)(e=>af(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 h8()(e,l,i)}function m9(e=[],t=10){let[r,n]=(0,hk.useState)(1),o=(0,hk.useMemo)(()=>"number"==typeof t&&t>0?Math.max(1,Math.ceil(e.length/t)):1,[e.length,t]);r>o&&n(o);let i=Math.min(Math.max(1,r),o),a=(0,hk.useMemo)(()=>{let r=(i-1)*t,n=(i+0)*t;return e.slice(r,n)},[e,i,t]),s=(0,hk.useCallback)(e=>{!Number.isInteger(e)||e<1?console.warn(`usePagination: ignoring goTo(${e}); page must be a positive integer.`):n(e)},[]),l=(0,hk.useCallback)(()=>{n(e=>e+1)},[]),u=(0,hk.useCallback)(()=>{n(e=>Math.max(1,e-1))},[]);return(0,hk.useMemo)(()=>({results:a,totalPages:o,currentPage:i,paginated:e.length>t,showNextButton:i<o,showPreviousButton:i>1,goTo:s,goToNext:l,goToPrevious:u}),[a,o,e.length,t,i,s,l,u])}function m8(e,t,r,n){return{pageSizes:(0,hk.useMemo)(()=>{let r=Math.ceil(t/e);return isNaN(r)&&(r=0),[...Array(r).keys()].map(t=>(t+1)*e)},[e,t]),pageItemsCount:(0,hk.useMemo)(()=>e>t?t:e*r>t?e*(r-1)+n:e*r,[e,t,r,n])}}function ye(){let e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function yt(e){let[t,r]=(0,hk.useState)(e??ye()),{data:n,error:o,isValidating:i}=h8()(t?["patient",t]:null,()=>pv(t,{}));return(0,hk.useEffect)(()=>{let e=()=>{let e=ye();e!==t&&r(e)};return window.addEventListener("single-spa:routing-event",e),()=>window.removeEventListener("single-spa:routing-event",e)},[t]),(0,hk.useMemo)(()=>({isLoading:i&&!o&&!n,patient:n,patientUuid:t,error:o}),[i,o,n,t])}function yr(){let e=`${au}/metadatamapping/termmapping?v=custom:(metadataUuid)&code=emr.primaryIdentifierType`,{data:t,error:r,isLoading:n}=h8()(e,af);return(0,hk.useMemo)(()=>({primaryIdentifierCode:t?.data?.results[0]?.metadataUuid,isLoading:n,error:r}),[t,r,n])}function yn(e){let{extensions:t,extensionSlotModuleName:r}=hz(e);return e?t.map(t=>({state:n})=>hC().createElement(hj.Provider,{value:{moduleName:r,featureName:"",extension:{extensionId:t.id,extensionSlotName:e,extensionSlotModuleName:r}}},hC().createElement(hR,{state:n}))):[]}function yo(){let e=(0,hk.useRef)(),[t,r]=(0,hk.useState)(null),n=null;if(!t){if(s){let e=av().getState();e.loaded&&(n=e.session)}else s=new Promise(t=>{let r=({loaded:r,session:o})=>{r&&(t(o),n=o,e.current&&(e.current(),e.current=void 0))};r(av().getState()),n||(e.current=av().subscribe(r))});if(n)r(n);else throw s}(0,hk.useEffect)(()=>(e.current||(e.current=av().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(s)throw console.warn("useSession is in an unexpected state. Attempting to recover."),s;else throw Error("useSession is in an invalid state.");return o}let yi=({privilege:e,fallback:t,children:r})=>{let[n,o]=(0,hk.useState)(null);return((0,hk.useEffect)(()=>{let e=ab({includeAuthStatus:!1}).subscribe(o);return()=>e.unsubscribe()},[]),n&&aE(e,n))?hC().createElement(hC().Fragment,null,r):t?hC().createElement(hC().Fragment,null,t):null};var ya=r(4274),ys=r.n(ya),yl=r(5602);let yu=new Map;function yc(){for(let e of Array.from(yu.values()))e()}let yd={setVisitContext:(e,t)=>null==t?{manuallySetVisitUuid:null}:{manuallySetVisitUuid:t.uuid,patientUuid:t.patient?.uuid}};function yp(e){let t=(0,hk.useId)();return(0,hk.useEffect)(()=>{if(e)return yu.set(t,e),()=>{yu.delete(t)}},[t,e]),{...hM(pR(),yd),mutateVisit:yc}}function yf(e,t=pj){let r=(0,hk.useRef)(void 0),{patientUuid:n,manuallySetVisitUuid:o,setVisitContext:i}=yp((0,hk.useCallback)(()=>r.current?.(),[])),a=e&&n==e?o:null,s=`?patient=${e}&v=${t}&includeInactive=false`,l=`/${a}?v=${t}`,{data:u,error:c,mutate:d,isValidating:p}=h8()(e?`${au}/visit${s}`:null,af),{data:f,error:h,mutate:m,isValidating:y}=h8()(e&&a?`${au}/visit${l}`:null,af),g=(0,hk.useMemo)(()=>u?.data.results.find(e=>null===e.stopDatetime)??null,[u]),b=(0,hk.useMemo)(()=>a&&f?f.data:null,[f,a]),v=(0,hk.useRef)(null);(0,hk.useEffect)(()=>{!p&&g&&n===e&&null===o&&i(g),y||(v.current&&b&&v.current.uuid===b.uuid&&!v.current.stopDatetime&&b.stopDatetime&&i(null),v.current=b)},[b,o,g,p,y,n]);let w=(0,hk.useCallback)(()=>{d(),m()},[d,m]);(0,hk.useEffect)(()=>{r.current=w},[w]);let x=!!(!u||a&&!f),E=!!(a?h:c);return{error:c||h,mutate:w,isValidating:p||y,activeVisit:g,currentVisit:b,currentVisitIsRetrospective:!!a,isLoading:x&&!E}}function yh(){let[e,t]=(0,hk.useState)([]);return(0,hk.useEffect)(()=>{let e=pP().subscribe(e=>{t(e)},e=>console.error(e));return()=>e.unsubscribe()},[]),e}ys().extend(yl);let ym=new Map;async function yy(e,t){let r=t.indexOf("#"),n=r>=0,o=n?t.substring(0,r):e,i=n?t.substring(r+1):t,a=await sM(o);return a&&Object.hasOwn(a,i)&&"function"==typeof a[i]?yb(o,a).then(()=>a[i]()):(a?a&&Object.hasOwn(a,i)?console.warn(`The export ${t}, defined in ${e}'s routes.json, is not a function`):console.warn(`${o} does not define a component called "${i}", referenced in ${e}'s routes.json. This cannot be loaded.`):console.warn(`Unknown app ${o} for ${t} defined in ${e}'s routes.json`),yg)}let yg={bootstrap:()=>Promise.resolve(),mount:()=>Promise.resolve(),unmount:()=>Promise.resolve()};async function yb(e,t){if(e in ym)await ym[e];else{let r=t??await sM(e);await (ym[e]=new Promise((t,n)=>{if(Object.hasOwn(r,"startupApp")){let o=r.startupApp;if("function"==typeof o)return Promise.resolve(o()).then(()=>{n4(e),t(null)}).catch(n)}n4(e),t(null)}))}}function yv(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 ay=q("session",{loaded:!1,session:null}),ag=0;function ab(e={includeAuthStatus:!0}){return(ag<Date.now()-6e4||!ay.getState().loaded)&&a_(),new ep.Observable(t=>{let r=r=>{r.loaded&&(e.includeAuthStatus?t.next(r.session):t.next(r.session?.user))};return r(ay.getState()),ay.subscribe(r)})}function av(){return(ag<Date.now()-6e4||!ay.getState().loaded)&&a_(),ay}function aw(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 a_(e,t){ag=Date.now();let r={};return e&&t&&(r.Authorization=`Basic ${window.btoa(`${e}:${t}`)}`),ak(af(ad,{headers:r}))}function ax(){ay.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})}function aE(e,t){var r,n;if(void 0===t)return!e;if(!e)return!0;return r=e,n=t,("string"==typeof r?!Q(n.privileges.find(e=>r===e.display)):Array.isArray(r)?r.every(e=>!Q(n.privileges.find(t=>e===t.display))):(Q(r)||console.error(`Could not understand privileges "${r}"`),!0))||!Q(t.roles.find(e=>"System Developer"===e.display))}function aS(){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(ay.getState()),e||(t=ay.subscribe(n))})}function aD(){return new Promise((e,t)=>{ab().subscribe(t=>{e(t.sessionLocation)},t).unsubscribe()})}async function aO(e,t){return ak(af(ad,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal}))}async function aP(e,t,r){return r||(r=new AbortController),await af(`${au}/user/${e}`,{method:"POST",body:{userProperties:t},headers:{"Content-Type":"application/json"},signal:r.signal}),a_()}function ak(e){return new Promise((t,r)=>{e.then(e=>{let n;"object"==typeof e?.data?(n={loaded:!0,session:e.data},ay.setState(n),t(n)):(n={loaded:!1,session:null},ay.setState(n),r(n))}).catch(e=>{$(`Failed to fetch new session information: ${e}`);let t={loaded:!1,session:null};ay.setState(t),r(t)})})}function aC(){return"development"===window.spaEnv||"true"===localStorage.getItem("openmrs:devtools")}ay.subscribe(e=>{e.loaded&&e.session&&aw(e.session)});let aj={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"};function aT(){n1("@openmrs/esm-api",as),a_()}let aR={address1:"Address line 1",address2:"Address line 2",address3:"Address line 3",address4:"Address line 4",address5:"Address line 5",address6:"Address line 6",city:"City",cityVillage:"City",country:"Country",countyDistrict:"District",district:"District",postalCode:"Postal code",state:"State",stateProvince:"State",closeAllOpenedWorkspaces:"Discard changes in {{count}} workspaces",closingAllWorkspacesPromptBody:"There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",closingAllWorkspacesPromptTitle:"You have unsaved changes",discard:"Discard",hide:"Hide",maximize:"Maximize",minimize:"Minimize",openAnyway:"Open anyway",unsavedChangesInOpenedWorkspace:"You may have unsaved changes in the opened workspace. Do you want to discard these changes?",unsavedChangesInWorkspace:'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',unsavedChangesTitleText:"Unsaved changes",workspaceHeader:"Workspace header",discardUnsavedChangesPromptBodyMultiple:"{{count}} workspaces have unsaved changes. Closing them will discard the changes:",discardUnsavedChangesPromptBodySingle:"<strong>{{workspaceTitle}}</strong> has unsaved changes. Closing it will discard them.",discardUnsavedChangesPromptTitle:"Discard unsaved changes?",keepEditing:"Keep editing",abnormalValue:"Abnormal value",actions:"Actions",actionableNotification:"Actionable notification",address:"Address",age:"Age",batchActionItemSelected:"{{totalSelected}} item selected",batchActionsItemsSelected:"{{totalSelected}} items selected",cancel:"Cancel",change:"Change",Clinic:"Clinic",close:"Close",closesActionableNotification:"Close actionable notification",closeSnackbar:"Close snackbar",confirm:"Confirm",contactAdministratorIfIssuePersists:"Contact your system administrator if the problem persists.",contactDetails:"Contact details",delete:"Delete",discardChanges:"Discard changes",edit:"Edit",emptyStateText:"There are no {{displayText}} to display",error:"Error",errorCopy:"Sorry, there was a problem displaying this information. You can try to reload this page, or contact the site administrator and quote the error code above.",errorLoadingLoginLocations:"Unable to load login locations. Please try again or contact support if the problem persists.",female:"Female",leftNavigation:"Left navigation",loading:"Loading",localVersion:"Local Build",male:"Male",noResultsToDisplay:"No results to display",notAvailable:"Not available",other:"Other",paginationItemsCount:"{{pageItemsCount}} / {{totalItems}} items",paginationOfPages:"of {{count}} pages",patientAvatarAlt:"Avatar for {{patientName}}",patientIdentifierSticker:"Patient identifier sticker",patientLists:"Patient lists",patientPhotoAlt:"Profile photo of {{patientName}}",patientPhotoPlaceholder:"Photo placeholder for {{patientName}}",prereleaseVersion:"Prerelease",print:"Print",printError:"Print error",printErrorExplainer:"An error occurred in {{errorLocation}}",printIdentifierSticker:"Print identifier sticker",printing:"Printing",recordNewEntry:"Record {{displayText}}",relationships:"Relationships",resetOverrides:"Reset overrides",save:"Save",scriptLoadingFailed:"Error: Script failed to load",scriptLoadingError:"Failed to load overridden script from {{url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",searchForLocation:"Search for a location",seeAll:"See all",seeMoreLists:"See {{count}} more lists",selectAll:"Select all",sex:"Sex",showLess:"Show less",showMore:"Show more",snackbarNotification:"Snackbar notification",toggleDevTools:"Toggle dev tools",unknown:"Unknown",yearAbbreviation:"yr",yearsAbbreviation:"yrs"},aN=e=>"string"==typeof e,aA=()=>{let e,t,r=new Promise((r,n)=>{e=r,t=n});return r.resolve=e,r.reject=t,r},a$=e=>null==e?"":""+e,aI=/###/g,aM=e=>e&&e.indexOf("###")>-1?e.replace(aI,"."):e,aL=e=>!e||aN(e),aF=(e,t,r)=>{let n=aN(t)?t.split("."):t,o=0;for(;o<n.length-1;){if(aL(e))return{};let t=aM(n[o]);!e[t]&&r&&(e[t]=new r),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return aL(e)?{}:{obj:e,k:aM(n[o])}},aB=(e,t,r)=>{let{obj:n,k:o}=aF(e,t,Object);if(void 0!==n||1===t.length){n[o]=r;return}let i=t[t.length-1],a=t.slice(0,t.length-1),s=aF(e,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,s=aF(e,a=a.slice(0,a.length-1),Object),s?.obj&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=r},aV=(e,t)=>{let{obj:r,k:n}=aF(e,t);if(r&&Object.prototype.hasOwnProperty.call(r,n))return r[n]},aU=(e,t,r)=>{for(let n in t)"__proto__"!==n&&"constructor"!==n&&(n in e?aN(e[n])||e[n]instanceof String||aN(t[n])||t[n]instanceof String?r&&(e[n]=t[n]):aU(e[n],t[n],r):e[n]=t[n]);return e};var aW={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};let az=e=>aN(e)?e.replace(/[&<>"'\/]/g,e=>aW[e]):e,aK=[" ",",","?","!",";"],aH=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(void 0!==t)return t;let r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}(20),aG=(e,t,r=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}let n=t.split(r),o=e;for(let e=0;e<n.length;){let t;if(!o||"object"!=typeof o)return;let i="";for(let a=e;a<n.length;++a)if(a!==e&&(i+=r),i+=n[a],void 0!==(t=o[i])){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<n.length-1)continue;e+=a-e+1;break}o=t}return o},aq=e=>e?.replace("_","-"),aZ={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class aY{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||aZ,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,r,n){return n&&!this.debug?null:(aN(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new aY(this.logger,{...{prefix:`${this.prefix}:${e}:`},...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new aY(this.logger,e)}}var aJ=new aY;class aX{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let r=this.observers[e].get(t)||0;this.observers[e].set(t,r+1)}),this}off(e,t){if(this.observers[e]){if(!t)return void delete this.observers[e];this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,r])=>{for(let n=0;n<r;n++)e(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([r,n])=>{for(let o=0;o<n;o++)r.apply(r,[e,...t])})}}class aQ extends aX{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,r,n={}){let o,i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,a=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],r&&(Array.isArray(r)?o.push(...r):aN(r)&&i?o.push(...r.split(i)):o.push(r)));let s=aV(this.data,o);return(!s&&!t&&!r&&e.indexOf(".")>-1&&(e=o[0],t=o[1],r=o.slice(2).join(".")),!s&&a&&aN(r))?aG(this.data?.[e]?.[t],r,i):s}addResource(e,t,r,n,o={silent:!1}){let i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,a=[e,t];r&&(a=a.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(a=e.split("."),n=t,t=a[1]),this.addNamespaces(t),aB(this.data,a,n),o.silent||this.emit("added",e,t,r,n)}addResources(e,t,r,n={silent:!1}){for(let n in r)(aN(r[n])||Array.isArray(r[n]))&&this.addResource(e,t,n,r[n],{silent:!0});n.silent||this.emit("added",e,t,r)}addResourceBundle(e,t,r,n,o,i={silent:!1,skipCopy:!1}){let a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),n=r,r=t,t=a[1]),this.addNamespaces(t);let s=aV(this.data,a)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),n?aU(s,r,o):s={...s,...r},aB(this.data,a,s),i.silent||this.emit("added",e,t,r)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var a0={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,n,o){return e.forEach(e=>{t=this.processors[e]?.process(t,r,n,o)??t}),t}};let a1=Symbol("i18next/PATH_KEY");function a2(e,t){let r,n,o,{[a1]:i}=e((n=[],(o=Object.create(null)).get=(e,t)=>(r?.revoke?.(),t===a1)?n:(n.push(t),(r=Proxy.revocable(e,o)).proxy),Proxy.revocable(Object.create(null),o).proxy));return i.join(t?.keySeparator??".")}let a4={},a3=e=>!aN(e)&&"boolean"!=typeof e&&"number"!=typeof e;class a6 extends aX{constructor(e,t={}){super(),((e,t,r)=>{e.forEach(e=>{t[e]&&(r[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=aJ.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let r={...t};if(null==e)return!1;let n=this.resolve(e,r);if(n?.res===void 0)return!1;let o=a3(n.res);return!1!==r.returnObjects||!o}extractFromKey(e,t){let r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");let n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],i=r&&e.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!((e,t,r)=>{t=t||"",r=r||"";let n=aK.filter(e=>0>t.indexOf(e)&&0>r.indexOf(e));if(0===n.length)return!0;let o=aH.getRegExp(`(${n.map(e=>"?"===e?"\\?":e).join("|")})`),i=!o.test(e);if(!i){let t=e.indexOf(r);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,r,n);if(i&&!a){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:aN(o)?[o]:o};let i=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(n)}return{key:e,namespaces:aN(o)?[o]:o}}translate(e,t,r){let n="object"==typeof t?{...t}:t;if("object"!=typeof n&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof n&&(n={...n}),n||(n={}),null==e)return"";"function"==typeof e&&(e=a2(e,{...this.options,...n})),Array.isArray(e)||(e=[String(e)]);let o=void 0!==n.returnDetails?n.returnDetails:this.options.returnDetails,i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(e[e.length-1],n),l=s[s.length-1],u=void 0!==n.nsSeparator?n.nsSeparator:this.options.nsSeparator;void 0===u&&(u=":");let c=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c?.toLowerCase()==="cimode")return d?o?{res:`${l}${u}${a}`,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${u}${a}`:o?{res:a,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:a;let p=this.resolve(e,n),f=p?.res,h=p?.usedKey||a,m=p?.exactUsedKey||a,y=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,g=!this.i18nFormat||this.i18nFormat.handleAsObject,b=void 0!==n.count&&!aN(n.count),v=a6.hasDefaultValue(n),w=b?this.pluralResolver.getSuffix(c,n.count,n):"",x=n.ordinal&&b?this.pluralResolver.getSuffix(c,n.count,{ordinal:!1}):"",E=b&&!n.ordinal&&0===n.count,S=E&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${w}`]||n[`defaultValue${x}`]||n.defaultValue,D=f;g&&!f&&v&&(D=S);let O=a3(D),P=Object.prototype.toString.apply(D);if(g&&D&&O&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(P)&&!(aN(y)&&Array.isArray(D))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,D,{...n,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return o?(p.res=e,p.usedParams=this.getUsedParamsDetails(n),p):e}if(i){let e=Array.isArray(D),t=e?[]:{},r=e?m:h;for(let e in D)if(Object.prototype.hasOwnProperty.call(D,e)){let o=`${r}${i}${e}`;v&&!f?t[e]=this.translate(o,{...n,defaultValue:a3(S)?S[e]:void 0,...{joinArrays:!1,ns:s}}):t[e]=this.translate(o,{...n,joinArrays:!1,ns:s}),t[e]===o&&(t[e]=D[e])}f=t}}else if(g&&aN(y)&&Array.isArray(f))(f=f.join(y))&&(f=this.extendTranslation(f,e,n,r));else{let t=!1,o=!1;!this.isValidLookup(f)&&v&&(t=!0,f=S),this.isValidLookup(f)||(o=!0,f=a);let s=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:f,d=v&&S!==f&&this.options.updateMissing;if(o||t||d){if(this.logger.log(d?"updateKey":"missingKey",c,l,a,d?S:f),i){let e=this.resolve(a,{...n,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let r=0;r<t.length;r++)e.push(t[r]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(n.lng||this.language):e.push(n.lng||this.language);let r=(e,t,r)=>{let o=v&&r!==f?r:s;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,o,d,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,o,d,n),this.emit("missingKey",e,l,t,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,n);E&&n[`defaultValue${this.options.pluralSeparator}zero`]&&0>t.indexOf(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{r([e],a+t,n[`defaultValue${t}`]||S)})}):r(e,a,S))}f=this.extendTranslation(f,e,n,p,r),o&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${l}${u}${a}`),(o||t)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${a}`:a,t?f:void 0,n))}return o?(p.res=f,p.usedParams=this.getUsedParamsDetails(n),p):f}extendTranslation(e,t,r,n,o){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){let i;r.interpolation&&this.interpolator.init({...r,...{interpolation:{...this.options.interpolation,...r.interpolation}}});let a=aN(e)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(a){let t=e.match(this.interpolator.nestingRegexp);i=t&&t.length}let s=r.replace&&!aN(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,r.lng||this.language||n.usedLng,r),a){let t=e.match(this.interpolator.nestingRegexp);i<(t&&t.length)&&(r.nest=!1)}!r.lng&&n&&n.res&&(r.lng=this.language||n.usedLng),!1!==r.nest&&(e=this.interpolator.nest(e,(...e)=>o?.[0]!==e[0]||r.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),r)),r.interpolation&&this.interpolator.reset()}let i=r.postProcess||this.options.postProcess,a=aN(i)?[i]:i;return null!=e&&a?.length&&!1!==r.applyPostProcessor&&(e=a0.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...n,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e,t={}){let r,n,o,i,a;return aN(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(r))return;let s=this.extractFromKey(e,t),l=s.key;n=l;let u=s.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));let c=void 0!==t.count&&!aN(t.count),d=c&&!t.ordinal&&0===t.count,p=void 0!==t.context&&(aN(t.context)||"number"==typeof t.context)&&""!==t.context,f=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(e=>{this.isValidLookup(r)||(a=e,!a4[`${f[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(a)&&(a4[`${f[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${f.join(", ")}" won't get resolved as namespace "${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!!!")),f.forEach(n=>{let a;if(this.isValidLookup(r))return;i=n;let s=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(s,l,n,e,t);else{let e;c&&(e=this.pluralResolver.getSuffix(n,t.count,t));let r=`${this.options.pluralSeparator}zero`,o=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(t.ordinal&&0===e.indexOf(o)&&s.push(l+e.replace(o,this.options.pluralSeparator)),s.push(l+e),d&&s.push(l+r)),p){let n=`${l}${this.options.contextSeparator||"_"}${t.context}`;s.push(n),c&&(t.ordinal&&0===e.indexOf(o)&&s.push(n+e.replace(o,this.options.pluralSeparator)),s.push(n+e),d&&s.push(n+r))}}for(;a=s.pop();)this.isValidLookup(r)||(o=a,r=this.getResource(n,e,a,t))}))})}),{res:r,usedKey:n,exactUsedKey:o,usedLng:i,usedNS:a}}isValidLookup(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}getResource(e,t,r,n={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}getUsedParamsDetails(e={}){let t=e.replace&&!aN(e.replace),r=t?e.replace:e;if(t&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!t)for(let e of(r={...r},["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"]))delete r[e];return r}static hasDefaultValue(e){let t="defaultValue";for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,t.length)&&void 0!==e[r])return!0;return!1}}class a5{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=aJ.create("languageUtils")}getScriptPartFromCode(e){if(!(e=aq(e))||0>e.indexOf("-"))return null;let t=e.split("-");return 2===t.length||(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(!(e=aq(e))||0>e.indexOf("-"))return e;let t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(aN(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)?t:this.options.lowerCaseLng?e.toLowerCase():e}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){let t;return e?(e.forEach(e=>{if(t)return;let r=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(r))&&(t=r)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let r=this.getScriptPartFromCode(e);if(this.isSupportedCode(r))return t=r;let n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(e=>{if(e===n||!(0>e.indexOf("-")&&0>n.indexOf("-"))&&(e.indexOf("-")>0&&0>n.indexOf("-")&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1))return e})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),aN(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let 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||[]}toResolveHierarchy(e,t){let r=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),n=[],o=e=>{e&&(this.isSupportedCode(e)?n.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return aN(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):aN(e)&&o(this.formatLanguageCode(e)),r.forEach(e=>{0>n.indexOf(e)&&o(this.formatLanguageCode(e))}),n}}let a7={zero:0,one:1,two:2,few:3,many:4,other:5},a9={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class a8{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=aJ.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let r,n=aq("dev"===e?"en":e),o=t.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:n,type:o});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];try{r=new Intl.PluralRules(n,{type:o})}catch(o){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),a9;if(!e.match(/-|_/))return a9;let n=this.languageUtils.getLanguagePartFromCode(e);r=this.getRule(n,t)}return this.pluralRulesCache[i]=r,r}needsPlural(e,t={}){let r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,r={}){return this.getSuffixes(e,r).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let r=this.getRule(e,t);return(r||(r=this.getRule("dev",t)),r)?r.resolvedOptions().pluralCategories.sort((e,t)=>a7[e]-a7[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,r={}){let n=this.getRule(e,r);return n?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${n.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,r))}}let se=(e,t,r,n=".",o=!0)=>{let i,a=void 0!==(i=aV(e,r))?i:aV(t,r);return!a&&o&&aN(r)&&void 0===(a=aG(e,r,n))&&(a=aG(t,r,n)),a};class st{constructor(e={}){this.logger=aJ.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});let{escape:t,escapeValue:r,useRawValueToEscape:n,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:s,formatSeparator:l,unescapeSuffix:u,unescapePrefix:c,nestingPrefix:d,nestingPrefixEscaped:p,nestingSuffix:f,nestingSuffixEscaped:h,nestingOptionsSeparator:m,maxReplaces:y,alwaysFormat:g}=e.interpolation;this.escape=void 0!==t?t:az,this.escapeValue=void 0===r||r,this.useRawValueToEscape=void 0!==n&&n,this.prefix=o?o.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):i||"{{",this.suffix=a?a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):s||"}}",this.formatSeparator=l||",",this.unescapePrefix=u?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=d?d.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):p||"$t(".replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),this.nestingSuffix=f?f.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):h||")".replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),this.nestingOptionsSeparator=m||",",this.maxReplaces=y||1e3,this.alwaysFormat=void 0!==g&&g,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,r,n){let o,i,a,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(0>e.indexOf(this.formatSeparator)){let o=se(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,r,{...n,...t,interpolationkey:e}):o}let o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(se(t,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,r,{...n,...t,interpolationkey:i})};this.resetRegExp();let u=n?.missingInterpolationHandler||this.options.missingInterpolationHandler,c=n?.interpolation?.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e.replace(/\$/g,"$$$$")},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e).replace(/\$/g,"$$$$"):e.replace(/\$/g,"$$$$")}].forEach(t=>{for(a=0;o=t.regex.exec(e);){let r=o[1].trim();if(void 0===(i=l(r)))if("function"==typeof u){let t=u(e,o,n);i=aN(t)?t:""}else if(n&&Object.prototype.hasOwnProperty.call(n,r))i="";else if(c){i=o[0];continue}else this.logger.warn(`missed to pass in variable ${r} for interpolating ${e}`),i="";else aN(i)||this.useRawValueToEscape||(i=a$(i));let s=t.safeValue(i);if(e=e.replace(o[0],s),c?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++a>=this.maxReplaces)break}}),e}nest(e,t,r={}){let n,o,i,a=(e,t)=>{let r=this.nestingOptionsSeparator;if(0>e.indexOf(r))return e;let n=e.split(RegExp(`${r}[ ]*{`)),o=`{${n[1]}`;e=n[0];let a=(o=this.interpolate(o,i)).match(/'/g),s=o.match(/"/g);((a?.length??0)%2!=0||s)&&s.length%2==0||(o=o.replace(/'/g,'"'));try{i=JSON.parse(o),t&&(i={...t,...i})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${r}${o}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let s=[];(i=(i={...r}).replace&&!aN(i.replace)?i.replace:i).applyPostProcessor=!1,delete i.defaultValue;let l=/{.*}/.test(n[1])?n[1].lastIndexOf("}")+1:n[1].indexOf(this.formatSeparator);if(-1!==l&&(s=n[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),n[1]=n[1].slice(0,l)),(o=t(a.call(this,n[1].trim(),i),i))&&n[0]===e&&!aN(o))return o;aN(o)||(o=a$(o)),o||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),o=""),s.length&&(o=s.reduce((e,t)=>this.format(e,t,r.lng,{...r,interpolationkey:n[1].trim()}),o.trim())),e=e.replace(n[0],o),this.regexp.lastIndex=0}return e}}let sr=e=>{let t={};return(r,n,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});let a=n+JSON.stringify(i),s=t[a];return s||(s=e(aq(n),o),t[a]=s),s(r)}},sn=e=>(t,r,n)=>e(aq(r),n)(t);class so{constructor(e={}){this.logger=aJ.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";let r=t.cacheInBuiltFormats?sr:sn;this.formats={number:r((e,t)=>{let r=new Intl.NumberFormat(e,{...t});return e=>r.format(e)}),currency:r((e,t)=>{let r=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>r.format(e)}),datetime:r((e,t)=>{let r=new Intl.DateTimeFormat(e,{...t});return e=>r.format(e)}),relativetime:r((e,t)=>{let r=new Intl.RelativeTimeFormat(e,{...t});return e=>r.format(e,t.range||"day")}),list:r((e,t)=>{let r=new Intl.ListFormat(e,{...t});return e=>r.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=sr(t)}format(e,t,r,n={}){let o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&0>o[0].indexOf(")")&&o.find(e=>e.indexOf(")")>-1)){let e=o.findIndex(e=>e.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}return o.reduce((e,t)=>{let{formatName:o,formatOptions:i}=(e=>{let t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){let n=e.split("(");t=n[0].toLowerCase().trim();let 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(e=>{if(e){let[t,...n]=e.split(":"),o=n.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();r[i]||(r[i]=o),"false"===o&&(r[i]=!1),"true"===o&&(r[i]=!0),isNaN(o)||(r[i]=parseInt(o,10))}})}return{formatName:t,formatOptions:r}})(t);if(this.formats[o]){let t=e;try{let a=n?.formatParams?.[n.interpolationkey]||{},s=a.locale||a.lng||n.locale||n.lng||r;t=this.formats[o](e,s,{...i,...n,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e},e)}}class si extends aX{constructor(e,t,r,n={}){super(),this.backend=e,this.store=t,this.services=r,this.languageUtils=r.languageUtils,this.options=n,this.logger=aJ.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=n.maxParallelReads||10,this.readingCalls=0,this.maxRetries=n.maxRetries>=0?n.maxRetries:5,this.retryTimeout=n.retryTimeout>=1?n.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,n.backend,n)}queueLoad(e,t,r,n){let o={},i={},a={},s={};return e.forEach(e=>{let n=!0;t.forEach(t=>{let a=`${e}|${t}`;!r.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===i[a]&&(i[a]=!0):(this.state[a]=1,n=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===s[t]&&(s[t]=!0)))}),n||(a[e]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,r){let n=e.split("|"),o=n[0],i=n[1];t&&this.emit("failedLoading",o,i,t),!t&&r&&this.store.addResourceBundle(o,i,r,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&r&&(this.state[e]=0);let a={};this.queue.forEach(r=>{((e,t,r,n)=>{let{obj:o,k:i}=aF(e,t,Object);o[i]=o[i]||[],o[i].push(r)})(r.loaded,[o],i),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(e=>{a[e]||(a[e]={});let t=r.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,r,n=0,o=this.retryTimeout,i){if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:r,tried:n,wait:o,callback:i});this.readingCalls++;let a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&n<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,r,n+1,2*o,i)},o):i(a,s)},s=this.backend[r].bind(this.backend);if(2===s.length){try{let r=s(e,t);r&&"function"==typeof r.then?r.then(e=>a(null,e)).catch(a):a(null,r)}catch(e){a(e)}return}return s(e,t,a)}prepareLoading(e,t,r={},n){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),n&&n();aN(e)&&(e=this.languageUtils.toResolveHierarchy(e)),aN(t)&&(t=[t]);let o=this.queueLoad(e,t,r,n);if(!o.toLoad.length)return o.pending.length||n(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,r){this.prepareLoading(e,t,{},r)}reload(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}loadOne(e,t=""){let r=e.split("|"),n=r[0],o=r[1];this.read(n,o,"read",void 0,void 0,(r,i)=>{r&&this.logger.warn(`${t}loading namespace ${o} for language ${n} failed`,r),!r&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${n}`,i),this.loaded(e,r,i)})}saveMissing(e,t,r,n,o,i={},a=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t))return void this.logger.warn(`did not save key "${r}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");if(null!=r&&""!==r){if(this.backend?.create){let s={...i,isUpdate:o},l=this.backend.create.bind(this.backend);if(l.length<6)try{let o;(o=5===l.length?l(e,t,r,n,s):l(e,t,r,n))&&"function"==typeof o.then?o.then(e=>a(null,e)).catch(a):a(null,o)}catch(e){a(e)}else l(e,t,r,n,a,s)}e&&e[0]&&this.store.addResource(e[0],t,r,n)}}}let sa=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),aN(e[1])&&(t.defaultValue=e[1]),aN(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){let r=e[3]||e[2];Object.keys(r).forEach(e=>{t[e]=r[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),ss=e=>(aN(e.ns)&&(e.ns=[e.ns]),aN(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),aN(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),sl=()=>{};class su extends aX{constructor(e={},t){if(super(),this.options=ss(e),this.services={},this.logger=aJ,this.modules={external:[]},(e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))})})(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(aN(e.ns)?e.defaultNS=e.ns:0>e.ns.indexOf("translation")&&(e.defaultNS=e.ns[0]));let r=sa();this.options={...r,...this.options,...ss(e)},this.options.interpolation={...r.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator);let n=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?aJ.init(n(this.modules.logger),this.options):aJ.init(null,this.options),e=this.modules.formatter?this.modules.formatter:so;let t=new a5(this.options);this.store=new aQ(this.options.resources,this.options);let o=this.services;o.logger=aJ,o.resourceStore=this.store,o.languageUtils=t,o.pluralResolver=new a8(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),e&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(o.formatter=n(e),o.formatter.init&&o.formatter.init(o,this.options),this.options.interpolation.format=o.formatter.format.bind(o.formatter)),o.interpolator=new st(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new si(n(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(o.languageDetector=n(this.modules.languageDetector),o.languageDetector.init&&o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=n(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new a6(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=sl),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let o=aA(),i=()=>{let e=(e,r)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(r),t(e,r)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?i():setTimeout(i,0),o}loadResources(e,t=sl){let r=t,n=aN(e)?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(n?.toLowerCase()==="cimode"&&(!this.options.preload||0===this.options.preload.length))return r();let e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&0>e.indexOf(t)&&e.push(t)})};n?t(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),r(e)})}else r(null)}reloadResources(e,t,r){let n=aA();return"function"==typeof e&&(r=e,e=void 0),"function"==typeof t&&(r=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),r||(r=sl),this.services.backendConnector.reload(e,t,e=>{n.resolve(),r(e)}),n}use(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&a0.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&0>this.languages.indexOf(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let r=aA();this.emit("languageChanging",e);let n=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(o,i)=>{i?this.isLanguageChangingTo===e&&(n(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,r.resolve((...e)=>this.t(...e)),t&&t(o,(...e)=>this.t(...e))},i=t=>{e||t||!this.services.languageDetector||(t=[]);let r=aN(t)?t:t&&t[0],i=this.store.hasLanguageSomeTranslations(r)?r:this.services.languageUtils.getBestMatchFromCodes(aN(t)?[t]:t);i&&(this.language||n(i),this.translator.language||this.translator.changeLanguage(i),this.services.languageDetector?.cacheUserLanguage?.(i)),this.loadResources(i,e=>{o(e,i)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),r}getFixedT(e,t,r){let n=(e,t,...o)=>{let i,a;(i="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(o)):{...t}).lng=i.lng||n.lng,i.lngs=i.lngs||n.lngs,i.ns=i.ns||n.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||r||n.keyPrefix);let s=this.options.keySeparator||".";return i.keyPrefix&&Array.isArray(e)?a=e.map(e=>("function"==typeof e&&(e=a2(e,{...this.options,...t})),`${i.keyPrefix}${s}${e}`)):("function"==typeof e&&(e=a2(e,{...this.options,...t})),a=i.keyPrefix?`${i.keyPrefix}${s}${e}`:e),this.t(a,i)};return aN(e)?n.lng=e:n.lngs=e,n.ns=t,n.keyPrefix=r,n}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;let r=t.lng||this.resolvedLanguage||this.languages[0],n=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;let i=(e,t)=>{let r=this.services.backendConnector.state[`${e}|${t}`];return -1===r||0===r||2===r};if(t.precheck){let e=t.precheck(this,i);if(void 0!==e)return e}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,e)&&(!n||i(o,e)))}loadNamespaces(e,t){let r=aA();return this.options.ns?(aN(e)&&(e=[e]),e.forEach(e=>{0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}),this.loadResources(e=>{r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}loadLanguages(e,t){let r=aA();aN(e)&&(e=[e]);let n=this.options.preload||[],o=e.filter(e=>0>n.indexOf(e)&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=n.concat(o),this.loadResources(e=>{r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}let t=this.services?.languageUtils||new a5(sa());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){return new su(e,t)}cloneInstance(e={},t=sl){let r=e.forkResourceStore;r&&delete e.forkResourceStore;let n={...this.options,...e,isClone:!0},o=new su(n);return(void 0!==e.debug||void 0!==e.prefix)&&(o.logger=o.logger.clone(e)),["store","services","language"].forEach(e=>{o[e]=this[e]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r&&(o.store=new aQ(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((r,n)=>(r[n]={...e[t][n]},r),e[t]),e),{}),n),o.services.resourceStore=o.store),o.translator=new a6(o.services,n),o.translator.on("*",(e,...t)=>{o.emit(e,...t)}),o.init(n,t),o.translator.options=n,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}let sc=su.createInstance();sc.createInstance=su.createInstance,sc.createInstance,sc.dir,sc.init,sc.loadResources,sc.reloadResources,sc.use,sc.changeLanguage,sc.getFixedT,sc.t,sc.exists,sc.setDefaultNamespace,sc.hasLoadedNamespace,sc.loadNamespaces,sc.loadLanguages;let sd=sc.default||sc;function sp(e,t,r,n){return sd.t(t,{ns:e,defaultValue:r,...n})}function sf(e,t,r){return aR[e]?sp("core",e,t??aR[e],r):(console.error(`O3 Core Translations does not provide key '${e}'. The key itself is being rendered as text.`),e)}sd.on("initialized",function(){window.i18next.loadNamespaces(["core"])});let sh="import-map-override:",sm="import-map-overrides-disabled",sy="import-map-overrides:change",sg=!1,sb=null,sv=null;async function sw(){return sv??(sv=s_().then(({map:e,complete:t})=>(t||(sv=null),e))),sv}async function s_(){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:sx(t),complete:r}}function sx(e){let t={imports:{}};for(let r of e)r?.imports&&Object.assign(t.imports,r.imports);return t}function sE(){let e={};try{let t=sk();for(let r=0;r<localStorage.length;r++){let n=localStorage.key(r);if(n?.startsWith(sh)){let r=n.slice(sh.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 sS(){let e=await sw();return sg?sx([e,sb??sE()]):e}async function sD(){return sw()}async function sO(){return sg?sx([await sw(),sE()]):sw()}function sP(e){if(!sg)return{imports:{}};if(e){let e={};for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);if(r?.startsWith(sh)){let t=localStorage.getItem(r);t&&(e[r.slice(sh.length)]=t)}}return{imports:e}}return sE()}function sk(){if(!sg)return[];try{let e=localStorage.getItem(sm);if(e){let t=JSON.parse(e);if(Array.isArray(t))return t}}catch{}return[]}function sC(e){return!!sg&&sk().includes(e)}function sj(e,t){if(!sg)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.setItem(sh+e,t),window.dispatchEvent(new CustomEvent(sy))}catch(e){console.warn("[import-maps] Failed to write import-map override to localStorage",e)}}function sT(e){if(!sg)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.removeItem(sh+e);let t=sk().filter(t=>t!==e);t.length>0?localStorage.setItem(sm,JSON.stringify(t)):localStorage.removeItem(sm),window.dispatchEvent(new CustomEvent(sy))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}function sR(){if(!sg)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(sh)&&e.push(r)}e.forEach(e=>localStorage.removeItem(e)),localStorage.removeItem(sm),window.dispatchEvent(new CustomEvent(sy))}catch(e){console.warn("[import-maps] Failed to clear import-map overrides from localStorage",e)}}function sN(e){if(!sg)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{let t=sk().filter(t=>t!==e);t.length>0?localStorage.setItem(sm,JSON.stringify(t)):localStorage.removeItem(sm),window.dispatchEvent(new CustomEvent(sy))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}let sA=!1;function s$(){!sA&&(sA=!0,(sg="development"===window.spaEnv)&&(sb=sE()))}function sI(e){return e.replace(/[\/\-@]/g,"_")}async function sM(e,t="./start",n){var o;let i,a=!n?.maxLoadingTime||n.maxLoadingTime<=0?6e5:n.maxLoadingTime;await Promise.race([sL(e,n?.importMap),new Promise((t,r)=>{i=setTimeout(()=>{var t;r(Error(`Could not resolve requested script, ${e}, within ${(t=a)<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`}.`))},a)})]),i&&clearTimeout(i);let s=sI(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 sL(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=sI(e);if(!window[r]){let r=t??await sF();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 sP().imports;try{return await function(e){var t;let r=(t=window)[sB]??(t[sB]=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 i=new Promise((t,n)=>{let i=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 a(){clearTimeout(i),o.removeEventListener("load",s),o.removeEventListener("error",l)}function s(){a(),t()}function l(t){a(),r.delete(e),o.remove();let i=`Failed to load script from ${e}`;console.error(i,t),n(t.message??i)}o.addEventListener("load",s),o.addEventListener("error",l),document.head.appendChild(o)});return r.set(e,i),i}(n)}catch(e){return o&&j({kind:"error",title:sf("scriptLoadingFailed","Error: Script failed to load"),description:sf("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:sf("resetOverrides","Reset overrides"),onActionButtonClick(){sR(),window.location.reload()}}),Promise.reject(e)}}return Promise.resolve()}async function sF(){return sS()}let sB=Symbol.for("__openmrs_script_loading");function sV(e){return!!e&&"object"==typeof e&&!(Object.hasOwn(e,"pages")&&(!e.pages||!Array.isArray(e.pages))||Object.hasOwn(e,"extensions")&&(!e.extensions||!Array.isArray(e.extensions))||Object.hasOwn(e,"workspaces")&&(!e.workspaces||!Array.isArray(e.workspaces))||Object.hasOwn(e,"modals")&&(!e.modals||!Array.isArray(e.modals)))}function sU(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&&sV(t))}let sW="openmrs-routes:",sz="openmrs-routes:change",sK=!1,sH=null,sG=null;async function sq(){return sG??(sG=sZ().then(({map:e,complete:t})=>(t||(sG=null),e))),sG}async function sZ(){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&&sU(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:sY(t),complete:r}}function sY(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 sJ(){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(sW)){let e=localStorage.getItem(r);e&&t.push({moduleName:r.slice(sW.length),raw:e})}}for(let r of(await Promise.allSettled(t.map(async({moduleName:e,raw:t})=>{let r=JSON.parse(t);if(sV(r))return{moduleName:e,routes:r};if("string"==typeof r&&r.startsWith("http")){let t=await fetch(r),n=await t.json();if(sV(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 sX(){let e=await sq();return sK?sY([e,sH??await sJ()]):e}async function sQ(){return sq()}async function s0(){return sK?sY([await sq(),await sJ()]):sq()}function s1(){if(!sK)return{};let e={};try{for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);if(r?.startsWith(sW)){let t=localStorage.getItem(r);t&&(e[r.slice(sW.length)]=t)}}}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}function s2(e,t){if(!sK)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{if("string"==typeof t)if(t.startsWith("http"))localStorage.setItem(sW+e,JSON.stringify(t));else{let r=JSON.parse(t);if(!sV(r))return void console.error(`The supplied routes for ${e} is not a valid OpenmrsAppRoutes object`,t);localStorage.setItem(sW+e,JSON.stringify(r))}else if(t instanceof URL)localStorage.setItem(sW+e,JSON.stringify(t.toString()));else{if(!sV(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(sW+e,JSON.stringify(t))}window.dispatchEvent(new CustomEvent(sz))}catch(e){console.warn("[route-maps] Failed to write route override to localStorage",e)}}function s4(e){if(!sK)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{localStorage.removeItem(sW+e),window.dispatchEvent(new CustomEvent(sz))}catch(e){console.warn("[route-maps] Failed to remove route override from localStorage",e)}}function s3(){if(!sK)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(sW)&&e.push(r)}e.forEach(e=>localStorage.removeItem(e)),window.dispatchEvent(new CustomEvent(sz))}catch(e){console.warn("[route-maps] Failed to clear route overrides from localStorage",e)}}let s6=null;function s5(){return s6||(s6=(sK="development"===window.spaEnv)?sJ().then(e=>{sH=e}):Promise.resolve())}let s7=`${au}/attachment`;function s9(e,t){return af(`${s7}/${e}`,{signal:t.signal})}function s8(e,t,r,n){return af(le(e,t,n),{signal:r.signal})}function le(e,t,r){return r?`${s7}?patient=${e}&encounter=${r}`:`${s7}?patient=${e}&includeEncounterless=${t}`}async function lt(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)),af(`${s7}`,{method:"POST",body:n})}function lr(e,t){return af(`${s7}/${e}`,{method:"DELETE",signal:t.signal})}try{self["workbox:window:6.5.4"]&&_()}catch(e){}function ln(e,t){return new Promise(function(r){var n=new MessageChannel;n.port1.onmessage=function(e){r(e.data)},e.postMessage(t,[n.port2])})}function lo(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 li(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}try{self["workbox:core:6.5.4"]&&_()}catch(e){}var la=function(){var e=this;this.promise=new Promise(function(t,r){e.resolve=t,e.reject=r})};function ls(e,t){var r=location.href;return new URL(e,r).href===new URL(t,r).href}var ll=function(e,t){this.type=e,Object.assign(this,t)};function lu(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function lc(){}var ld={type:"SKIP_WAITING"};function lp(e,t){if(!t)return e&&e.then?e.then(lc):Promise.resolve()}var lf=function(e){function t(t,r){var n,o;return void 0===r&&(r={}),(n=e.call(this)||this).nn={},n.tn=0,n.rn=new la,n.en=new la,n.on=new la,n.un=0,n.an=new Set,n.cn=function(){var e=n.fn,t=e.installing;n.tn>0||!ls(t.scriptURL,n.sn.toString())||performance.now()>n.un+6e4?(n.vn=t,e.removeEventListener("updatefound",n.cn)):(n.hn=t,n.an.add(t),n.rn.resolve(t)),++n.tn,t.addEventListener("statechange",n.ln)},n.ln=function(e){var t=n.fn,r=e.target,o=r.state,i=r===n.vn,a={sw:r,isExternal:i,originalEvent:e};!i&&n.mn&&(a.isUpdate=!0),n.dispatchEvent(new ll(o,a)),"installed"===o?n.wn=self.setTimeout(function(){"installed"===o&&t.waiting===r&&n.dispatchEvent(new ll("waiting",a))},200):"activating"===o&&(clearTimeout(n.wn),i||n.en.resolve(r))},n.dn=function(e){var t=n.hn,r=t!==navigator.serviceWorker.controller;n.dispatchEvent(new ll("controlling",{isExternal:r,originalEvent:e,sw:t,isUpdate:n.mn})),r||n.on.resolve(t)},o=function(e){var t=e.data,r=e.ports,o=e.source;return lu(n.getSW(),function(){n.an.has(o)&&n.dispatchEvent(new ll("message",{data:t,originalEvent:e,ports:r,sw:o}))})},n.gn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(o.apply(this,e))}catch(e){return Promise.reject(e)}},n.sn=t,n.nn=r,navigator.serviceWorker.addEventListener("message",n.gn),n}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e;var r,n,o=t.prototype;return o.register=function(e){var t=(void 0===e?{}:e).immediate,r=void 0!==t&&t;try{var n,o,i,a=this;return n=function(){if(!r&&"complete"!==document.readyState)return lp(new Promise(function(e){return window.addEventListener("load",e)}))},o=function(){return a.mn=!!navigator.serviceWorker.controller,a.yn=a.pn(),lu(a.bn(),function(e){a.fn=e,a.yn&&(a.hn=a.yn,a.en.resolve(a.yn),a.on.resolve(a.yn),a.yn.addEventListener("statechange",a.ln,{once:!0}));var t=a.fn.waiting;return t&&ls(t.scriptURL,a.sn.toString())&&(a.hn=t,Promise.resolve().then(function(){a.dispatchEvent(new ll("waiting",{sw:t,wasWaitingBeforeRegister:!0}))}).then(function(){})),a.hn&&(a.rn.resolve(a.hn),a.an.add(a.hn)),a.fn.addEventListener("updatefound",a.cn),navigator.serviceWorker.addEventListener("controllerchange",a.dn),a.fn})},(i=n())&&i.then?i.then(o):o(i)}catch(e){return Promise.reject(e)}},o.update=function(){try{return this.fn?lp(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},o.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},o.messageSW=function(e){try{return lu(this.getSW(),function(t){return ln(t,e)})}catch(e){return Promise.reject(e)}},o.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&ln(this.fn.waiting,ld)},o.pn=function(){var e=navigator.serviceWorker.controller;return e&&ls(e.scriptURL,this.sn.toString())?e:void 0},o.bn=function(){try{var e=this;return function(e,t){try{var r=e()}catch(e){return t(e)}return r&&r.then?r.then(void 0,t):r}(function(){return lu(navigator.serviceWorker.register(e.sn,e.nn),function(t){return e.un=performance.now(),t})},function(e){throw e})}catch(e){return Promise.reject(e)}},r=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}],lo(t.prototype,r),n&&lo(t,n),t}(function(){function e(){this.Pn=new Map}var t=e.prototype;return t.addEventListener=function(e,t){this.Sn(e).add(t)},t.removeEventListener=function(e,t){this.Sn(e).delete(t)},t.dispatchEvent=function(e){e.target=this;for(var t,r=function(e){var t;if("u"<typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=function(e){if(e){if("string"==typeof e)return li(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?li(e,void 0):void 0}}(e))){t&&(e=t);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}(this.Sn(e.type));!(t=r()).done;)(0,t.value)(e)},t.Sn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}());function lh(e,t){if(void 0!==p)return console.warn(`The application's Service Worker has already been registered. The new service worker at ${e} will not be registered.`),p;if(!("serviceWorker"in navigator))throw Error("Registering the Service Worker is not possible due to missing browser capabilities.");let r=new lf(e,t);return p=r.register().then(()=>r.controlling.then(()=>r))}function lm(){return p??Promise.resolve(void 0)}let ly="x-omrs-offline-response-body",lg="x-omrs-offline-response-status",lb="x-omrs-offline-caching-strategy";async function lv(e){let t=await lm();return t?await t.messageSW(e):{success:!1,result:void 0,error:"No service worker has been registered. This is typically the case when the application has been built without offline-related features."}}async function lw(){let e=window.sessionStorage;try{e.setItem("someKeyHere","test"),e.removeItem("someKeyHere")}catch(t){if(t.code===DOMException.QUOTA_EXCEEDED_ERR&&0===e.length)return!0}return!1}async function l_(){return!window.indexedDB}async function lx(){return new Promise(e=>{let t=indexedDB.open("test");t.onerror=()=>e(!0),t.onsuccess=()=>e(!1)})}async function lE(){return await lx()||await l_()||await lw()}let lS="openmrs3:offline-mode",lD="unavailable";function lO(){return{current:lD,notAvailable:"unavailable"===lD,active:"on"===lD}}function lP(e){"unavailable"!==lD&&"unavailable"!==e&&(localStorage.setItem(lS,"on"===e?"active":"disabled"),lD=e)}async function lk(){await lE()||(lD="active"===localStorage.getItem(lS)?"on":"off"),navigator.onLine}let lC="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:global,lj=Object.keys,lT=Array.isArray;function lR(e,t){return"object"!=typeof t||lj(t).forEach(function(r){e[r]=t[r]}),e}"u"<typeof Promise||lC.Promise||(lC.Promise=Promise);let lN=Object.getPrototypeOf,lA={}.hasOwnProperty;function l$(e,t){return lA.call(e,t)}function lI(e,t){"function"==typeof t&&(t=t(lN(e))),("u"<typeof Reflect?lj:Reflect.ownKeys)(t).forEach(r=>{lL(e,r,t[r])})}let lM=Object.defineProperty;function lL(e,t,r,n){lM(e,t,lR(r&&l$(r,"get")&&"function"==typeof r.get?{get:r.get,set:r.set,configurable:!0}:{value:r,configurable:!0,writable:!0},n))}function lF(e){return{from:function(t){return e.prototype=Object.create(t.prototype),lL(e.prototype,"constructor",e),{extend:lI.bind(null,e.prototype)}}}}let lB=Object.getOwnPropertyDescriptor;function lV(e,t){let r;return lB(e,t)||(r=lN(e))&&lV(r,t)}let lU=[].slice;function lW(e,t,r){return lU.call(e,t,r)}function lz(e,t){return t(e)}function lK(e){if(!e)throw Error("Assertion Failed")}function lH(e){lC.setImmediate?setImmediate(e):setTimeout(e,0)}function lG(e,t){return e.reduce((e,r,n)=>{var o=t(r,n);return o&&(e[o[0]]=o[1]),e},{})}function lq(e,t){if(l$(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var r=[],n=0,o=t.length;n<o;++n){var i=lq(e,t[n]);r.push(i)}return r}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return void 0===s?void 0:lq(s,t.substr(a+1))}}function lZ(e,t,r){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){lK("string"!=typeof r&&"length"in r);for(var n=0,o=t.length;n<o;++n)lZ(e,t[n],r[n])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),s=t.substr(i+1);if(""===s)void 0===r?lT(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=r;else{var l=e[a];l&&l$(e,a)||(l=e[a]={}),lZ(l,s,r)}}else void 0===r?lT(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=r}}function lY(e){var t={};for(var r in e)l$(e,r)&&(t[r]=e[r]);return t}let lJ=[].concat;function lX(e){return lJ.apply([],e)}let lQ="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(lX([8,16,32,64].map(e=>["Int","Uint","Float"].map(t=>t+e+"Array")))).filter(e=>lC[e]),l0=lQ.map(e=>lC[e]);lG(lQ,e=>[e,!0]);let l1=null;function l2(e){l1="u">typeof WeakMap&&new WeakMap;let t=function e(t){if(!t||"object"!=typeof t)return t;let r=l1&&l1.get(t);if(r)return r;if(lT(t)){r=[],l1&&l1.set(t,r);for(var n=0,o=t.length;n<o;++n)r.push(e(t[n]))}else if(l0.indexOf(t.constructor)>=0)r=t;else{let n=lN(t);for(var i in r=n===Object.prototype?{}:Object.create(n),l1&&l1.set(t,r),t)l$(t,i)&&(r[i]=e(t[i]))}return r}(e);return l1=null,t}let{toString:l4}={};function l3(e){return l4.call(e).slice(8,-1)}let l6="u">typeof Symbol?Symbol.iterator:"@@iterator",l5="symbol"==typeof l6?function(e){var t;return null!=e&&(t=e[l6])&&t.apply(e)}:function(){return null},l7={};function l9(e){var t,r,n,o;if(1==arguments.length){if(lT(e))return e.slice();if(this===l7&&"string"==typeof e)return[e];if(o=l5(e)){for(r=[];!(n=o.next()).done;)r.push(n.value);return r}if(null==e)return[e];if("number"==typeof(t=e.length)){for(r=Array(t);t--;)r[t]=e[t];return r}return[e]}for(t=arguments.length,r=Array(t);t--;)r[t]=arguments[t];return r}let l8="u">typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var ue="u">typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),ut=()=>!0;let ur=!Error("").stack;function un(){if(ur)try{throw un.arguments,Error()}catch(e){return e}return Error()}function uo(e,t){var r=e.stack;return r?(t=t||0,0===r.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),r.split("\n").slice(t).filter(ut).map(e=>"\n"+e).join("")):""}var ui=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],ua=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(ui),us={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function ul(e,t){this._e=un(),this.name=e,this.message=t}function uu(e,t){return e+". Errors: "+Object.keys(t).map(e=>t[e].toString()).filter((e,t,r)=>r.indexOf(e)===t).join("\n")}function uc(e,t,r,n){this._e=un(),this.failures=t,this.failedKeys=n,this.successCount=r,this.message=uu(e,t)}function ud(e,t){this._e=un(),this.name="BulkError",this.failures=Object.keys(t).map(e=>t[e]),this.failuresByPos=t,this.message=uu(e,t)}lF(ul).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+uo(this._e,2))}},toString:function(){return this.name+": "+this.message}}),lF(uc).from(ul),lF(ud).from(ul);var up=ua.reduce((e,t)=>(e[t]=t+"Error",e),{}),uf=ua.reduce((e,t)=>{var r=t+"Error";function n(e,n){this._e=un(),this.name=r,e?"string"==typeof e?(this.message=`${e}${n?"\n "+n:""}`,this.inner=n||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=us[t]||r,this.inner=null)}return lF(n).from(ul),e[t]=n,e},{});uf.Syntax=SyntaxError,uf.Type=TypeError,uf.Range=RangeError;var uh=ui.reduce((e,t)=>(e[t+"Error"]=uf[t],e),{}),um=ua.reduce((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=uf[t]),e),{});function uy(){}function ug(e){return e}function ub(e,t){return null==e||e===ug?t:function(r){return t(e(r))}}function uv(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function uw(e,t){return e===uy?t:function(){var r=e.apply(this,arguments);void 0!==r&&(arguments[0]=r);var n=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=t.apply(this,arguments);return n&&(this.onsuccess=this.onsuccess?uv(n,this.onsuccess):n),o&&(this.onerror=this.onerror?uv(o,this.onerror):o),void 0!==i?i:r}}function u_(e,t){return e===uy?t:function(){e.apply(this,arguments);var r=this.onsuccess,n=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),r&&(this.onsuccess=this.onsuccess?uv(r,this.onsuccess):r),n&&(this.onerror=this.onerror?uv(n,this.onerror):n)}}function ux(e,t){return e===uy?t:function(r){var n=e.apply(this,arguments);lR(r,n);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?uv(o,this.onsuccess):o),i&&(this.onerror=this.onerror?uv(i,this.onerror):i),void 0===n?void 0===a?void 0:a:lR(n,a)}}function uE(e,t){return e===uy?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function uS(e,t){return e===uy?t:function(){var r=e.apply(this,arguments);if(r&&"function"==typeof r.then){for(var n=this,o=arguments.length,i=Array(o);o--;)i[o]=arguments[o];return r.then(function(){return t.apply(n,i)})}return t.apply(this,arguments)}}um.ModifyError=uc,um.DexieError=ul,um.BulkError=ud;var uD={};let[uO,uP,uk]="u"<typeof Promise?[]:(()=>{let e=Promise.resolve();if("u"<typeof crypto||!crypto.subtle)return[e,lN(e),e];let t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,lN(t),e]})(),uC=uP&&uP.then,uj=uO&&uO.constructor,uT=!!uk;var uR=!1,uN=uk?()=>{uk.then(u0)}:lC.setImmediate?setImmediate.bind(null,u0):lC.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver(()=>{u0(),e=null}).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(u0,0)},uA=function(e,t){uW.push([e,t]),uI&&(uN(),uI=!1)},u$=!0,uI=!0,uM=[],uL=[],uF=null,uB=ug,uV={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:ch,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(e=>{try{ch(e[0],e[1])}catch(e){}})}},uU=uV,uW=[],uz=0,uK=[];function uH(e){if("object"!=typeof this)throw TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=uy,this._lib=!1;var t=this._PSD=uU;if(ue&&(this._stackHolder=un(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==uD)throw TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&uZ(this,this._value))}this._state=null,this._value=null,++t.ref,function e(t,r){try{r(r=>{if(null===t._state){if(r===t)throw TypeError("A promise cannot be resolved with itself.");var n=t._lib&&u1();r&&"function"==typeof r.then?e(t,(e,t)=>{r instanceof uH?r._then(e,t):r.then(e,t)}):(t._state=!0,t._value=r,uY(t)),n&&u2()}},uZ.bind(null,t))}catch(e){uZ(t,e)}}(this,e)}let uG={get:function(){var e=uU,t=ce;function r(r,n){var o=!e.global&&(e!==uU||t!==ce);let i=o&&!co();var a=new uH((t,a)=>{uJ(this,new uq(cd(r,e,o,i),cd(n,e,o,i),t,a,e))});return ue&&uQ(a,this),a}return r.prototype=uD,r},set:function(e){lL(this,"then",e&&e.prototype===uD?uG:{get:function(){return e},set:uG.set})}};function uq(e,t,r,n,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=r,this.reject=n,this.psd=o}function uZ(e,t){if(uL.push(t),null===e._state){var r=e._lib&&u1();t=uB(t),e._state=!1,e._value=t,ue&&null!==t&&"object"==typeof t&&!t._promise&&function(e){try{e.apply(null,void 0)}catch(e){}}(()=>{var r=lV(t,"stack");t._promise=e,lL(t,"stack",{get:()=>uR?r&&(r.get?r.get.apply(t):r.value):e.stack})}),uM.some(t=>t._value===e._value)||uM.push(e),uY(e),r&&u2()}}function uY(e){var t=e._listeners;e._listeners=[];for(var r=0,n=t.length;r<n;++r)uJ(e,t[r]);var o=e._PSD;--o.ref||o.finalize(),0===uz&&(++uz,uA(()=>{0==--uz&&u4()},[]))}function uJ(e,t){if(null!==e._state){var r=e._state?t.onFulfilled:t.onRejected;if(null===r)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++uz,uA(uX,[r,e,t])}else e._listeners.push(t)}function uX(e,t,r){try{uF=t;var n,o=t._value;t._state?n=e(o):(uL.length&&(uL=[]),n=e(o),-1===uL.indexOf(o)&&function(e){for(var t=uM.length;t;)if(uM[--t]._value===e._value)return void uM.splice(t,1)}(t)),r.resolve(n)}catch(e){r.reject(e)}finally{uF=null,0==--uz&&u4(),--r.psd.ref||r.psd.finalize()}}function uQ(e,t){var r=t?t._numPrev+1:0;r<100&&(e._prev=t,e._numPrev=r)}function u0(){u1()&&u2()}function u1(){var e=u$;return u$=!1,uI=!1,e}function u2(){var e,t,r;do for(;uW.length>0;)for(e=uW,uW=[],r=e.length,t=0;t<r;++t){var n=e[t];n[0].apply(null,n[1])}while(uW.length>0);u$=!0,uI=!0}function u4(){var e=uM;uM=[],e.forEach(e=>{e._PSD.onunhandled.call(null,e._value,e)});for(var t=uK.slice(0),r=t.length;r;)t[--r]()}function u3(e){return new uH(uD,!1,e)}function u6(e,t){var r=uU;return function(){var n=u1(),o=uU;try{return cl(r,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{cl(o,!1),n&&u2()}}}lI(uH.prototype,{then:uG,_then:function(e,t){uJ(this,new uq(null,null,e,t,uU))},catch:function(e){if(1==arguments.length)return this.then(null,e);var t=arguments[0],r=arguments[1];return"function"==typeof t?this.then(null,e=>e instanceof t?r(e):u3(e)):this.then(null,e=>e&&e.name===t?r(e):u3(e))},finally:function(e){return this.then(t=>(e(),t),t=>(e(),u3(t)))},stack:{get:function(){if(this._stack)return this._stack;try{uR=!0;var e=(function e(t,r,n){if(r.length===n)return r;var o="";if(!1===t._state){var i,a,s=t._value;null!=s?(i=s.name||"Error",a=s.message||s,o=uo(s,0)):(i=s,a=""),r.push(i+(a?": "+a:"")+o)}return ue&&((o=uo(t._stackHolder,2))&&-1===r.indexOf(o)&&r.push(o),t._prev&&e(t._prev,r,n)),r})(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{uR=!1}}},timeout:function(e,t){return e<1/0?new uH((r,n)=>{var o=setTimeout(()=>n(new uf.Timeout(t)),e);this.then(r,n).finally(clearTimeout.bind(null,o))}):this}}),"u">typeof Symbol&&Symbol.toStringTag&&lL(uH.prototype,Symbol.toStringTag,"Dexie.Promise"),uV.env=cu(),lI(uH,{all:function(){var e=l9.apply(null,arguments).map(ci);return new uH(function(t,r){0===e.length&&t([]);var n=e.length;e.forEach((o,i)=>uH.resolve(o).then(r=>{e[i]=r,--n||t(e)},r))})},resolve:e=>{if(e instanceof uH)return e;if(e&&"function"==typeof e.then)return new uH((t,r)=>{e.then(t,r)});var t=new uH(uD,!0,e);return uQ(t,uF),t},reject:u3,race:function(){var e=l9.apply(null,arguments).map(ci);return new uH((t,r)=>{e.map(e=>uH.resolve(e).then(t,r))})},PSD:{get:()=>uU,set:e=>uU=e},totalEchoes:{get:()=>ce},newPSD:cr,usePSD:cc,scheduler:{get:()=>uA,set:e=>{uA=e}},rejectionMapper:{get:()=>uB,set:e=>{uB=e}},follow:(e,t)=>new uH((r,n)=>cr((t,r)=>{var n=uU;n.unhandleds=[],n.onunhandled=r,n.finalize=uv(function(){var e;e=()=>{0===this.unhandleds.length?t():r(this.unhandleds[0])},uK.push(function t(){e(),uK.splice(uK.indexOf(t),1)}),++uz,uA(()=>{0==--uz&&u4()},[])},n.finalize),e()},t,r,n))}),uj&&(uj.allSettled&&lL(uH,"allSettled",function(){let e=l9.apply(null,arguments).map(ci);return new uH(t=>{0===e.length&&t([]);let r=e.length,n=Array(r);e.forEach((e,o)=>uH.resolve(e).then(e=>n[o]={status:"fulfilled",value:e},e=>n[o]={status:"rejected",reason:e}).then(()=>--r||t(n)))})}),uj.any&&"u">typeof AggregateError&&lL(uH,"any",function(){let e=l9.apply(null,arguments).map(ci);return new uH((t,r)=>{0===e.length&&r(AggregateError([]));let n=e.length,o=Array(n);e.forEach((e,i)=>uH.resolve(e).then(e=>t(e),e=>{o[i]=e,--n||r(AggregateError(o))}))})}));let u5={awaits:0,echoes:0,id:0};var u7=0,u9=[],u8=0,ce=0,ct=0;function cr(e,t,r,n){var o=uU,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++ct;var a=uV.env;i.env=uT?{Promise:uH,PromiseProp:{value:uH,configurable:!0,writable:!0},all:uH.all,race:uH.race,allSettled:uH.allSettled,any:uH.any,resolve:uH.resolve,reject:uH.reject,nthen:cp(a.nthen,i),gthen:cp(a.gthen,i)}:{},t&&lR(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=cc(i,e,r,n);return 0===i.ref&&i.finalize(),s}function cn(){return u5.id||(u5.id=++u7),++u5.awaits,u5.echoes+=100,u5.id}function co(){return!!u5.awaits&&(0==--u5.awaits&&(u5.id=0),u5.echoes=100*u5.awaits,!0)}function ci(e){return u5.echoes&&e&&e.constructor===uj?(cn(),e.then(e=>(co(),e),e=>(co(),cm(e)))):e}function ca(e){++ce,u5.echoes&&0!=--u5.echoes||(u5.echoes=u5.id=0),u9.push(uU),cl(e,!0)}function cs(){var e=u9[u9.length-1];u9.pop(),cl(e,!1)}function cl(e,t){var r,n=uU;if((t?!u5.echoes||u8++&&e===uU:!u8||--u8&&e===uU)||(r=t?ca.bind(null,e):cs,uC.call(uO,r)),e!==uU&&(uU=e,n===uV&&(uV.env=cu()),uT)){var o=uV.env.Promise,i=e.env;uP.then=i.nthen,o.prototype.then=i.gthen,(n.global||e.global)&&(Object.defineProperty(lC,"Promise",i.PromiseProp),o.all=i.all,o.race=i.race,o.resolve=i.resolve,o.reject=i.reject,i.allSettled&&(o.allSettled=i.allSettled),i.any&&(o.any=i.any))}}function cu(){var e=lC.Promise;return uT?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(lC,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:uP.then,gthen:e.prototype.then}:{}}function cc(e,t,r,n,o){var i=uU;try{return cl(e,!0),t(r,n,o)}finally{cl(i,!1)}}function cd(e,t,r,n){return"function"!=typeof e?e:function(){var o,i=uU;r&&cn(),cl(t,!0);try{return e.apply(this,arguments)}finally{cl(i,!1),n&&(o=co,uC.call(uO,o))}}}function cp(e,t){return function(r,n){return e.call(this,cd(r,t),cd(n,t))}}-1===(""+uC).indexOf("[native code]")&&(cn=co=uy);let cf="unhandledrejection";function ch(e,t){var r;try{r=t.onuncatched(e)}catch(e){}if(!1!==r)try{var n,o={promise:t,reason:e};if(lC.document&&document.createEvent?((n=document.createEvent("Event")).initEvent(cf,!0,!0),lR(n,o)):lC.CustomEvent&&lR(n=new CustomEvent(cf,{detail:o}),o),n&&lC.dispatchEvent&&(dispatchEvent(n),!lC.PromiseRejectionEvent&&lC.onunhandledrejection))try{lC.onunhandledrejection(n)}catch(e){}ue&&n&&!n.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}var cm=uH.reject;let cy="3.2.4",cg=String.fromCharCode(65535),cb=-1/0,cv="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",cw="String expected.",c_=[],cx="u">typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),cE=e=>!/(dexie\.js|dexie\.min\.js)/.test(e),cS="__dbnames",cD="readonly",cO="readwrite";function cP(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}let ck={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function cC(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=l2(t))[e],t)}class cj{_trans(e,t,r){let n=this._tx||uU.trans,o=this.name;function i(e,r,n){if(!n.schema[o])throw new uf.NotFound("Table "+o+" not part of transaction");return t(n.idbtrans,n)}let a=u1();try{return n&&n.db===this.db?n===uU.trans?n._promise(e,i,r):cr(()=>n._promise(e,i,r),{trans:n,transless:uU.transless||uU}):function e(t,r,n,o){if(t.idbdb&&(t._state.openComplete||uU.letThrough||t._vip)){var i=t._createTransaction(r,n,t._dbSchema);try{i.create(),t._state.PR1398_maxLoop=3}catch(i){return i.name===up.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>e(t,r,n,o))):cm(i)}return i._promise(r,(e,t)=>cr(()=>(uU.trans=i,o(e,t,i)))).then(e=>i._completion.then(()=>e))}if(t._state.openComplete)return cm(new uf.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return cm(new uf.DatabaseClosed);t.open().catch(uy)}return t._state.dbReadyPromise.then(()=>e(t,r,n,o))}(this.db,e,[this.name],i)}finally{a&&u2()}}get(e,t){return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",t=>this.core.get({trans:t,key:e}).then(e=>this.hook.reading.fire(e))).then(t)}where(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(lT(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);let t=lj(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);let r=this.schema.indexes.concat(this.schema.primKey).filter(e=>e.compound&&t.every(t=>e.keyPath.indexOf(t)>=0)&&e.keyPath.every(e=>t.indexOf(e)>=0))[0];if(r&&this.db._maxKey!==cg)return this.where(r.name).equals(r.keyPath.map(t=>e[t]));!r&&ue&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);let{idxByName:n}=this.schema,o=this.db._deps.indexedDB;function i(e,t){try{return 0===o.cmp(e,t)}catch(e){return!1}}let[a,s]=t.reduce(([t,r],o)=>{let a=n[o],s=e[o];return[t||a,t||!a?cP(r,a&&a.multi?e=>{let t=lq(e,o);return lT(t)&&t.some(e=>i(s,e))}:e=>i(s,lq(e,o))):r]},[null,null]);return a?this.where(a.name).equals(e[a.keyPath]).filter(s):r?this.filter(s):this.where(t).equals("")}filter(e){return this.toCollection().and(e)}count(e){return this.toCollection().count(e)}offset(e){return this.toCollection().offset(e)}limit(e){return this.toCollection().limit(e)}each(e){return this.toCollection().each(e)}toArray(e){return this.toCollection().toArray(e)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(e){return new this.db.Collection(new this.db.WhereClause(this,lT(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;let t=t=>{if(!t)return t;let r=Object.create(e.prototype);for(var n in t)if(l$(t,n))try{r[n]=t[n]}catch(e){}return r};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}defineClass(){return this.mapToClass(function(e){lR(this,e)})}add(e,t){let{auto:r,keyPath:n}=this.schema.primKey,o=e;return n&&r&&(o=cC(n)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[o]})).then(e=>e.numFailures?uH.reject(e.failures[0]):e.lastResult).then(t=>{if(n)try{lZ(e,n,t)}catch(e){}return t})}update(e,t){if("object"!=typeof e||lT(e))return this.where(":id").equals(e).modify(t);{let r=lq(e,this.schema.primKey.keyPath);if(void 0===r)return cm(new uf.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?lj(t).forEach(r=>{lZ(e,r,t[r])}):t(e,{value:e,primKey:r})}catch(e){}return this.where(":id").equals(r).modify(t)}}put(e,t){let{auto:r,keyPath:n}=this.schema.primKey,o=e;return n&&r&&(o=cC(n)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=t?[t]:null})).then(e=>e.numFailures?uH.reject(e.failures[0]):e.lastResult).then(t=>{if(n)try{lZ(e,n,t)}catch(e){}return t})}delete(e){return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"delete",keys:[e]})).then(e=>e.numFailures?uH.reject(e.failures[0]):void 0)}clear(){return this._trans("readwrite",e=>this.core.mutate({trans:e,type:"deleteRange",range:ck})).then(e=>e.numFailures?uH.reject(e.failures[0]):void 0)}bulkGet(e){return this._trans("readonly",t=>this.core.getMany({keys:e,trans:t}).then(e=>e.map(e=>this.hook.reading.fire(e))))}bulkAdd(e,t,r){let n=Array.isArray(t)?t:void 0,o=(r=r||(n?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",t=>{let{auto:r,keyPath:i}=this.schema.primKey;if(i&&n)throw new uf.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(n&&n.length!==e.length)throw new uf.InvalidArgument("Arguments objects and keys must have the same length");let a=e.length,s=i&&r?e.map(cC(i)):e;return this.core.mutate({trans:t,type:"add",keys:n,values:s,wantResults:o}).then(({numFailures:e,results:t,lastResult:r,failures:n})=>{if(0===e)return o?t:r;throw new ud(`${this.name}.bulkAdd(): ${e} of ${a} operations failed`,n)})})}bulkPut(e,t,r){let n=Array.isArray(t)?t:void 0,o=(r=r||(n?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",t=>{let{auto:r,keyPath:i}=this.schema.primKey;if(i&&n)throw new uf.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(n&&n.length!==e.length)throw new uf.InvalidArgument("Arguments objects and keys must have the same length");let a=e.length,s=i&&r?e.map(cC(i)):e;return this.core.mutate({trans:t,type:"put",keys:n,values:s,wantResults:o}).then(({numFailures:e,results:t,lastResult:r,failures:n})=>{if(0===e)return o?t:r;throw new ud(`${this.name}.bulkPut(): ${e} of ${a} operations failed`,n)})})}bulkDelete(e){let t=e.length;return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"delete",keys:e})).then(({numFailures:e,lastResult:r,failures:n})=>{if(0===e)return r;throw new ud(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,n)})}}function cT(e){var t={},r=function(r,n){if(n){for(var o=arguments.length,i=Array(o-1);--o;)i[o-1]=arguments[o];return t[r].subscribe.apply(null,i),e}if("string"==typeof r)return t[r]};r.addEventType=i;for(var n=1,o=arguments.length;n<o;++n)i(arguments[n]);return r;function i(e,n,o){if("object"!=typeof e){n||(n=uE),o||(o=uy);var a={subscribers:[],fire:o,subscribe:function(e){-1===a.subscribers.indexOf(e)&&(a.subscribers.push(e),a.fire=n(a.fire,e))},unsubscribe:function(e){a.subscribers=a.subscribers.filter(function(t){return t!==e}),a.fire=a.subscribers.reduce(n,o)}};return t[e]=r[e]=a,a}lj(e).forEach(function(t){var r=e[t];if(lT(r))i(t,e[t][0],e[t][1]);else{if("asap"!==r)throw new uf.InvalidArgument("Invalid event config");var n=i(t,ug,function(){for(var e=arguments.length,t=Array(e);e--;)t[e]=arguments[e];n.subscribers.forEach(function(e){lH(function(){e.apply(null,t)})})})}})}}function cR(e,t){return lF(t).from({prototype:e}),t}function cN(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function cA(e,t){e.filter=cP(e.filter,t)}function c$(e,t,r){var n=e.replayFilter;e.replayFilter=n?()=>cP(n(),t()):t,e.justLimit=r&&!n}function cI(e,t){if(e.isPrimKey)return t.primaryKey;let r=t.getIndexByKeyPath(e.index);if(!r)throw new uf.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return r}function cM(e,t,r){let n=cI(e,t.schema);return t.openCursor({trans:r,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:n,range:e.range}})}function cL(e,t,r,n){let o=e.replayFilter?cP(e.filter,e.replayFilter()):e.filter;if(e.or){let i={},a=(e,r,n)=>{if(!o||o(r,n,e=>r.stop(e),e=>r.fail(e))){var a=r.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),l$(i,s)||(i[s]=!0,t(e,r,n))}};return Promise.all([e.or._iterate(a,r),cF(cM(e,n,r),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return cF(cM(e,n,r),cP(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)}function cF(e,t,r,n){var o=u6(n?(e,t,o)=>r(n(e),t,o):r);return e.then(e=>{if(e)return e.start(()=>{var r=()=>e.continue();t&&!t(e,e=>r=e,t=>{e.stop(t),r=uy},t=>{e.fail(t),r=uy})||o(e.value,e,e=>r=e),r()})})}function cB(e,t){try{let r=cV(e),n=cV(t);if(r!==n)return"Array"===r?1:"Array"===n?-1:"binary"===r?1:"binary"===n?-1:"string"===r?1:"string"===n?-1:"Date"===r?1:"Date"!==n?NaN:-1;switch(r){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){let r=e.length,n=t.length,o=r<n?r:n;for(let r=0;r<o;++r)if(e[r]!==t[r])return e[r]<t[r]?-1:1;return r===n?0:r<n?-1:1}(cU(e),cU(t));case"Array":return function(e,t){let r=e.length,n=t.length,o=r<n?r:n;for(let r=0;r<o;++r){let n=cB(e[r],t[r]);if(0!==n)return n}return r===n?0:r<n?-1:1}(e,t)}}catch(e){}return NaN}function cV(e){let t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";let r=l3(e);return"ArrayBuffer"===r?"binary":r}function cU(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class cW{_read(e,t){var r=this._ctx;return r.error?r.table._trans(null,cm.bind(null,r.error)):r.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,cm.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=cP(t.algorithm,e)}_iterate(e,t){return cL(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),r=Object.create(this._ctx);return e&&lR(r,e),t._ctx=r,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read(r=>cL(t,e,r,t.table.core))}count(e){return this._read(e=>{let t=this._ctx,r=t.table.core;if(cN(t,!0))return r.count({trans:e,query:{index:cI(t,r.schema),range:t.range}}).then(e=>Math.min(e,t.limit));var n=0;return cL(t,()=>(++n,!1),e,r).then(()=>n)}).then(e)}sortBy(e,t){let r=e.split(".").reverse(),n=r[0],o=r.length-1;function i(e,t){return t?i(e[r[t]],t-1):e[n]}var a="next"===this._ctx.dir?1:-1;function s(e,t){var r=i(e,o),n=i(t,o);return r<n?-a:r>n?a:0}return this.toArray(function(e){return e.sort(s)}).then(t)}toArray(e){return this._read(e=>{var t=this._ctx;if("next"===t.dir&&cN(t,!0)&&t.limit>0){let{valueMapper:r}=t,n=cI(t,t.table.core.schema);return t.table.core.query({trans:e,limit:t.limit,values:!0,query:{index:n,range:t.range}}).then(({result:e})=>r?e.map(r):e)}{let r=[];return cL(t,e=>r.push(e),e,t.table.core).then(()=>r)}},e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,cN(t)?c$(t,()=>{var t=e;return(e,r)=>0===t||(1===t?--t:r(()=>{e.advance(t),t=0}),!1)}):c$(t,()=>{var t=e;return()=>--t<0})),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),c$(this._ctx,()=>{var t=e;return function(e,r,n){return--t<=0&&r(n),t>=0}},!0),this}until(e,t){return cA(this._ctx,function(r,n,o){return!e(r.value)||(n(o),t)}),this}first(e){return this.limit(1).toArray(function(e){return e[0]}).then(e)}last(e){return this.reverse().first(e)}filter(e){var t;return cA(this._ctx,function(t){return e(t.value)}),(t=this._ctx).isMatch=cP(t.isMatch,e),this}and(e){return this.filter(e)}or(e){return new this.db.WhereClause(this._ctx.table,e,this)}reverse(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,r){e(r.key,r)})}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,r){e(r.primaryKey,r)})}keys(e){var t=this._ctx;t.keysOnly=!t.isMatch;var r=[];return this.each(function(e,t){r.push(t.key)}).then(function(){return r}).then(e)}primaryKeys(e){var t=this._ctx;if("next"===t.dir&&cN(t,!0)&&t.limit>0)return this._read(e=>{var r=cI(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:r,range:t.range}})}).then(({result:e})=>e).then(e);t.keysOnly=!t.isMatch;var r=[];return this.each(function(e,t){r.push(t.primaryKey)}).then(function(){return r}).then(e)}uniqueKeys(e){return this._ctx.unique="unique",this.keys(e)}firstKey(e){return this.limit(1).keys(function(e){return e[0]}).then(e)}lastKey(e){return this.reverse().firstKey(e)}distinct(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var r={};return cA(this._ctx,function(e){var t=e.primaryKey.toString(),n=l$(r,t);return r[t]=!0,!n}),this}modify(e){var t=this._ctx;return this._write(r=>{var n;if("function"==typeof e)n=e;else{var o=lj(e),i=o.length;n=function(t){for(var r=!1,n=0;n<i;++n){var a=o[n],s=e[a];lq(t,a)!==s&&(lZ(t,a,s),r=!0)}return r}}let a=t.table.core,{outbound:s,extractKey:l}=a.schema.primaryKey,u=this.db._options.modifyChunkSize||200,c=[],d=0,p=[],f=(e,t)=>{let{failures:r,numFailures:n}=t;for(let t of(d+=e-n,lj(r)))c.push(r[t])};return this.clone().primaryKeys().then(o=>{let i=c=>{let d=Math.min(u,o.length-c);return a.getMany({trans:r,keys:o.slice(c,c+d),cache:"immutable"}).then(p=>{let h=[],m=[],y=s?[]:null,g=[];for(let e=0;e<d;++e){let t=p[e],r={value:l2(t),primKey:o[c+e]};!1!==n.call(r,r.value,r)&&(null==r.value?g.push(o[c+e]):s||0===cB(l(t),l(r.value))?(m.push(r.value),s&&y.push(o[c+e])):(g.push(o[c+e]),h.push(r.value)))}let b=cN(t)&&t.limit===1/0&&("function"!=typeof e||e===cz)&&{index:t.index,range:t.range};return Promise.resolve(h.length>0&&a.mutate({trans:r,type:"add",values:h}).then(e=>{for(let t in e.failures)g.splice(parseInt(t),1);f(h.length,e)})).then(()=>(m.length>0||b&&"object"==typeof e)&&a.mutate({trans:r,type:"put",keys:y,values:m,criteria:b,changeSpec:"function"!=typeof e&&e}).then(e=>f(m.length,e))).then(()=>(g.length>0||b&&e===cz)&&a.mutate({trans:r,type:"delete",keys:g,criteria:b}).then(e=>f(g.length,e))).then(()=>o.length>c+d&&i(c+u))})};return i(0).then(()=>{if(c.length>0)throw new uc("Error modifying one or more objects",c,d,p);return o.length})})})}delete(){var e=this._ctx,t=e.range;return cN(e)&&(e.isPrimKey&&!cx||3===t.type)?this._write(r=>{let{primaryKey:n}=e.table.core.schema;return e.table.core.count({trans:r,query:{index:n,range:t}}).then(n=>e.table.core.mutate({trans:r,type:"deleteRange",range:t}).then(({failures:e,lastResult:t,results:r,numFailures:o})=>{if(o)throw new uc("Could not delete some values",Object.keys(e).map(t=>e[t]),n-o);return n-o}))}):this.modify(cz)}}let cz=(e,t)=>t.value=null;function cK(e,t){return e<t?-1:+(e!==t)}function cH(e,t){return e>t?-1:+(e!==t)}function cG(e,t,r){var n=e instanceof cX?new e.Collection(e):e;return n._ctx.error=r?new r(t):TypeError(t),n}function cq(e){return new e.Collection(e,()=>cJ("")).limit(0)}function cZ(e,t,r,n){var o,i,a,s,l,u,c,d=r.length;if(!r.every(e=>"string"==typeof e))return cG(e,cw);function p(e){o="next"===e?e=>e.toUpperCase():e=>e.toLowerCase(),i="next"===e?e=>e.toLowerCase():e=>e.toUpperCase(),a="next"===e?cK:cH;var t=r.map(function(e){return{lower:i(e),upper:o(e)}}).sort(function(e,t){return a(e.lower,t.lower)});s=t.map(function(e){return e.upper}),l=t.map(function(e){return e.lower}),u=e,c="next"===e?"":n}p("next");var f=new e.Collection(e,()=>cY(s[0],l[d-1]+n));f._ondirectionchange=function(e){p(e)};var h=0;return f._addAlgorithm(function(e,r,n){var o=e.key;if("string"!=typeof o)return!1;var p=i(o);if(t(p,l,h))return!0;for(var f=null,m=h;m<d;++m){var y=function(e,t,r,n,o,i){for(var a=Math.min(e.length,n.length),s=-1,l=0;l<a;++l){var u=t[l];if(u!==n[l])return 0>o(e[l],r[l])?e.substr(0,l)+r[l]+r.substr(l+1):0>o(e[l],n[l])?e.substr(0,l)+n[l]+r.substr(l+1):s>=0?e.substr(0,s)+t[s]+r.substr(s+1):null;0>o(e[l],u)&&(s=l)}return a<n.length&&"next"===i?e+r.substr(e.length):a<e.length&&"prev"===i?e.substr(0,r.length):s<0?null:e.substr(0,s)+n[s]+r.substr(s+1)}(o,p,s[m],l[m],a,u);null===y&&null===f?h=m+1:(null===f||a(f,y)>0)&&(f=y)}return r(null!==f?function(){e.continue(f+c)}:n),!1}),f}function cY(e,t,r,n){return{type:2,lower:e,upper:t,lowerOpen:r,upperOpen:n}}function cJ(e){return{type:1,lower:e,upper:e}}class cX{get Collection(){return this._ctx.table.db.Collection}between(e,t,r,n){r=!1!==r,n=!0===n;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(r||n)&&(!r||!n)?cq(this):new this.Collection(this,()=>cY(e,t,!r,!n))}catch(e){return cG(this,cv)}}equals(e){return null==e?cG(this,cv):new this.Collection(this,()=>cJ(e))}above(e){return null==e?cG(this,cv):new this.Collection(this,()=>cY(e,void 0,!0))}aboveOrEqual(e){return null==e?cG(this,cv):new this.Collection(this,()=>cY(e,void 0,!1))}below(e){return null==e?cG(this,cv):new this.Collection(this,()=>cY(void 0,e,!1,!0))}belowOrEqual(e){return null==e?cG(this,cv):new this.Collection(this,()=>cY(void 0,e))}startsWith(e){return"string"!=typeof e?cG(this,cw):this.between(e,e+cg,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):cZ(this,(e,t)=>0===e.indexOf(t[0]),[e],cg)}equalsIgnoreCase(e){return cZ(this,(e,t)=>e===t[0],[e],"")}anyOfIgnoreCase(){var e=l9.apply(l7,arguments);return 0===e.length?cq(this):cZ(this,(e,t)=>-1!==t.indexOf(e),e,"")}startsWithAnyOfIgnoreCase(){var e=l9.apply(l7,arguments);return 0===e.length?cq(this):cZ(this,(e,t)=>t.some(t=>0===e.indexOf(t)),e,cg)}anyOf(){let e=l9.apply(l7,arguments),t=this._cmp;try{e.sort(t)}catch(e){return cG(this,cv)}if(0===e.length)return cq(this);let r=new this.Collection(this,()=>cY(e[0],e[e.length-1]));r._ondirectionchange=r=>{t="next"===r?this._ascending:this._descending,e.sort(t)};let n=0;return r._addAlgorithm((r,o,i)=>{let a=r.key;for(;t(a,e[n])>0;)if(++n===e.length)return o(i),!1;return 0===t(a,e[n])||(o(()=>{r.continue(e[n])}),!1)}),r}notEqual(e){return this.inAnyRange([[cb,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){let e=l9.apply(l7,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return cG(this,cv)}let t=e.reduce((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[cb,t]],null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,t){let r=this._cmp,n=this._ascending,o=this._descending,i=this._min,a=this._max;if(0===e.length)return cq(this);if(!e.every(e=>void 0!==e[0]&&void 0!==e[1]&&0>=n(e[0],e[1])))return cG(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",uf.InvalidArgument);let s=!t||!1!==t.includeLowers,l=t&&!0===t.includeUppers,u,c=n;function d(e,t){return c(e[0],t[0])}try{(u=e.reduce(function(e,t){let n=0,o=e.length;for(;n<o;++n){let o=e[n];if(0>r(t[0],o[1])&&r(t[1],o[0])>0){o[0]=i(o[0],t[0]),o[1]=a(o[1],t[1]);break}}return n===o&&e.push(t),e},[])).sort(d)}catch(e){return cG(this,cv)}let p=0,f=l?e=>n(e,u[p][1])>0:e=>n(e,u[p][1])>=0,h=s?e=>o(e,u[p][0])>0:e=>o(e,u[p][0])>=0,m=f,y=new this.Collection(this,()=>cY(u[0][0],u[u.length-1][1],!s,!l));return y._ondirectionchange=e=>{"next"===e?(m=f,c=n):(m=h,c=o),u.sort(d)},y._addAlgorithm((e,t,r)=>{for(var o=e.key;m(o);)if(++p===u.length)return t(r),!1;return!!(!f(o)&&!h(o))||(0===this._cmp(o,u[p][1])||0===this._cmp(o,u[p][0])||t(()=>{c===n?e.continue(u[p][0]):e.continue(u[p][1])}),!1)}),y}startsWithAnyOf(){let e=l9.apply(l7,arguments);return e.every(e=>"string"==typeof e)?0===e.length?cq(this):this.inAnyRange(e.map(e=>[e,e+cg])):cG(this,"startsWithAnyOf() only works with strings")}}function cQ(e){return u6(function(t){return c0(t),e(t.target.error),!1})}function c0(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}let c1="storagemutated",c2="x-storagemutated-1",c4=cT(null,c1);class c3{_lock(){return lK(!uU.global),++this._reculock,1!==this._reculock||uU.global||(uU.lockOwnerFor=this),this}_unlock(){if(lK(!uU.global),0==--this._reculock)for(uU.global||(uU.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{cc(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&uU.lockOwnerFor!==this}create(e){if(!this.mode)return this;let t=this.db.idbdb,r=this.db._state.dbOpenError;if(lK(!this.idbtrans),!e&&!t)switch(r&&r.name){case"DatabaseClosedError":throw new uf.DatabaseClosed(r);case"MissingAPIError":throw new uf.MissingAPI(r.message,r);default:throw new uf.OpenFailed(r)}if(!this.active)throw new uf.TransactionInactive;return lK(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):t.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=u6(t=>{c0(t),this._reject(e.error)}),e.onabort=u6(t=>{c0(t),this.active&&this._reject(new uf.Abort(e.error)),this.active=!1,this.on("abort").fire(t)}),e.oncomplete=u6(()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&c4.storagemutated.fire(e.mutatedParts)}),this}_promise(e,t,r){if("readwrite"===e&&"readwrite"!==this.mode)return cm(new uf.ReadOnly("Transaction is readonly"));if(!this.active)return cm(new uf.TransactionInactive);if(this._locked())return new uH((n,o)=>{this._blockedFuncs.push([()=>{this._promise(e,t,r).then(n,o)},uU])});if(r)return cr(()=>{var e=new uH((e,r)=>{this._lock();let n=t(e,r,this);n&&n.then&&n.then(e,r)});return e.finally(()=>this._unlock()),e._lib=!0,e});var n=new uH((e,r)=>{var n=t(e,r,this);n&&n.then&&n.then(e,r)});return n._lib=!0,n}_root(){return this.parent?this.parent._root():this}waitFor(e){var t=this._root();let r=uH.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then(()=>r);else{t._waitingFor=r,t._waitingQueue=[];var n=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(n.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new uH((e,n)=>{r.then(r=>t._waitingQueue.push(u6(e.bind(null,r))),e=>t._waitingQueue.push(u6(n.bind(null,e)))).finally(()=>{t._waitingFor===o&&(t._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new uf.Abort))}table(e){let t=this._memoizedTables||(this._memoizedTables={});if(l$(t,e))return t[e];let r=this.schema[e];if(!r)throw new uf.NotFound("Table "+e+" not part of transaction");let n=new this.db.Table(e,r,this);return n.core=this.db.core.table(e),t[e]=n,n}}function c6(e,t,r,n,o,i,a){return{name:e,keyPath:t,unique:r,multi:n,auto:o,compound:i,src:(r&&!a?"&":"")+(n?"*":"")+(o?"++":"")+c5(t)}}function c5(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function c7(e,t,r){return{name:e,primKey:t,indexes:r,mappedClass:null,idxByName:lG(r,e=>[e.name,e])}}let c9=e=>{try{return e.only([[]]),c9=()=>[[]],[[]]}catch(e){return c9=()=>cg,cg}};function c8(e){return null==e?()=>{}:"string"==typeof e?1===e.split(".").length?t=>t[e]:t=>lq(t,e):t=>lq(t,e)}function de(e){return[].slice.call(e)}let dt=0;function dr(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function dn({_novip:e},t){let r=t.db,n=function(e,t,{IDBKeyRange:r,indexedDB:n},o){var i;return{dbcore:(i=function(e,t,r){let n;function o(e){if(3===e.type)return null;if(4===e.type)throw Error("Cannot convert never type to IDBKeyRange");let{lower:r,upper:n,lowerOpen:o,upperOpen:i}=e;return void 0===r?void 0===n?null:t.upperBound(n,!!i):void 0===n?t.lowerBound(r,!!o):t.bound(r,n,!!o,!!i)}let{schema:i,hasGetAll:a}=(n=de(e.objectStoreNames),{schema:{name:e.name,tables:n.map(e=>r.objectStore(e)).map(e=>{let{keyPath:t,autoIncrement:r}=e,n=lT(t),o=null==t,i={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:n,keyPath:t,autoIncrement:r,unique:!0,extractKey:c8(t)},indexes:de(e.indexNames).map(t=>e.index(t)).map(e=>{let{name:t,unique:r,multiEntry:n,keyPath:o}=e,a={name:t,compound:lT(o),keyPath:o,unique:r,multiEntry:n,extractKey:c8(o)};return i[dr(o)]=a,a}),getIndexByKeyPath:e=>i[dr(e)]};return i[":id"]=a.primaryKey,null!=t&&(i[dr(t)]=a.primaryKey),a})},hasGetAll:n.length>0&&"getAll"in r.objectStore(n[0])&&!("u">typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),s=i.tables.map(e=>{let t;return{name:t=e.name,schema:e,mutate:function({trans:e,type:r,keys:n,values:i,range:a}){return new Promise((s,l)=>{let u;s=u6(s);let c=e.objectStore(t),d=null==c.keyPath,p="put"===r||"add"===r;if(!p&&"delete"!==r&&"deleteRange"!==r)throw Error("Invalid operation type: "+r);let{length:f}=n||i||{length:1};if(n&&i&&n.length!==i.length)throw Error("Given keys array must have same length as given values array.");if(0===f)return s({numFailures:0,failures:{},results:[],lastResult:void 0});let h=[],m=[],y=0,g=e=>{++y,c0(e)};if("deleteRange"===r){if(4===a.type)return s({numFailures:y,failures:m,results:[],lastResult:void 0});3===a.type?h.push(u=c.clear()):h.push(u=c.delete(o(a)))}else{let[e,t]=p?d?[i,n]:[i,null]:[n,null];if(p)for(let n=0;n<f;++n)h.push(u=t&&void 0!==t[n]?c[r](e[n],t[n]):c[r](e[n])),u.onerror=g;else for(let t=0;t<f;++t)h.push(u=c[r](e[t])),u.onerror=g}let b=e=>{let t=e.target.result;h.forEach((e,t)=>null!=e.error&&(m[t]=e.error)),s({numFailures:y,failures:m,results:"delete"===r?n:h.map(e=>e.result),lastResult:t})};u.onerror=e=>{g(e),b(e)},u.onsuccess=b})},getMany:({trans:e,keys:r})=>new Promise((n,o)=>{n=u6(n);let i=e.objectStore(t),a=r.length,s=Array(a),l,u=0,c=0,d=e=>{let t=e.target;s[t._pos]=t.result,++c===u&&n(s)},p=cQ(o);for(let e=0;e<a;++e)null!=r[e]&&((l=i.get(r[e]))._pos=e,l.onsuccess=d,l.onerror=p,++u);0===u&&n(s)}),get:({trans:e,key:r})=>new Promise((n,o)=>{n=u6(n);let i=e.objectStore(t).get(r);i.onsuccess=e=>n(e.target.result),i.onerror=cQ(o)}),query:e=>new Promise((r,n)=>{r=u6(r);let{trans:i,values:s,limit:l,query:u}=e,c=l===1/0?void 0:l,{index:d,range:p}=u,f=i.objectStore(t),h=d.isPrimaryKey?f:f.index(d.name),m=o(p);if(0===l)return r({result:[]});if(a){let e=s?h.getAll(m,c):h.getAllKeys(m,c);e.onsuccess=e=>r({result:e.target.result}),e.onerror=cQ(n)}else{let e=0,t=!s&&"openKeyCursor"in h?h.openKeyCursor(m):h.openCursor(m),o=[];t.onsuccess=n=>{let i=t.result;return i?(o.push(s?i.value:i.primaryKey),++e===l?r({result:o}):void i.continue()):r({result:o})},t.onerror=cQ(n)}}),openCursor:function({trans:e,values:r,query:n,reverse:i,unique:a}){return new Promise((s,l)=>{s=u6(s);let{index:u,range:c}=n,d=e.objectStore(t),p=u.isPrimaryKey?d:d.index(u.name),f=i?a?"prevunique":"prev":a?"nextunique":"next",h=!r&&"openKeyCursor"in p?p.openKeyCursor(o(c),f):p.openCursor(o(c),f);h.onerror=cQ(l),h.onsuccess=u6(t=>{let r=h.result;if(!r)return void s(null);r.___id=++dt,r.done=!1;let n=r.continue.bind(r),o=r.continuePrimaryKey;o&&(o=o.bind(r));let i=r.advance.bind(r),a=()=>{throw Error("Cursor not stopped")};r.trans=e,r.stop=r.continue=r.continuePrimaryKey=r.advance=()=>{throw Error("Cursor not started")},r.fail=u6(l),r.next=function(){let e=1;return this.start(()=>e--?this.continue():this.stop()).then(()=>this)},r.start=e=>{let t=new Promise((e,t)=>{e=u6(e),h.onerror=cQ(t),r.fail=t,r.stop=t=>{r.stop=r.continue=r.continuePrimaryKey=r.advance=a,e(t)}}),s=()=>{if(h.result)try{e()}catch(e){r.fail(e)}else r.done=!0,r.start=()=>{throw Error("Cursor behind last entry")},r.stop()};return h.onsuccess=u6(e=>{h.onsuccess=s,s()}),r.continue=n,r.continuePrimaryKey=o,r.advance=i,s(),t},s(r)},l)})},count({query:e,trans:r}){let{index:n,range:i}=e;return new Promise((e,a)=>{let s=r.objectStore(t),l=n.isPrimaryKey?s:s.index(n.name),u=o(i),c=u?l.count(u):l.count();c.onsuccess=u6(t=>e(t.target.result)),c.onerror=cQ(a)})}}}),l={};return s.forEach(e=>l[e.name]=e),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!l[e])throw Error(`Table '${e}' not found`);return l[e]},MIN_KEY:-1/0,MAX_KEY:c9(t),schema:i}}(t,r,o),e.dbcore.reduce((e,{create:t})=>({...e,...t(e)}),i))}}(e._middlewares,r,e._deps,t);e.core=n.dbcore,e.tables.forEach(t=>{let r=t.name;e.core.schema.tables.some(e=>e.name===r)&&(t.core=e.core.table(r),e[r]instanceof e.Table&&(e[r].core=t.core))})}function di({_novip:e},t,r,n){r.forEach(r=>{let o=n[r];t.forEach(t=>{let n=lV(t,r);(!n||"value"in n&&void 0===n.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?lL(t,r,{get(){return this.table(r)},set(e){lM(this,r,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[r]=new e.Table(r,o))})})}function da({_novip:e},t){t.forEach(t=>{for(let r in t)t[r]instanceof e.Table&&delete t[r]})}function ds(e,t){return e._cfg.version-t._cfg.version}function dl(e,t){let r,n={del:[],add:[],change:[]};for(r in e)t[r]||n.del.push(r);for(r in t){let o=e[r],i=t[r];if(o){let e={name:r,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")==""+(i.primKey.keyPath||"")&&(o.primKey.auto===i.primKey.auto||cx)){let t,r=o.idxByName,a=i.idxByName;for(t in r)a[t]||e.del.push(t);for(t in a){let n=r[t],o=a[t];n?n.src!==o.src&&e.change.push(o):e.add.push(o)}(e.del.length>0||e.add.length>0||e.change.length>0)&&n.change.push(e)}else e.recreate=!0,n.change.push(e)}else n.add.push([r,i])}return n}function du(e,t,r,n){let o=e.db.createObjectStore(t,r.keyPath?{keyPath:r.keyPath,autoIncrement:r.auto}:{autoIncrement:r.auto});return n.forEach(e=>dc(o,e)),o}function dc(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function dd(e,t,r){let n={};return lW(t.objectStoreNames,0).forEach(e=>{let t=r.objectStore(e),o=t.keyPath,i=c6(c5(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[];for(let e=0;e<t.indexNames.length;++e){let r=t.index(t.indexNames[e]);o=r.keyPath;var s=c6(r.name,o,!!r.unique,!!r.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}n[e]=c7(e,i,a)}),n}function dp({_novip:e},t,r){let n=r.db.objectStoreNames;for(let o=0;o<n.length;++o){let i=n[o],a=r.objectStore(i);e._hasGetAll="getAll"in a;for(let e=0;e<a.indexNames.length;++e){let r=a.indexNames[e],n=a.index(r).keyPath,o="string"==typeof n?n:"["+lW(n).join("+")+"]";if(t[i]){let e=t[i].idxByName[o];e&&(e.name=r,delete t[i].idxByName[o],t[i].idxByName[r]=e)}}}"u">typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&lC.WorkerGlobalScope&&lC instanceof lC.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class df{_parseStoresSpec(e,t){lj(e).forEach(r=>{if(null!==e[r]){var n=e[r].split(",").map((e,t)=>{let r=(e=e.trim()).replace(/([&*]|\+\+)/g,""),n=/^\[/.test(r)?r.match(/^\[(.*)\]$/)[1].split("+"):r;return c6(r,n||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),lT(n),0===t)}),o=n.shift();if(o.multi)throw new uf.Schema("Primary key cannot be multi-valued");n.forEach(e=>{if(e.auto)throw new uf.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new uf.Schema("Index must have a name and cannot be an empty string")}),t[r]=c7(r,o,n)}})}stores(e){let t=this.db;this._cfg.storesSource=this._cfg.storesSource?lR(this._cfg.storesSource,e):e;let r=t._versions,n={},o={};return r.forEach(e=>{lR(n,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(n,o)}),t._dbSchema=o,da(t,[t._allTables,t,t.Transaction.prototype]),di(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],lj(o),o),t._storeNames=lj(o),this}upgrade(e){return this._cfg.contentUpgrade=uS(this._cfg.contentUpgrade||uy,e),this}}function dh(e,t){let r=e._dbNamesDB;return r||(r=e._dbNamesDB=new dN(cS,{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),r.table("dbnames")}function dm(e){return e&&"function"==typeof e.databases}function dy(e){return cr(function(){return uU.letThrough=!0,e()})}function dg(e){var t=t=>e.next(t),r=o(t),n=o(t=>e.throw(t));function o(e){return t=>{var o=e(t),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(r,n):lT(i)?Promise.all(i).then(r,n):r(i)}}return o(t)()}function db(e,t,r){var n=arguments.length;if(n<2)throw new uf.InvalidArgument("Too few arguments");for(var o=Array(n-1);--n;)o[n-1]=arguments[n];return r=o.pop(),[e,lX(o),r]}function dv(e,t,r){let n=lT(e)?e.slice():[e];for(let e=0;e<r;++e)n.push(t);return n}let dw={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){let r=e.table(t),{schema:n}=r,o={},i=[];function a(e,t,r){let n=dr(e),s=o[n]=o[n]||[],l=null==e?0:"string"==typeof e?1:e.length,u=t>0,c={...r,isVirtual:u,keyTail:t,keyLength:l,extractKey:c8(e),unique:!u&&r.unique};return s.push(c),c.isPrimaryKey||i.push(c),l>1&&a(2===l?e[0]:e.slice(0,l-1),t+1,r),s.sort((e,t)=>e.keyTail-t.keyTail),c}let s=a(n.primaryKey.keyPath,0,n.primaryKey);for(let e of(o[":id"]=[s],n.indexes))a(e.keyPath,0,e);function l(t){var r,n;let o=t.query.index;return o.isVirtual?{...t,query:{index:o,range:(r=t.query.range,n=o.keyTail,{type:1===r.type?2:r.type,lower:dv(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,n),lowerOpen:!0,upper:dv(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,n),upperOpen:!0})}}:t}return{...r,schema:{...n,primaryKey:s,indexes:i,getIndexByKeyPath:function(e){let t=o[dr(e)];return t&&t[0]}},count:e=>r.count(l(e)),query:e=>r.query(l(e)),openCursor(t){let{keyTail:n,isVirtual:o,keyLength:i}=t.query.index;return o?r.openCursor(l(t)).then(r=>r&&Object.create(r,{continue:{value:function(o){null!=o?r.continue(dv(o,t.reverse?e.MAX_KEY:e.MIN_KEY,n)):t.unique?r.continue(r.key.slice(0,i).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,n)):r.continue()}},continuePrimaryKey:{value(t,o){r.continuePrimaryKey(dv(t,e.MAX_KEY,n),o)}},primaryKey:{get:()=>r.primaryKey},key:{get(){let e=r.key;return 1===i?e[0]:e.slice(0,i)}},value:{get:()=>r.value}})):r.openCursor(t)}}}}}};function d_(e,t,r,n){return r=r||{},n=n||"",lj(e).forEach(o=>{if(l$(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){let e=l3(i);e!==l3(a)?r[n+o]=t[o]:"Object"===e?d_(i,a,r,n+o+"."):i!==a&&(r[n+o]=t[o])}else i!==a&&(r[n+o]=t[o])}else r[n+o]=void 0}),lj(t).forEach(o=>{l$(e,o)||(r[n+o]=t[o])}),r}let dx={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){let r=e.table(t),{primaryKey:n}=r.schema;return{...r,mutate(e){let o=uU.trans,{deleting:i,creating:a,updating:s}=o.table(t).hook;switch(e.type){case"add":if(a.fire===uy)break;return o._promise("readwrite",()=>l(e),!0);case"put":if(a.fire===uy&&s.fire===uy)break;return o._promise("readwrite",()=>l(e),!0);case"delete":if(i.fire===uy)break;return o._promise("readwrite",()=>l(e),!0);case"deleteRange":if(i.fire===uy)break;return o._promise("readwrite",()=>(function e(t,o,i){return r.query({trans:t,values:!1,query:{index:n,range:o},limit:i}).then(({result:r})=>l({type:"delete",keys:r,trans:t}).then(n=>n.numFailures>0?Promise.reject(n.failures[0]):r.length<i?{failures:[],numFailures:0,lastResult:void 0}:e(t,{...o,lower:r[r.length-1],lowerOpen:!0},i)))})(e.trans,e.range,1e4),!0)}return r.mutate(e);function l(e){var t,o;let l=uU.trans,u=e.keys||("delete"===(t=e).type?t.keys:t.keys||t.values.map(n.extractKey));if(!u)throw Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:u}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),("add"===(o=e).type?Promise.resolve([]):r.getMany({trans:o.trans,keys:u,cache:"immutable"})).then(t=>{let o=u.map((r,o)=>{let u=t[o],c={onerror:null,onsuccess:null};if("delete"===e.type)i.fire.call(c,r,u,l);else if("add"===e.type||void 0===u){let t=a.fire.call(c,r,e.values[o],l);null==r&&null!=t&&(r=t,e.keys[o]=r,n.outbound||lZ(e.values[o],n.keyPath,r))}else{let t=d_(u,e.values[o]),n=s.fire.call(c,t,r,u,l);if(n){let t=e.values[o];Object.keys(n).forEach(e=>{l$(t,e)?t[e]=n[e]:lZ(t,e,n[e])})}}return c});return r.mutate(e).then(({failures:r,results:n,numFailures:i,lastResult:a})=>{for(let i=0;i<u.length;++i){let a=n?n[i]:u[i],s=o[i];null==a?s.onerror&&s.onerror(r[i]):s.onsuccess&&s.onsuccess("put"===e.type&&t[i]?e.values[i]:a)}return{failures:r,results:n,numFailures:i,lastResult:a}}).catch(e=>(o.forEach(t=>t.onerror&&t.onerror(e)),Promise.reject(e)))})}}}}})};function dE(e,t,r){try{if(!t||t.keys.length<e.length)return null;let n=[];for(let o=0,i=0;o<t.keys.length&&i<e.length;++o)0===cB(t.keys[o],e[i])&&(n.push(r?l2(t.values[o]):t.values[o]),++i);return n.length===e.length?n:null}catch(e){return null}}let dS={stack:"dbcore",level:-1,create:e=>({table:t=>{let r=e.table(t);return{...r,getMany:e=>{if(!e.cache)return r.getMany(e);let t=dE(e.keys,e.trans._cache,"clone"===e.cache);return t?uH.resolve(t):r.getMany(e).then(t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?l2(t):t},t))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),r.mutate(e))}}})};function dD(e){return!("from"in e)}let dO=function(e,t){if(!this){let t=new dO;return e&&"d"in e&&lR(t,e),t}lR(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function dP(e,t,r){let n=cB(t,r);if(isNaN(n))return;if(n>0)throw RangeError();if(dD(e))return lR(e,{from:t,to:r,d:1});let o=e.l,i=e.r;if(0>cB(r,e.from))return o?dP(o,t,r):e.l={from:t,to:r,d:1,l:null,r:null},dj(e);if(cB(t,e.to)>0)return i?dP(i,t,r):e.r={from:t,to:r,d:1,l:null,r:null},dj(e);0>cB(t,e.from)&&(e.from=t,e.l=null,e.d=i?i.d+1:1),cB(r,e.to)>0&&(e.to=r,e.r=null,e.d=e.l?e.l.d+1:1);let a=!e.r;o&&!e.l&&dk(e,o),i&&a&&dk(e,i)}function dk(e,t){dD(t)||function e(t,{from:r,to:n,l:o,r:i}){dP(t,r,n),o&&e(t,o),i&&e(t,i)}(e,t)}function dC(e){let t=dD(e)?null:{s:0,n:e};return{next(e){let r=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,r)for(;t.n.l&&0>cB(e,t.n.from);)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!r||0>=cB(e,t.n.to))return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function dj(e){var t,r;let n=((null==(t=e.r)?void 0:t.d)||0)-((null==(r=e.l)?void 0:r.d)||0),o=n>1?"r":n<-1?"l":"";if(o){let t="r"===o?"l":"r",r={...e},n=e[o];e.from=n.from,e.to=n.to,e[o]=n[o],r[o]=n[t],e[t]=r,r.d=dT(r)}e.d=dT(e)}function dT({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}lI(dO.prototype,{add(e){return dk(this,e),this},addKey(e){return dP(this,e,e),this},addKeys(e){return e.forEach(e=>dP(this,e,e)),this},[l6](){return dC(this)}});let dR={stack:"dbcore",level:0,create:e=>{let t=e.schema.name,r=new dO(e.MIN_KEY,e.MAX_KEY);return{...e,table:n=>{let o=e.table(n),{schema:i}=o,{primaryKey:a}=i,{extractKey:s,outbound:l}=a,u={...o,mutate:e=>{let a=e.trans,s=a.mutatedParts||(a.mutatedParts={}),l=e=>{let r=`idb://${t}/${n}/${e}`;return s[r]||(s[r]=new dO)},u=l(""),c=l(":dels"),{type:d}=e,[p,f]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[],h=e.trans._cache;return o.mutate(e).then(e=>{if(lT(p)){"delete"!==d&&(p=e.results),u.addKeys(p);let t=dE(p,h);t||"add"===d||c.addKeys(p),(t||f)&&i.indexes.forEach(function(e){let r=l(e.name||"");function n(t){return null!=t?e.extractKey(t):null}let o=t=>e.multiEntry&&lT(t)?t.forEach(e=>r.addKey(e)):r.addKey(t);(t||f).forEach((e,r)=>{let i=t&&n(t[r]),a=f&&n(f[r]);0!==cB(i,a)&&(null!=i&&o(i),null!=a&&o(a))})})}else if(p){let e={from:p.lower,to:p.upper};c.add(e),u.add(e)}else u.add(r),c.add(r),i.indexes.forEach(e=>l(e.name).add(r));return e})}},c=({query:{index:t,range:r}})=>{var n,o;return[t,new dO(null!=(n=r.lower)?n:e.MIN_KEY,null!=(o=r.upper)?o:e.MAX_KEY)]},d={get:e=>[a,new dO(e.key)],getMany:e=>[a,(new dO).addKeys(e.keys)],count:c,query:c,openCursor:c};return lj(d).forEach(e=>{u[e]=function(i){let{subscr:a}=uU;if(a){let u=e=>{let r=`idb://${t}/${n}/${e}`;return a[r]||(a[r]=new dO)},c=u(""),p=u(":dels"),[f,h]=d[e](i);if(u(f.name||"").add(h),!f.isPrimaryKey){if("count"!==e){let t="query"===e&&l&&i.values&&o.query({...i,values:!1});return o[e].apply(this,arguments).then(r=>{if("query"===e){if(l&&i.values)return t.then(({result:e})=>(c.addKeys(e),r));let e=i.values?r.result.map(s):r.result;i.values?c.addKeys(e):p.addKeys(e)}else if("openCursor"===e){let e=i.values;return r&&Object.create(r,{key:{get:()=>(p.addKey(r.primaryKey),r.key)},primaryKey:{get(){let e=r.primaryKey;return p.addKey(e),e}},value:{get:()=>(e&&c.addKey(r.primaryKey),r.value)}})}return r})}p.add(r)}}return o[e].apply(this,arguments)}}),u}}}};class dN{constructor(e,t){var r;this._middlewares={},this.verno=0;const n=dN.dependencies;this._options=t={addons:dN.addons,autoOpen:!0,indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange,...t},this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange};const{addons:o}=t;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const i={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:uy,dbReadyPromise:null,cancelOpen:uy,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};i.dbReadyPromise=new uH(e=>{i.dbReadyResolve=e}),i.openCanceller=new uH((e,t)=>{i.cancelOpen=t}),this._state=i,this.name=e,this.on=cT(this,"populate","blocked","versionchange","close",{ready:[uS,uy]}),this.on.ready.subscribe=lz(this.on.ready.subscribe,e=>(t,r)=>{dN.vip(()=>{let n=this._state;if(n.openComplete)n.dbOpenError||uH.resolve().then(t),r&&e(t);else if(n.onReadyBeingFired)n.onReadyBeingFired.push(t),r&&e(t);else{e(t);let n=this;r||e(function e(){n.on.ready.unsubscribe(t),n.on.ready.unsubscribe(e)})}})}),this.Collection=(r=this,cR(cW.prototype,function(e,t){this.db=r;let n=ck,o=null;if(t)try{n=t()}catch(e){o=e}let i=e._ctx,a=i.table,s=a.hook.reading.fire;this._ctx={table:a,index:i.index,isPrimKey:!i.index||a.schema.primKey.keyPath&&i.index===a.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:o,or:i.or,valueMapper:s!==ug?s:null}})),this.Table=function(e){return cR(cj.prototype,function(t,r,n){this.db=e,this._tx=n,this.name=t,this.schema=r,this.hook=e._allTables[t]?e._allTables[t].hook:cT(null,{creating:[uw,uy],reading:[ub,ug],updating:[ux,uy],deleting:[u_,uy]})})}(this),this.Transaction=function(e){return cR(c3.prototype,function(t,r,n,o,i){this.db=e,this.mode=t,this.storeNames=r,this.schema=n,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=cT(this,"complete","error","abort"),this.parent=i||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new uH((e,t)=>{this._resolve=e,this._reject=t}),this._completion.then(()=>{this.active=!1,this.on.complete.fire()},e=>{var t=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):t&&this.idbtrans&&this.idbtrans.abort(),cm(e)})})}(this),this.Version=function(e){return cR(df.prototype,function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}(this),this.WhereClause=function(e){return cR(cX.prototype,function(t,r,n){this.db=e,this._ctx={table:t,index:":id"===r?null:r,or:n};let o=e._deps.indexedDB;if(!o)throw new uf.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=(e,t)=>o.cmp(t,e),this._max=(e,t)=>o.cmp(e,t)>0?e:t,this._min=(e,t)=>0>o.cmp(e,t)?e:t,this._IDBKeyRange=e._deps.IDBKeyRange})}(this),this.on("versionchange",e=>{e.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()}),this.on("blocked",e=>{!e.newVersion||e.newVersion<e.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${e.oldVersion/10}`)}),this._maxKey=c9(t.IDBKeyRange),this._createTransaction=(e,t,r,n)=>new this.Transaction(e,t,r,this._options.chromeTransactionDurability,n),this._fireOnBlocked=e=>{this.on("blocked").fire(e),c_.filter(e=>e.name===this.name&&e!==this&&!e._state.vcFired).map(t=>t.on("versionchange").fire(e))},this.use(dw),this.use(dx),this.use(dR),this.use(dS),this.vip=Object.create(this,{_vip:{value:!0}}),o.forEach(e=>e(this))}version(e){if(isNaN(e)||e<.1)throw new uf.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new uf.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);let t=this._versions;var r=t.filter(t=>t._cfg.version===e)[0];return r||(r=new this.Version(e),t.push(r),t.sort(ds),r.stores({}),this._state.autoSchema=!1,r)}_whenReady(e){return this.idbdb&&(this._state.openComplete||uU.letThrough||this._vip)?e():new uH((e,t)=>{if(this._state.openComplete)return t(new uf.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new uf.DatabaseClosed);this.open().catch(uy)}this._state.dbReadyPromise.then(e,t)}).then(e)}use({stack:e,create:t,level:r,name:n}){n&&this.unuse({stack:e,name:n});let o=this._middlewares[e]||(this._middlewares[e]=[]);return o.push({stack:e,create:t,level:null==r?10:r,name:n}),o.sort((e,t)=>e.level-t.level),this}unuse({stack:e,name:t,create:r}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter(e=>r?e.create!==r:!!t&&e.name!==t)),this}open(){return function(e){var t;let r=e._state,{indexedDB:n}=e._deps;if(r.isBeingOpened||e.idbdb)return r.dbReadyPromise.then(()=>r.dbOpenError?cm(r.dbOpenError):e);ue&&(r.openCanceller._stackHolder=un()),r.isBeingOpened=!0,r.dbOpenError=null,r.openComplete=!1;let o=r.openCanceller;function i(){if(r.openCanceller!==o)throw new uf.DatabaseClosed("db.open() was cancelled")}let a=r.dbReadyResolve,s=null,l=!1;return uH.race([o,("u"<typeof navigator?uH.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(e){var r=function(){return indexedDB.databases().finally(e)};t=setInterval(r,100),r()}).finally(function(){return clearInterval(t)}):Promise.resolve()).then(()=>new uH((t,o)=>{if(i(),!n)throw new uf.MissingAPI;let a=e.name,u=r.autoSchema?n.open(a):n.open(a,Math.round(10*e.verno));if(!u)throw new uf.MissingAPI;u.onerror=cQ(o),u.onblocked=u6(e._fireOnBlocked),u.onupgradeneeded=u6(t=>{if(s=u.transaction,r.autoSchema&&!e._options.allowEmptyDB){u.onerror=c0,s.abort(),u.result.close();let e=n.deleteDatabase(a);e.onsuccess=e.onerror=u6(()=>{o(new uf.NoSuchDatabase(`Database ${a} doesnt exist`))})}else{let r,n,a,p;s.onerror=cQ(o);var i,c,d=t.oldVersion>0x4000000000000000?0:t.oldVersion;l=d<1,e._novip.idbdb=u.result,i=d/10,c=s,r=e._dbSchema,(n=e._createTransaction("readwrite",e._storeNames,r)).create(c),n._completion.catch(o),a=n._reject.bind(n),p=uU.transless||uU,cr(()=>{uU.trans=n,uU.transless=p,0===i?(lj(r).forEach(e=>{du(c,e,r[e].primKey,r[e].indexes)}),dn(e,c),uH.follow(()=>e.on.populate.fire(n)).catch(a)):(function({_novip:e},t,r,n){let o=[],i=e._versions,a=e._dbSchema=dd(e,e.idbdb,n),s=!1;return i.filter(e=>e._cfg.version>=t).forEach(i=>{o.push(()=>{let o=a,l=i._cfg.dbschema;dp(e,o,n),dp(e,l,n),a=e._dbSchema=l;let u=dl(o,l);u.add.forEach(e=>{du(n,e[0],e[1].primKey,e[1].indexes)}),u.change.forEach(e=>{if(e.recreate)throw new uf.Upgrade("Not yet support for changing primary key");{let t=n.objectStore(e.name);e.add.forEach(e=>dc(t,e)),e.change.forEach(e=>{t.deleteIndex(e.name),dc(t,e)}),e.del.forEach(e=>t.deleteIndex(e))}});let c=i._cfg.contentUpgrade;if(c&&i._cfg.version>t){let t;dn(e,n),r._memoizedTables={},s=!0;let i=lY(l);u.del.forEach(e=>{i[e]=o[e]}),da(e,[e.Transaction.prototype]),di(e,[e.Transaction.prototype],lj(i),i),r.schema=i;let a=l8(c);a&&cn();let d=uH.follow(()=>{if((t=c(r))&&a){var e=co.bind(null,null);t.then(e,e)}});return t&&"function"==typeof t.then?uH.resolve(t):d.then(()=>t)}}),o.push(t=>{var n;s&&cx||(n=i._cfg.dbschema,[].slice.call(t.db.objectStoreNames).forEach(e=>null==n[e]&&t.db.deleteObjectStore(e))),da(e,[e.Transaction.prototype]),di(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),r.schema=e._dbSchema})}),(function e(){return o.length?uH.resolve(o.shift()(r.idbtrans)).then(e):uH.resolve()})().then(()=>{var e;lj(e=a).forEach(t=>{n.db.objectStoreNames.contains(t)||du(n,t,e[t].primKey,e[t].indexes)})})})(e,i,n,c).catch(a)})}},o),u.onsuccess=u6(()=>{s=null;let n=e._novip.idbdb=u.result,o=lW(n.objectStoreNames);if(o.length>0)try{let t,i=n.transaction(1===o.length?o[0]:o,"readonly");r.autoSchema?function({_novip:e},t,r){e.verno=t.version/10;let n=e._dbSchema=dd(0,t,r);e._storeNames=lW(t.objectStoreNames,0),di(e,[e._allTables],lj(n),n)}(e,n,i):(dp(e,e._dbSchema,i),((t=dl(dd(0,e.idbdb,i),e._dbSchema)).add.length||t.change.some(e=>e.add.length||e.change.length))&&console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),dn(e,i)}catch(e){}c_.push(e),n.onversionchange=u6(t=>{r.vcFired=!0,e.on("versionchange").fire(t)}),n.onclose=u6(t=>{e.on("close").fire(t)}),l&&function({indexedDB:e,IDBKeyRange:t},r){dm(e)||r===cS||dh(e,t).put({name:r}).catch(uy)}(e._deps,a),t()},o)}))]).then(()=>(i(),r.onReadyBeingFired=[],uH.resolve(dy(()=>e.on.ready.fire(e.vip))).then(function t(){if(r.onReadyBeingFired.length>0){let n=r.onReadyBeingFired.reduce(uS,uy);return r.onReadyBeingFired=[],uH.resolve(dy(()=>n(e.vip))).then(t)}}))).finally(()=>{r.onReadyBeingFired=null,r.isBeingOpened=!1}).then(()=>e).catch(t=>{r.dbOpenError=t;try{s&&s.abort()}catch(e){}return o===r.openCanceller&&e._close(),cm(t)}).finally(()=>{r.openComplete=!0,a()})}(this)}_close(){let e=this._state,t=c_.indexOf(this);if(t>=0&&c_.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new uH(t=>{e.dbReadyResolve=t}),e.openCanceller=new uH((t,r)=>{e.cancelOpen=r})}close(){this._close();let e=this._state;this._options.autoOpen=!1,e.dbOpenError=new uf.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){let e=arguments.length>0,t=this._state;return new uH((r,n)=>{let o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=u6(()=>{!function({indexedDB:e,IDBKeyRange:t},r){dm(e)||r===cS||dh(e,t).delete(r).catch(uy)}(this._deps,this.name),r()}),e.onerror=cQ(n),e.onblocked=this._fireOnBlocked};if(e)throw new uf.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(o):o()})}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){let e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return lj(this._allTables).map(e=>this._allTables[e])}transaction(){let e=db.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,r){let n,o,i=uU.trans;i&&i.db===this&&-1===e.indexOf("!")||(i=null);let a=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{if(o=t.map(e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t}),"r"==e||e===cD)n=cD;else{if("rw"!=e&&e!=cO)throw new uf.InvalidArgument("Invalid transaction mode: "+e);n=cO}if(i){if(i.mode===cD&&n===cO){if(!a)throw new uf.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");i=null}i&&o.forEach(e=>{if(i&&-1===i.storeNames.indexOf(e)){if(!a)throw new uf.SubTransaction("Table "+e+" not included in parent transaction.");i=null}}),a&&i&&!i.active&&(i=null)}}catch(e){return i?i._promise(null,(t,r)=>{r(e)}):cm(e)}let s=(function e(t,r,n,o,i){return uH.resolve().then(()=>{let a,s=uU.transless||uU,l=t._createTransaction(r,n,t._dbSchema,o);if(o)l.idbtrans=o.idbtrans;else try{l.create(),t._state.PR1398_maxLoop=3}catch(o){return o.name===up.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>e(t,r,n,null,i))):cm(o)}let u=l8(i);u&&cn();let c=uH.follow(()=>{if(a=i.call(l,l))if(u){var e=co.bind(null,null);a.then(e,e)}else"function"==typeof a.next&&"function"==typeof a.throw&&(a=dg(a))},{trans:l,transless:s});return(a&&"function"==typeof a.then?uH.resolve(a).then(e=>l.active?e:cm(new uf.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))):c.then(()=>a)).then(e=>(o&&l._resolve(),l._completion.then(()=>e))).catch(e=>(l._reject(e),cm(e)))})}).bind(null,this,n,o,i,r);return i?i._promise(n,s,"lock"):uU.trans?cc(uU.transless,()=>this._whenReady(s)):this._whenReady(s)}table(e){if(!l$(this._allTables,e))throw new uf.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}let dA="u">typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class d${constructor(e){this._subscribe=e}subscribe(e,t,r){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:r})}[dA](){return this}}function dI(e,t){return lj(t).forEach(r=>{dk(e[r]||(e[r]=new dO),t[r])}),e}try{i={indexedDB:lC.indexedDB||lC.mozIndexedDB||lC.webkitIndexedDB||lC.msIndexedDB,IDBKeyRange:lC.IDBKeyRange||lC.webkitIDBKeyRange}}catch(e){i={indexedDB:null,IDBKeyRange:null}}function dM(e){let t=dL;try{dL=!0,c4.storagemutated.fire(e)}finally{dL=t}}lI(dN,{...um,delete:e=>new dN(e,{addons:[]}).delete(),exists:e=>new dN(e,{addons:[]}).open().then(e=>(e.close(),!0)).catch("NoSuchDatabaseError",()=>!1),getDatabaseNames(e){try{return(function({indexedDB:e,IDBKeyRange:t}){return dm(e)?Promise.resolve(e.databases()).then(e=>e.map(e=>e.name).filter(e=>e!==cS)):dh(e,t).toCollection().primaryKeys()})(dN.dependencies).then(e)}catch(e){return cm(new uf.MissingAPI)}},defineClass:()=>function(e){lR(this,e)},ignoreTransaction:e=>uU.trans?cc(uU.transless,e):e(),vip:dy,async:function(e){return function(){try{var t=dg(e.apply(this,arguments));return t&&"function"==typeof t.then?t:uH.resolve(t)}catch(e){return cm(e)}}},spawn:function(e,t,r){try{var n=dg(e.apply(r,t||[]));return n&&"function"==typeof n.then?n:uH.resolve(n)}catch(e){return cm(e)}},currentTransaction:{get:()=>uU.trans||null},waitFor:function(e,t){let r=uH.resolve("function"==typeof e?dN.ignoreTransaction(e):e).timeout(t||6e4);return uU.trans?uU.trans.waitFor(r):r},Promise:uH,debug:{get:()=>ue,set:e=>{ue=e,ut="dexie"===e?()=>!0:cE}},derive:lF,extend:lR,props:lI,override:lz,Events:cT,on:c4,liveQuery:function(e){let t,r=!1,n=new d$(n=>{let o=l8(e),i=!1,a={},s={},l={get closed(){return i},unsubscribe:()=>{i=!0,c4.storagemutated.unsubscribe(p)}};n.start&&n.start(l);let u=!1,c=!1;function d(){return lj(s).some(e=>a[e]&&function(e,t){let r=dC(t),n=r.next();if(n.done)return!1;let o=n.value,i=dC(e),a=i.next(o.from),s=a.value;for(;!n.done&&!a.done;){if(0>=cB(s.from,o.to)&&cB(s.to,o.from)>=0)return!0;0>cB(o.from,s.from)?o=(n=r.next(s.from)).value:s=(a=i.next(o.from)).value}return!1}(a[e],s[e]))}let p=e=>{dI(a,e),d()&&f()},f=()=>{let h,m;if(u||i)return;a={};let y={},g=(o&&cn(),h=()=>cr(e,{subscr:y,trans:null}),m=uU.trans?cc(uU.transless,h):h(),o&&m.then(co,co),m);c||(c4(c1,p),c=!0),u=!0,Promise.resolve(g).then(e=>{r=!0,t=e,u=!1,i||(d()?f():(a={},s=y,n.next&&n.next(e)))},e=>{u=!1,r=!1,n.error&&n.error(e),l.unsubscribe()})};return f(),l});return n.hasValue=()=>r,n.getValue=()=>t,n},extendObservabilitySet:dI,getByKeyPath:lq,setByKeyPath:lZ,delByKeyPath:function(e,t){"string"==typeof t?lZ(e,t,void 0):"length"in t&&[].map.call(t,function(t){lZ(e,t,void 0)})},shallowClone:lY,deepClone:l2,getObjectDiff:d_,cmp:cB,asap:lH,minKey:cb,addons:[],connections:c_,errnames:up,dependencies:i,semVer:cy,version:cy.split(".").map(e=>parseInt(e)).reduce((e,t,r)=>e+t/Math.pow(10,2*r))}),dN.maxKey=c9(dN.dependencies.IDBKeyRange),"u">typeof dispatchEvent&&"u">typeof addEventListener&&(c4(c1,e=>{if(!dL){let t;cx?(t=document.createEvent("CustomEvent")).initCustomEvent(c2,!0,!0,e):t=new CustomEvent(c2,{detail:e}),dL=!0,dispatchEvent(t),dL=!1}}),addEventListener(c2,({detail:e})=>{dL||dM(e)}));let dL=!1;if("u">typeof BroadcastChannel){let e=new BroadcastChannel(c2);"function"==typeof e.unref&&e.unref(),c4(c1,t=>{dL||e.postMessage(t)}),e.onmessage=e=>{e.data&&dM(e.data)}}else if("u">typeof self&&"u">typeof navigator){c4(c1,e=>{try{dL||("u">typeof localStorage&&localStorage.setItem(c2,JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(t=>t.postMessage({type:c2,changedParts:e})))}catch(e){}}),"u">typeof addEventListener&&addEventListener("storage",e=>{if(e.key===c2){let t=JSON.parse(e.newValue);t&&dM(t.changedParts)}});let e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",function({data:e}){e&&e.type===c2&&dM(e.changedParts)})}function dF(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}uH.rejectionMapper=function(e,t){if(!e||e instanceof ul||e instanceof TypeError||e instanceof SyntaxError||!e.name||!uh[e.name])return e;var r=new uh[e.name](t||e.message,e);return"stack"in e&&lL(r,"stack",{get:function(){return this.inner.stack}}),r},ut=cE;class dB extends dN{constructor(){super("EsmOffline"),dF(this,"syncQueue",void 0),dF(this,"dynamicOfflineData",void 0),this.version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),this.syncQueue=this.table("syncQueue"),this.dynamicOfflineData=this.table("dynamicOfflineData")}}function dV(){return new dB}let dU=new dB,dW={},dz=q("offline-synchronization",{});function dK(){return dz}async function dH(){if(dz.getState().synchronization)return;let e=await dU.syncQueue.count(),t={},r=Object.entries(dW),n=r.length,o={},i=new AbortController,a=()=>{let e=dz.getState().synchronization;dz.setState({synchronization:{...e,pendingCount:e.pendingCount-1}})};try{dz.setState({synchronization:{totalCount:e,pendingCount:e,abortController:i}});for(let e=0;e<n&&r.length>0;e++)for(let e=r.length;e--;){let[n,s]=r[e],l=s.dependsOn.map(e=>t[e]);l.every(Boolean)&&(o[n]={},await Promise.all(l),t[n]=dG(s,o,i,a),r.splice(e,1))}await Promise.allSettled(Object.values(t))}finally{dz.setState({synchronization:void 0})}}async function dG({type:e,dependsOn:t,process:r},n,o,i){let a=[],s=[],l=await dq();await dU.syncQueue.where({type:e,userId:l}).each((e,t)=>{a.push([t.primaryKey,e.content,e.descriptor]),s.push(e.content)});for(let u=0;u<a.length;u++){let[c,d,{id:p,dependencies:f=[]}]=a[u];try{let i=await r(d,{abort:o,index:u,items:s,userId:l,dependencies:f.map(({id:e,type:r})=>t.includes(r)?n[r][e]:void 0)});void 0!==p&&(n[e][p]=i),await dU.syncQueue.delete(c)}catch(e){await dU.syncQueue.update(c,{lastError:{name:e?.name,message:e?.message??e?.toString()}})}finally{i()}}}async function dq(){let e=await aS();return e?.uuid||"*"}async function dZ(e,t,r,n){let o=n&&n.id;return void 0!==o&&await dU.syncQueue.where({type:t,userId:e}).filter(e=>e?.descriptor.id===o).delete().catch(dN.errnames.DatabaseClosed),await dU.syncQueue.add({type:t,content:r,userId:e,descriptor:n||{},createdOn:new Date}).catch(dN.errnames.DatabaseClosed,()=>-1)}async function dY(e,t,r){let n=await dq();return await dZ(n,e,t,r)}async function dJ(e,t){return(await dX(e,t)).map(e=>e.content)}async function dX(e,t){return await dU.syncQueue.where(t?{type:t,userId:e}:{userId:e}).toArray().catch(dN.errnames.DatabaseClosed,()=>[])}async function dQ(e){let t=await dq();return await dJ(t,e)}async function d0(e){let t=await dq();return await dX(t,e)}async function d1(e){return await dU.syncQueue.get(e).catch(dN.errnames.DatabaseClosed,()=>void 0)}function d2(e){return!!dW[e]?.options.onBeginEditSyncItem}async function d4(e){let t=await d1(e);if(!t)throw Error(`No sync item with the ID ${e} exists.`);let r=dW[t.type]?.options.onBeginEditSyncItem;if(!r)throw Error(`A sync item with the ID ${e} exists, but the associated handler (if one exists) doesn't support editing the item. You can avoid this error by either verifying that sync items of this type can be edited via the "canEditSynchronizationItemsOfType(type: string)" function or alternatively ensure that the synchronizaton handler for sync items of type "${t.type}" supports editing items.`);r(t)}async function d3(e){await dU.syncQueue.delete(e).catch(dN.errnames.DatabaseClosed)}function d6(e,t,r,n={}){dW[e]={type:e,dependsOn:t,process:r,options:n}}let d5="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),d7=new Uint8Array(16),d9=[];for(let e=0;e<256;++e)d9.push((e+256).toString(16).slice(1));let d8=function(e,t,r){if(d5&&!t&&!e)return d5();let n=(e=e||{}).random||(e.rng||function(){if(!a&&!(a="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return a(d7)})();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return d9[e[t+0]]+d9[e[t+1]]+d9[e[t+2]]+d9[e[t+3]]+"-"+d9[e[t+4]]+d9[e[t+5]]+"-"+d9[e[t+6]]+d9[e[t+7]]+"-"+d9[e[t+8]]+d9[e[t+9]]+"-"+d9[e[t+10]]+d9[e[t+11]]+d9[e[t+12]]+d9[e[t+13]]+d9[e[t+14]]+d9[e[t+15]]}(n)},pe="OFFLINE+";function pt(){return pe+d8()}function pr(e){return e.startsWith(pe)}let pn={};function po(){return Object.values(pn)}function pi(e){pn[e.id]&&console.warn(`[setupDynamicOfflineDataHandler] Another second handler with the ID "${e.id}" was registered. This handler will override the previous one. This could be unintended as the previous handler might run different flows than the newly registered one. If this is the case, ensure that you are setting up the handlers with different IDs.`),pn[e.id]=e}async function pa(e){let t=await ph();return await ps(t,e)}async function ps(e,t){let r=new dB;return await r.dynamicOfflineData.where(t?{type:t,users:e}:{users:e}).toArray().catch(dN.errnames.DatabaseClosed,()=>[])}async function pl(e,t){let r=await ph();return await pu(r,e,t)}async function pu(e,t,r){let n=new dB,o=await n.dynamicOfflineData.get({type:t,identifier:r}).catch(dN.errnames.DatabaseClosed,()=>void 0);o?o.users.includes(e)||await n.dynamicOfflineData.update(o.id,{users:[...o.users,e]}).catch(dN.errnames.DatabaseClosed):await n.dynamicOfflineData.add({users:[e],type:t,identifier:r}).catch(dN.errnames.DatabaseClosed)}async function pc(e,t){let r=await ph();return await pd(r,e,t)}async function pd(e,t,r){let n=new dB,o=await n.dynamicOfflineData.get({type:t,identifier:r,users:e}).catch(dN.errnames.DatabaseClosed,()=>void 0);o&&(o.users.length>1?await n.dynamicOfflineData.update(o.id,{users:o.users.filter(t=>t!==e)}).catch(dN.errnames.DatabaseClosed):await n.dynamicOfflineData.delete(o.id).catch(dN.errnames.DatabaseClosed))}async function pp(e,t){let r=await pa(e);await Promise.all(r.map(async e=>pf(e.type,e.identifier,t)))}async function pf(e,t,r){await pl(e,t);let n=new dB,o=await ph(),i=await n.dynamicOfflineData.get({type:e,identifier:t}).catch(dN.errnames.DatabaseClosed,()=>void 0),a=po().filter(t=>t.type===e);if(!i)return;let s=await Promise.all(a.map(async e=>{try{return e.sync(t,r),{id:e.id,error:void 0}}catch(r){let t=r.message?.toString()??r.toString();return{id:e.id,error:t}}})),l=s.filter(e=>!e.error).map(e=>e.id),u=s.filter(e=>e.error).map(e=>e.id),c=s.filter(e=>e.error).map(e=>({handlerId:e.id,message:e.error})),d={syncedOn:new Date,syncedBy:o,succeededHandlers:l,erroredHandlers:u,errors:c};i.id&&await n.dynamicOfflineData.update(i.id,{syncState:d}).catch(dN.errnames.DatabaseClosed)}async function ph(){let e=(await aS()).uuid;if(!e)throw Error("Using the dynamic offline data API requires a logged in user.");return e}let pm=q("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function py(){return pv(),pm}function pg(e,t){pv(),pi({type:"patient",displayName:t.displayName,id:e,isSynced:()=>Promise.resolve(!0),sync:(e,r)=>t.onOfflinePatientAdded({patientUuid:e,signal:r??new AbortController().signal})})}async function pb(e){pv(),await pf("patient",e)}function pv(){console.warn("The offline patient API has been deprecated and will be removed in a future release. To prevent future crashes, the functions remain available for the moment, but any invocations should be migrated ASAP.")}async function pw(e,t,r=!0){if(e){let n=null,[o,i]=await Promise.all([af(`${ac}/Patient/${e}`,t).catch(e=>n=e),r?p_(e):Promise.resolve(null)]);if(o.ok)return o.data;if(i)return i;if(n)throw n}return null}async function p_(e){let t=(await dQ("patient-registration")).find(t=>t.fhirPatient.id===e);return t?.fhirPatient??null}function px(e,t){let r=new CustomEvent(`openmrs:${e}`,{detail:t??void 0,cancelable:!0,bubbles:!0});return window.dispatchEvent(r)}function pE(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)}}var pS=r(9549);function pD(e){return{uuid:e.uuid,display:e.display}}function pO(e=null,t=null){let r=new URLSearchParams;e&&r.set("tag",e),t&&r.set("q",t);let n=r.toString();return ah(`${au}/location${n?"?"+n:""}`).pipe((0,pS.map)(e=>e.data.results.map(pD))).pipe((0,pS.take)(1))}function pP(e){return{uuid:e.uuid,display:e.display,name:e.name}}function pk(){return ah(`${au}/visittype`).pipe((0,pS.map)(e=>e.data.results.map(pP))).pipe((0,pS.take)(1))}var pC=((el={}).NEWVISIT="startVisit",el.EDITVISIT="editVisit",el.LOADING="loadingVisit",el),pj=((eu={}).NOTSTARTED="notStarted",eu.ONGOING="ongoing",eu);let pT="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))",pR=function(){try{return JSON.parse(sessionStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null};function pN(){return Y("visit",pR)}function pA(e,t){pN().setState({patientUuid:e,manuallySetVisitUuid:t})}function p$(e,t){return af(`${au}/visit`,{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function pI(e,t,r){return af(`${au}/visit/${e}`,{signal:r.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}function pM(e,t,r){return af(`${au}/visit?patient=${e}&v=${r??pT}`,{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}})}pN().subscribe(e=>{var t;t=e,sessionStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))});let pL=new ep.BehaviorSubject(null);class pF{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+pF.version}static addUnaryOp(e){return pF.max_unop_len=Math.max(e.length,pF.max_unop_len),pF.unary_ops[e]=1,pF}static addBinaryOp(e,t,r){return pF.max_binop_len=Math.max(e.length,pF.max_binop_len),pF.binary_ops[e]=t,r?pF.right_associative.add(e):pF.right_associative.delete(e),pF}static addIdentifierChar(e){return pF.additional_identifier_chars.add(e),pF}static addLiteral(e,t){return pF.literals[e]=t,pF}static removeUnaryOp(e){return delete pF.unary_ops[e],e.length===pF.max_unop_len&&(pF.max_unop_len=pF.getMaxKeyLen(pF.unary_ops)),pF}static removeAllUnaryOps(){return pF.unary_ops={},pF.max_unop_len=0,pF}static removeIdentifierChar(e){return pF.additional_identifier_chars.delete(e),pF}static removeBinaryOp(e){return delete pF.binary_ops[e],e.length===pF.max_binop_len&&(pF.max_binop_len=pF.getMaxKeyLen(pF.binary_ops)),pF.right_associative.delete(e),pF}static removeAllBinaryOps(){return pF.binary_ops={},pF.max_binop_len=0,pF}static removeLiteral(e){return delete pF.literals[e],pF}static removeAllLiterals(){return pF.literals={},pF}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 pF(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 pF.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!pF.binary_ops[String.fromCharCode(e)]||pF.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return pF.isIdentifierStart(e)||pF.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(pF.hooks[e]){let r={context:this,node:t};return pF.hooks.run(e,r),r.node}return t}searchHook(e){if(pF.hooks[e]){let t={context:this};return pF.hooks[e].find(function(e){return e.call(t.context,t),t.node}),t.node}}gobbleSpaces(){let e=this.code;for(;e===pF.SPACE_CODE||e===pF.TAB_CODE||e===pF.LF_CODE||e===pF.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:pF.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)===pF.SEMCOL_CODE||r===pF.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,pF.max_binop_len),t=e.length;for(;t>0;){if(pF.binary_ops.hasOwnProperty(e)&&(!pF.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!pF.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,i,a,s,l;if(!(i=this.gobbleToken())||!(t=this.gobbleBinaryOp()))return i;for(o={value:t,prec:pF.binaryPrecedence(t),right_a:pF.right_associative.has(t)},(a=this.gobbleToken())||this.throwError("Expected expression after "+t),n=[i,o,a];t=this.gobbleBinaryOp();){if(0===(r=pF.binaryPrecedence(t))){this.index-=t.length;break}o={value:t,prec:r,right_a:pF.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]);)a=n.pop(),t=n.pop().value,i=n.pop(),e={type:pF.BINARY_EXP,operator:t,left:i,right:a},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:pF.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,pF.isDecimalDigit(e)||e===pF.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===pF.SQUOTE_CODE||e===pF.DQUOTE_CODE)n=this.gobbleStringLiteral();else if(e===pF.OBRACK_CODE)n=this.gobbleArray();else{for(r=(t=this.expr.substr(this.index,pF.max_unop_len)).length;r>0;){if(pF.unary_ops.hasOwnProperty(t)&&(!pF.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!pF.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:pF.UNARY_EXP,operator:t,argument:e,prefix:!0})}t=t.substr(0,--r)}pF.isIdentifierStart(e)?(n=this.gobbleIdentifier(),pF.literals.hasOwnProperty(n.name)?n={type:pF.LITERAL,value:pF.literals[n.name],raw:n.name}:n.name===pF.this_str&&(n={type:pF.THIS_EXP})):e===pF.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===pF.PERIOD_CODE||t===pF.OBRACK_CODE||t===pF.OPAREN_CODE||t===pF.QUMARK_CODE;){let r;if(t===pF.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==pF.PERIOD_CODE)break;r=!0,this.index+=2,this.gobbleSpaces(),t=this.code}this.index++,t===pF.OBRACK_CODE?((e={type:pF.MEMBER_EXP,computed:!0,object:e,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),(t=this.code)!==pF.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):t===pF.OPAREN_CODE?e={type:pF.CALL_EXP,arguments:this.gobbleArguments(pF.CPAREN_CODE),callee:e}:(t===pF.PERIOD_CODE||r)&&(r&&this.index--,this.gobbleSpaces(),e={type:pF.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(;pF.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(this.code===pF.PERIOD_CODE)for(e+=this.expr.charAt(this.index++);pF.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++));pF.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);pF.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+e+this.char+")")}return r=this.code,pF.isIdentifierStart(r)?this.throwError("Variable names cannot start with a number ("+e+this.char+")"):(r===pF.PERIOD_CODE||1===e.length&&e.charCodeAt(0)===pF.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:pF.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:pF.LITERAL,value:e,raw:this.expr.substring(t,this.index)}}gobbleIdentifier(){let e=this.code,t=this.index;for(pF.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length;)if(e=this.code,pF.isIdentifierPart(e))this.index++;else break;return{type:pF.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===pF.CPAREN_CODE&&n&&n>=t.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}if(o===pF.COMMA_CODE){if(this.index++,++n!==t.length){if(e===pF.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===pF.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!==pF.COMPOUND||this.throwError("Expected comma"),t.push(e)}}return r||this.throwError("Expected "+String.fromCharCode(e)),t}gobbleGroup(){this.index++;let e=this.gobbleExpressions(pF.CPAREN_CODE);if(this.code===pF.CPAREN_CODE)return(this.index++,1===e.length)?e[0]:!!e.length&&{type:pF.SEQUENCE_EXP,expressions:e};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:pF.ARRAY_EXP,elements:this.gobbleArguments(pF.CBRACK_CODE)}}}Object.assign(pF,{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)})}}(pF),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"}),pF.max_unop_len=pF.getMaxKeyLen(pF.unary_ops),pF.max_binop_len=pF.getMaxKeyLen(pF.binary_ops);let pB=e=>new pF(e).parse(),pV=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(pF).filter(e=>!pV.includes(e)&&void 0===pB[e]).forEach(e=>{pB[e]=pF[e]}),pB.Jsep=pF,pB.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 pU="ArrowFunctionExpression",pW={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)}},pz={...pW,Promise};function pK(e,t={}){return pJ(e,t,p0)}async function pH(e,t={}){return pX(e,t,p0)}function pG(e,t={}){return pJ(e,t,p1)}function pq(e,t={}){return pX(e,t,p1)}function pZ(e,t={}){return pJ(e,t,p2)}function pY(e,t={}){return pX(e,t,p2)}function pJ(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=p7(t,pW),o=p4("string"==typeof e?pB(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 pX(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=p7(t,pz);return Promise.resolve(p4("string"==typeof e?pB(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 pQ(e){return pB(e)}function p0(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||e instanceof Date}function p1(e){return"boolean"==typeof e}function p2(e){return"number"==typeof e}function p4(e,t){switch(e.type){case"UnaryExpression":var r,n,o,i,a,s,l,u,c,d,p,f,h,m=e,y=t;let g=p4(m.argument,y);switch(m.operator){case"+":return+g;case"-":return-g;case"~":return~g;case"!":return!g;default:throw`Expression evaluator does not support operator '${m.operator}''`}case"BinaryExpression":var b=e,v=t;switch(b.operator){case"&&":return p4(b.left,v)&&p4(b.right,v);case"||":return p4(b.left,v)||p4(b.right,v);case"??":return p4(b.left,v)??p4(b.right,v)}let w=p4(b.left,v),x=p4(b.right,v);switch(b.operator){case"+":return w+x;case"-":return w-x;case"*":return w*x;case"/":return w/x;case"%":return w%x;case"**":return w**x;case"==":return w==x;case"===":return w===x;case"!=":return w!=x;case"!==":return w!==x;case">":return w>x;case">=":return w>=x;case"<":return w<x;case"<=":return w<=x;case"in":return w in x;default:throw`Expression evaluator does not support operator '${b.operator}' operator`}case"ConditionalExpression":return r=e,n=t,p4(r.test,n)?p4(r.consequent,n):p4(r.alternate,n);case"CallExpression":return fe(p6(e,t));case"ArrowFunctionExpression":let E;return o=e,i=t,E=o.params?.map(e=>{if("Identifier"===e.type)return e.name;throw`Cannot handle parameter of type ${e.type}`})??[],(function(...e){if(e.length<E.length)throw`Required argument(s) ${E.slice(e.length,-1).join(", ")} were not provided`;let t=Object.fromEntries(E.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 p4(o.body,i.addVariables(t))}).bind(null);case"MemberExpression":return fe(p5(e,t));case"ArrayExpression":return a=e,s=t,a.elements?.map(ft(s));case"SequenceExpression":let S;return l=e,u=t,(S=l.expressions.map(ft(u)))[S.length-1];case"NewExpression":var D=e,O=t;if(D.callee&&"Identifier"===D.callee.type){let e=D.arguments?.map(ft(O));switch(D.callee.name){case"Date":return new Date(...e);case"RegExp":return new RegExp(...e);default:throw`Cannot instantiate object of type ${D.callee.name}`}}if(D.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,(fr(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 P,k;return p=e,f=t,P=p.expressions?.map(ft(f))??[],(k=p.quasis?.map(ft(f))??[]).filter(e=>!e.tail).map(e=>e.value).join("")+P.join("")+k.filter(e=>e.tail).map(e=>e.value).join("");case"TemplateElement":return{value:(h=e).cooked,tail:h.tail};default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function p3(e,t){switch(e.type){case"Literal":return e.value;case"Identifier":return e.name;case"MemberExpression":return p3(e.property,t);default:throw`VisitExpressionName does not support expression of type '${e.type}'`}}function p6(e,t){let r=p8(e.callee,t);if(r===p9||e.optional&&null==r)return p9;let n=e.arguments?.map(ft(t));if(r){if("function"!=typeof r)throw`${fi(e.callee)} is not a function`}else throw`No function named ${fi(e.callee)} is defined in this context`;return r(...n)}function p5(e,t){let r=p8(e.object,t);if(r===p9||e.optional&&null==r)return p9;if(null===r)throw TypeError(`TypeError: cannot read properties of null (reading '${fo(e.property,t)}')`);if(void 0===r)switch(e.object.type){case"Identifier":{let r=p3(e.object,t);throw ReferenceError(`ReferenceError: ${r} is not defined`)}case"MemberExpression":throw TypeError(`TypeError: cannot read properties of undefined (reading '${fo(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}(p4(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);fr(n),function(e,t){if(fn.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 p7(e,t){let r={variables:{...e},globals:{...t},addVariables(e){return this.variables={...this.variables,...e},this}};return r.addVariables.bind(r),r}pB.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:pU,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=pU,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)})}}),pB.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"}})}}),pB.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 i=this.char;("e"===i||"E"===i)&&(n+=this.expr.charAt(this.index++),("+"===(i=this.char)||"-"===i)&&(n+=this.expr.charAt(this.index++)),o(),e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+n+this.char+")"));let a=this.code;if(e.isIdentifierStart(a))this.throwError("Variable names cannot start with a number ("+n+this.char+")");else if(a===e.PERIOD_CODE){n.length>1&&this.throwError(`Unexpected period ${JSON.stringify({chCode:a,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,i,a;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,i=u,95===o||i.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"===(a=l)||"X"===a?16:"b"===a||"B"===a?2:8),raw:this.expr.substring(s,this.index)}}else(e.isDecimalDigit(this.code)||this.code===e.PERIOD_CODE)&&r.call(this,n)})}}),pB.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),i="";for(;++this.index<this.expr.length;){let e=this.code;if(e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57)i+=this.char;else break}try{n=new RegExp(o,i)}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")}})}}),pB.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 :")}})}}),pB.plugins.register({name:"jsepTemplateLiteral",init(e){function t(e,r=!0){if(96===this.code){let t={type:"TemplateLiteral",quasis:[],expressions:[]},n="",o="",i=!1,a=this.expr.length,s=()=>t.quasis.push({type:"TemplateElement",value:{raw:o,cooked:n},tail:i});for(;this.index<a;){let a=this.expr.charAt(++this.index);if("`"===a)return this.index+=1,i=!0,s(),e.node=t,r&&(e.node=this.gobbleTokenProperty(e.node)),e.node;if("$"===a&&"{"===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("\\"===a)switch(o+=a,a=this.expr.charAt(++this.index),o+=a,a){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+=a}else n+=a,o+=a}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})}}),pB.addBinaryOp("in",7),pB.addBinaryOp("??",1);let p9=Symbol("optional chain short-circuited");function p8(e,t){switch(e.type){case"MemberExpression":return p5(e,t);case"CallExpression":return p6(e,t);default:return p4(e,t)}}function fe(e){return e===p9?void 0:e}function ft(e){return function(t){return null===t?null:p4(t,e)}}function fr(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:`Cannot access the ${e} property of objects`}}let fn=new Set(["toString","valueOf","hasOwnProperty"]);function fo(e,t){try{return p3(e,t)}catch{return"<computed>"}}function fi(e){return e?"MemberExpression"===e.type?e.property?.name:e.name:null}function fa(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:{...pz},isLocalExpression:!1,variables:new Set};return fs("string"==typeof e?pB(e):e,t),[...t.variables]}function fs(e,t){switch(e.type){case"UnaryExpression":return n=e,o=t,fs(n.argument,o);case"BinaryExpression":return i=e,a=t,[fs(i.left,a),fs(i.right,a)].filter(Boolean);case"ConditionalExpression":return s=e,l=t,[fs(s.consequent,l),fs(s.test,l),fs(s.alternate,l)].filter(Boolean);case"CallExpression":let r;return u=e,c=t,r=fs(u.callee,c),u.arguments?.map(fl(c)),r;case"ArrowFunctionExpression":var n,o,i,a,s,l,u,c,d,p,f,h,m,y,g,b,v=e,w=t;let x={...w};x.isLocalExpression=!0;let E=v.params?.map(fl(x))??[],S=fs(v.body,x)??[];if(S&&Array.isArray(S))for(let e of S)E.includes(e)||w.variables.add(e);return;case"MemberExpression":var D=e,O=t;if(fs(D.object,O),D.computed)return void fs(D.property,O);let P={...O};P.isLocalExpression=!0,fs(D.property,P);return;case"ArrayExpression":return d=e,p=t,void d.elements?.map(fl(p));case"SequenceExpression":return f=e,h=t,void f.expressions?.map(fl(h));case"NewExpression":return m=e,y=t,void m.arguments?.map(fl(y));case"Literal":case"TemplateElement":return;case"Identifier":var k=e,C=t;if(!(k.name in C.globals))if(C.isLocalExpression)return k.name;else C.variables.add(k.name);return;case"TemplateLiteral":return g=e,b=t,void(g.expressions?.map(fl(b)),g.quasis?.map(fl(b)));default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function fl(e){return function(t){return null===t?null:fs(t,e)}}let fu=Y("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 fc(e,t,r){fu.setState(n=>({flags:{...n.flags,[e]:{enabled:n.flags[e]?.enabled??!1,label:t,description:r}}}))}function fd(){let e=fu.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 fp(e){return fu.getState().flags[e].enabled}function ff(e,t){fu.subscribe(r=>{t(r.flags[e].enabled)})}function fh(e,t){fu.setState(r=>({flags:{...r.flags,[e]:{...r.flags[e],enabled:t}}}))}function fm(e){return!window.offlineEnabled||(e??navigator.onLine)}fu.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 fy=t1(function(e,t,r){tG(e,t,r)});function fg(e=!0,t=!1){return fb(fm(),e,t)}function fb(e,t=!0,r=!1){return!!(e?t:r)}let fv=q("extensionsInternal",{slots:{},extensions:{}}),fw=q("extensionRenderings",{renderings:new Map}),f_=()=>Y("extensionsInternal",{slots:{},extensions:{}}),fx=()=>Y("extensionRenderings",{renderings:new Map});function fE(e){let t=fv.getState(),r=e(t);r!==t&&fv.setState(r)}let fS=null,fD=null;function fO(){let e=fw.getState();return fS&&e===fD||(fS=new Map(e.renderings),fD=e,function(e){for(let t of(fI.clear(),e.values()))fL(t,1);fM=!0}(fS)),fS}function fP(e){fD={renderings:e},fw.setState(fD,!0)}function fk(e){let t=fO();t.has(e.renderingId)||(t.set(e.renderingId,e),fL(e,1),fP(t))}function fC(e){let t=fO(),r=t.get(e);r&&(t.delete(e),fL(r,-1),fP(t))}let fj=()=>Y("extensions",{slots:{}}),fT=0,fR=new Set;function fN(e){fT++;try{return e()}finally{if(0==--fT&&fR.size>0){let e=Array.from(fR);for(let t of(fR.clear(),e))fA(t)}}}function fA(e){try{e()}catch(t){console.error(`The extension system's '${e.name}' recomputation failed`,t)}}function f$(e){fT>0?fR.add(e):fA(e)}let fI=new Map,fM=!1;function fL(e,t){let r=JSON.stringify([e.slotName,e.extensionId,e.slotModuleName,e.extensionModuleName]),n=fI.get(r);if(!n){if(t<0)return;fI.set(r,{count:1,record:{slotModuleName:e.slotModuleName,extensionModuleName:e.extensionModuleName,slotName:e.slotName,extensionId:e.extensionId}}),fM=!0;return}n.count+=t,n.count<1&&(fI.delete(r),fM=!0)}function fF(){var e,t;if(fO(),!fM)return;fM=!1;let r=Array.from(fI.values(),({record:e})=>e);r.sort(fB),e=nC.getState().mountedExtensions,t=r,e.length===t.length&&e.every((e,r)=>0===fB(e,t[r]))||nC.setState({mountedExtensions:r})}function fB(e,t){return fV(e.slotName,t.slotName)||fV(e.extensionId,t.extensionId)||fV(e.slotModuleName,t.slotModuleName)||fV(e.extensionModuleName,t.extensionModuleName)}function fV(e,t){return e===t?0:e<t?-1:1}fF(),fw.subscribe(()=>f$(fF));let fU=f_(),fW=fj(),fz=nT(),fK=nA(),fH=new Set,fG=!1;function fq(e){if(null===e)fH=null;else if(null!==fH)for(let t of e)fH.add(t);f$(fZ)}function fZ(){if(!fG){fG=!0;try{for(let e=1;;e++){let t=fH;if(null!==t&&0===t.size)return;fH=new Set;try{!function(e,t,r,n,o,i=null){let a=fW.getState().slots,s={},l=!1,u=fm(),c=Object.entries(n.flags).filter(([,{enabled:e}])=>e).map(([e])=>e);for(let[n,d]of Object.entries(e.slots)){let p=a[n];if(p&&i&&!i.has(n)){s[n]=p;continue}let{config:f}=nN(t,d.name),h=function(e,t,r,n,o,i,a){let s=function(e,t){let r=e.add||[],n=e.remove||[],o=e.order||[],{extensions:i}=fU.getState();return[...t,...r].filter(e=>!n.includes(e)).sort((e,r)=>f5(e,o,i[fQ(e)]?.order,t)-f5(r,o,i[fQ(r)]?.order,t))}(r,t.slots[e].attachedIds),l=[];for(let u of s){let{config:s}=nI(n,e,u),c=nM(r,e,u),d=c?fy({},s,c):s,p=fQ(u),f=t.extensions[p];if(f){let e=d?.["Display conditions"]?.privileges??f.privileges??[];if(e&&("string"==typeof e||Array.isArray(e)&&e.length>0)&&(!a?.user||!aE(e,a.user))||f.featureFlag&&!o.includes(f.featureFlag)||window.offlineEnabled&&!fb(i,f.online,f.offline))continue;l.push({id:u,name:p,moduleName:f.moduleName,config:d,featureFlag:f.featureFlag,meta:f.meta,online:d?.["Display conditions"]?.online??f.online??!0,offline:d?.["Display conditions"]?.offline??f.offline??!1,displayConditionExpression:d?.["Display conditions"]?.expression||f.displayExpression})}}return l}(n,e,f,r,c,u,o.session);p&&p.moduleName===d.moduleName&&rI(p.candidateExtensions,h)?s[n]=p:(s[n]={moduleName:d.moduleName,candidateExtensions:h},l=!0)}(l||Object.keys(a).length!==Object.keys(s).length)&&fW.setState({slots:s})}(fU.getState(),fz.getState(),fK.getState(),fu.getState(),ay.getState(),t)}catch(e){throw fH=null===t||null===fH?null:new Set([...t,...fH]),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{fG=!1}}}function fY(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 fJ(){fq(null)}function fX(e,t){return{moduleName:t,name:e,attachedIds:[]}}function fQ(e){let[t]=e.split("#");return t}function f0(e,t){let r=fQ(t);return e.extensions[r]}function f1(e){return f0(fU.getState(),e)}fU.subscribe((e,t)=>{fq(e.extensions!==t.extensions?null:fY(e.slots,t.slots))}),fz.subscribe((e,t)=>{fq(fY(e.slots,t.slots))}),fK.subscribe((e,t)=>{fq(fY(e.configs,t.configs))}),fu.subscribe(()=>fq(null)),ay.subscribe(()=>fq(null)),fJ(),g(fJ);let f2=e=>fE(t=>({...t,extensions:{...t.extensions,[e.name]:{...e}}}));function f4(e,t){fE(r=>{let n=r.slots[e];return n?{...r,slots:{...r.slots,[e]:{...n,attachedIds:[...n.attachedIds,t]}}}:{...r,slots:{...r.slots,[e]:{...fX(e),attachedIds:[t]}}}})}function f3(e,t){fE(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 f6(e){fE(t=>{let r=t.slots[e];return r?{...t,slots:{...t.slots,[e]:{...r,attachedIds:[]}}}:t})}function f5(e,t,r,n){let o=t.indexOf(e);if(-1!==o)return o;{if(void 0!==r)return 1e3+r;let t=n.indexOf(e);return -1!==t?2e3+t:3e3}}function f7(e,t){return function(e,t,r=null,n){let o;return e.filter(e=>{let i=e.displayConditionExpression;if("string"!=typeof i||0===i.trim().length)return!0;o??(o=t&&"object"==typeof t?{session:r,...t}:{session:r});try{return!!pG(i,o)}catch(t){return console.error(`Error while evaluating expression '${i}' for ${e.id}`+(n?` in ${n}`:""),t),!1}})}(f9(e),t,ay.getState().session,e)}function f9(e){return fW.getState().slots[e]?.candidateExtensions??[]}let f8=(e,t)=>fU.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=fX(t,e);return{...r,slots:{...r.slots,[t]:{...o}}}}),he=()=>{fH=null,fE(()=>({slots:{},extensions:{}})),fx().setState({renderings:new Map}),fW.setState({slots:{}})},ht=q("left-nav",{slotName:null,basePath:window.spaBase,mode:"normal"});function hr({name:e,basePath:t,mode:r,componentContext:n,state:o}){ht.setState({slotName:e,basePath:t,mode:r??"normal",componentContext:n,state:o})}function hn(e){ht.getState().slotName===e&&ht.setState(ht.getInitialState(),!0)}let ho=q("modalRegistry",{modals:{}});function hi(e){ho.setState(t=>(t.modals[e.name]=e,t))}function ha(e){let t=ho.getState().modals[e];if(!t){let r=f1(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.`),hi(t))}return t}let hs=q("workspaceRegistrations",{workspaces:{}}),hl=q("workspaceGroups",{workspaceGroups:{}});function hu(e){hs.setState(t=>({workspaces:{...t.workspaces,[e.name]:{...e,load:e.load,preferredWindowSize:e.preferredWindowSize??"normal",type:e.type??"form",canHide:e.canHide??!1,canMaximize:e.canMaximize??!1,width:e.width??"narrow",groups:e.groups??[]}}}))}function hc(e){hl.setState(t=>{let r=t.workspaceGroups[e.name];return r?{workspaceGroups:{...t.workspaceGroups,[e.name]:{...r,members:Array.from(new Set([...r.members,...e.members]))}}}:{workspaceGroups:{...t.workspaceGroups,[e.name]:{name:e.name,members:e.members}}}})}let hd=new Set;function hp(e){let t=hs.getState().workspaces;if(t[e])return t[e];{let t=f1(e);if(t){var r;let n;return hd.has(e)||(console.warn(`The workspace '${e}' is registered as an extension. This is deprecated. Please register it in the "workspaces" section of the routes.json file.`),hd.add(e)),{name:t.name,title:(r=t,"string"==typeof(n=r?.meta?.title)?n:n&&"object"==typeof n?sp(r.moduleName,n.key,n.default):r.name),moduleName:t.moduleName,preferredWindowSize:t.meta?.screenSize??"normal",load:t.load,type:t.meta?.type??"form",canHide:t.meta?.canHide??!1,canMaximize:t.meta?.canMaximize??!1,width:t.meta?.width??"narrow",groups:t.meta?.groups??[]}}throw Error(`No workspace named '${e}' has been registered.`)}}function hf(e){let t=hl.getState().workspaceGroups;if(t[e])return t[e];throw Error(`No workspace group named '${e}' has been registered.`)}let hh=q("workspace2",{registeredGroupsByName:{},registeredWindowsByName:{},registeredWorkspacesByName:{},openedGroup:null,openedWindows:[],workspaceTitleByWorkspaceName:{},isMostRecentlyOpenedWindowHidden:!1});function hm(e){let{registeredWorkspacesByName:t,registeredWindowsByName:r}=hh.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 hy(e){let{registeredGroupsByName:t,registeredWindowsByName:r}=hh.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 hg(e){let{openedWindows:t}=hh.getState();return t.findIndex(t=>t.openedWorkspaces.find(t=>t.workspaceName===e))}function hb(e,t){if(0==t.length)return;let{registeredGroupsByName:r}=hh.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}}hh.setState({registeredGroupsByName:n})}function hv(e,t){if(0==t.length)return;let{registeredWindowsByName:r}=hh.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}hh.setState({registeredWindowsByName:n})}function hw(e,t){if(0==t.length)return;let{registeredWorkspacesByName:r}=hh.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}hh.setState({registeredWorkspacesByName:n})}let h_=0,hx=null,hE={bootstrap:15e3,mount:15e3,unmount:15e3};function hS(e,t){if(e.timeouts)return e;let r=e.name??"parcel",n=Object.fromEntries(Object.keys(hE).filter(t=>e[t]).map(n=>{var o,i;let a,s;return[n,(o=e[n],i=hE[n],a=Array.isArray(o)?o:[o],s=e=>a.reduce((t,o,i)=>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 ${i} for parcel ${r} did not return a promise`))}),Promise.resolve(void 0)),e=>{let o,a=new Promise((e,t)=>{o=setTimeout(()=>t(Error(`Lifecycle function ${n} for parcel ${r} did not settle within ${i}ms`)),i)});return Promise.race([s(e),a]).finally(()=>clearTimeout(o)).then(e=>(t(n,!1),e),e=>{throw t(n,!0),e})})]}));return{...e,...n}}async function hD(e,t){var r,n;let o,i,a,s,l,u=await (hx??(hx=new Promise((e,t)=>{ic({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),ic))),hx),c={...t},d=(o=c,i=!1,{retarget:e=>o={...e},release:a=()=>(function(e){for(let t of Object.keys(e))delete e[t]})(o),onSettled(e,t){switch(e){case"bootstrap":t&&a();return;case"mount":i||(i=t);return;case"unmount":(t||i)&&a();return}}});return n=u((r=d.onSettled,"function"==typeof e?()=>e().then(e=>hS(e,r)):hS(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 hO(){return hP}function hP(e,t){let r,n=hD(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 hk(e,t,r,n,o=e=>e,i={}){let a=fQ(n),s=f1(n),l=null;if(e){if(!s)throw Error(`Couldn't find extension '${a}' to attach to '${t}'`);let{meta:u,moduleName:c,online:d,offline:p,load:f}=s;if(fg(d,p)){let s,d=h_++,p=`${t}/${n}-${d}`;e.dataset.extensionRenderingId=p;let h=e=>{try{fC(p)}catch(t){console.error(e,t)}};try{fk({renderingId:p,extensionName:a,extensionModuleName:c,extensionId:n,slotName:t,slotModuleName:r})}catch(e){throw h(`Recomputing configuration after registering '${n}' failed also failed`),e}try{s=await f()}catch(e){throw h(`Recomputing configuration after '${n}' failed to load also failed`),e}try{l=await hD(o({...s,name:`${t}/${a}-${d}`}),{...i,_meta:u,_extensionContext:{extensionId:n,extensionSlotName:t,extensionSlotModuleName:r,extensionModuleName: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 hC=r(2491),hj=r.n(hC);let hT=(0,hC.createContext)({moduleName:"",featureName:""});function hR({to:e,templateParams:t,onBeforeNavigate:r,children:n,...o}){return(0,hC.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}`)},[]),hj().createElement("a",{onClick:n=>{0===n.button&&!n.ctrlKey&&!n.shiftKey&&!n.altKey&&!n.metaKey&&(n.preventDefault(),r?.(n),i8({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:i7(e,t),...o},n)}let hN=({state:e,children:t,...r})=>{let{extension:n}=(0,hC.useContext)(hT),o=(0,hC.useRef)(null),i=(0,hC.useRef)(Promise.resolve()),a=(0,hC.useRef)(!1),s=(0,hC.useRef)(!1),l=(0,hC.useRef)(e),u=(0,hC.useCallback)(e=>{if(!e)return;let t=()=>{"MOUNTED"===e.getStatus()&&e.unmount()};switch(e.getStatus()){case"MOUNTED":e.unmount();break;case"UPDATING":i.current?.then(t,t);break;default:e.mountPromise.then(t,()=>{})}},[]),c=(0,hC.useCallback)((e,t)=>{e.update&&"UNMOUNTING"!==e.getStatus()&&(i.current=Promise.all([e.mountPromise,i.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,hC.useCallback)(t=>{t&&!o.current&&!s.current&&n?.extensionSlotName&&n.extensionSlotModuleName&&(s.current=!0,hk(t,n.extensionSlotName,n.extensionSlotModuleName,n.extensionId,void 0,e).then(t=>{(s.current=!1,o.current=t,a.current)?u(t):t&&l.current!==e&&c(t,l.current)},()=>{s.current=!1}))},[]);return(0,hC.useEffect)(()=>(a.current=!1,()=>{a.current=!0,u(o.current)}),[]),(0,hC.useEffect)(()=>{l.current=e,o.current&&c(o.current,e)},[e]),n?hj().createElement("div",{ref:d,"data-extension-id":n?.extensionId,style:{position:"relative"},...r}):null};function hA(e){let t=(0,hC.useRef)(e);return L(t.current,e)||(t.current=e),t.current}function h$(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 hI=e=>e;function hM(e,t=hI,r){let n=(0,hC.useCallback)(t=>e.subscribe(t),[e]),o=(0,hC.useCallback)(()=>t(e.getState()),[e,t]),i=(0,hC.useSyncExternalStore)(n,o,o),a=(0,hC.useMemo)(()=>r?h$(e,r):null,[e,r]);return(0,hC.useMemo)(()=>a?{...i,...a}:i,[i,a])}function hL(e,t){return hM(e,hI,t)}function hF(e){return function(t){let r=(0,hC.useCallback)(t=>e.subscribe(t),[]),n=(0,hC.useCallback)(()=>e.getState(),[]),o=(0,hC.useSyncExternalStore)(r,n,n),i=(0,hC.useMemo)(()=>t?h$(e,t):null,[t]);return(0,hC.useMemo)(()=>i?{...o,...i}:o,[o,i])}}let hB=[];Object.freeze(hB);let hV={candidateExtensions:hB};Object.freeze(hV);let hU=e=>{let t=(0,hC.useCallback)(t=>t.slots?.[e]??hV,[e]);return hM(fj(),t)},hW=e=>e.session;function hz(e,t){let{candidateExtensions:r}=hU(e),n=hM(ay,hW),o=hA(t);return(0,hC.useMemo)(()=>f7(e,o),[e,o,n,r])}function hK(e,t){let{moduleName:r}=(0,hC.useContext)(hT);if(!r)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,hC.useEffect)(()=>{f8(r,e)},[r,e]),{extensions:hz(e,t),extensionSlotName:e,extensionSlotModuleName:r}}function hH(e){return e}function hG({name:e,extensionSlotName:t,select:r=hH,children:n,state:o,style:i,...a}){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,hC.useRef)(null),{extensions:u,extensionSlotModuleName:c}=hK(s,o),d=(0,hC.useMemo)(()=>r(u),[r,u]),p=(0,hC.useMemo)(()=>{if("function"==typeof n&&!hj().isValidElement(n))return d.map(e=>n(e,o))},[n,d]);return hj().createElement("div",{ref:l,"data-extension-slot-name":s,"data-extension-slot-module-name":c,style:{...i,position:"relative"},...a},s&&d?.map((e,t)=>hj().createElement(hT.Provider,{key:e.id,value:{moduleName:c,featureName:"",extension:{extensionId:e.id,extensionSlotName:s,extensionSlotModuleName:c}}},p?.[t]??("function"!=typeof n?n:null)??hj().createElement(hN,{state:o}))))}var hq=r(5873);function hZ(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 hY(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?hZ(Object(r),!0).forEach(function(t){var n,o,i;n=e,o=t,i=r[t],o in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hZ(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function hJ(e){return(hJ="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 hX(e){return(hX="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 hQ(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(hX(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(hX(e)));return e}}var h0=null;try{h0=require("react").createContext()}catch(e){}var h1={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 h2(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then(function(t){e.rootComponent=t})}function h4(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,i=h7(e,t,function(){r(this)}),a=hQ(e,t)(),s=function(e){var t=e.reactDom,r=e.renderType,n=e.elementToRender,o=e.domElement,i=t[r];if("function"!=typeof i)throw Error('renderType "'.concat(r,'" did not return a function.'));switch(r){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var a=i(o);return a.render(n),a;case"hydrateRoot":return i(o,n);default:return i(n,o),null}}({elementToRender:i,domElement:a,reactDom:h5(e),renderType:"function"==typeof(o=e).renderType?o.renderType():o.renderType});e.domElements[t.name]=a,e.renderResults[t.name]=s})}function h3(e,t){return new Promise(function(r){e.unmountResolves[t.name]=r;var n=e.renderResults[t.name];n&&n.unmount?n.unmount():h5(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]})}function h6(e,t){return new Promise(function(r){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(r);var n=h7(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(n);else{var i=hQ(e,t)();h5(e).render(n,i)}})}function h5(e){return e.ReactDOMClient||e.ReactDOM}function h7(e,t,r){var n=e.React.createElement(e.rootComponent,t),o=h0?e.React.createElement(h0.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,hY(hY({},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 h9=r(4011),h8=r(5327),me=r.n(h8),mt=r(3780);let mr={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},mn=new Map;(0,mt.initCache)(mn);let mo={errorRetryCount:3,fetcher:af,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,shouldRetryOnError:e=>{if(e instanceof am){let t=e.response.status;return!!(t>=500)||401===t||403===t||429===t}return!0},provider:()=>mn};function mi(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw Error("Invalid options");let t=Object.assign({},mr,e),r={...mo,...t.swrConfig};return function(e){var n,o,i,a,s;return i=o=class extends(n=hj().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 hj().createElement("div",null,"An error has occurred. Please try reloading the page.");{let n=hj().createElement(hC.Suspense,{fallback:null},hj().createElement(h8.SWRConfig,{value:r},hj().createElement(hT.Provider,{value:this.state.config},t.disableTranslations?hj().createElement(e,this.props):hj().createElement(h9.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},hj().createElement(e,this.props)))));return t.strictMode&&hj().StrictMode?hj().createElement(hj().StrictMode,null,n):n}}constructor(e){super(e),this.state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,featureName:t.featureName,extension:e._extensionContext}}}},a="displayName",s=`OpenmrsReactComponent(${t.featureName})`,a in i?Object.defineProperty(i,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):i[a]=s,o}}function ma(e,t){return function(e){if("object"!==hJ(e))throw Error("single-spa-react requires a configuration object");var t,r=hY(hY({},h1),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");!h0&&r.React.createContext&&(h0=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:h2.bind(null,r),mount:h4.bind(null,r),unmount:h3.bind(null,r)};return r.parcelCanUpdate&&(n.update=h6.bind(null,r)),n}({React:hj(),ReactDOMClient:hq,rootComponent:mi(t)(e)})}function ms(e,t){return()=>e().then(({default:e})=>ma(e,t))}function ml(e,t){return()=>Promise.resolve(ma(e,t))}let mu=ms,mc=U()(()=>({}));Z("openmrs-app-context",mc);let md={};function mp(e,t=e=>e){let r=mc.getState();return e in r?Object.freeze(Object.assign({},t?t(r[e]):r[e])):null}function mf(e,t){mc.setState(r=>(e in r||(r[e]={}),r[e]=t(r[e]),Object.assign({},r)))}function mh(e){return null===e?null:Object.freeze(Object.assign({},e))}let mm=new Map;function my(e,t){let r=(0,hC.useRef)(t??{}),n=(0,hC.useRef)(t=>mf(e,t)),o=(0,hC.useRef)(Symbol());return(0,hC.useEffect)(()=>{let r=t??{},n=o.current;return null===mp(e)?!function(e,t=md){mc.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===md?{}: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.`),mf(e,()=>r)),mm.set(e,n),()=>{mm.get(e)===n&&(mc.setState(t=>(e in t&&delete t[e],t)),mm.delete(e))}},[e]),(0,hC.useEffect)(()=>{let n=t??{};L(r.current,n)||(mf(e,()=>n),r.current=n)},[t]),n.current}function mg({namespace:e,value:t}){return my(e,t),null}let mb=({children:e,value:t,fallback:r})=>t?hj().createElement(hj().Fragment,null,e):r?hj().createElement(hj().Fragment,null,r):null;function mv(){let e=(0,hC.useRef)();return(!e.current||e.current.signal.aborted)&&(e.current=new AbortController),(0,hC.useEffect)(()=>{let t=e.current;return()=>t?.abort()},[]),e.current}function mw(e,t=e=>e??{}){let[r,n]=(0,hC.useState)(()=>{if(m_(e))return;let r=mp(e);if(null!==r)return t?t(r):r});return(0,hC.useEffect)(()=>{if(m_(e))throw Error(`The namespace supplied to useAppContext must be a non-empty string, but was "${e}".`)},[e]),(0,hC.useEffect)(()=>{var r;let o;return(r=e=>{if(null==e)return void n(void 0);let r=t?t(e):e;n(e=>L(e,r)?e:r)})(mh(o=mp(e))),mc.subscribe(t=>{let n=e in t?t[e]:null;n!==o&&(o=n,r(mh(n)))})},[e,t]),r}function m_(e){return"string"!=typeof e||0===e.trim().length}function mx(e){let t=hz(e);return(0,hC.useMemo)(()=>t.map(e=>e.id),[t])}function mE(e){return hU(e).candidateExtensions}function mS(e,t,r){let{data:n,error:o,mutate:i,isLoading:a,isValidating:s}=me()(e?le(e,t,r):null,af);return(0,hC.useMemo)(()=>({isLoading:a,data:n?.data.results??[],error:o,mutate:i,isValidating:s}),[n,o,a,s,i])}function mD(e){(0,hC.useEffect)(()=>{if(e){let e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])}let mO={},mP=`No ComponentContext has been provided. This should come from "openmrsComponentDecorator".
|
|
16
|
+
Usually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".`;function mk(e){let{moduleName:t,extension:r}=(0,hC.useContext)(hT),n=e?.externalModuleName??t;if(!n&&!r)throw Error(mP);let o=function(e){let t=(0,hC.useMemo)(()=>nj(e),[e]),r=function(e){let[t,r]=(0,hC.useState)(()=>{let t=e.getState();return t.loaded&&t.config?t.config:null});return(0,hC.useEffect)(()=>e?.subscribe(e=>{e.loaded&&e.config&&r(e.config)}),[e]),t}(t);if(!r)throw mO[e]||(mO[e]=new Promise(e=>{let r=t.subscribe(t=>{t.loaded&&t.config&&(e(t.config),r())})})),mO[e];return r}(n),i=function(e){let t=(0,hC.useMemo)(nA,[]),r=function(e,t){let[r,n]=(0,hC.useState)(t?()=>{let r=nI(e.getState(),t.extensionSlotName,t.extensionId);if(r.loaded&&r.config)return r.config}:null);return(0,hC.useEffect)(()=>{if(t)return e.subscribe(e=>{let o=nI(e,t.extensionSlotName,t.extensionId);o.loaded&&o.config&&!rI(o.config,r)&&n(o.config)})},[e,t,r]),r}(t,e);if(!r&&e){let r=`${e.extensionSlotName}-${e.extensionId}`;throw!mO[r]&&t&&(mO[r]=new Promise(r=>{let n=t.subscribe(t=>{let o=nI(t,e.extensionSlotName,e.extensionId);o.loaded&&o.config&&(r(o.config),n())})})),mO[r]}return r||{}}(r);return(0,hC.useMemo)(()=>e?.externalModuleName&&n===e.externalModuleName?{...o}:{...o,...i},[n,e?.externalModuleName,o,i])}let mC=hz;function mj(){let[e,t]=(0,hC.useState)(fm());return(0,hC.useEffect)(()=>g(({online:e})=>t(e)),[]),e}function mT(e,t=300){let[r,n]=(0,hC.useState)(e);return(0,hC.useEffect)(()=>{let r=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(r)}},[e,t]),r}var mR=r(9256),mN=r.n(mR);let mA=`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 m$(){let e=`${au}/emrapi/configuration?v=${mA}`,t=mN()(e,af);return(0,hC.useMemo)(()=>({emrConfiguration:t.data?.data,isLoadingEmrConfiguration:t.isLoading,mutateEmrConfiguration:t.mutate,errorFetchingEmrConfiguration:t.error}),[t])}let mI=hF(f_());function mM(e){let t=hz(e);return(0,hC.useMemo)(()=>Object.fromEntries(t.map(e=>[e.name,e.meta])),[t])}let mL=hF(fj());function mF(e){let{flags:t}=hM(fu);return t[e]?.enabled??!1}function mB(){let[,e]=(0,hC.useState)(0);return(0,hC.useCallback)(()=>{e(e=>e+1)},[])}function mV(e,t,r={}){return mW(e,t,mU,r)}let mU={getPaginatedUrl:(e,t,r)=>{if(!e)return null;{let n=new URL(ap(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 mW(e,t,r,n={}){let{getPaginatedUrl:o,getTotalCount:i,getCurrentPageSize:a,getData:s}=r,{immutable:l,swrConfig:u}=n,c=n.fetcher??af,[d,p]=(0,hC.useState)(1),f=(0,hC.useRef)(NaN),h=(0,hC.useRef)(NaN),m=(0,hC.useRef)(d),y=(0,hC.useRef)(!1),g=(0,hC.useRef)(!1),b=e?.toString()??"",[v,w]=(0,hC.useState)(b);b!==v&&(w(b),p(1),m.current=1,f.current=NaN,h.current=NaN,y.current=!1,g.current=!1);let x=(d-1)*t,E=(0,hC.useMemo)(()=>o(e,t,x),[e,t,x]),{data:S,...D}=(l?mN():me())(E,c,u);S?.data&&(f.current=i(S?.data),h.current=a(S?.data),y.current=!0);let O=Math.ceil(f.current/t),P=(0,hC.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(f.current/t);!y.current||Number.isNaN(r)||e<=r?(m.current=e,p(e)):console.warn("Invalid attempt to go to out of bounds page: "+e)},[t]);(0,hC.useEffect)(()=>{if(!y.current)return;if(Number.isNaN(f.current)){g.current||(g.current=!0,console.warn(`useServerPagination: ${b} returned no total count, so out-of-range pages cannot be detected.`));return}let e=Math.max(1,Math.ceil(f.current/t));d>e&&(console.warn(`Invalid attempt to go to out of bounds page: ${d}; returning to page ${e}.`),m.current=e,p(e))},[d,t,b,S]);let k=(0,hC.useCallback)(()=>{P(m.current+1)},[P]),C=(0,hC.useCallback)(()=>{P(m.current-1)},[P]);return{data:s(S?.data),totalPages:O,totalCount:f.current,currentPage:d,currentPageSize:h.current,paginated:O>1,showNextButton:d<O,showPreviousButton:d>1,goTo:P,goToNext:k,goToPrevious:C,...D}}function mz(e,t,r={}){return mW(e,t,mK(),r)}function mK(){return{getPaginatedUrl:(e,t,r)=>{if(!e)return null;{let n=new URL(ap(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 mH=r(6038),mG=r.n(mH);function mq(e,t={}){return mZ(e,mU,t)}function mZ(e,t,r={}){let{swrInfiniteConfig:n,immutable:o}=r,{getNextUrl:i,getTotalCount:a,getData:s}=t,l=r.fetcher??af,u=(0,hC.useCallback)((r,n)=>0==r?e?.toString()??null:t.getNextUrl(n.data),[e]),{data:c,size:d,setSize:p,...f}=mG()(u,l,{...n,...o?{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1}:{}}),h=i(c?.[c.length-1].data),m=a(c?.[0]?.data);return{data:c?.flatMap(e=>s(e.data)),totalCount:m,hasMore:null!=h,loadMore:()=>{p((c?.length??0)+1)},nextUri:h,...f}}function mY(e,t={}){return mJ(e,mU,t)}function mJ(e,t,r={}){let n=mZ(e,t,r),{hasMore:o,error:i,data:a,loadMore:s,isLoading:l,nextUri:u}=n;return((0,hC.useEffect)(()=>{o&&!i&&s()},[o,u]),r.partialData)?n:{...n,data:o||i?void 0:a,isLoading:l||o}}function mX(e,t={}){return mJ(e,mK(),t)}function mQ(e,t={}){return mZ(e,mK(),t)}function m0(){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 m1(){let[e,t]=(0,hC.useState)(m0);return(0,hC.useEffect)(()=>{let e=()=>{t(m0())};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}let m2=e=>"small-desktop"===e||"large-desktop"===e;function m4(e){let t=(0,hC.useContext)(hT);(0,hC.useEffect)(()=>(t&&t.moduleName&&(e.componentContext=t),hr(e),()=>{hn(e.name)}),[t,e])}function m3(){return hM(ht)}function m6(e=null,t=null){let[r,n]=(0,hC.useState)([]);return(0,hC.useEffect)(()=>{let r=pO(e,t).subscribe(e=>{n(e)},e=>{console.error(e)});return()=>r.unsubscribe()},[e,t]),r}function m5(e,t=!0){let r=(0,hC.useRef)(null);return(0,hC.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 m7(e){let t=(0,hC.useRef)();return(0,hC.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 m9(e,t={}){let{abortController:r,fetchInit:n,url:o,swrConfig:i}=t,a=mv(),s=(0,hC.useMemo)(()=>n?.signal??r?.signal??a.signal,[r?.signal,n?.signal,a.signal]),l=(0,hC.useCallback)(e=>af(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 me()(e,l,i)}function m8(e=[],t=10){let[r,n]=(0,hC.useState)(1),o=(0,hC.useMemo)(()=>"number"==typeof t&&t>0?Math.max(1,Math.ceil(e.length/t)):1,[e.length,t]);r>o&&n(o);let i=Math.min(Math.max(1,r),o),a=(0,hC.useMemo)(()=>{let r=(i-1)*t,n=(i+0)*t;return e.slice(r,n)},[e,i,t]),s=(0,hC.useCallback)(e=>{!Number.isInteger(e)||e<1?console.warn(`usePagination: ignoring goTo(${e}); page must be a positive integer.`):n(e)},[]),l=(0,hC.useCallback)(()=>{n(e=>e+1)},[]),u=(0,hC.useCallback)(()=>{n(e=>Math.max(1,e-1))},[]);return(0,hC.useMemo)(()=>({results:a,totalPages:o,currentPage:i,paginated:e.length>t,showNextButton:i<o,showPreviousButton:i>1,goTo:s,goToNext:l,goToPrevious:u}),[a,o,e.length,t,i,s,l,u])}function ye(e,t,r,n){return{pageSizes:(0,hC.useMemo)(()=>{let r=Math.ceil(t/e);return isNaN(r)&&(r=0),[...Array(r).keys()].map(t=>(t+1)*e)},[e,t]),pageItemsCount:(0,hC.useMemo)(()=>e>t?t:e*r>t?e*(r-1)+n:e*r,[e,t,r,n])}}function yt(){let e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function yr(e){let[t,r]=(0,hC.useState)(e??yt()),{data:n,error:o,isValidating:i}=me()(t?["patient",t]:null,()=>pw(t,{}));return(0,hC.useEffect)(()=>{let e=()=>{let e=yt();e!==t&&r(e)};return window.addEventListener("single-spa:routing-event",e),()=>window.removeEventListener("single-spa:routing-event",e)},[t]),(0,hC.useMemo)(()=>({isLoading:i&&!o&&!n,patient:n,patientUuid:t,error:o}),[i,o,n,t])}function yn(){let e=`${au}/metadatamapping/termmapping?v=custom:(metadataUuid)&code=emr.primaryIdentifierType`,{data:t,error:r,isLoading:n}=me()(e,af);return(0,hC.useMemo)(()=>({primaryIdentifierCode:t?.data?.results[0]?.metadataUuid,isLoading:n,error:r}),[t,r,n])}function yo(e){let{extensions:t,extensionSlotModuleName:r}=hK(e);return e?t.map(t=>({state:n})=>hj().createElement(hT.Provider,{value:{moduleName:r,featureName:"",extension:{extensionId:t.id,extensionSlotName:e,extensionSlotModuleName:r}}},hj().createElement(hN,{state:n}))):[]}function yi(){let e=(0,hC.useRef)(),[t,r]=(0,hC.useState)(null),n=null;if(!t){if(s){let e=av().getState();e.loaded&&(n=e.session)}else s=new Promise(t=>{let r=({loaded:r,session:o})=>{r&&(t(o),n=o,e.current&&(e.current(),e.current=void 0))};r(av().getState()),n||(e.current=av().subscribe(r))});if(n)r(n);else throw s}(0,hC.useEffect)(()=>(e.current||(e.current=av().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(s)throw console.warn("useSession is in an unexpected state. Attempting to recover."),s;else throw Error("useSession is in an invalid state.");return o}let ya=({privilege:e,fallback:t,children:r})=>{let[n,o]=(0,hC.useState)(null);return((0,hC.useEffect)(()=>{let e=ab({includeAuthStatus:!1}).subscribe(o);return()=>e.unsubscribe()},[]),n&&aE(e,n))?hj().createElement(hj().Fragment,null,r):t?hj().createElement(hj().Fragment,null,t):null};var ys=r(4274),yl=r.n(ys),yu=r(5602);let yc=new Map;function yd(){for(let e of Array.from(yc.values()))e()}let yp={setVisitContext:(e,t)=>null==t?{manuallySetVisitUuid:null}:{manuallySetVisitUuid:t.uuid,patientUuid:t.patient?.uuid}};function yf(e){let t=(0,hC.useId)();return(0,hC.useEffect)(()=>{if(e)return yc.set(t,e),()=>{yc.delete(t)}},[t,e]),{...hL(pN(),yp),mutateVisit:yd}}function yh(e,t=pT){let r=(0,hC.useRef)(void 0),{patientUuid:n,manuallySetVisitUuid:o,setVisitContext:i}=yf((0,hC.useCallback)(()=>r.current?.(),[])),a=e&&n==e?o:null,s=`?patient=${e}&v=${t}&includeInactive=false`,l=`/${a}?v=${t}`,{data:u,error:c,mutate:d,isValidating:p}=me()(e?`${au}/visit${s}`:null,af),{data:f,error:h,mutate:m,isValidating:y}=me()(e&&a?`${au}/visit${l}`:null,af),g=(0,hC.useMemo)(()=>u?.data.results.find(e=>null===e.stopDatetime)??null,[u]),b=(0,hC.useMemo)(()=>a&&f?f.data:null,[f,a]),v=(0,hC.useRef)(null);(0,hC.useEffect)(()=>{!p&&g&&n===e&&null===o&&i(g),y||(v.current&&b&&v.current.uuid===b.uuid&&!v.current.stopDatetime&&b.stopDatetime&&i(null),v.current=b)},[b,o,g,p,y,n]);let w=(0,hC.useCallback)(()=>{d(),m()},[d,m]);(0,hC.useEffect)(()=>{r.current=w},[w]);let x=!!(!u||a&&!f),E=!!(a?h:c);return{error:c||h,mutate:w,isValidating:p||y,activeVisit:g,currentVisit:b,currentVisitIsRetrospective:!!a,isLoading:x&&!E}}function ym(){let[e,t]=(0,hC.useState)([]);return(0,hC.useEffect)(()=>{let e=pk().subscribe(e=>{t(e)},e=>console.error(e));return()=>e.unsubscribe()},[]),e}yl().extend(yu);let yy=new Map;async function yg(e,t){let r=t.indexOf("#"),n=r>=0,o=n?t.substring(0,r):e,i=n?t.substring(r+1):t,a=await sM(o);return a&&Object.hasOwn(a,i)&&"function"==typeof a[i]?yv(o,a).then(()=>a[i]()):(a?a&&Object.hasOwn(a,i)?console.warn(`The export ${t}, defined in ${e}'s routes.json, is not a function`):console.warn(`${o} does not define a component called "${i}", referenced in ${e}'s routes.json. This cannot be loaded.`):console.warn(`Unknown app ${o} for ${t} defined in ${e}'s routes.json`),yb)}let yb={bootstrap:()=>Promise.resolve(),mount:()=>Promise.resolve(),unmount:()=>Promise.resolve()};async function yv(e,t){if(e in yy)await yy[e];else{let r=t??await sM(e);await (yy[e]=new Promise((t,n)=>{if(Object.hasOwn(r,"startupApp")){let o=r.startupApp;if("function"==typeof o)return Promise.resolve(o()).then(()=>{n4(e),t(null)}).catch(n)}n4(e),t(null)}))}}function yw(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(f2({name:r,load:()=>yg(e,t.component),meta:t.meta||{},order:t.order,moduleName:e,privileges:t.privileges,online:t.online??!0,offline:t.offline??!1,featureFlag:t.featureFlag,displayExpression:t.displayExpression}),n))f4(o,r)}let y_=[];function yx(e,t){fN(()=>(function(e,t){if(e&&t&&"object"==typeof t){n2(e);let r=t.extensions??[],n=t.modals??[],o=t.workspaces??[],i=t.workspaceGroups??[],a=t.featureFlags??[],s=t.workspaceGroups2??[],l=t.workspaceWindows2??[],u=t.workspaces2??[];t.pages?.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"component")&&(Object.hasOwn(t,"route")||Object.hasOwn(t,"routeRegex")||Object.hasOwn(t,"routes"))?y_.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")?yw(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?hi({name:r,moduleName:e,load:()=>yg(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
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)}),o.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")?function(e,t){let r=t.name;if(!r)return console.error(`A workspace definition in ${e} is missing a name and thus cannot be registered.
|
|
24
24
|
To fix this, ensure that you define the "name" field inside the workspace definition.`,t);let n=t.title;if(!n)return console.error(`A workspace definition in ${e} is missing a title and thus cannot be registered.
|
|
25
25
|
To fix this, ensure that you define the "title" field inside the workspace definition.`,t);if(!t.component)return console.error(`The workspace ${r} from ${e} is missing a 'component' entry and thus cannot be registered.
|
|
26
|
-
To fix this, ensure that you define a 'component' field inside the workspace definition.`,t);for(let o of(
|
|
27
|
-
To fix this, ensure that you define the "name" field inside the workspace definition.`,t)}else console.warn(`A workspace group for ${e} could not be registered as it does not appear to have the required properties`,t)}),
|
|
26
|
+
To fix this, ensure that you define a 'component' field inside the workspace definition.`,t);for(let o of(hu({name:r,title:n,component:t.component,moduleName:e,type:t.type,canHide:t.canHide,canMaximize:t.canMaximize,width:t.width,preferredWindowSize:t.preferredWindowSize,groups:t.groups,load:()=>yg(e,t.component)}),t.groups||[]))hc({name:o,members:[r]})}(e,t):console.warn(`A workspace for ${e} could not be registered as it does not appear to have the required properties`,t)}),i.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"name")){let r;(r=t.name)?hc({name:r,members:t.members??[]}):console.error(`A workspace group definition in ${e} is missing a name and thus cannot be registered.
|
|
27
|
+
To fix this, ensure that you define the "name" field inside the workspace definition.`,t)}else console.warn(`A workspace group for ${e} could not be registered as it does not appear to have the required properties`,t)}),hb(e,s);for(let t of(hv(e,l),l))t.icon&&yw(e,{name:t.name,component:t.icon,slot:t.group,order:t.order});hw(e,u),a.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"flagName"))t.flagName?t.label?t.description?fc(t.flagName,t.label,t.description):console.error(`A feature flag definition in ${e} is missing a description and thus cannot be registered.
|
|
28
28
|
To fix this, ensure that you define the "description" field inside the feature flag definition.`,t):console.error(`A feature flag definition in ${e} is missing a description and thus cannot be registered.
|
|
29
29
|
To fix this, ensure that you define the "label" field inside the feature flag definition.`,t):console.error(`A feature flag definition in ${e} is missing a name and thus cannot be registered.
|
|
30
|
-
To fix this, ensure that you define the "name" field inside the feature flag definition.`,t);else console.warn(`A feature flag for ${e} could not be registered as it does not appear to have the required properties`,t)})}})(e,t))}function
|
|
31
|
-
To fix this, ensure that you define the "route" (or alternatively the "routeRegex") field inside the extension definition.`,e):t.component?iH(e,()=>
|
|
32
|
-
To fix this, ensure that you define the "component" field inside the page definition.`,e)}(n,t)}}let yE={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 yS(){document.body.classList.toggle("omrs-breakpoint-lt-tablet",window.innerWidth<yE.TABLET_MIN),document.body.classList.toggle("omrs-breakpoint-gt-phone",window.innerWidth>yE.PHONE_MAX),document.body.classList.toggle("omrs-breakpoint-gt-tablet",window.innerWidth>yE.TABLET_MAX),document.body.classList.toggle("omrs-breakpoint-lt-desktop",window.innerWidth<yE.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-small-desktop",window.innerWidth<yE.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-large-desktop",window.innerWidth<yE.LARGE_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-gt-small-desktop",window.innerWidth>yE.SMALL_DESKTOP_MAX)}let yD=!1;function yO(){yD||(window.addEventListener("resize",yS),yS(),yD=!0)}var yP=r(1085),yk=r(3373),yC=r.n(yk);function yj({title:e,children:t}){let r="tablet"===m0();return(0,yP.jsxs)("div",{className:yC()({"-esm-openconceptlab__card-header-module__tabletHeader___xhRSy":r,"-esm-openconceptlab__card-header-module__desktopHeader___aPTXc":!r}),children:[(0,yP.jsx)("h4",{children:e}),t]})}let yT=["red","magenta","purple","blue","teal","cyan","gray","green","warm-gray","cool-gray","high-contrast","outline"],yR={primaryColor:{_type:nv.String,_description:"The color for displaying primary diagnoses tags",_default:"red",_validators:[oD.oneOf(yT)]},secondaryColor:{_type:nv.String,_description:"The color for displaying secondary diagnoses tags",_default:"blue",_validators:[oD.oneOf(yT)]}},yN={"Brand color #1":{_default:"#005d5d",_type:nv.String},"Brand color #2":{_default:"#004144",_type:nv.String},"Brand color #3":{_default:"#007d79",_type:nv.String},excludePatientIdentifierCodeTypes:{uuids:{_type:nv.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:nv.UUID}}},implementationName:{_type:nv.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},patientPhotoConceptUuid:{_type:nv.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:nv.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:nv.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:nv.String}},diagnosisTags:yR};var yA=r(815);let y$={"carbon.table.batch.cancel":"cancel","carbon.table.batch.items.selected":"batchActionsItemsSelected","carbon.table.batch.item.selected":"batchActionItemSelected","carbon.table.batch.selectAll":"selectAll"},yI=e=>(0,yP.jsx)(yA.GGC,{translateWithId:(e,t)=>{let r=y$[e];return r?sf(r,e,t):e},...e}),yM="-esm-openconceptlab__custom-overflow-menu-module__container___QIBvW",yL="-esm-openconceptlab__custom-overflow-menu-module__menu___ZppPo",yF="-esm-openconceptlab__custom-overflow-menu-module__show___8rVUu",yB="-esm-openconceptlab__custom-overflow-menu-module__overflowMenuButton___0VKUu",yV=(0,hk.createContext)(null);function yU(){let e=(0,hk.useContext)(yV);if(!e)throw Error("useCustomOverflowMenu must be used within a CustomOverflowMenu");return e}function yW({menuTitle:e,children:t}){let[r,n]=hC().useState(!1),o=m6(()=>n(!1),r),i="tablet"===m0(),a=(0,hk.useCallback)(()=>n(e=>!e),[]),s=(0,hk.useRef)(null),l=(0,hk.useRef)(null),u=(0,hk.useId)(),c=`custom-overflow-menu-trigger-${u}`,d=`custom-overflow-menu-${u}`,p=(0,hk.useCallback)(()=>{n(!1),s.current?.focus()},[]),f=(0,hk.useMemo)(()=>({closeMenu:p}),[p]),h=(0,hk.useCallback)(e=>{"Escape"===e.key&&r&&(e.stopPropagation(),p())},[p,r]),m=hk.Children.toArray(t);(0,hk.useEffect)(()=>{if(r&&l.current){let e=l.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[r]);let y=(0,hk.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 i=o+t,a=i<0?r.length-1:i>=r.length?0:i;r[a]?.focus()},[]),g=m.map((e,t)=>(0,hk.isValidElement)(e)?(0,hk.cloneElement)(e,{closeMenu:p,handleOverflowMenuItemFocus:y,index:t}):e);return(0,yP.jsxs)("div",{"data-overflow-menu":!0,className:yC()("cds--overflow-menu",yM),ref:o,children:[(0,yP.jsx)("button",{className:yC()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":r},yB),"aria-controls":d,"aria-expanded":r,"aria-haspopup":"true",id:c,onClick:a,onKeyDown:h,ref:s,children:e}),(0,yP.jsxs)("div",{className:yC()("cds--overflow-menu-options","cds--overflow-menu--flip",yL,{[yF]:r}),"aria-labelledby":c,"data-floating-menu-direction":"bottom",id:d,onKeyDown:h,ref:l,role:"menu",tabIndex:-1,children:[(0,yP.jsx)("ul",{className:yC()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":i}),children:(0,yP.jsx)(yV.Provider,{value:f,children:g})}),(0,yP.jsx)("span",{})]})]})}function yz(e){let t=(0,hk.useContext)(yV);return(0,yP.jsx)(yA.XSD,{...e,closeMenu:t?.closeMenu})}var yK=r(6311);let yH=["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"],yG=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-activity",iconProps:e})})),yq=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-add",iconProps:e})})),yZ=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-arrow-down",iconProps:e})})),yY=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-arrow-left",iconProps:e})})),yJ=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-arrow-right",iconProps:e})})),yX=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-arrow-up",iconProps:e})})),yQ=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-baby",iconProps:e})})),y0=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-calendar-heat-map",iconProps:e})})),y1=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-calendar",iconProps:e})})),y2=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-caret-down",iconProps:e})})),y4=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-caret-left",iconProps:e})})),y3=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-caret-right",iconProps:e})})),y6=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-caret-up",iconProps:e})})),y5=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-chart-average",iconProps:e})})),y7=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-chart-line",iconProps:e})})),y9=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-checkmark-filled",iconProps:e})})),y8=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-checkmark-outline",iconProps:e})})),ge=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-chemistry",iconProps:e})})),gt=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-chevron-down",iconProps:e})})),gr=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-chevron-left",iconProps:e})})),gn=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-chevron-right",iconProps:e})})),go=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-chevron-up",iconProps:e})})),gi=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-close",iconProps:e})})),ga=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-close-filled",iconProps:e})})),gs=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-close-outline",iconProps:e})})),gl=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-document",iconProps:e})})),gu=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-document-attachment",iconProps:e})})),gc=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-download",iconProps:e})})),gd=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-drug-order",iconProps:e})})),gp=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-edit",iconProps:e})})),gf=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-event-schedule",iconProps:e})})),gh=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-events",iconProps:e})})),gm=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-gender-female",iconProps:e})})),gy=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-gender-male",iconProps:e})})),gg=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-gender-other",iconProps:e})})),gb=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-gender-unknown",iconProps:e})})),gv=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-generic-order-type",iconProps:e})})),gw=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-group",iconProps:e})})),g_=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-group-access",iconProps:e})})),gx=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-hospital-bed",iconProps:e})})),gE=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-image-medical",iconProps:e})})),gS=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-information",iconProps:e})})),gD=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-information-filled",iconProps:e})})),gO=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-information-square",iconProps:e})})),gP=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-inventory-management",iconProps:e})})),gk=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-lab-order",iconProps:e})})),gC=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-list-checked",iconProps:e})})),gj=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-location",iconProps:e})})),gT=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-material-order",iconProps:e})})),gR=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-maximize",iconProps:e})})),gN=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-medication",iconProps:e})})),gA=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-message-queue",iconProps:e})})),g$=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-microscope",iconProps:e})})),gI=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-mobile-check",iconProps:e})})),gM=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-money",iconProps:e})})),gL=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-mother",iconProps:e})})),gF=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-movement",iconProps:e})})),gB=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),gV=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),gU=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-password",iconProps:e})})),gW=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-pedestrian-family",iconProps:e})})),gz=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-pen",iconProps:e})})),gK=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-printer",iconProps:e})})),gH=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-procedure-order",iconProps:e})})),gG=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-programs",iconProps:e})})),gq=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-referral-order",iconProps:e})})),gZ=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-renew",iconProps:e})})),gY=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-report",iconProps:e})})),gJ=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-reset",iconProps:e})})),gX=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-save",iconProps:e})})),gQ=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-search",iconProps:e})})),g0=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-settings",iconProps:e})})),g1=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-switcher",iconProps:e})})),g2=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-shopping-cart",iconProps:e})})),g4=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-shopping-cart--arrow-down",iconProps:e})})),g3=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-sticky-note-add",iconProps:e})})),g6=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-syringe",iconProps:e})})),g5=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-table-of-contents",iconProps:e})})),g7=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-table",iconProps:e})})),g9=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-time",iconProps:e})})),g8=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-tools",iconProps:e})})),be=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-translate",iconProps:e})})),bt=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-trash-can",iconProps:e})})),br=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-tree-view--alt",iconProps:e})})),bn=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-two-factor-authentication",iconProps:e})})),bo=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-user-avatar",iconProps:e})})),bi=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-user-follow",iconProps:e})})),ba=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-user-xray",iconProps:e})})),bs=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-user",iconProps:e})})),bl=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-view-off",iconProps:e})})),bu=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-view",iconProps:e})})),bc=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(bg,{ref:t,icon:"omrs-icon-warning",iconProps:e})})),bd=bc,bp=gu,bf=gC,bh=gE,bm=g4,by=(0,hk.memo)((0,hk.forwardRef)(function({icon:e,fallback:t,...r},n){let o=(0,hk.useRef)(e?document.getElementById(e):void 0);return(0,hk.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,yP.jsx)(mg,{value:o.current,fallback:t,children:(0,yP.jsx)(bg,{ref:n,icon:e,iconProps:r})})})),bg=(0,hk.memo)((0,hk.forwardRef)(function({icon:e,iconProps:t},r){let{className:n,fill:o,size:i}=Object.assign({},{fill:"currentColor",size:20},t);(i<=0||i>72)&&(console.error(`Invalid size '${i}' specified for ${e}. Defaulting to 20.`),i=20);let a=(0,hk.useRef)(null);return(0,hk.useImperativeHandle)(r,()=>a.current),(0,hk.useEffect)(()=>{a.current&&"currentColor"!==o&&a.current.style.setProperty("--omrs-icon-fill",o)},[]),(0,yP.jsx)("svg",{ref:a,className:yC()("omrs-icon","-esm-openconceptlab__icons-module__icon___uq4qr",n),height:i,width:i,viewBox:"0 0 16 16",children:(0,yP.jsx)("use",{href:`#${e}`})})})),bb=({path:e,title:t,basePath:r,icon:n})=>{let{t:o}=(0,h7.useTranslation)(),i=(0,yK.useLocation)(),a=(0,hk.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=(i.pathname??"").split("/").slice(1).map(e=>decodeURIComponent(e));return n.some((e,t)=>r.every((e,r)=>n[t+r]===e))},[i.pathname,e]);return(0,yP.jsx)("div",{children:(0,yP.jsx)(hT,{className:yC()("cds--side-nav__link",{"active-left-nav-link":a}),to:`${r}/${encodeURIComponent(e)}`,children:(0,yP.jsxs)("span",{className:"-esm-openconceptlab__dashboard-module__menu___WbY42",children:[(0,yP.jsx)(by,{icon:n,className:"-esm-openconceptlab__dashboard-module__icon___L-hKL",size:16}),(0,yP.jsx)("span",{children:o(t)})]})})},e)};function bv(e){return function({basePath:t}){return(0,yP.jsx)(yK.BrowserRouter,{children:(0,yP.jsx)(bb,{basePath:t,...e})})}}function bw(e){let t=(0,hk.useRef)(null);return(0,hk.useMemo)(()=>({get current(){return t.current},set current(value){t.current=value,"function"==typeof e?e(value):e&&(e.current=value)}}),[e])}function b_(...e){return(...t)=>{for(let r of e)"function"==typeof r&&r(...t)}}let bx="u">typeof document?hC().useLayoutEffect:()=>{};function bE(e){let t=(0,hk.useRef)(null);return bx(()=>{t.current=e},[e]),(0,hk.useCallback)((...e)=>{let r=t.current;return null==r?void 0:r(...e)},[])}let bS={prefix:String(Math.round(1e10*Math.random())),current:0},bD=hC().createContext(bS),bO=hC().createContext(!1),bP=("u">typeof window&&window.document&&window.document.createElement,new WeakMap),bk="function"==typeof hC().useId?function(e){let t=hC().useId(),[r]=(0,hk.useState)(bR()),n=r?"react-aria":`react-aria${bS.prefix}`;return e||`${n}-${t}`}:function(e){let t=(0,hk.useContext)(bD),r=function(e=!1){let t=(0,hk.useContext)(bD),r=(0,hk.useRef)(null);if(null===r.current&&!e){var n,o;let e=null==(o=hC().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||null==(n=o.ReactCurrentOwner)?void 0:n.current;if(e){let r=bP.get(e);null==r?bP.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==r.state&&(t.current=r.id,bP.delete(e))}r.current=++t.current}return r.current}(!!e),n=`react-aria${t.prefix}`;return e||`${n}-${r}`};function bC(){return!1}function bj(){return!0}function bT(e){return()=>{}}function bR(){return"function"==typeof hC().useSyncExternalStore?hC().useSyncExternalStore(bT,bC,bj):(0,hk.useContext)(bO)}let bN=!!("u">typeof window&&window.document&&window.document.createElement),bA=new Map;function b$(e){let[t,r]=(0,hk.useState)(e),n=(0,hk.useRef)(null),o=bk(t),i=(0,hk.useRef)(null);if(l&&l.register(i,o),bN){let e=bA.get(o);e&&!e.includes(n)?e.push(n):bA.set(o,[n])}return bx(()=>()=>{l&&l.unregister(i),bA.delete(o)},[o]),(0,hk.useEffect)(()=>{let e=n.current;return e&&r(e),()=>{e&&(n.current=null)}}),o}function bI(e=[]){let t=b$(),[r,n]=function(e){let[t,r]=(0,hk.useState)(e),n=(0,hk.useRef)(null),o=bE(()=>{if(!n.current)return;let e=n.current.next();if(e.done){n.current=null;return}t===e.value?o():r(e.value)});bx(()=>{n.current&&o()});let i=bE(e=>{n.current=e(t),o()});return[t,i]}(t),o=(0,hk.useCallback)(()=>{n(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,n]);return bx(o,[t,o,...e]),r}"u">typeof FinalizationRegistry&&(l=new FinalizationRegistry(e=>{bA.delete(e)}));let bM=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 i=t.length;for(r=0;r<i;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 bL(...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]=b_(r,o):("className"===e||"UNSAFE_className"===e)&&"string"==typeof r&&"string"==typeof o?t[e]=bM(r,o):"id"===e&&r&&o?t.id=function(e,t){if(e===t)return e;let r=bA.get(e);if(r)return r.forEach(e=>e.current=t),t;let n=bA.get(t);return n?(n.forEach(t=>t.current=e),e):t}(r,o):t[e]=void 0!==o?o:r}}return t}let bF=Symbol("default");function bB({values:e,children:t}){for(let[r,n]of e)t=hC().createElement(r.Provider,{value:n},t);return t}function bV(e){let{className:t,style:r,children:n,defaultClassName:o,defaultChildren:i,defaultStyle:a,values:s}=e;return(0,hk.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof r?r({...s,defaultStyle:a||{}}):r,u="function"==typeof n?n({...s,defaultChildren:i}):null==n?i:n,{className:null!=e?e:o,style:l||a?{...a,...l}:void 0,children:null!=u?u:i,"data-rac":""}},[t,r,n,o,i,a,s])}function bU(e,t){let r=(0,hk.useContext)(e);if(null===t)return null;if(r&&"object"==typeof r&&"slots"in r&&r.slots){let e=t||bF;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 bW(e,t,r){let{ref:n,...o}=bU(r,e.slot)||{},i=bw((0,hk.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])),a=bL(o,e);return"style"in o&&o.style&&"style"in e&&e.style&&("function"==typeof o.style||"function"==typeof e.style?a.style=t=>{let r="function"==typeof o.style?o.style(t):o.style,n={...t.defaultStyle,...r},i="function"==typeof e.style?e.style({...t,defaultStyle:n}):e.style;return{...n,...i}}:a.style={...o.style,...e.style}),[a,i]}function bz(e=!0){let[t,r]=(0,hk.useState)(e),n=(0,hk.useRef)(!1),o=(0,hk.useCallback)(e=>{n.current=!0,r(!!e)},[]);return bx(()=>{n.current||r(!1)},[]),[o,t]}function bK(e){let t=/^(data-.*)$/,r={};for(let n in e)t.test(n)||(r[n]=e[n]);return r}let bH=(0,hk.createContext)(null),bG=null;function bq(e,t="assertive",r=7e3){bG?bG.announce(e,t,r):(bG=new bZ,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?bG.announce(e,t,r):setTimeout(()=>{(null==bG?void 0:bG.isAttached())&&(null==bG||bG.announce(e,t,r))},100))}class bZ{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 i=document.createElement("div");"object"==typeof e?(i.setAttribute("role","img"),i.setAttribute("aria-labelledby",e["aria-labelledby"])):i.textContent=e,"assertive"===t?null==(n=this.assertiveLog)||n.appendChild(i):null==(o=this.politeLog)||o.appendChild(i),""!==e&&setTimeout(()=>{i.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 bY=new Set(["id"]),bJ=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),bX=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),bQ=/^(data-.*)$/;function b0(e,t={}){let{labelable:r,isLink:n,propNames:o}=t,i={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(bY.has(t)||r&&bJ.has(t)||n&&bX.has(t)||(null==o?void 0:o.has(t))||bQ.test(t))&&(i[t]=e[t]);return i}let b1=["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"])'],b2=b1.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";b1.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let b4=b1.join(':not([hidden]):not([tabindex="-1"]),');function b3(e){return e.matches(b2)}function b6(e){return e.matches(b4)}let b5=e=>{var t;return null!=(t=null==e?void 0:e.ownerDocument)?t:document},b7=e=>e&&"window"in e&&e.window===e?e:b5(e).defaultView||window;function b9(e){if(function(){if(null==b8){b8=!1;try{document.createElement("div").focus({get preventScroll(){return b8=!0,!0}})}catch{}}return b8}())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 b8=null;function ve(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function vt(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function vr(e){let t=(0,hk.useRef)({isFocused:!1,observer:null});bx(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let r=bE(t=>{null==e||e(t)});return(0,hk.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(ve(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 vn=!1;function vo(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 vi(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 va(e){let t=null;return()=>(null==t&&(t=e()),t)}let vs=va(function(){return vi(/^Mac/i)}),vl=va(function(){return vi(/^iPhone/i)}),vu=va(function(){return vi(/^iPad/i)||vs()&&navigator.maxTouchPoints>1}),vc=va(function(){return vl()||vu()});va(function(){return vs()||vc()});let vd=va(function(){return vo(/AppleWebKit/i)&&!vp()}),vp=va(function(){return vo(/Chrome/i)}),vf=va(function(){return vo(/Android/i)}),vh=va(function(){return vo(/Firefox/i)}),vm=new Map,vy=new Set;function vg(){if("u"<typeof window)return;function e(e){return"propertyName"in e}let t=r=>{if(!e(r)||!r.target)return;let n=vm.get(r.target);if(n&&(n.delete(r.propertyName),0===n.size&&(r.target.removeEventListener("transitioncancel",t),vm.delete(r.target)),0===vm.size)){for(let e of vy)e();vy.clear()}};document.body.addEventListener("transitionrun",r=>{if(!e(r)||!r.target)return;let n=vm.get(r.target);n||(n=new Set,vm.set(r.target,n),r.target.addEventListener("transitioncancel",t,{once:!0})),n.add(r.propertyName)}),document.body.addEventListener("transitionend",t)}function vb(e){requestAnimationFrame(()=>{0===vm.size?e():vy.add(e)})}"u">typeof document&&("loading"!==document.readyState?vg():document.addEventListener("DOMContentLoaded",vg));let vv="default",vw="",v_=new WeakMap;function vx(e){if(vc())"disabled"===vv&&(vv="restoring",setTimeout(()=>{vb(()=>{if("restoring"===vv){let t=b5(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=vw||""),vw="",vv="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&v_.has(e)){let t=v_.get(e),r="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[r]&&(e.style[r]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),v_.delete(e)}}let vE=hC().createContext({register:()=>{}});function vS(e,t,r){if(!t.has(e))throw TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function vD(e,t,r){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}function vO(e,t,r){var n=vS(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 vP(e,t){bx(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function vk(){let e=(0,hk.useRef)(new Map),t=(0,hk.useCallback)((t,r,n,o)=>{let i=(null==o?void 0:o.once)?(...t)=>{e.current.delete(n),n(...t)}:n;e.current.set(n,{type:r,eventTarget:t,fn:i,options:o}),t.addEventListener(r,i,o)},[]),r=(0,hk.useCallback)((t,r,n,o)=>{var i;let a=(null==(i=e.current.get(n))?void 0:i.fn)||n;t.removeEventListener(r,a,o),e.current.delete(n)},[]),n=(0,hk.useCallback)(()=>{e.current.forEach((e,t)=>{r(e.eventTarget,e.type,t,e.options)})},[r]);return(0,hk.useEffect)(()=>n,[n]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:n}}vE.displayName="PressResponderContext";function vC(e,t){return!!t&&!!e&&e.contains(t)}function vj(e){return e.target}function vT(e,t,r=!0){var n,o;let{metaKey:i,ctrlKey:a,altKey:s,shiftKey:l}=t;vh()&&(null==(o=window.event)||null==(n=o.type)?void 0:n.startsWith("key"))&&"_blank"===e.target&&(vs()?i=!0:a=!0);let u=vd()&&vs()&&!vu()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:i,ctrlKey:a,altKey:s,shiftKey:l}):new MouseEvent("click",{metaKey:i,ctrlKey:a,altKey:s,shiftKey:l,bubbles:!0,cancelable:!0});vT.isOpening=r,b9(e),e.dispatchEvent(u),vT.isOpening=!1}function vR(e){return 0===e.mozInputSource&&!!e.isTrusted||(vf()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}vT.isOpening=!1;var vN=r(5427),vA=r.n(vN),v$=new WeakMap;class vI{continuePropagation(){vO(this,v$,!1)}get shouldStopPropagation(){var e;return e=vS(this,v$,"get"),e.get?e.get.call(this):e.value}constructor(e,t,r,n){var o;vD(this,v$,{writable:!0,value:void 0}),vO(this,v$,!0);let i=null!=(o=null==n?void 0:n.target)?o:r.currentTarget;const a=null==i?void 0:i.getBoundingClientRect();let s,l=0,u,c=null;null!=r.clientX&&null!=r.clientY&&(u=r.clientX,c=r.clientY),a&&(null!=u&&null!=c?(s=u-a.left,l=c-a.top):(s=a.width/2,l=a.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 vM=Symbol("linkClicked");function vL(e){let{onPress:t,onPressChange:r,onPressStart:n,onPressEnd:o,onPressUp:i,onClick:a,isDisabled:s,isPressed:l,preventFocusOnPress:u,shouldCancelOnPointerExit:c,allowTextSelectionOnPress:d,ref:p,...f}=function(e){let t=(0,hk.useContext)(vE);if(t){let{register:r,...n}=t;e=bL(n,e),r()}return vP(t,e.ref),e}(e),[h,m]=(0,hk.useState)(!1),y=(0,hk.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:g,removeAllGlobalListeners:b}=vk(),v=bE((e,t)=>{let o=y.current;if(s||o.didFirePressStart)return!1;let i=!0;if(o.isTriggeringEvent=!0,n){let r=new vI("pressstart",t,e);n(r),i=r.shouldStopPropagation}return r&&r(!0),o.isTriggeringEvent=!1,o.didFirePressStart=!0,m(!0),i}),w=bE((e,n,i=!0)=>{let a=y.current;if(!a.didFirePressStart)return!1;a.didFirePressStart=!1,a.isTriggeringEvent=!0;let l=!0;if(o){let t=new vI("pressend",n,e);o(t),l=t.shouldStopPropagation}if(r&&r(!1),m(!1),t&&i&&!s){let r=new vI("press",n,e);t(r),l&&(l=r.shouldStopPropagation)}return a.isTriggeringEvent=!1,l}),x=bE((e,t)=>{let r=y.current;if(s)return!1;if(i){r.isTriggeringEvent=!0;let n=new vI("pressup",t,e);return i(n),r.isTriggeringEvent=!1,n.shouldStopPropagation}return!0}),E=bE(e=>{let t=y.current;if(t.isPressed&&t.target){for(let r of(t.didFirePressStart&&null!=t.pointerType&&w(vV(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,b(),d||vx(t.target),t.disposables))r();t.disposables=[]}}),S=bE(e=>{c&&E(e)}),D=bE(e=>{null==a||a(e)}),O=bE((e,t)=>{if(a){let r=new MouseEvent("click",e);vt(r,t),a(ve(r))}}),P=(0,hk.useMemo)(()=>{let e=y.current,t={onKeyDown(t){if(vB(t.nativeEvent,t.currentTarget)&&vC(t.currentTarget,vj(t.nativeEvent))){var n;vU(vj(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=v(t,"keyboard");let n=t.currentTarget;g(b5(t.currentTarget),"keyup",b_(t=>{vB(t,n)&&!t.repeat&&vC(n,vj(t))&&e.target&&x(vV(e.target,t),"keyboard")},r),!0)}o&&t.stopPropagation(),t.metaKey&&vs()&&(null==(n=e.metaKeyEvents)||n.set(t.key,t.nativeEvent))}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||vC(t.currentTarget,vj(t.nativeEvent)))&&t&&0===t.button&&!e.isTriggeringEvent&&!vT.isOpening){let r=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||vR(t.nativeEvent))){let e=v(t,"virtual"),n=x(t,"virtual"),o=w(t,"virtual");D(t),r=e&&n&&o}else if(e.isPressed&&"keyboard"!==e.pointerType){let n=e.pointerType||t.nativeEvent.pointerType||"virtual";r=w(vV(t.currentTarget,t),n,!0),e.isOverTarget=!1,D(t),E(t)}e.ignoreEmulatedMouseEvents=!1,r&&t.stopPropagation()}}},r=t=>{var r,n,o;if(e.isPressed&&e.target&&vB(t,e.target)){vU(vj(t),t.key)&&t.preventDefault();let r=vj(t),o=vC(e.target,vj(t));w(vV(e.target,t),"keyboard",o),o&&O(t,e.target),b(),"Enter"!==t.key&&vF(e.target)&&vC(e.target,r)&&!t[vM]&&(t[vM]=!0,vT(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||!vC(t.currentTarget,vj(t.nativeEvent)))return;if(o=t.nativeEvent,!vf()&&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 i=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,d||function(e){if(vc()){if("default"===vv){let t=b5(e);vw=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}vv="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";v_.set(e,e.style[t]),e.style[t]="none"}}(e.target),i=v(t,e.pointerType);let o=vj(t.nativeEvent);"releasePointerCapture"in o&&o.releasePointerCapture(t.pointerId),g(b5(t.currentTarget),"pointerup",r,!1),g(b5(t.currentTarget),"pointercancel",n,!1)}i&&t.stopPropagation()},t.onMouseDown=t=>{if(vC(t.currentTarget,vj(t.nativeEvent))&&0===t.button){if(u){let r=function(e){for(;e&&!b3(e);)e=e.parentElement;let t=b7(e),r=t.document.activeElement;if(!r||r===e)return;vn=!0;let n=!1,o=e=>{(e.target===r||n)&&e.stopImmediatePropagation()},i=t=>{(t.target===r||n)&&(t.stopImmediatePropagation(),e||n||(n=!0,b9(r),l()))},a=t=>{(t.target===e||n)&&t.stopImmediatePropagation()},s=t=>{(t.target===e||n)&&(t.stopImmediatePropagation(),n||(n=!0,b9(r),l()))};t.addEventListener("blur",o,!0),t.addEventListener("focusout",i,!0),t.addEventListener("focusin",s,!0),t.addEventListener("focus",a,!0);let l=()=>{cancelAnimationFrame(u),t.removeEventListener("blur",o,!0),t.removeEventListener("focusout",i,!0),t.removeEventListener("focusin",s,!0),t.removeEventListener("focus",a,!0),vn=!1,n=!1},u=requestAnimationFrame(l);return l}(t.target);r&&e.disposables.push(r)}t.stopPropagation()}},t.onPointerUp=t=>{vC(t.currentTarget,vj(t.nativeEvent))&&"virtual"!==e.pointerType&&0===t.button&&x(t,e.pointerType||t.pointerType)},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!0,v(vV(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,w(vV(e.target,t),e.pointerType,!1),S(t))};let r=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target){if(vC(e.target,vj(t))&&null!=e.pointerType){let r=!1,n=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(r?E(t):(b9(e.target),e.target.click()))},80);g(t.currentTarget,"click",()=>r=!0,!0),e.disposables.push(()=>clearTimeout(n))}else E(t);e.isOverTarget=!1}},n=e=>{E(e)};t.onDragStart=e=>{vC(e.currentTarget,vj(e.nativeEvent))&&E(e)}}return t},[g,s,u,b,d,E,S,w,v,x,D,O]);return(0,hk.useEffect)(()=>{let e=null==p?void 0:p.current;e&&e instanceof b7(e).Element&&"auto"===b7(e).getComputedStyle(e).touchAction&&(e.style.touchAction="pan-x pan-y pinch-zoom")},[p]),(0,hk.useEffect)(()=>{let e=y.current;return()=>{var t;for(let r of(d||vx(null!=(t=e.target)?t:void 0),e.disposables))r();e.disposables=[]}},[d]),{isPressed:l||h,pressProps:bL(f,P)}}function vF(e){return"A"===e.tagName&&e.hasAttribute("href")}function vB(e,t){let{key:r,code:n}=e,o=t.getAttribute("role");return("Enter"===r||" "===r||"Spacebar"===r||"Space"===n)&&!(t instanceof b7(t).HTMLInputElement&&!vz(t,r)||t instanceof b7(t).HTMLTextAreaElement||t.isContentEditable)&&!(("link"===o||!o&&vF(t))&&"Enter"!==r)}function vV(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 vU(e,t){return e instanceof HTMLInputElement?!vz(e,t):!(e instanceof HTMLInputElement)&&(e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!vF(e))}let vW=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function vz(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:vW.has(e.type)}let vK=null,vH=new Set,vG=new Map,vq=!1,vZ=!1,vY={Tab:!0,Escape:!0};function vJ(e,t){for(let r of vH)r(e,t)}function vX(e){vq=!0,e.metaKey||!vs()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(vK="keyboard",vJ("keyboard",e))}function vQ(e){vK="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(vq=!0,vJ("pointer",e))}function v0(e){vR(e)&&(vq=!0,vK="virtual")}function v1(e){e.target!==window&&e.target!==document&&!vn&&e.isTrusted&&(vq||vZ||(vK="virtual",vJ("virtual",e)),vq=!1,vZ=!1)}function v2(){vn||(vq=!1,vZ=!0)}function v4(e){if("u"<typeof window||vG.get(b7(e)))return;let t=b7(e),r=b5(e),n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){vq=!0,n.apply(this,arguments)},r.addEventListener("keydown",vX,!0),r.addEventListener("keyup",vX,!0),r.addEventListener("click",v0,!0),t.addEventListener("focus",v1,!0),t.addEventListener("blur",v2,!1),"u">typeof PointerEvent&&(r.addEventListener("pointerdown",vQ,!0),r.addEventListener("pointermove",vQ,!0),r.addEventListener("pointerup",vQ,!0)),t.addEventListener("beforeunload",()=>{v3(e)},{once:!0}),vG.set(t,{focus:n})}let v3=(e,t)=>{let r=b7(e),n=b5(e);t&&n.removeEventListener("DOMContentLoaded",t),vG.has(r)&&(r.HTMLElement.prototype.focus=vG.get(r).focus,n.removeEventListener("keydown",vX,!0),n.removeEventListener("keyup",vX,!0),n.removeEventListener("click",v0,!0),r.removeEventListener("focus",v1,!0),r.removeEventListener("blur",v2,!1),"u">typeof PointerEvent&&(n.removeEventListener("pointerdown",vQ,!0),n.removeEventListener("pointermove",vQ,!0),n.removeEventListener("pointerup",vQ,!0)),vG.delete(r))};function v6(){return"pointer"!==vK}"u">typeof document&&("loading"!==(f=b5(void 0)).readyState?v4(void 0):f.addEventListener("DOMContentLoaded",()=>{v4(void 0)}));let v5=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function v7(e){let t=b5(e),r=((e=document)=>e.activeElement)(t);"virtual"===vK?vb(()=>{((e=document)=>e.activeElement)(t)===r&&e.isConnected&&b9(e)}):b9(e)}function v9(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:o}=e,i=(0,hk.useCallback)(e=>{if(e.target===e.currentTarget)return n&&n(e),o&&o(!1),!0},[n,o]),a=vr(i),s=(0,hk.useCallback)(e=>{let t=b5(e.target),n=t?((e=document)=>e.activeElement)(t):((e=document)=>e.activeElement)();e.target===e.currentTarget&&n===vj(e.nativeEvent)&&(r&&r(e),o&&o(!0),a(e))},[o,r,a]);return{focusProps:{onFocus:!t&&(r||o||n)?s:void 0,onBlur:!t&&(n||o)?i:void 0}}}function v8(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 we=hC().createContext(null);function wt(e,t){let{focusProps:r}=v9(e),{keyboardProps:n}={keyboardProps:e.isDisabled?{}:{onKeyDown:v8(e.onKeyDown),onKeyUp:v8(e.onKeyUp)}},o=bL(r,n),i=function(e){let t=(0,hk.useContext)(we)||{};vP(t,e);let{ref:r,...n}=t;return n}(t),a=e.isDisabled?{}:i,s=(0,hk.useRef)(e.autoFocus);(0,hk.useEffect)(()=>{s.current&&t.current&&v7(t.current),s.current=!1},[t]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:bL({...o,tabIndex:l},a)}}function wr(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:o}=e,i=(0,hk.useRef)({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:s}=vk(),l=(0,hk.useCallback)(e=>{e.currentTarget.contains(e.target)&&i.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(i.current.isFocusWithin=!1,s(),r&&r(e),o&&o(!1))},[r,o,i,s]),u=vr(l),c=(0,hk.useCallback)(e=>{if(!e.currentTarget.contains(e.target))return;let t=b5(e.target),r=((e=document)=>e.activeElement)(t);if(!i.current.isFocusWithin&&r===vj(e.nativeEvent)){n&&n(e),o&&o(!0),i.current.isFocusWithin=!0,u(e);let r=e.currentTarget;a(t,"focus",e=>{if(i.current.isFocusWithin&&!vC(r,e.target)){let n=new t.defaultView.FocusEvent("blur",{relatedTarget:e.target});vt(n,r),l(ve(n))}},{capture:!0})}},[n,o,u,a,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:l}}}function wn(e={}){var t;let{autoFocus:r=!1,isTextInput:n,within:o}=e,i=(0,hk.useRef)({isFocused:!1,isFocusVisible:r||v6()}),[a,s]=(0,hk.useState)(!1),[l,u]=(0,hk.useState)(()=>i.current.isFocused&&i.current.isFocusVisible),c=(0,hk.useCallback)(()=>u(i.current.isFocused&&i.current.isFocusVisible),[]),d=(0,hk.useCallback)(e=>{i.current.isFocused=e,s(e),c()},[c]);t={isTextInput:n},v4(),(0,hk.useEffect)(()=>{let e=(e,r)=>{var n;let o,a,s,l,u;n=!!(null==t?void 0:t.isTextInput),o=b5(null==r?void 0:r.target),a="u">typeof window?b7(null==r?void 0:r.target).HTMLInputElement:HTMLInputElement,s="u">typeof window?b7(null==r?void 0:r.target).HTMLTextAreaElement:HTMLTextAreaElement,l="u">typeof window?b7(null==r?void 0:r.target).HTMLElement:HTMLElement,u="u">typeof window?b7(null==r?void 0:r.target).KeyboardEvent:KeyboardEvent,(n=n||o.activeElement instanceof a&&!v5.has(o.activeElement.type)||o.activeElement instanceof s||o.activeElement instanceof l&&o.activeElement.isContentEditable)&&"keyboard"===e&&r instanceof u&&!vY[r.key]||(e=>{i.current.isFocusVisible=e,c()})(v6())};return vH.add(e),()=>{vH.delete(e)}},[]);let{focusProps:p}=v9({isDisabled:o,onFocusChange:d}),{focusWithinProps:f}=wr({isDisabled:!o,onFocusWithinChange:d});return{isFocused:a,isFocusVisible:l,focusProps:o?f:p}}hC().forwardRef(function(e,t){let{children:r,...n}=e,o=bw(t),i={...n,ref:o};return hC().createElement(we.Provider,{value:i},r)});let wo=!1,wi=0;function wa(e){"touch"===e.pointerType&&(wo=!0,setTimeout(()=>{wo=!1},50))}function ws(){if("u">typeof document)return"u">typeof PointerEvent&&document.addEventListener("pointerup",wa),wi++,()=>{!(--wi>0)&&"u">typeof PointerEvent&&document.removeEventListener("pointerup",wa)}}function wl(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:o}=e,[i,a]=(0,hk.useState)(!1),s=(0,hk.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,hk.useEffect)(ws,[]);let{addGlobalListener:l,removeAllGlobalListeners:u}=vk(),{hoverProps:c,triggerHoverEnd:d}=(0,hk.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),a(!1))},i={};return"u">typeof PointerEvent&&(i.onPointerEnter=n=>{wo&&"mouse"===n.pointerType||((n,i)=>{if(s.pointerType=i,o||"touch"===i||s.isHovered||!n.currentTarget.contains(n.target))return;s.isHovered=!0;let u=n.currentTarget;s.target=u,l(b5(n.target),"pointerover",t=>{s.isHovered&&s.target&&!vC(s.target,t.target)&&e(t,t.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:u,pointerType:i}),r&&r(!0),a(!0)})(n,n.pointerType)},i.onPointerLeave=t=>{!o&&t.currentTarget.contains(t.target)&&e(t,t.pointerType)}),{hoverProps:i,triggerHoverEnd:e}},[t,r,n,o,s,l,u]);return(0,hk.useEffect)(()=>{o&&d({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:c,isHovered:i}}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 wu=(0,hk.createContext)(!1);function wc(e){let t=(t,r)=>(0,hk.useContext)(wu)?null:e(t,r);return t.displayName=e.displayName||e.name,(0,hk.forwardRef)(t)}let wd=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),wp=(0,hk.createContext)({}),wf=wc(function(e,t){var r;[e,t]=bW(e,t,wp);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:i,isPressed:a}=function(e,t){let r,{elementType:n="button",isDisabled:o,onPress:i,onPressStart:a,onPressEnd:s,onPressUp:l,onPressChange:u,preventFocusOnPress:c,allowFocusWhenDisabled:d,onClick:p,href:f,target:h,rel:m,type:y="button"}=e;r="button"===n?{type:y,disabled:o}:{role:"button",href:"a"!==n||o?void 0:f,target:"a"===n?h:void 0,type:"input"===n?y:void 0,disabled:"input"===n?o:void 0,"aria-disabled":o&&"input"!==n?o:void 0,rel:"a"===n?m:void 0};let{pressProps:g,isPressed:b}=vL({onPressStart:a,onPressEnd:s,onPressChange:u,onPress:i,onPressUp:l,onClick:p,isDisabled:o,preventFocusOnPress:c,ref:t}),{focusableProps:v}=wt(e,t);d&&(v.tabIndex=o?-1:v.tabIndex);let w=bL(v,g,b0(e,{labelable:!0}));return{isPressed:b,buttonProps:bL(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}=wn(e),{hoverProps:c,isHovered:d}=wl({...e,isDisabled:e.isDisabled||o}),p={isHovered:d,isPressed:(n.isPressed||a)&&!o,isFocused:l,isFocusVisible:u,isDisabled:e.isDisabled||!1,isPending:null!=o&&o},f=bV({...e,values:p,defaultClassName:"react-aria-Button"}),h=b$(i.id),m=b$(),y=i["aria-labelledby"];o&&(y?y=`${y} ${m}`:i["aria-label"]&&(y=`${h} ${m}`));let g=(0,hk.useRef)(o);return(0,hk.useEffect)(()=>{let e={"aria-labelledby":y||h};!g.current&&l&&o?bq(e,"assertive"):g.current&&l&&!o&&bq(e,"assertive"),g.current=o},[o,l,y,h]),hC().createElement("button",{...b0(e,{propNames:wd}),...bL(i,s,c),...f,type:"submit"===i.type&&o?"button":i.type,id:h,ref:t,"aria-labelledby":y,slot:e.slot||void 0,"aria-disabled":o?"true":i["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":p.isPressed||void 0,"data-hovered":d||void 0,"data-focused":l||void 0,"data-pending":o||void 0,"data-focus-visible":u||void 0},hC().createElement(bH.Provider,{value:{id:m}},f.children))});(0,hk.createContext)(null),(0,hk.createContext)(null),(0,hk.createContext)(null),(0,hk.createContext)(null),(0,hk.createContext)(null);let wh=(0,hk.createContext)({}),wm=(0,hk.createContext)({}),wy=(0,hk.forwardRef)(function(e,t){[e,t]=bW(e,t,wm);let{elementType:r="span",...n}=e;return hC().createElement(r,{className:"react-aria-Text",...n,ref:t})}),wg=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),wb=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function wv(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 wg.has(t.script)}let t=e.split("-")[0];return wb.has(t)}let ww=Symbol.for("react-aria.i18n.locale");function w_(){let e="u">typeof window&&window[ww]||"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:wv(e)?"rtl":"ltr"}}let wx=w_(),wE=new Set;function wS(){for(let e of(wx=w_(),wE))e(wx)}function wD(){let e=bR(),[t,r]=(0,hk.useState)(wx);return((0,hk.useEffect)(()=>(0===wE.size&&window.addEventListener("languagechange",wS),wE.add(r),()=>{wE.delete(r),0===wE.size&&window.removeEventListener("languagechange",wS)}),[]),e)?{locale:"en-US",direction:"ltr"}:t}let wO=hC().createContext(null);function wP(e){let{locale:t,children:r}=e,n=wD(),o=hC().useMemo(()=>t?{locale:t,direction:wv(t)?"rtl":"ltr"}:n,[n,t]);return hC().createElement(wO.Provider,{value:o},r)}function wk(){let e=wD();return(0,hk.useContext)(wO)||e}var wC={};function wj(e,t){return e-t*Math.floor(e/t)}function wT(e,t,r,n){let o=(t=wN(e,t))-1,i=-2;return r<=2?i=0:wR(t)&&(i=-1),1721425+365*o+Math.floor(o/4)-Math.floor(o/100)+Math.floor(o/400)+Math.floor((367*r-362)/12+i+n)}function wR(e){return e%4==0&&(e%100!=0||e%400==0)}function wN(e,t){return"BC"===e?1-t:t}function wA(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}wC={"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 w$={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 wI{fromJulianDay(e){let t=e-1721426,r=Math.floor(t/146097),n=wj(t,146097),o=Math.floor(n/36524),i=wj(n,36524),a=Math.floor(i/1461),s=Math.floor(wj(i,1461)/365),[l,u]=wA(400*r+100*o+4*a+s+ +(4!==o&&4!==s)),c=e-wT(l,u,1,1),d=2;e<wT(l,u,3,1)?d=0:wR(u)&&(d=1);let p=Math.floor(((c+d)*12+373)/367),f=e-wT(l,u,p,1)+1;return new w3(l,u,p,f)}toJulianDay(e){return wT(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return w$[wR(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return wR(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 wM(e,t){let r=e.copy(),n="hour"in r?wG(r,t):0;wL(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,wF(r),wB(r),r.day+=7*(t.weeks||0),r.day+=t.days||0,r.day+=n,function(e){for(;e.day<1;)e.month--,wF(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,wF(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 i,a;let e=null==(i=(a=r.calendar).isInverseEra)?void 0:i.call(a,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 wL(e,t){var r,n;(null==(r=(n=e.calendar).isInverseEra)?void 0:r.call(n,e))&&(t=-t),e.year+=t}function wF(e){for(;e.month<1;)wL(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,wL(e,1)}function wB(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 wV(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),wB(e)}function wU(e){let t={};for(let r in e)"number"==typeof e[r]&&(t[r]=-e[r]);return t}function wW(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),wV(r),r}function wz(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),wK(r),r}function wK(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 wH(e,t){let r=e%t;return r<0&&(r+=t),r}function wG(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=wH(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=wH(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=wH(e.minute,60),r=Math.floor(e.hour/24),e.hour=wH(e.hour,24),r}function wq(e,t){let r=e.copy();return wG(r,t),r}function wZ(e,t,r,n){let o=e.copy();switch(t){case"era":{let t=e.calendar.getEras(),i=t.indexOf(e.era);if(i<0)throw Error("Invalid era: "+e.era);i=wJ(i,r,0,t.length-1,null==n?void 0:n.round),o.era=t[i],wV(o);break}case"year":var i,a;(null==(i=(a=o.calendar).isInverseEra)?void 0:i.call(a,o))&&(r=-r),o.year=wJ(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=wJ(e.month,r,1,e.calendar.getMonthsInYear(e),null==n?void 0:n.round);break;case"day":o.day=wJ(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),wV(o),o}function wY(e,t,r,n){let o=e.copy();switch(t){case"hour":{let t=e.hour,i=0,a=23;if((null==n?void 0:n.hourCycle)===12){let e=t>=12;i=12*!!e,a=e?23:11}o.hour=wJ(t,r,i,a,null==n?void 0:n.round);break}case"minute":o.minute=wJ(e.minute,r,0,59,null==n?void 0:n.round);break;case"second":o.second=wJ(e.second,r,0,59,null==n?void 0:n.round);break;case"millisecond":o.millisecond=wJ(e.millisecond,r,0,999,null==n?void 0:n.round);break;default:throw Error("Unsupported field "+t)}return o}function wJ(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 wX(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?_a(wM(_c(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):_t(e)-e.offset)+(t.milliseconds||0),r+=1e3*(t.seconds||0),r+=6e4*(t.minutes||0),_d(_l(r+=36e5*(t.hours||0),e.timeZone),e.calendar)}function wQ(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 w0(e){let t,r=_d(e,new wI);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 w1(e){return`${w0(e)}T${wQ(e)}`}function w2(e){let t,r="object"==typeof e[0]?e.shift():new wI;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 w4=new WeakMap;class w3{copy(){return this.era?new w3(this.calendar,this.era,this.year,this.month,this.day):new w3(this.calendar,this.year,this.month,this.day)}add(e){return wM(this,e)}subtract(e){return wM(this,wU(e))}set(e){return wW(this,e)}cycle(e,t,r){return wZ(this,e,t,r)}toDate(e){return _s(this,e)}toString(){return w0(this)}compare(e){return _w(this,e)}constructor(...e){vD(this,w4,{writable:!0,value:void 0});let[t,r,n,o,i]=w2(e);this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=i,wV(this)}}var w6=new WeakMap;class w5{copy(){return new w5(this.hour,this.minute,this.second,this.millisecond)}add(e){return wq(this,e)}subtract(e){return wq(this,wU(e))}set(e){return wz(this,e)}cycle(e,t,r){return wY(this,e,t,r)}toString(){return wQ(this)}compare(e){var t,r;return t=this,r=e,__(t)-__(r)}constructor(e=0,t=0,r=0,n=0){vD(this,w6,{writable:!0,value:void 0}),this.hour=e,this.minute=t,this.second=r,this.millisecond=n,wK(this)}}var w7=new WeakMap;class w9{copy(){return this.era?new w9(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new w9(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return wM(this,e)}subtract(e){return wM(this,wU(e))}set(e){return wW(wz(this,e),e)}cycle(e,t,r){switch(e){case"era":case"year":case"month":case"day":return wZ(this,e,t,r);default:return wY(this,e,t,r)}}toDate(e,t){return _s(this,e,t)}toString(){return w1(this)}compare(e){var t,r;let n=_w(this,e);return 0===n?(t=this,r=_c(e),__(t)-__(r)):n}constructor(...e){vD(this,w7,{writable:!0,value:void 0});let[t,r,n,o,i]=w2(e);this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=i,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,wV(this)}}var w8=new WeakMap;class _e{copy(){return this.era?new _e(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new _e(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return wX(this,e)}subtract(e){return wX(this,wU(e))}set(e,t){let r,n;return 0===(n=wz(wW(r=_c(this),e),e)).compare(r)?this:_d(_l(_a(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 i=_c(e),a=_d(wz(i,{hour:t}),new wI),s=[_a(a,e.timeZone,"earlier"),_a(a,e.timeZone,"later")].filter(t=>_l(t,e.timeZone).day===a.day)[0],l=_d(wz(i,{hour:o}),new wI),u=[_a(l,e.timeZone,"earlier"),_a(l,e.timeZone,"later")].filter(t=>_l(t,e.timeZone).day===l.day).pop(),c=_t(e)-e.offset,d=Math.floor(c/36e5),p=c%36e5;return _d(_l(c=36e5*wJ(d,r,Math.floor(s/36e5),Math.floor(u/36e5),null==n?void 0:n.round)+p,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return wY(e,t,r,n);case"era":case"year":case"month":case"day":return _d(_l(_a(wZ(_c(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(_t(e)-e.offset)}toString(){var e;let t,r,n;return`${w1(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 _e){var r,n;return e.timeZone===t?e:(r=e,n=t,_d(_l(_t(r)-r.offset,n),r.calendar))}return _l(_a(e,t,void 0),t)})(e,this.timeZone).toDate().getTime()}constructor(...e){vD(this,w8,{writable:!0,value:void 0});let[t,r,n,o,i]=w2(e),a=e.shift(),s=e.shift();this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=i,this.timeZone=a,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,wV(this)}}function _t(e){return _r(wN((e=_d(e,new wI)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function _r(e,t,r,n,o,i,a){let s=new Date;return s.setUTCHours(n,o,i,a),s.setUTCFullYear(e,t-1,r),s.getTime()}function _n(e,t){if("UTC"===t)return 0;if(e>0&&t===_E())return -6e4*new Date(e).getTimezoneOffset();let{year:r,month:n,day:o,hour:i,minute:a,second:s}=_i(e,t);return _r(r,n,o,i,a,s,0)-1e3*Math.floor(e/1e3)}let _o=new Map;function _i(e,t){let r=_o.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"}),_o.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 _a(e,t,r="compatible"){var n,o,i;let a=_c(e);if("UTC"===t)return _t(a);if(t===_E()&&"compatible"===r){a=_d(a,new wI);let e=new Date,t=wN(a.era,a.year);return e.setFullYear(t,a.month-1,a.day),e.setHours(a.hour,a.minute,a.second,a.millisecond),e.getTime()}let s=_t(a),l=_n(s-864e5,t),u=_n(s+864e5,t),c=(n=a,((o=s-l)==(i=s-u)?[o]:[o,i]).filter(e=>{var r;let o;return r=n,o=_i(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 _s(e,t,r="compatible"){return new Date(_a(e,t,r))}function _l(e,t){let r=_n(e,t),n=new Date(e+r),o=n.getUTCFullYear();return new _e(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 _u(e){return new w3(e.calendar,e.era,e.year,e.month,e.day)}function _c(e,t){let r=0,n=0,o=0,i=0;if("timeZone"in e)({hour:r,minute:n,second:o,millisecond:i}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:o,millisecond:i}=t),new w9(e.calendar,e.era,e.year,e.month,e.day,r,n,o,i)}function _d(e,t){if(_m(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,wV(n),n}let _p={"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 _f(e,t){return t=_d(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function _h(e,t){return _m(e.calendar,t.calendar)&&_f(e,t)}function _m(e,t){var r,n,o,i;return null!=(i=null!=(o=null==(r=e.isEqual)?void 0:r.call(e,t))?o:null==(n=t.isEqual)?void 0:n.call(t,e))?i:e.identifier===t.identifier}let _y={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function _g(e,t,r){let n,o=Math.ceil(e.calendar.toJulianDay(e)+1-(r?_y[r]:(n=function(e){if(Intl.Locale){let t=_P.get(e);return!t&&(t=new Intl.Locale(e).maximize().region)&&_P.set(e,t),t}let t=e.split("-")[1];return"u"===t?void 0:t}(t))&&_p[n]||0))%7;return o<0&&(o+=7),o}function _b(e){return _l(Date.now(),e)}function _v(e){return _u(_b(e))}function _w(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function __(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let _x=null;function _E(){return null==_x&&(_x=new Intl.DateTimeFormat().resolvedOptions().timeZone),_x}function _S(e){return e.subtract({days:e.day-1})}function _D(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function _O(e,t,r){let n=_g(e,t,r);return e.subtract({days:n})}let _P=new Map;function _k(e,t){return e&&t?0>=e.compare(t)?e:t:e||t}function _C(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}let _j=Symbol.for("react-aria.i18n.locale"),_T=Symbol.for("react-aria.i18n.strings");class _R{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[_j];if(void 0===h){let e=window[_T];if(!e)return null;for(let r in h={},e)h[r]=new _R({[t]:e[r]},t)}let r=null==h?void 0:h[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 _N=new Map,_A=new Map;class _${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,i=_N.get(o);return i||(i=new Intl.PluralRules(this.locale,{type:r}),_N.set(o,i)),"function"==typeof(n=t[i.select(e)]||t.other)?n():n}number(e){let t=_A.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),_A.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 _I=new WeakMap;function _M(e,t){let r;return t&&_R.getGlobalDictionaryForPackage(t)||((r=_I.get(e))||(r=new _R(e),_I.set(e,r)),r)}function _L(e,t){let{locale:r}=wk(),n=_M(e,t);return(0,hk.useMemo)(()=>new _$(r,n),[r,n])}let _F=new Map;class _B{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==_z&&(_z="h12"===new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle),_z&&(this.resolvedHourCycle||(this.resolvedHourCycle=function(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,"");let r=_U(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=_U(e,t),this.options=t}}let _V={true:{ja:"h11"},false:{}};function _U(e,t={}){if("boolean"==typeof t.hour12&&(null==_W&&(_W="24"===new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))),_W)){let r=_V[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(_F.has(r))return _F.get(r);let n=new Intl.DateTimeFormat(e,t);return _F.set(r,n),n}let _W=null,_z=null;function _K(e,t){let r=(0,hk.useRef)(null);return e&&r.current&&t(e,r.current)&&(e=r.current),r.current=e,e}function _H(e){e=_K(null!=e?e:{},_G);let{locale:t}=wk();return(0,hk.useMemo)(()=>new _B(t,e),[t,e])}function _G(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 _q(e){return e&&e.__esModule?e.default:e}let _Z=new WeakMap;function _Y(e){return(null==e?void 0:e.calendar.identifier)==="gregory"&&"BC"===e.era?"short":void 0}function _J(e,t,r,n){let o=_L(_q(wC),"@react-aria/calendar"),i=_Y(e)||_Y(t),a=_H({month:"long",year:"numeric",era:i,calendar:e.calendar.identifier,timeZone:r}),s=_H({month:"long",year:"numeric",day:"numeric",era:i,calendar:e.calendar.identifier,timeZone:r});return(0,hk.useMemo)(()=>{if(_f(e,_S(e))){let i=e,s=t;if(e.calendar.getFormattableMonth&&(i=e.calendar.getFormattableMonth(e)),t.calendar.getFormattableMonth&&(s=t.calendar.getFormattableMonth(t)),_f(t,_D(e)))return a.format(i.toDate(r));if(_f(t,_D(t)))return n?_X(a,o,i,s,r):a.formatRange(i.toDate(r),s.toDate(r))}return n?_X(s,o,e,t,r):s.formatRange(e.toDate(r),t.toDate(r))},[e,t,a,s,o,r,n])}function _X(e,t,r,n,o){let i=e.formatRangeToParts(r.toDate(o),n.toDate(o)),a=-1;for(let e=0;e<i.length;e++){let t=i[e];if("shared"===t.source&&"literal"===t.type)a=e;else if("endRange"===t.source)break}let s="",l="";for(let e=0;e<i.length;e++)e<a?s+=i[e].value:e>a&&(l+=i[e].value);return t.format("dateRange",{startDate:s,endDate:l})}function _Q(e,t){let r=(0,hk.useRef)(!0),n=(0,hk.useRef)(null);(0,hk.useEffect)(()=>(r.current=!0,()=>{r.current=!1}),[]),(0,hk.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 _0(e,t){let{id:r,"aria-label":n,"aria-labelledby":o}=e;return r=b$(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 _1(e,t){var r,n;let o,i,a,s,l,u=_L((r=wC)&&r.__esModule?r.default:r,"@react-aria/calendar"),c=b0(e),d=_J(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),p=_J(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);_Q(()=>{t.isFocused||bq(p)},[p]);let f=(a=_L(_q(wC),"@react-aria/calendar"),"highlightedRange"in t?{start:o,end:i}=t.highlightedRange||{}:o=i=null!=(n=t.value)?n:void 0,s=_H({weekday:"long",month:"long",year:"numeric",day:"numeric",era:_Y(o)||_Y(i),timeZone:t.timeZone}),l="anchorDate"in t?t.anchorDate:null,(0,hk.useMemo)(()=>{if(!l&&o&&i)if(_f(o,i)){let e=s.format(o.toDate(t.timeZone));return a.format("selectedDateDescription",{date:e})}else{let e=_X(s,a,o,i,t.timeZone);return a.format("selectedRangeDescription",{dateRange:e})}return""},[o,i,l,t.timeZone,a,s]));_Q(()=>{f&&bq(f,"polite",4e3)},[f]);let h=bI([!!e.errorMessage,e.isInvalid,e.validationState]);_Z.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:h,selectedDateDescription:f});let[m,y]=(0,hk.useState)(!1),g=e.isDisabled||t.isNextVisibleRangeInvalid();g&&m&&(y(!1),t.setFocused(!0));let[b,v]=(0,hk.useState)(!1),w=e.isDisabled||t.isPreviousVisibleRangeInvalid();return w&&b&&(v(!1),t.setFocused(!0)),{calendarProps:bL(c,_0({id:e.id,"aria-label":[e["aria-label"],p].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:g,onFocusChange:y},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":u.format("previous"),isDisabled:w,onFocusChange:v},errorMessageProps:{id:h},title:d}}let _2={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 _4(e){let{children:t,elementType:r="div",isFocusable:n,style:o,...i}=e,{visuallyHiddenProps:a}=function(e={}){let{style:t,isFocusable:r}=e,[n,o]=(0,hk.useState)(!1),{focusWithinProps:i}=wr({isDisabled:!r,onFocusWithinChange:e=>o(e)}),a=(0,hk.useMemo)(()=>n?t:t?{..._2,...t}:_2,[n]);return{visuallyHiddenProps:{...i,style:a}}}(e);return hC().createElement(r,bL(i,a),t)}function _3(e,t,r,n){let o=bE(r),i=null==r;(0,hk.useEffect)(()=>{if(i||!e.current)return;let r=e.current;return r.addEventListener(t,o,n),()=>{r.removeEventListener(t,o,n)}},[e,t,n,i,o])}let _6=0,_5=new Map;function _7(e){let[t,r]=(0,hk.useState)();return bx(()=>{if(!e)return;let t=_5.get(e);if(t)r(t.element.id);else{let n=`react-aria-description-${_6++}`;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},_5.set(e,t)}return t.refCount++,()=>{t&&0==--t.refCount&&(t.element.remove(),_5.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function _9(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 _8(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 xe(e,t){if(e&&document.contains(e)){let a=document.scrollingElement||document.documentElement;if("hidden"===window.getComputedStyle(a).overflow)for(let t of function(e){let t=[];for(;e&&e!==document.documentElement;)_9(e,void 0)&&t.push(e),e=e.parentElement;return t}(e))!function(e,t){let r=_8(e,t,"left"),n=_8(e,t,"top"),o=t.offsetWidth,i=t.offsetHeight,a=e.scrollLeft,s=e.scrollTop,{borderTopWidth:l,borderLeftWidth:u,scrollPaddingTop:c,scrollPaddingRight:d,scrollPaddingBottom:p,scrollPaddingLeft:f}=getComputedStyle(e),h=a+parseInt(u,10),m=s+parseInt(l,10),y=h+e.clientWidth,g=m+e.clientHeight,b=parseInt(c,10)||0,v=parseInt(p,10)||0,w=parseInt(d,10)||0,x=parseInt(f,10)||0;r<=a+x?a=r-parseInt(u,10)-x:r+o>y-w&&(a+=r+o-y+w),n<=m+b?s=n-parseInt(l,10)-b:n+i>g-v&&(s+=n+i-g+v),e.scrollLeft=a,e.scrollTop=s}(t,e);else{var r,n,o,i;let{left:a,top:s}=e.getBoundingClientRect();null==e||null==(r=e.scrollIntoView)||r.call(e,{block:"nearest"});let{left:l,top:u}=e.getBoundingClientRect();(Math.abs(a-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==(i=e.scrollIntoView)||i.call(e,{block:"nearest"}))}}}function xt(e,t){let r=e;for(_9(r,t)&&(r=r.parentElement);r&&!_9(r,t);)r=r.parentElement;return r||document.scrollingElement||document.documentElement}class xr extends wI{fromJulianDay(e){let t=super.fromJulianDay(e);return new w3(this,wN(t.era,t.year)- -543,t.month,t.day)}toJulianDay(e){return super.toJulianDay(xn(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(xn(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function xn(e){let[t,r]=wA(e.year+-543);return new w3(t,r,e.month,e.day)}function xo(e,t,r,n){return e+365*t+Math.floor(t/4)+30*(r-1)+n-1}function xi(e,t){let r=Math.floor(4*(t-e)/1461),n=1+Math.floor((t-xo(e,r,1,1))/30),o=t+1-xo(e,r,n,1);return[r,n,o]}function xa(e){return Math.floor(e%4/3)}function xs(e,t){return t%13!=0?30:xa(e)+5}class xl{fromJulianDay(e){let[t,r,n]=xi(1723856,e),o="AM";return t<=0&&(o="AA",t+=5500),new w3(this,o,t,r,n)}toJulianDay(e){let t=e.year;return"AA"===e.era&&(t-=5500),xo(1723856,t,e.month,e.day)}getDaysInMonth(e){return xs(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+xa(e.year)}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class xu extends xl{fromJulianDay(e){let[t,r,n]=xi(1723856,e);return new w3(this,"AA",t+=5500,r,n)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class xc extends xl{fromJulianDay(e){let[t,r,n]=xi(1824665,e),o="CE";return t<=0&&(o="BCE",t=1-t),new w3(this,o,t,r,n)}toJulianDay(e){let t=e.year;return"BCE"===e.era&&(t=1-t),xo(1824665,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return"BCE"===e.era&&(t=1-t),xs(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 xd=765433;function xp(e){return 7>wj(7*e+1,19)}function xf(e){let t=Math.floor((235*e-234)/19),r=29*t+Math.floor((12084+13753*t)/25920);return 3>wj(3*(r+1),7)&&(r+=1),r}function xh(e){let t,r;return xf(e)+(t=xf(e-1),r=xf(e),xf(e+1)-r==356?2:+(r-t==382))}function xm(e){return xh(e+1)-xh(e)}function xy(e,t){if(t>=6&&!xp(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;let r=function(e){let t=xm(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*!!xp(e):30}class xg{fromJulianDay(e){let t=e-347997,r=Math.floor((25920*t/xd*19+234)/235)+1,n=xh(r),o=Math.floor(t-n);for(;o<1;)o=Math.floor(t-(n=xh(--r)));let i=1,a=0;for(;a<o;)a+=xy(r,i),i++;let s=o-(a-=xy(r,--i));return new w3(this,r,i,s)}toJulianDay(e){let t=xh(e.year);for(let r=1;r<e.month;r++)t+=xy(e.year,r);return t+e.day+347997}getDaysInMonth(e){return xy(e.year,e.month)}getMonthsInYear(e){return xp(e.year)?13:12}getDaysInYear(e){return xm(e.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,t){t.year!==e.year&&(xp(t.year)&&!xp(e.year)&&t.month>6?e.month--:!xp(t.year)&&xp(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class xb extends wI{fromJulianDay(e){let t,r,n,o=super.fromJulianDay(e),i=o.year-78,a=e-wT(o.era,o.year,1,1);if(a<80?(i--,a+=(t=wR(o.year-1)?31:30)+155+90+10):(t=wR(o.year)?31:30,a-=80),a<t)r=1,n=a+1;else{let e=a-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 w3(this,i,r,n)}toJulianDay(e){let t,r,[n,o]=wA(e.year+78);return(wR(o)?(t=31,r=wT(n,o,3,21)):(t=30,r=wT(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&&wR(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 xv(e,t,r,n){return n+Math.ceil(29.5*(r-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function xw(e,t,r){let n=Math.floor((30*(r-t)+10646)/10631),o=Math.min(12,Math.ceil((r-(29+xv(t,n,1,1)))/29.5)+1),i=r-xv(t,n,o,1)+1;return new w3(e,n,o,i)}function x_(e){return(14+11*e)%30<11}class xx{fromJulianDay(e){return xw(this,1948440,e)}toJulianDay(e){return xv(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return 12===e.month&&x_(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return x_(e.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class xE extends xx{fromJulianDay(e){return xw(this,1948439,e)}toJulianDay(e){return xv(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function xS(e){return 460322+c[e-1300]}function xD(e,t){return(u[e-1300]&1<<11-(t-1))==0?29:30}function xO(e,t){let r=xS(e);for(let n=1;n<t;n++)r+=xD(e,n);return r}function xP(e){return c[e+1-1300]-c[e-1300]}class xk extends xx{fromJulianDay(e){let t=e-1948440,r=xS(1300),n=xS(1600);if(t<r||t>n)return super.fromJulianDay(e);{let e=1299,r=1,n=1;for(;n>0;){n=t-xS(++e)+1;let o=xP(e);if(n===o){r=12;break}if(n<o){let t=xD(e,r);for(r=1;n>t;)n-=t,t=xD(e,++r);break}}return new w3(this,e,r,t-xO(e,r)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+xO(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):xD(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):xP(e.year)}constructor(){if(super(),this.identifier="islamic-umalqura",u||(u=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),e=>e.charCodeAt(0)).buffer)),!c){c=new Uint32Array(301);let e=0;for(let t=1300;t<=1600;t++){c[t-1300]=e;for(let r=1;r<=12;r++)e+=xD(t,r)}}}}let xC=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],xj=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],xT=[1867,1911,1925,1988,2018],xR=["meiji","taisho","showa","heisei","reiwa"];function xN(e){let t=xC.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?xC.length-1:0===t?0:t-1}function xA(e){let t=xT[xR.indexOf(e.era)];if(!t)throw Error("Unknown era: "+e.era);return new w3(e.year+t,e.month,e.day)}class x$ extends wI{fromJulianDay(e){let t=super.fromJulianDay(e),r=xN(t);return new w3(this,xR[r],t.year-xT[r],t.month,t.day)}toJulianDay(e){return super.toJulianDay(xA(e))}balanceDate(e){let t=xA(e),r=xN(t);xR[r]!==e.era&&(e.era=xR[r],e.year=t.year-xT[r]),this.constrainDate(e)}constrainDate(e){let t=xR.indexOf(e.era),r=xj[t];if(null!=r){let[n,o,i]=r,a=n-xT[t];e.year=Math.max(1,Math.min(a,e.year)),e.year===a&&(e.month=Math.min(o,e.month),e.month===o&&(e.day=Math.min(i,e.day)))}if(1===e.year&&t>=0){let[,r,n]=xC[t];e.month=Math.max(r,e.month),e.month===r&&(e.day=Math.max(n,e.day))}}getEras(){return xR}getYearsInEra(e){let t=xR.indexOf(e.era),r=xC[t],n=xC[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(xA(e))}getMinimumMonthInYear(e){let t=xI(e);return t?t[1]:1}getMinimumDayInMonth(e){let t=xI(e);return t&&e.month===t[1]?t[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function xI(e){if(1===e.year)return xC[xR.indexOf(e.era)]}let xM=[0,31,62,93,124,155,186,216,246,276,306,336];class xL{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),i=n-xM[o]+1;return new w3(this,r,o+1,i)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=xM[e.month-1],t+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>wj(25*e.year+11,33)?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function xF(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function xB(e){let t=e-1911;return t>0?["minguo",t]:["before_minguo",1-t]}class xV extends wI{fromJulianDay(e){let t=super.fromJulianDay(e),[r,n]=xB(wN(t.era,t.year));return new w3(this,r,n,t.month,t.day)}toJulianDay(e){return super.toJulianDay(xU(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[t,r]=xB(xF(e));e.era=t,e.year=r}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(xU(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function xU(e){let[t,r]=wA(xF(e));return new w3(t,r,e.month,e.day)}function xW(e){switch(e){case"buddhist":return new xr;case"ethiopic":return new xl;case"ethioaa":return new xu;case"coptic":return new xc;case"hebrew":return new xg;case"indian":return new xb;case"islamic-civil":return new xx;case"islamic-tbla":return new xE;case"islamic-umalqura":return new xk;case"japanese":return new x$;case"persian":return new xL;case"roc":return new xV;default:return new wI}}function xz(e,t,r){return null!=t&&0>e.compare(t)||null!=r&&e.compare(r)>0}function xK(e,t,r,n,o){let i={};for(let e in t)i[e]=Math.floor(t[e]/2),i[e]>0&&t[e]%2==0&&i[e]--;let a=xH(e,t,r).subtract(i);return xq(e,a,t,r,n,o)}function xH(e,t,r,n,o){let i=e;if(t.years)i=_S(e.subtract({months:e.month-1}));else t.months?i=_S(e):t.weeks&&(i=_O(e,r));return xq(e,i,t,r,n,o)}function xG(e,t,r,n,o){let i={...t};i.days?i.days--:i.weeks?i.weeks--:i.months?i.months--:i.years&&i.years--;let a=xH(e,t,r).subtract(i);return xq(e,a,t,r,n,o)}function xq(e,t,r,n,o,i){if(o&&e.compare(o)>=0){let e=_C(t,xH(_u(o),r,n));e&&(t=e)}if(i&&0>=e.compare(i)){let e=_k(t,xG(_u(i),r,n));e&&(t=e)}return t}function xZ(e,t,r){if(t){let r=_C(e,_u(t));r&&(e=r)}if(r){let t=_k(e,_u(r));t&&(e=t)}return e}function xY(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 xJ(e,t,r){let[n,o]=(0,hk.useState)(e||t),i=(0,hk.useRef)(void 0!==e),a=void 0!==e;(0,hk.useEffect)(()=>{i.current,i.current=a},[a]);let s=a?e:n,l=(0,hk.useCallback)((e,...t)=>{let n=(e,...t)=>{r&&!Object.is(s,e)&&r(e,...t),a||(s=e)};"function"==typeof e?o((r,...o)=>{let i=e(a?s:r,...o);return(n(i,...t),a)?r:i}):(a||o(e),n(e,...t))},[a,s,r]);return[s,l]}function xX(e){var t,r,n;let o=(0,hk.useMemo)(()=>new _B(e.locale),[e.locale]),i=(0,hk.useMemo)(()=>o.resolvedOptions(),[o]),{locale:a,createCalendar:s,visibleDuration:l={months:1},minValue:u,maxValue:c,selectionAlignment:d,isDateUnavailable:p,pageBehavior:f="visible",firstDayOfWeek:h}=e,m=(0,hk.useMemo)(()=>s(i.calendar),[s,i.calendar]),[y,g]=xJ(e.value,null!=(t=e.defaultValue)?t:null,e.onChange),b=(0,hk.useMemo)(()=>y?_d(_u(y),m):null,[y,m]),v=(0,hk.useMemo)(()=>y&&"timeZone"in y?y.timeZone:i.timeZone,[y,i.timeZone]),[w,x]=xJ((0,hk.useMemo)(()=>e.focusedValue?xZ(_d(_u(e.focusedValue),m),u,c):void 0,[e.focusedValue,m,u,c]),(0,hk.useMemo)(()=>xZ(e.defaultFocusedValue?_d(_u(e.defaultFocusedValue),m):b||_d(_v(v),m),u,c),[e.defaultFocusedValue,b,v,m,u,c]),e.onFocusChange),[E,S]=(0,hk.useState)(()=>{switch(d){case"start":return xH(w,l,a,u,c);case"end":return xG(w,l,a,u,c);default:return xK(w,l,a,u,c)}}),[D,O]=(0,hk.useState)(e.autoFocus||!1),P=(0,hk.useMemo)(()=>{let e={...l};return e.days?e.days--:e.days=-1,E.add(e)},[E,l]),[k,C]=(0,hk.useState)(m);if(!_m(m,k)){let e=_d(w,m);S(xK(e,l,a,u,c)),x(e),C(m)}function j(e){x(e=xZ(e,u,c))}function T(t){if(!e.isDisabled&&!e.isReadOnly){let e=t;if(null===e)return void g(null);(e=xY(e=xZ(e,u,c),E,p))&&(e=_d(e,(null==y?void 0:y.calendar)||new wI),y&&"hour"in y?g(y.set(e)):g(e))}}xz(w,u,c)?x(xZ(w,u,c)):0>w.compare(E)?S(xG(w,l,a,u,c)):w.compare(P)>0&&S(xH(w,l,a,u,c));let R=(0,hk.useMemo)(()=>!!b&&(!!(p&&p(b))||xz(b,u,c)),[b,p,u,c]),N=e.isInvalid||"invalid"===e.validationState||R,A=(0,hk.useMemo)(()=>"visible"===f?l:xQ(l),[f,l]);return{isDisabled:null!=(r=e.isDisabled)&&r,isReadOnly:null!=(n=e.isReadOnly)&&n,value:b,setValue:T,visibleRange:{start:E,end:P},minValue:u,maxValue:c,focusedDate:w,timeZone:v,validationState:N?"invalid":null,isValueInvalid:N,setFocusedDate(e){j(e),O(!0)},focusNextDay(){j(w.add({days:1}))},focusPreviousDay(){j(w.subtract({days:1}))},focusNextRow(){l.days?this.focusNextPage():(l.weeks||l.months||l.years)&&j(w.add({weeks:1}))},focusPreviousRow(){l.days?this.focusPreviousPage():(l.weeks||l.months||l.years)&&j(w.subtract({weeks:1}))},focusNextPage(){let e=E.add(A);x(xZ(w.add(A),u,c)),S(xH(xq(w,e,A,a,u,c),A,a))},focusPreviousPage(){let e=E.subtract(A);x(xZ(w.subtract(A),u,c)),S(xH(xq(w,e,A,a,u,c),A,a))},focusSectionStart(){l.days?j(E):l.weeks?j(_O(w,a)):(l.months||l.years)&&j(_S(w))},focusSectionEnd(){l.days?j(P):l.weeks?j(_O(w,a,void 0).add({days:6})):(l.months||l.years)&&j(_D(w))},focusNextSection(e){e||l.days?l.days?this.focusNextPage():l.weeks?j(w.add({months:1})):(l.months||l.years)&&j(w.add({years:1})):j(w.add(xQ(l)))},focusPreviousSection(e){e||l.days?l.days?this.focusPreviousPage():l.weeks?j(w.subtract({months:1})):(l.months||l.years)&&j(w.subtract({years:1})):j(w.subtract(xQ(l)))},selectFocusedDate(){p&&p(w)||T(w)},selectDate(e){T(e)},isFocused:D,setFocused:O,isInvalid:e=>xz(e,u,c),isSelected(e){return null!=b&&_f(e,b)&&!this.isCellDisabled(e)&&!this.isCellUnavailable(e)},isCellFocused:e=>D&&w&&_f(e,w),isCellDisabled(t){return e.isDisabled||0>t.compare(E)||t.compare(P)>0||this.isInvalid(t)},isCellUnavailable:t=>!!e.isDateUnavailable&&e.isDateUnavailable(t),isPreviousVisibleRangeInvalid(){let e=E.subtract({days:1});return _f(e,E)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=P.add({days:1});return _f(e,P)||this.isInvalid(e)},getDatesInWeek(e,t=E){let r=t.add({weeks:e}),n=[],o=_g(r=_O(r,a,h),a,h);for(let e=0;e<o;e++)n.push(null);for(;n.length<7;){n.push(r);let e=r.add({days:1});if(_f(r,e))break;r=e}for(;n.length<7;)n.push(null);return n}}}function xQ(e){let t={...e};for(let r in e)t[r]=1;return t}function x0(e,t){return e&&t?(0>t.compare(e)&&([e,t]=[t,e]),{start:_u(e),end:_u(t)}):null}function x1(e,t){return(e=_d(e,(null==t?void 0:t.calendar)||new wI),t&&"hour"in t)?t.set(e):e}function x2(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 x4=(0,hk.createContext)(null),x3=(0,hk.createContext)(null),x6=(0,hk.createContext)(null),x5=(0,hk.createContext)(null),x7=(0,hk.forwardRef)(function(e,t){[e,t]=bW(e,t,x4);let{locale:r}=wk(),n=xX({...e,locale:r,createCalendar:e.createCalendar||xW}),{calendarProps:o,prevButtonProps:i,nextButtonProps:a,errorMessageProps:s,title:l}=_1(e,n),u=bV({...e,values:{state:n,isDisabled:e.isDisabled||!1,isInvalid:n.isValueInvalid},defaultClassName:"react-aria-Calendar"});return hC().createElement("div",{...u,...o,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":n.isValueInvalid||void 0},hC().createElement(bB,{values:[[wp,{slots:{previous:i,next:a}}],[wh,{"aria-hidden":!0,level:2,children:l}],[x6,n],[x4,e],[wm,{slots:{errorMessage:s}}]]},hC().createElement(_4,null,hC().createElement("h2",null,o["aria-label"])),u.children,hC().createElement(_4,null,hC().createElement("button",{"aria-label":a["aria-label"],disabled:a.isDisabled,onClick:()=>n.focusNextPage(),tabIndex:-1}))))}),x9=(0,hk.forwardRef)(function(e,t){var r,n;let o,i,a;[e,t]=bW(e,t,x3);let{locale:s}=wk(),l=function(e){let{value:t,defaultValue:r,onChange:n,createCalendar:o,locale:i,visibleDuration:a={months:1},minValue:s,maxValue:l,...u}=e,[c,d]=xJ(t,r||null,n),[p,f]=(0,hk.useState)(null),h="center";if(c&&c.start&&c.end){let e=xK(_u(c.start),a,i,s,l).add(a).subtract({days:1});c.end.compare(e)>0&&(h="start")}let m=(0,hk.useRef)(null),[y,g]=(0,hk.useState)(null),b=(0,hk.useMemo)(()=>_C(s,null==y?void 0:y.start),[s,y]),v=(0,hk.useMemo)(()=>_k(l,null==y?void 0:y.end),[l,y]),w=xX({...u,value:c&&c.start,createCalendar:o,locale:i,visibleDuration:a,minValue:b,maxValue:v,selectionAlignment:h}),x=t=>{t&&e.isDateUnavailable&&!e.allowsNonContiguousRanges?(m.current={start:x2(t,w,-1),end:x2(t,w,1)},g(m.current)):(m.current=null,g(null))},[E,S]=(0,hk.useState)(w.visibleRange);_h(w.visibleRange.start,E.start)&&_h(w.visibleRange.end,E.end)||(x(p),S(w.visibleRange));let D=e=>{e?(f(e),x(e)):(f(null),x(null))},O=p?x0(p,w.focusedDate):c&&x0(c.start,c.end),P=t=>{if(e.isReadOnly)return;let r=xY(xZ(t,b,v),w.visibleRange.start,e.isDateUnavailable);if(r)if(p){let e=x0(p,r);e&&d({start:x1(e.start,null==c?void 0:c.start),end:x1(e.end,null==c?void 0:c.end)}),D(null)}else D(r)},[k,C]=(0,hk.useState)(!1),{isDateUnavailable:j}=e,T=(0,hk.useMemo)(()=>!!c&&!p&&(!!(j&&(j(c.start)||j(c.end)))||xz(c.start,s,l)||xz(c.end,s,l)),[j,c,p,s,l]),R=e.isInvalid||"invalid"===e.validationState||T;return{...w,value:c,setValue:d,anchorDate:p,setAnchorDate:D,highlightedRange:O,validationState:R?"invalid":null,isValueInvalid:R,selectFocusedDate(){P(w.focusedDate)},selectDate:P,highlightDate(e){p&&w.setFocusedDate(e)},isSelected:e=>!!(O&&e.compare(O.start)>=0&&0>=e.compare(O.end)&&!w.isCellDisabled(e)&&!w.isCellUnavailable(e)),isInvalid(e){var t,r;return w.isInvalid(e)||xz(e,null==(t=m.current)?void 0:t.start,null==(r=m.current)?void 0:r.end)},isDragging:k,setDragging:C}}({...e,locale:s,createCalendar:e.createCalendar||xW}),{calendarProps:u,prevButtonProps:c,nextButtonProps:d,errorMessageProps:p,title:f}=(r=e,n=t,o=_1(r,l),i=(0,hk.useRef)(!1),_3(a=(0,hk.useRef)("u">typeof window?window:null),"pointerdown",e=>{i.current=0===e.width&&0===e.height}),_3(a,"pointerup",e=>{if(i.current){i.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())},_3(n,"touchmove",e=>{l.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),o),h=bV({...e,values:{state:l,isDisabled:e.isDisabled||!1,isInvalid:l.isValueInvalid},defaultClassName:"react-aria-RangeCalendar"});return hC().createElement("div",{...h,...u,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":l.isValueInvalid||void 0},hC().createElement(bB,{values:[[wp,{slots:{previous:c,next:d}}],[wh,{"aria-hidden":!0,level:2,children:f}],[x5,l],[x3,e],[wm,{slots:{errorMessage:p}}]]},hC().createElement(_4,null,hC().createElement("h2",null,u["aria-label"])),h.children,hC().createElement(_4,null,hC().createElement("button",{"aria-label":d["aria-label"],disabled:d.isDisabled,onClick:()=>l.focusNextPage(),tabIndex:-1}))))}),x8=(0,hk.createContext)(null),Ee=(0,hk.forwardRef)(function(e,t){var r,n;let o=(0,hk.useContext)(x6),i=(0,hk.useContext)(x5),a=bU(x4),s=bU(x3),l=null!=o?o:i,u=l.visibleRange.start;e.offset&&(u=u.add(e.offset));let c=null!=(r=null==a?void 0:a.firstDayOfWeek)?r:null==s?void 0:s.firstDayOfWeek,{gridProps:d,headerProps:p,weekDays:f,weeksInMonth:h}=function(e,t){let r,{startDate:n=t.visibleRange.start,endDate:o=t.visibleRange.end,firstDayOfWeek:i}=e,{direction:a}=wk(),s=_J(n,o,t.timeZone,!0),{ariaLabel:l,ariaLabelledBy:u}=_Z.get(t),c=_0({"aria-label":[l,s].filter(Boolean).join(", "),"aria-labelledby":u}),d=_H({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:p}=wk(),f=(0,hk.useMemo)(()=>{let e=_O(_v(t.timeZone),p,i);return[...Array(7).keys()].map(r=>{let n=e.add({days:r}).toDate(t.timeZone);return d.format(n)})},[p,t.timeZone,d,i]),h=(r=n.calendar.getDaysInMonth(n),Math.ceil((_g(_S(n),p,i)+r)/7));return{gridProps:bL(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"===a?t.focusNextDay():t.focusPreviousDay();break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),t.focusPreviousRow();break;case"ArrowRight":e.preventDefault(),e.stopPropagation(),"rtl"===a?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:f,weeksInMonth:h}}({startDate:u,endDate:_D(u),weekdayStyle:e.weekdayStyle,firstDayOfWeek:c},l);return hC().createElement(x8.Provider,{value:{headerProps:p,weekDays:f,startDate:u,weeksInMonth:h}},hC().createElement("table",{...b0(e),...d,ref:t,style:e.style,className:null!=(n=e.className)?n:"react-aria-CalendarGrid"},"function"!=typeof e.children?e.children:hC().createElement(hC().Fragment,null,hC().createElement(Et,null,e=>hC().createElement(Er,null,e)),hC().createElement(En,null,e.children))))}),Et=(0,hk.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e,{headerProps:i,weekDays:a}=(0,hk.useContext)(x8);return hC().createElement("thead",{...b0(e),...i,ref:t,style:n,className:o||"react-aria-CalendarGridHeader"},hC().createElement("tr",null,a.map((e,t)=>hC().cloneElement(r(e),{key:t}))))}),Er=(0,hk.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e;return hC().createElement("th",{...b0(e),ref:t,style:n,className:o||"react-aria-CalendarHeaderCell"},r)}),En=(0,hk.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e,i=(0,hk.useContext)(x6),a=(0,hk.useContext)(x5),s=null!=i?i:a,{startDate:l,weeksInMonth:u}=(0,hk.useContext)(x8);return hC().createElement("tbody",{...b0(e),ref:t,style:n,className:o||"react-aria-CalendarGridBody"},[...Array(u).keys()].map(e=>hC().createElement("tr",{key:e},s.getDatesInWeek(e,l).map((e,t)=>e?hC().cloneElement(r(e),{key:t}):hC().createElement("td",{key:t})))))}),Eo=(0,hk.forwardRef)(function({date:e,...t},r){var n,o,i;let a=(0,hk.useContext)(x6),s=(0,hk.useContext)(x5),l=null!=a?a:s,{startDate:u}=null!=(n=(0,hk.useContext)(x8))?n:{startDate:l.visibleRange.start},c=(0,hk.useRef)(null),{cellProps:d,buttonProps:p,...f}=function(e,t,r){var n;let o,{date:i,isDisabled:a}=e,{errorMessageId:s,selectedDateDescription:l}=_Z.get(t),u=_L((n=wC)&&n.__esModule?n.default:n,"@react-aria/calendar"),c=_H({weekday:"long",day:"numeric",month:"long",year:"numeric",era:_Y(i),timeZone:t.timeZone}),d=t.isSelected(i),p=t.isCellFocused(i);a=a||t.isCellDisabled(i);let f=t.isCellUnavailable(i),h=!a&&!f,m=t.isValueInvalid&&!!("highlightedRange"in t?!t.anchorDate&&t.highlightedRange&&i.compare(t.highlightedRange.start)>=0&&0>=i.compare(t.highlightedRange.end):t.value&&_f(t.value,i));m&&(d=!0),i=_K(i,_h);let y=(0,hk.useMemo)(()=>i.toDate(t.timeZone),[i,t.timeZone]),g=_f(i,_v(t.timeZone)),b=(0,hk.useMemo)(()=>{let e="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(_f(i,t.value.start)||_f(i,t.value.end))&&(e=l+", "),e+=c.format(y),g?e=u.format(d?"todayDateSelected":"todayDate",{date:e}):d&&(e=u.format("dateSelected",{date:e})),t.minValue&&_f(i,t.minValue)?e+=", "+u.format("minimumDate"):t.maxValue&&_f(i,t.maxValue)&&(e+=", "+u.format("maximumDate")),e},[c,y,u,d,g,i,t,l]),v="";"anchorDate"in t&&p&&!t.isReadOnly&&h&&(v=t.anchorDate?u.format("finishRangeSelectionPrompt"):u.format("startRangeSelectionPrompt"));let w=_7(v),x=(0,hk.useRef)(!1),E=(0,hk.useRef)(!1),S=(0,hk.useRef)(void 0),{pressProps:D,isPressed:O}=vL({shouldCancelOnPointerExit:"anchorDate"in t&&!!t.anchorDate,preventFocusOnPress:!0,isDisabled:!h||t.isReadOnly,onPressStart(e){if(t.isReadOnly)return void t.setFocusedDate(i);if("highlightedRange"in t&&!t.anchorDate&&("mouse"===e.pointerType||"touch"===e.pointerType)){if(t.highlightedRange&&!m){if(_f(i,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(i),t.setDragging(!0),E.current=!0;return}else if(_f(i,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(i),t.setDragging(!0),E.current=!0;return}}let r=()=>{t.setDragging(!0),S.current=void 0,t.selectDate(i),t.setFocusedDate(i),x.current=!0};"touch"===e.pointerType?S.current=setTimeout(r,200):r()}},onPressEnd(){E.current=!1,x.current=!1,clearTimeout(S.current),S.current=void 0},onPress(){"anchorDate"in t||t.isReadOnly||(t.selectDate(i),t.setFocusedDate(i))},onPressUp(e){if(!t.isReadOnly&&("anchorDate"in t&&S.current&&(t.selectDate(i),t.setFocusedDate(i)),"anchorDate"in t))if(E.current)t.setAnchorDate(i);else if(t.anchorDate&&!x.current)t.selectDate(i),t.setFocusedDate(i);else if("keyboard"!==e.pointerType||t.anchorDate)"virtual"===e.pointerType&&(t.selectDate(i),t.setFocusedDate(i));else{t.selectDate(i);let e=i.add({days:1});t.isInvalid(e)&&(e=i.subtract({days:1})),t.isInvalid(e)||t.setFocusedDate(e)}}});a||(o=_f(i,t.focusedDate)?0:-1),(0,hk.useEffect)(()=>{p&&r.current&&(b9(r.current),"pointer"!==vK&&document.activeElement===r.current&&xe(r.current,{containingElement:xt(r.current)}))},[p,r]);let P=_H({day:"numeric",timeZone:t.timeZone,calendar:i.calendar.identifier}),k=(0,hk.useMemo)(()=>P.formatToParts(y).find(e=>"day"===e.type).value,[P,y]);return{cellProps:{role:"gridcell","aria-disabled":!h||void 0,"aria-selected":d||void 0,"aria-invalid":m||void 0},buttonProps:bL(D,{onFocus(){a||t.setFocusedDate(i)},tabIndex:o,role:"button","aria-disabled":!h||void 0,"aria-label":b,"aria-invalid":m||void 0,"aria-describedby":[m?s:void 0,w["aria-describedby"]].filter(Boolean).join(" ")||void 0,onPointerEnter(e){"highlightDate"in t&&("touch"!==e.pointerType||t.isDragging)&&h&&t.highlightDate(i)},onPointerDown(e){"releasePointerCapture"in e.target&&e.target.releasePointerCapture(e.pointerId)},onContextMenu(e){e.preventDefault()}}),isPressed:O,isFocused:p,isSelected:d,isDisabled:a,isUnavailable:f,isOutsideVisibleRange:0>i.compare(t.visibleRange.start)||i.compare(t.visibleRange.end)>0,isInvalid:m,formattedDate:k}}({date:e},l,c),{hoverProps:h,isHovered:m}=wl({...t,isDisabled:f.isDisabled}),{focusProps:y,isFocusVisible:g}=wn();g&&(g=f.isFocused);let b=(o=u,i=_d(i=e,o.calendar),o=_S(o),i=_S(i),o.era!==i.era||o.year!==i.year||o.month!==i.month),v=!1,w=!1;"highlightedRange"in l&&l.highlightedRange&&(v=_f(e,l.highlightedRange.start),w=_f(e,l.highlightedRange.end));let x=bV({...t,defaultChildren:f.formattedDate,defaultClassName:"react-aria-CalendarCell",values:{date:e,isHovered:m,isOutsideMonth:b,isFocusVisible:g,isSelectionStart:v,isSelectionEnd:w,...f}}),E={"data-focused":f.isFocused||void 0,"data-hovered":m||void 0,"data-pressed":f.isPressed||void 0,"data-unavailable":f.isUnavailable||void 0,"data-disabled":f.isDisabled||void 0,"data-focus-visible":g||void 0,"data-outside-visible-range":f.isOutsideVisibleRange||void 0,"data-outside-month":b||void 0,"data-selected":f.isSelected||void 0,"data-selection-start":v||void 0,"data-selection-end":w||void 0,"data-invalid":f.isInvalid||void 0};return hC().createElement("td",{...d,ref:r},hC().createElement("div",{...bL(b0(t),p,y,h,E,x),ref:c}))}),Ei=(0,hk.createContext)({}),Ea=(0,hk.forwardRef)(function(e,t){var r,n;[e,t]=bW(e,t,Ei);let{isDisabled:o,isInvalid:i,onHoverStart:a,onHoverChange:s,onHoverEnd:l,...u}=e,{hoverProps:c,isHovered:d}=wl({onHoverStart:a,onHoverChange:s,onHoverEnd:l,isDisabled:o}),{isFocused:p,isFocusVisible:f,focusProps:h}=wn({within:!0});null!=o||(o=!!e["aria-disabled"]&&"false"!==e["aria-disabled"]),null!=i||(i=!!e["aria-invalid"]&&"false"!==e["aria-invalid"]);let m=bV({...e,values:{isHovered:d,isFocusWithin:p,isFocusVisible:f,isDisabled:o,isInvalid:i},defaultClassName:"react-aria-Group"});return hC().createElement("div",{...bL(u,h,c),...m,ref:t,role:null!=(r=e.role)?r:"group",slot:null!=(n=e.slot)?n:void 0,"data-focus-within":p||void 0,"data-hovered":d||void 0,"data-focus-visible":f||void 0,"data-disabled":o||void 0,"data-invalid":i||void 0},m.children)}),Es=(0,hk.createContext)({}),El=wc(function(e,t){[e,t]=bW(e,t,Es);let{hoverProps:r,isHovered:n}=wl(e),{isFocused:o,isFocusVisible:i,focusProps:a}=wn({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e["aria-invalid"]&&"false"!==e["aria-invalid"],l=bV({...e,values:{isHovered:n,isFocused:o,isFocusVisible:i,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:"react-aria-Input"});return hC().createElement("input",{...bL((e=>{let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,...o}=e;return o})(e),a,r),...l,ref:t,"data-focused":o||void 0,"data-disabled":e.disabled||void 0,"data-hovered":n||void 0,"data-focus-visible":i||void 0,"data-invalid":s||void 0})});var Eu={};Eu={"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 Ec=hC().createContext(null),Ed="react-aria-focus-scope-restore",Ep=null;function Ef(e){var t,r,n,o,i,a,s,l,u,c;let d,p,f,h,{children:m,contain:y,restoreFocus:g,autoFocus:b}=e,v=(0,hk.useRef)(null),w=(0,hk.useRef)(null),x=(0,hk.useRef)([]),{parentNode:E}=(0,hk.useContext)(Ec)||{},S=(0,hk.useMemo)(()=>new Ek({scopeRef:x}),[x]);bx(()=>{let e=E||EC.root;if(EC.getTreeNode(e.scopeRef)&&Ep&&!Eb(Ep,e.scopeRef)){let t=EC.getTreeNode(Ep);t&&(e=t)}e.addChild(S),EC.addNode(S)},[S,E]),bx(()=>{let e=EC.getTreeNode(x);e&&(e.contain=!!y)},[y]),bx(()=>{var e;let t=null==(e=v.current)?void 0:e.nextSibling,r=[],n=e=>e.stopPropagation();for(;t&&t!==w.current;)r.push(t),t.addEventListener(Ed,n),t=t.nextSibling;return x.current=r,()=>{for(let e of r)e.removeEventListener(Ed,n)}},[m]),bx(()=>{if(r||n)return;let e=t.current,o=b5(e?e[0]:void 0),i=e=>{let r=vj(e);Ey(r,t.current)?Ep=t:Eg(r)||(Ep=null)};return o.addEventListener("focusin",i,!1),null==e||e.forEach(e=>e.addEventListener("focusin",i,!1)),()=>{o.removeEventListener("focusin",i,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",i,!1))}},[t=x,r=g,n=y]),o=x,i=y,d=(0,hk.useRef)(void 0),p=(0,hk.useRef)(void 0),bx(()=>{let e=o.current;if(!i){p.current&&(cancelAnimationFrame(p.current),p.current=void 0);return}let t=b5(e?e[0]:void 0),r=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!Em(o)||e.isComposing)return;let r=((e=document)=>e.activeElement)(t),n=o.current;if(!n||!Ey(r,n))return;let i=ES(Eh(n),{tabbable:!0},n);if(!r)return;i.currentNode=r;let a=e.shiftKey?i.previousNode():i.nextNode();a||(i.currentNode=e.shiftKey?n[n.length-1].nextElementSibling:n[0].previousElementSibling,a=e.shiftKey?i.previousNode():i.nextNode()),e.preventDefault(),a&&Ev(a,!0)},n=e=>{(!Ep||Eb(Ep,o))&&Ey(vj(e),o.current)?(Ep=o,d.current=vj(e)):Em(o)&&!Eg(vj(e),o)?d.current?d.current.focus():Ep&&Ep.current&&E_(Ep.current):Em(o)&&(d.current=vj(e))},a=e=>{p.current&&cancelAnimationFrame(p.current),p.current=requestAnimationFrame(()=>{let r=vK,n=("virtual"===r||null===r)&&vf()&&vp(),i=((e=document)=>e.activeElement)(t);if(!n&&i&&Em(o)&&!Eg(i,o)){Ep=o;let t=vj(e);if(t&&t.isConnected){var a;d.current=t,null==(a=d.current)||a.focus()}else Ep.current&&E_(Ep.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",a,!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",a,!1))}},[o,i]),bx(()=>()=>{p.current&&cancelAnimationFrame(p.current)},[p]),a=x,s=g,l=y,f=(0,hk.useRef)("u">typeof document?((e=document)=>e.activeElement)(b5(a.current?a.current[0]:void 0)):null),bx(()=>{let e=a.current,t=b5(e?e[0]:void 0);if(!s||l)return;let r=()=>{(!Ep||Eb(Ep,a))&&Ey(((e=document)=>e.activeElement)(t),a.current)&&(Ep=a)};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))}},[a,l]),bx(()=>{let e=b5(a.current?a.current[0]:void 0);if(!s)return;let t=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!Em(a)||t.isComposing)return;let r=e.activeElement;if(!Eg(r,a)||!Ex(a))return;let n=EC.getTreeNode(a);if(!n)return;let o=n.nodeToRestore,i=ES(e.body,{tabbable:!0});i.currentNode=r;let s=t.shiftKey?i.previousNode():i.nextNode();if(o&&o.isConnected&&o!==e.body||(o=void 0,n.nodeToRestore=void 0),(!s||!Eg(s,a))&&o){i.currentNode=o;do s=t.shiftKey?i.previousNode():i.nextNode();while(Eg(s,a));(t.preventDefault(),t.stopPropagation(),s)?Ev(s,!0):Eg(o)?Ev(o,!0):r.blur()}};return l||e.addEventListener("keydown",t,!0),()=>{l||e.removeEventListener("keydown",t,!0)}},[a,s,l]),bx(()=>{var e;let t=b5(a.current?a.current[0]:void 0);if(!s)return;let r=EC.getTreeNode(a);if(r)return r.nodeToRestore=null!=(e=f.current)?e:void 0,()=>{let e=EC.getTreeNode(a);if(!e)return;let r=e.nodeToRestore,n=((e=document)=>e.activeElement)(t);if(s&&r&&(n&&Eg(n,a)||n===t.body&&Ex(a))){let e=EC.clone();requestAnimationFrame(()=>{if(t.activeElement===t.body){let t=e.getTreeNode(a);for(;t;){if(t.nodeToRestore&&t.nodeToRestore.isConnected)return void EE(t.nodeToRestore);t=t.parent}for(t=e.getTreeNode(a);t;){if(t.scopeRef&&t.scopeRef.current&&EC.getTreeNode(t.scopeRef))return void EE(Ew(t.scopeRef.current,!0));t=t.parent}}})}}},[a,s]),u=x,c=b,h=hC().useRef(c),(0,hk.useEffect)(()=>{h.current&&(Ep=u,!Ey(((e=document)=>e.activeElement)(b5(u.current?u.current[0]:void 0)),Ep.current)&&u.current&&E_(u.current)),h.current=!1},[u]),(0,hk.useEffect)(()=>{let e=((e=document)=>e.activeElement)(b5(x.current?x.current[0]:void 0)),t=null;if(Ey(e,x.current)){for(let r of EC.traverse())r.scopeRef&&Ey(e,r.scopeRef.current)&&(t=r);t===EC.getTreeNode(x)&&(Ep=t.scopeRef)}},[x]),bx(()=>()=>{var e,t,r;let n=null!=(r=null==(t=EC.getTreeNode(x))||null==(e=t.parent)?void 0:e.scopeRef)?r:null;(x===Ep||Eb(x,Ep))&&(!n||EC.getTreeNode(n))&&(Ep=n),EC.removeTreeNode(x)},[x]);let D=(0,hk.useMemo)(()=>{var e;return e=x,{focusNext(t={}){var r;let n=e.current,{from:o,tabbable:i,wrap:a,accept:s}=t,l=o||((e=document)=>e.activeElement)(b5(null!=(r=n[0])?r:void 0)),u=n[0].previousElementSibling,c=ES(Eh(n),{tabbable:i,accept:s},n);c.currentNode=Ey(l,n)?l:u;let d=c.nextNode();return!d&&a&&(c.currentNode=u,d=c.nextNode()),d&&Ev(d,!0),d},focusPrevious(t={}){var r;let n=e.current,{from:o,tabbable:i,wrap:a,accept:s}=t,l=o||((e=document)=>e.activeElement)(b5(null!=(r=n[0])?r:void 0)),u=n[n.length-1].nextElementSibling,c=ES(Eh(n),{tabbable:i,accept:s},n);c.currentNode=Ey(l,n)?l:u;let d=c.previousNode();return!d&&a&&(c.currentNode=u,d=c.previousNode()),d&&Ev(d,!0),d},focusFirst(t={}){let r=e.current,{tabbable:n,accept:o}=t,i=ES(Eh(r),{tabbable:n,accept:o},r);i.currentNode=r[0].previousElementSibling;let a=i.nextNode();return a&&Ev(a,!0),a},focusLast(t={}){let r=e.current,{tabbable:n,accept:o}=t,i=ES(Eh(r),{tabbable:n,accept:o},r);i.currentNode=r[r.length-1].nextElementSibling;let a=i.previousNode();return a&&Ev(a,!0),a}}},[]),O=(0,hk.useMemo)(()=>({focusManager:D,parentNode:S}),[S,D]);return hC().createElement(Ec.Provider,{value:O},hC().createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:v}),m,hC().createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:w}))}function Eh(e){return e[0].parentElement}function Em(e){let t=EC.getTreeNode(Ep);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function Ey(e,t){return!!e&&!!t&&t.some(t=>t.contains(e))}function Eg(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:r}of EC.traverse(EC.getTreeNode(t)))if(r&&Ey(e,r.current))return!0;return!1}function Eb(e,t){var r;let n=null==(r=EC.getTreeNode(t))?void 0:r.parent;for(;n;){if(n.scopeRef===e)return!0;n=n.parent}return!1}function Ev(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch{}}else try{v7(e)}catch{}}function Ew(e,t=!0){let r=e[0].previousElementSibling,n=Eh(e),o=ES(n,{tabbable:t},e);o.currentNode=r;let i=o.nextNode();return t&&!i&&((o=ES(n=Eh(e),{tabbable:!1},e)).currentNode=r,i=o.nextNode()),i}function E_(e,t=!0){Ev(Ew(e,t))}function Ex(e){let t=EC.getTreeNode(Ep);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(null==t?void 0:t.scopeRef)===e}function EE(e){e.dispatchEvent(new CustomEvent(Ed,{bubbles:!0,cancelable:!0}))&&Ev(e)}function ES(e,t,r){var n,o,i;let a=(null==t?void 0:t.tabbable)?b6:b3,s=b5((null==e?void 0:e.nodeType)===Node.ELEMENT_NODE?e:null),l=(n=e||s,o=NodeFilter.SHOW_ELEMENT,i={acceptNode(e){var n;return(null==t||null==(n=t.from)?void 0:n.contains(e))?NodeFilter.FILTER_REJECT:a(e)&&function e(t,r){return"#comment"!==t.nodeName&&function(e){let t=b7(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||Ey(e,r))&&(!(null==t?void 0:t.accept)||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}},s.createTreeWalker(n,o,i));return(null==t?void 0:t.from)&&(l.currentNode=t.from),l}function ED(e,t={}){return{focusNext(r={}){let n=e.current;if(!n)return null;let{from:o,tabbable:i=t.tabbable,wrap:a=t.wrap,accept:s=t.accept}=r,l=o||((e=document)=>e.activeElement)(b5(n)),u=ES(n,{tabbable:i,accept:s});n.contains(l)&&(u.currentNode=l);let c=u.nextNode();return!c&&a&&(u.currentNode=n,c=u.nextNode()),c&&Ev(c,!0),c},focusPrevious(r=t){let n=e.current;if(!n)return null;let{from:o,tabbable:i=t.tabbable,wrap:a=t.wrap,accept:s=t.accept}=r,l=o||((e=document)=>e.activeElement)(b5(n)),u=ES(n,{tabbable:i,accept:s});if(n.contains(l))u.currentNode=l;else{let e=EO(u);return e&&Ev(e,!0),null!=e?e:null}let c=u.previousNode();if(!c&&a){u.currentNode=n;let e=EO(u);if(!e)return null;c=e}return c&&Ev(c,!0),null!=c?c:null},focusFirst(r=t){let n=e.current;if(!n)return null;let{tabbable:o=t.tabbable,accept:i=t.accept}=r,a=ES(n,{tabbable:o,accept:i}).nextNode();return a&&Ev(a,!0),a},focusLast(r=t){let n=e.current;if(!n)return null;let{tabbable:o=t.tabbable,accept:i=t.accept}=r,a=EO(ES(n,{tabbable:o,accept:i}));return a&&Ev(a,!0),null!=a?a:null}}}function EO(e){let t,r;do(t=e.lastChild())&&(r=t);while(t);return r}class EP{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 Ek({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&&Ey(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 EP;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 Ek({scopeRef:null}),this.fastMap.set(null,this.root)}}class Ek{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 EC=new EP;function Ej(e,t,r){let{direction:n}=wk(),o=(0,hk.useMemo)(()=>ED(t),[t]),i=()=>{var e;if(!t.current)return;let r=null==(e=window.event)?void 0:e.target,n=ES(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:a}=vL({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){"mouse"===e.pointerType&&i()},onPress(e){"mouse"!==e.pointerType&&i()}});return bL(a,{onKeyDown:i=>{if(i.currentTarget.contains(i.target)&&(i.altKey&&("ArrowDown"===i.key||"ArrowUp"===i.key)&&"setOpen"in e&&(i.preventDefault(),i.stopPropagation(),e.setOpen(!0)),!r))switch(i.key){case"ArrowLeft":if(i.preventDefault(),i.stopPropagation(),"rtl"===n){if(t.current){let e=i.target,r=ET(t.current,e.getBoundingClientRect().left,-1);r&&r.focus()}}else o.focusPrevious();break;case"ArrowRight":if(i.preventDefault(),i.stopPropagation(),"rtl"===n){if(t.current){let e=i.target,r=ET(t.current,e.getBoundingClientRect().left,1);r&&r.focus()}}else o.focusNext()}}})}function ET(e,t,r){let n=ES(e,{tabbable:!0}),o=n.nextNode(),i=null,a=1/0;for(;o;){let e=o.getBoundingClientRect().left-t,s=Math.abs(e);Math.sign(e)===r&&s<a&&(i=o,a=s),o=n.nextNode()}return i}function ER(e,t,r){let n=(0,hk.useRef)(t),o=bE(()=>{r&&r(n.current)});(0,hk.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 EN(e){let{description:t,errorMessage:r,isInvalid:n,validationState:o}=e,{labelProps:i,fieldProps:a}=function(e){let{id:t,label:r,"aria-labelledby":n,"aria-label":o,labelElementType:i="label"}=e;t=b$(t);let a=b$(),s={};return r&&(n=n?`${a} ${n}`:a,s={id:a,htmlFor:"label"===i?t:void 0}),{labelProps:s,fieldProps:_0({id:t,"aria-label":o,"aria-labelledby":n})}}(e),s=bI([!!t,!!r,n,o]),l=bI([!!t,!!r,n,o]);return{labelProps:i,fieldProps:a=bL(a,{"aria-describedby":[s,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),descriptionProps:{id:s},errorMessageProps:{id:l}}}function EA(e,t,r){let{validationBehavior:n,focus:o}=e;bx(()=>{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 i=bE(()=>{t.resetValidation()}),a=bE(e=>{var n,i;t.displayValidation.isInvalid||t.commitValidation();let a=null==r||null==(n=r.current)?void 0:n.form;!e.defaultPrevented&&r&&a&&function(e){for(let t=0;t<e.elements.length;t++){let r=e.elements[t];if(!r.validity.valid)return r}return null}(a)===r.current&&(o?o():null==(i=r.current)||i.focus(),vK="keyboard",vJ("keyboard",null)),e.preventDefault()}),s=bE(()=>{t.commitValidation()});(0,hk.useEffect)(()=>{let e=null==r?void 0:r.current;if(!e)return;let t=e.form;return e.addEventListener("invalid",a),e.addEventListener("change",s),null==t||t.addEventListener("reset",i),()=>{e.removeEventListener("invalid",a),e.removeEventListener("change",s),null==t||t.removeEventListener("reset",i)}},[r,a,s,i,n])}let E$=new WeakMap,EI="__role_"+Date.now(),EM="__focusManager_"+Date.now();function EL(e,t,r){var n,o;let i,{isInvalid:a,validationErrors:s,validationDetails:l}=t.displayValidation,{labelProps:u,fieldProps:c,descriptionProps:d,errorMessageProps:p}=EN({...e,labelElementType:"span",isInvalid:a,errorMessage:e.errorMessage||s}),f=(0,hk.useRef)(null),{focusWithinProps:h}=wr({...e,onFocusWithin(r){var n;f.current=t.value,null==(n=e.onFocus)||n.call(e,r)},onBlurWithin:r=>{var n;t.confirmPlaceholder(),t.value!==f.current&&t.commitValidation(),null==(n=e.onBlur)||n.call(e,r)},onFocusWithinChange:e.onFocusChange}),m=_L((o=Eu)&&o.__esModule?o.default:o,"@react-aria/datepicker"),y="hour"===t.maxGranularity?"selectedTimeDescription":"selectedDateDescription",g="hour"===t.maxGranularity?"time":"date",b=_7(t.value?m.format(y,{[g]:t.formatValue({month:"long"})}):""),v="presentation"===e[EI]?c["aria-describedby"]:[b["aria-describedby"],c["aria-describedby"]].filter(Boolean).join(" ")||void 0,w=e[EM],x=(0,hk.useMemo)(()=>w||ED(r),[w,r]),E=Ej(t,r,"presentation"===e[EI]);E$.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:[u.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:v,focusManager:x});let S=(0,hk.useRef)(e.autoFocus);i="presentation"===e[EI]?{role:"presentation"}:bL(c,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":v}),(0,hk.useEffect)(()=>{S.current&&x.focusFirst(),S.current=!1},[x]),ER(e.inputRef,t.value,t.setValue),EA({...e,focus(){x.focusFirst()}},t,e.inputRef);let D={type:"hidden",name:e.name,value:(null==(n=t.value)?void 0:n.toString())||"",disabled:e.isDisabled};"native"===e.validationBehavior&&(D.type="text",D.hidden=!0,D.required=e.isRequired,D.onChange=()=>{});let O=b0(e);return{labelProps:{...u,onClick:()=>{x.focusFirst()}},fieldProps:bL(O,i,E,h,{onKeyDown(t){e.onKeyDown&&e.onKeyDown(t)},onKeyUp(t){e.onKeyUp&&e.onKeyUp(t)},style:{unicodeBidi:"isolate"}}),inputProps:D,descriptionProps:d,errorMessageProps:p,isInvalid:a,validationErrors:s,validationDetails:l}}var EF={};EF={"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 EB={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},EV={...EB,customError:!0,valid:!1},EU={isInvalid:!1,validationDetails:EB,validationErrors:[]},EW=(0,hk.createContext)({}),Ez="__formValidationState"+Date.now();function EK(e){if(e[Ez]){let{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:i}=e[Ez];return{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:i}}return function(e){let{isInvalid:t,validationState:r,name:n,value:o,builtinValidation:i,validate:a,validationBehavior:s="aria"}=e;r&&(t||(t="invalid"===r));let l=void 0!==t?{isInvalid:t,validationErrors:[],validationDetails:EV}:null,u=(0,hk.useMemo)(()=>a&&null!=o?EG(function(e,t){if("function"==typeof e){let r=e(t);if(r&&"boolean"!=typeof r)return EH(r)}return[]}(a,o)):null,[a,o]);(null==i?void 0:i.validationDetails.valid)&&(i=void 0);let c=(0,hk.useContext)(EW),d=(0,hk.useMemo)(()=>n?Array.isArray(n)?n.flatMap(e=>EH(c[e])):EH(c[n]):[],[c,n]),[p,f]=(0,hk.useState)(c),[h,m]=(0,hk.useState)(!1);c!==p&&(f(c),m(!1));let y=(0,hk.useMemo)(()=>EG(h?[]:d),[h,d]),g=(0,hk.useRef)(EU),[b,v]=(0,hk.useState)(EU),w=(0,hk.useRef)(EU),[x,E]=(0,hk.useState)(!1);return(0,hk.useEffect)(()=>{if(!x)return;E(!1);let e=u||i||g.current;Eq(e,w.current)||(w.current=e,v(e))}),{realtimeValidation:l||y||u||i||EU,displayValidation:"native"===s?l||y||b:l||y||u||i||b,updateValidation(e){"aria"!==s||Eq(b,e)?g.current=e:v(e)},resetValidation(){Eq(EU,w.current)||(w.current=EU,v(EU)),"native"===s&&E(!1),m(!0)},commitValidation(){"native"===s&&E(!0),m(!0)}}}(e)}function EH(e){return e?Array.isArray(e)?e:[e]:[]}function EG(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:EV}:null}function Eq(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 EZ(...e){let t=new Set,r=!1,n={...EB};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 EY=new _R((ec=EF)&&ec.__esModule?ec.default:ec);function EJ(){return"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US"}function EX(e,t,r,n,o){let i=null!=e&&null!=r&&e.compare(r)>0,a=null!=e&&null!=t&&0>e.compare(t),s=null!=e&&(null==n?void 0:n(e))||!1,l=i||a||s,u=[];if(l){let e=EJ(),n=new _$(e,_R.getGlobalDictionaryForPackage("@react-stately/datepicker")||EY),l=new _B(e,E1({},o)),c=l.resolvedOptions().timeZone;a&&null!=t&&u.push(n.format("rangeUnderflow",{minValue:l.format(t.toDate(c))})),i&&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:i,rangeUnderflow:a,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!l}}}let EQ={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},E0={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function E1(e,t){var r;e={...t.shouldForceLeadingZeros?E0:EQ,...e};let n=t.granularity||"minute",o=Object.keys(e),i=o.indexOf(null!=(r=t.maxGranularity)?r:"year");i<0&&(i=0);let a=o.indexOf(n);if(a<0&&(a=2),i>a)throw Error("maxGranularity must be greater than granularity");let s=o.slice(i,a+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===i&&(s.era="short"),s}function E2(e){return e&&"hour"in e?e:new w5}function E4(e,t){return null===e?null:e?_d(e,t):void 0}function E3(e,t,r,n){if(e)return E4(e,r);let o=_d(_b(null!=n?n:_E()).set({hour:0,minute:0,second:0,millisecond:0}),r);return"year"===t||"month"===t||"day"===t?_u(o):n?o:_c(o)}function E6(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,i]=(0,hk.useState)([n,r]);return e&&(o[0]!==n||o[1]!==r)&&i([n,r]),t||(t=e?n:o[0]),[t,e?r:o[1]]}let E5=new _R({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"),E7={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},E9={year:5,month:2,day:7,hour:2,minute:15,second:15},E8={dayperiod:"dayPeriod"};function Se(e){var t,r;let{locale:n,createCalendar:o,hideTimeZone:i,isDisabled:a=!1,isReadOnly:s=!1,isRequired:l=!1,minValue:u,maxValue:c,isDateUnavailable:d}=e,p=e.value||e.defaultValue||e.placeholderValue||null,[f,h]=E6(p,e.granularity),m=h||"UTC";if(p&&!(f in p))throw Error("Invalid granularity "+f+" for value "+p.toString());let y=(0,hk.useMemo)(()=>new _B(n),[n]),g=(0,hk.useMemo)(()=>o(y.resolvedOptions().calendar),[o,y]),[b,v]=xJ(e.value,null!=(t=e.defaultValue)?t:null,e.onChange),w=(0,hk.useMemo)(()=>{var e;return null!=(e=E4(b,g))?e:null},[b,g]),[x,E]=(0,hk.useState)(()=>E3(e.placeholderValue,f,g,h)),S="gregory"===g.identifier&&"BC"===(w||x).era,D=(0,hk.useMemo)(()=>{var t;return{granularity:f,maxGranularity:null!=(t=e.maxGranularity)?t:"year",timeZone:h,hideTimeZone:i,hourCycle:e.hourCycle,showEra:S,shouldForceLeadingZeros:e.shouldForceLeadingZeros}},[e.maxGranularity,f,e.hourCycle,e.shouldForceLeadingZeros,h,i,S]),O=(0,hk.useMemo)(()=>E1({},D),[D]),P=(0,hk.useMemo)(()=>new _B(n,O),[n,O]),k=(0,hk.useMemo)(()=>P.resolvedOptions(),[P]),C=(0,hk.useMemo)(()=>P.formatToParts(new Date).filter(e=>E7[e.type]).reduce((e,t)=>(e[t.type]=!0,e),{}),[P]),[j,T]=(0,hk.useState)(()=>e.value||e.defaultValue?{...C}:{}),R=(0,hk.useRef)(null),N=(0,hk.useRef)(g);(0,hk.useEffect)(()=>{_m(g,N.current)||(N.current=g,E(t=>Object.keys(j).length>0?_d(t,g):E3(e.placeholderValue,f,g,h)))},[g,f,j,h,e.placeholderValue]),b&&Object.keys(j).length<Object.keys(C).length&&T(j={...C}),null==b&&Object.keys(j).length===Object.keys(C).length&&(T(j={}),E(E3(e.placeholderValue,f,g,h)));let A=w&&Object.keys(j).length>=Object.keys(C).length?w:x,$=t=>{if(e.isDisabled||e.isReadOnly)return;let r=Object.keys(j),n=Object.keys(C);null==t?(v(null),E(E3(e.placeholderValue,f,g,h)),T({})):r.length>=n.length||r.length===n.length-1&&C.dayPeriod&&!j.dayPeriod&&"dayPeriod"!==R.current?v(t=_d(t,(null==p?void 0:p.calendar)||new wI)):E(t),R.current=null},I=(0,hk.useMemo)(()=>A.toDate(m),[A,m]),M=(0,hk.useMemo)(()=>(function(e,t,r,n,o,i,a,s){let l=["hour","minute","second"],u=r.formatToParts(e),c=[];for(let e of u){var d,p;let r=E7[e.type];"era"===e.type&&1===i.getEras().length&&(r=!1);let u=E7[e.type]&&!t[e.type],f=E7[e.type]?(d=e.type,p=e.value,"era"===d||"dayPeriod"===d?p:"year"===d||"month"===d||"day"===d?E5.getStringForLocale(d,a):"––"):null,h={type:E8[e.type]||e.type,text:u?f:e.value,...St(o,e.type,n),isPlaceholder:u,placeholder:f,isEditable:r};"hour"===e.type?(c.push({type:"literal",text:"",...St(o,"literal",n),isPlaceholder:!1,placeholder:"",isEditable:!1}),c.push(h),e.type===s&&c.push({type:"literal",text:"",...St(o,"literal",n),isPlaceholder:!1,placeholder:"",isEditable:!1})):l.includes(e.type)&&e.type===s?(c.push(h),c.push({type:"literal",text:"",...St(o,"literal",n),isPlaceholder:!1,placeholder:"",isEditable:!1})):c.push(h)}return c})(I,j,P,k,A,g,n,f),[I,j,P,k,A,g,n,f]);C.era&&j.year&&!j.era?(j.era=!0,T({...j})):!C.era&&j.era&&(delete j.era,T({...j}));let L=e=>{j[e]=!0,"year"===e&&C.era&&(j.era=!0),T({...j})},F=(e,t)=>{if(j[e])$(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)}(A,e,t,k));else{L(e);let t=Object.keys(j),r=Object.keys(C);(t.length>=r.length||t.length===r.length-1&&C.dayPeriod&&!j.dayPeriod)&&$(A)}},B=(0,hk.useMemo)(()=>EX(b,u,c,d,D),[b,u,c,d,D]),V=EK({...e,value:b,builtinValidation:B}),U=V.displayValidation.isInvalid,W=e.validationState||(U?"invalid":null);return{...V,value:w,dateValue:I,calendar:g,setValue:$,segments:M,dateFormatter:P,validationState:W,isInvalid:U,granularity:f,maxGranularity:null!=(r=e.maxGranularity)?r:"year",isDisabled:a,isReadOnly:s,isRequired:l,increment(e){F(e,1)},decrement(e){F(e,-1)},incrementPage(e){F(e,E9[e]||1)},decrementPage(e){F(e,-(E9[e]||1))},setSegment(e,t){L(e),$(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)}(A,e,t,k))},confirmPlaceholder(){if(e.isDisabled||e.isReadOnly)return;let t=Object.keys(j),r=Object.keys(C);t.length===r.length-1&&C.dayPeriod&&!j.dayPeriod&&(T(j={...C}),$(A.copy()))},clearSegment(t){delete j[t],R.current=t,T({...j});let r=E3(e.placeholderValue,f,g,h),n=A;if("dayPeriod"===t&&"hour"in A&&"hour"in r){let e=A.hour>=12,t=r.hour>=12;e&&!t?n=A.set({hour:A.hour-12}):!e&&t&&(n=A.set({hour:A.hour+12}))}else"hour"===t&&"hour"in A&&A.hour>=12&&j.dayPeriod?n=A.set({hour:r.hour+12}):t in A&&(n=A.set({[t]:r[t]}));v(null),$(n)},formatValue:e=>w?new _B(n,E1(e,D)).format(I):"",getDateFormatter:(e,t)=>new _B(e,E1({},{...D,...t}))}}function St(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 Sr=(0,hk.createContext)(null),Sn=(0,hk.createContext)(null),So=(0,hk.createContext)(null),Si=(0,hk.forwardRef)(function(e,t){let r=(0,hk.useContext)(Sn),n=(0,hk.useContext)(So);return r||n?hC().createElement(Ss,{...e,ref:t}):hC().createElement(Sa,{...e,ref:t})}),Sa=(0,hk.forwardRef)((e,t)=>{let[r,n]=bW({slot:e.slot},t,Sr),{locale:o}=wk(),i=Se({...r,locale:o,createCalendar:xW}),a=(0,hk.useRef)(null),{fieldProps:s,inputProps:l}=EL({...r,inputRef:a},i,n);return hC().createElement(bB,{values:[[Sn,i],[Es,{...l,ref:a}],[Ei,{...s,ref:n,isInvalid:i.isInvalid,isDisabled:i.isDisabled}]]},hC().createElement(Ss,e))}),Ss=(0,hk.forwardRef)((e,t)=>{let{className:r,children:n}=e,o=(0,hk.useContext)(Sn),i=(0,hk.useContext)(So),a=null!=o?o:i;return hC().createElement(hC().Fragment,null,hC().createElement(Ea,{...e,ref:t,slot:e.slot||void 0,className:null!=r?r:"react-aria-DateInput",isInvalid:a.isInvalid,isDisabled:a.isDisabled},a.segments.map((e,t)=>(0,hk.cloneElement)(n(e),{key:t}))),hC().createElement(El,null))}),Sl=(0,hk.createContext)({});function Su({children:e}){let t=(0,hk.useMemo)(()=>({register:()=>{}}),[]);return hC().createElement(vE.Provider,{value:t},e)}hC().forwardRef(({children:e,...t},r)=>{let n=(0,hk.useRef)(!1),o=(0,hk.useContext)(vE);r=bw(r||(null==o?void 0:o.ref));let i=bL(o||{},{...t,ref:r,register(){n.current=!0,o&&o.register()}});return vP(o,r),(0,hk.useEffect)(()=>{n.current||(n.current=!0)},[]),hC().createElement(vE.Provider,{value:i},e)});let Sc=hC().createContext(null);function Sd(e){var t;let r=bR(),{portalContainer:n=r?null:document.body,isExiting:o}=e,[i,a]=(0,hk.useState)(!1),s=(0,hk.useMemo)(()=>({contain:i,setContain:a}),[i,a]),{getContainer:l}=null!=(t=(0,hk.useContext)(Sl))?t:{};if(!e.portalContainer&&l&&(n=l()),!n)return null;let u=e.children;return e.disableFocusManagement||(u=hC().createElement(Ef,{restoreFocus:!0,contain:(e.shouldContainFocus||i)&&!o},u)),u=hC().createElement(Sc.Provider,{value:s},hC().createElement(Su,null,u)),vA().createPortal(u,n)}let Sp=(0,hk.createContext)(null),Sf=(0,hk.createContext)(null),Sh=(0,hk.forwardRef)(function(e,t){let r=e["aria-labelledby"];[e,t]=bW(e,t,Sp);let{dialogProps:n,titleProps:o}=function(e,t){let r,n,{role:o="dialog"}=e,i=bI();i=e["aria-label"]?void 0:i;let a=(0,hk.useRef)(!1);return(0,hk.useEffect)(()=>{if(t.current&&!t.current.contains(document.activeElement)){v7(t.current);let e=setTimeout(()=>{document.activeElement===t.current&&(a.current=!0,t.current&&(t.current.blur(),v7(t.current)),a.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),bx(()=>{null==n||n(!0)},[n=null==(r=(0,hk.useContext)(Sc))?void 0:r.setContain]),{dialogProps:{...b0(e,{labelable:!0}),role:o,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||i,onBlur:e=>{a.current&&e.stopPropagation()}},titleProps:{id:i}}}({...e,"aria-labelledby":r},t),i=(0,hk.useContext)(Sf);n["aria-label"]||n["aria-labelledby"]||e["aria-labelledby"]&&(n["aria-labelledby"]=e["aria-labelledby"]);let a=bV({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(null==i?void 0:i.close)||(()=>{})}});return hC().createElement("section",{...b0(e),...n,...a,ref:t,slot:e.slot||void 0},hC().createElement(bB,{values:[[wh,{slots:{[bF]:{},title:{...o,level:2}}}],[wp,{slots:{[bF]:{},close:{onPress:()=>null==i?void 0:i.close()}}}]]},a.children))}),Sm=(0,hk.createContext)(null),Sy=(0,hk.forwardRef)(function(e,t){let r=(0,hk.useContext)(Sm);return(null==r?void 0:r.isInvalid)?hC().createElement(Sg,{...e,ref:t}):null}),Sg=(0,hk.forwardRef)((e,t)=>{let r=(0,hk.useContext)(Sm),n=b0(e),o=bV({...e,defaultClassName:"react-aria-FieldError",defaultChildren:0===r.validationErrors.length?void 0:r.validationErrors.join(" "),values:r});return null==o.children?null:hC().createElement(wy,{slot:"errorMessage",...n,...o,ref:t})}),Sb=(0,hk.createContext)(null),Sv=(0,hk.createContext)({}),Sw=wc(function(e,t){[e,t]=bW(e,t,Sv);let{elementType:r="label",...n}=e;return hC().createElement(r,{className:"react-aria-Label",...n,ref:t})}),S_=(0,hk.createContext)({placement:"bottom"}),Sx=new WeakMap,SE=[];function SS(e,t=-1/0,r=1/0){return Math.min(Math.max(e,t),r)}function SD(e,t){let r=e,n=t.toString(),o=n.indexOf("."),i=o>=0?n.length-o:0;if(i>0){let e=Math.pow(10,i);r=Math.round(r*e)/e}return r}function SO(e,t,r,n){t=Number(t),r=Number(r);let o=(e-(isNaN(t)?0:t))%n,i=SD(2*Math.abs(o)>=n?e+Math.sign(o)*(n-Math.abs(o)):e-o,n);return isNaN(t)?!isNaN(r)&&i>r&&(i=Math.floor(SD(r/n,n))*n):i<t?i=t:!isNaN(r)&&i>r&&(i=t+Math.floor(SD((r-t)/n,n))*n),i=SD(i,n)}let SP={top:"top",bottom:"top",left:"left",right:"left"},Sk={top:"bottom",bottom:"top",left:"right",right:"left"},SC={top:"left",left:"top"},Sj={top:"height",left:"width"},ST={width:"totalWidth",height:"totalHeight"},SR={},SN="u">typeof document?window.visualViewport:null;function SA(e){var t,r,n,o,i;let a=0,s=0,l=0,u=0,c=0,d=0,p={},f=(null!=(t=null==SN?void 0:SN.scale)?t:1)>1;if("BODY"===e.tagName){let t=document.documentElement;l=t.clientWidth,u=t.clientHeight,a=null!=(r=null==SN?void 0:SN.width)?r:l,s=null!=(n=null==SN?void 0:SN.height)?n:u,p.top=t.scrollTop||e.scrollTop,p.left=t.scrollLeft||e.scrollLeft,SN&&(c=SN.offsetTop,d=SN.offsetLeft)}else({width:a,height:s,top:c,left:d}=SF(e)),p.top=e.scrollTop,p.left=e.scrollLeft,l=a,u=s;return vd()&&("BODY"===e.tagName||"HTML"===e.tagName)&&f&&(p.top=0,p.left=0,c=null!=(o=null==SN?void 0:SN.pageTop)?o:0,d=null!=(i=null==SN?void 0:SN.pageLeft)?i:0),{width:a,height:s,totalWidth:l,totalHeight:u,scroll:p,top:c,left:d}}function S$(e,t,r,n,o,i,a){var s;let l=null!=(s=o.scroll[e])?s:0,u=n[Sj[e]],c=n.scroll[SP[e]]+i,d=u+n.scroll[SP[e]]-i,p=t-l+a[e]-n[SP[e]],f=t-l+r+a[e]-n[SP[e]];return p<c?c-p:f>d?Math.max(d-f,c-p):0}function SI(e){if(SR[e])return SR[e];let[t,r]=e.split(" "),n=SP[t]||"right",o=SC[n];SP[r]||(r="center");let i=Sj[n],a=Sj[o];return SR[e]={placement:t,crossPlacement:r,axis:n,crossAxis:o,size:i,crossSize:a},SR[e]}function SM(e,t,r,n,o,i,a,s,l,u){var c,d,p,f,h;let{placement:m,crossPlacement:y,axis:g,crossAxis:b,size:v,crossSize:w}=n,x={};x[b]=null!=(c=e[b])?c:0,"center"===y?x[b]+=((null!=(d=e[w])?d:0)-(null!=(p=r[w])?p:0))/2:y!==b&&(x[b]+=(null!=(f=e[w])?f:0)-(null!=(h=r[w])?h:0)),x[b]+=i;let E=e[b]-r[w]+l+u,S=e[b]+e[w]-l-u;if(x[b]=SS(x[b],E,S),m===g){let r=s?a[v]:t[ST[v]];x[Sk[g]]=Math.floor(r-e[g]+o)}else x[g]=Math.floor(e[g]+e[v]+o);return x}function SL(e,t,r,n,o,i){var a,s,l;let{placement:u,axis:c,size:d}=i;return u===c?Math.max(0,r[c]-e[c]-(null!=(a=e.scroll[c])?a:0)+t[c]-(null!=(s=n[c])?s:0)-n[Sk[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[Sk[c]]-o)}function SF(e){let{top:t,left:r,width:n,height:o}=e.getBoundingClientRect(),{scrollTop:i,scrollLeft:a,clientTop:s,clientLeft:l}=document.documentElement;return{top:t+i-s,left:r+a-l,width:n,height:o}}function SB(e,t){let r,n=window.getComputedStyle(e);if("fixed"===n.position){let{top:t,left:n,width:o,height:i}=e.getBoundingClientRect();r={top:t,left:n,width:o,height:i}}else{r=SF(e);let n=SF(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 SV(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 SU=new WeakMap;function SW(e){let{ref:t,box:r,onResize:n}=e;(0,hk.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 Sz="u">typeof document?window.visualViewport:null;function SK(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 SH=[],SG="u">typeof document&&window.visualViewport,Sq=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),SZ=0;function SY(e,t,r){let n=e.style[t];return e.style[t]=r,()=>{e.style[t]=n}}function SJ(e,t,r,n){return e.addEventListener(t,r,n),()=>{e.removeEventListener(t,r,n)}}function SX(e){let t=document.scrollingElement||document.documentElement,r=e;for(;r&&r!==t;){let e=xt(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 SQ={};function S0(e){var t;let{onDismiss:r,...n}=e,o=_0(n,_L((t=SQ)&&t.__esModule?t.default:t,"@react-aria/overlays").format("dismiss"));return hC().createElement(_4,null,hC().createElement("button",{...o,tabIndex:-1,onClick:()=>{r&&r()},style:{width:1,height:1}}))}function S1(e,t,r){bx(()=>{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,vN.flushSync)(()=>{r()})}).catch(()=>{}),()=>{n=!0}}},[e,t,r])}function S2(e){let[t,r]=xJ(e.isOpen,e.defaultOpen||!1,e.onOpenChange),n=(0,hk.useCallback)(()=>{r(!0)},[r]),o=(0,hk.useCallback)(()=>{r(!1)},[r]),i=(0,hk.useCallback)(()=>{r(!t)},[r,t]);return{isOpen:t,setOpen:r,open:n,close:o,toggle:i}}SQ={"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 S4=(0,hk.createContext)(null),S3=(0,hk.createContext)(null),S6=(0,hk.forwardRef)(function(e,t){[e,t]=bW(e,t,S4);let r=(0,hk.useContext)(Sf),n=S2(e),o=null==e.isOpen&&null==e.defaultOpen&&r?r:n,i=function(e,t){let[r,n]=(0,hk.useState)(t?"open":"closed");switch(r){case"open":t||n("exiting");break;case"closed":case"exiting":t&&n("open")}let o="exiting"===r;return S1(e,o,(0,hk.useCallback)(()=>{n(e=>"exiting"===e?"closed":e)},[])),o}(t,o.isOpen)||e.isExiting||!1,a=(0,hk.useContext)(wu),{direction:s}=wk();if(a){let t=e.children;return"function"==typeof t&&(t=t({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),hC().createElement(hC().Fragment,null,t)}return!o||o.isOpen||i?hC().createElement(S5,{...e,triggerRef:e.triggerRef,state:o,popoverRef:t,isExiting:i,dir:s}):null});function S5({state:e,isExiting:t,UNSTABLE_portalContainer:r,...n}){var o,i;let a=(0,hk.useRef)(null),[s,l]=(0,hk.useState)(0),u=(0,hk.useRef)(null),c=(0,hk.useContext)(S3),p=c&&"SubmenuTrigger"===n.trigger;bx(()=>{a.current&&e.isOpen&&l(a.current.getBoundingClientRect().width)},[e.isOpen,a]);let{popoverProps:f,underlayProps:h,arrowProps:m,placement:y}=function(e,t){let{triggerRef:r,popoverRef:n,groupRef:o,isNonModal:i,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:s,...l}=e,u="SubmenuTrigger"===l.trigger,{overlayProps:c,underlayProps:p}=function(e,t){let{onClose:r,shouldCloseOnBlur:n,isOpen:o,isDismissable:i=!1,isKeyboardDismissDisabled:a=!1,shouldCloseOnInteractOutside:s}=e;(0,hk.useEffect)(()=>{if(o&&!SH.includes(t))return SH.push(t),()=>{let e=SH.indexOf(t);e>=0&&SH.splice(e,1)}},[o,t]);let l=()=>{SH[SH.length-1]===t&&r&&r()};!function(e){let{ref:t,onInteractOutside:r,isDisabled:n,onInteractOutsideStart:o}=e,i=(0,hk.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),a=bE(e=>{r&&SK(e,t)&&(o&&o(e),i.current.isPointerDown=!0)}),s=bE(e=>{r&&r(e)});(0,hk.useEffect)(()=>{let e=i.current;if(n)return;let r=b5(t.current);if("u">typeof PointerEvent){let n=r=>{e.isPointerDown&&SK(r,t)&&s(r),e.isPointerDown=!1};return r.addEventListener("pointerdown",a,!0),r.addEventListener("pointerup",n,!0),()=>{r.removeEventListener("pointerdown",a,!0),r.removeEventListener("pointerup",n,!0)}}},[t,n,a,s])}({ref:t,onInteractOutside:i&&o?e=>{(!s||s(e.target))&&(SH[SH.length-1]===t&&(e.stopPropagation(),e.preventDefault()),l())}:void 0,onInteractOutsideStart:e=>{(!s||s(e.target))&&SH[SH.length-1]===t&&(e.stopPropagation(),e.preventDefault())}});let{focusWithinProps:u}=wr({isDisabled:!n,onBlurWithin:e=>{!(!e.relatedTarget||Eg(e.relatedTarget,Ep))&&(!s||s(e.relatedTarget))&&(null==r||r())}});return{overlayProps:{onKeyDown:e=>{"Escape"!==e.key||a||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:!i||u,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:s},null!=o?o:n),{overlayProps:f,arrowProps:h,placement:m}=function(e){var t,r,n;let{direction:o}=wk(),{arrowSize:i=0,targetRef:a,overlayRef:s,scrollRef:l=s,placement:u="bottom",containerPadding:c=12,shouldFlip:d=!0,boundaryElement:p="u">typeof document?document.body:null,offset:f=0,crossOffset:h=0,shouldUpdatePosition:m=!0,isOpen:y=!0,onClose:g,maxHeight:b,arrowBoundaryOffset:v=0}=e,[w,x]=(0,hk.useState)(null),E=[m,u,s.current,a.current,l.current,c,d,p,f,h,y,o,b,v,i],S=(0,hk.useRef)(null==Sz?void 0:Sz.scale);(0,hk.useEffect)(()=>{y&&(S.current=null==Sz?void 0:Sz.scale)},[y]);let D=(0,hk.useCallback)(()=>{var e,t,r,n,g,w;if(!1===m||!y||!s.current||!a.current||!p||(null==Sz?void 0:Sz.scale)!==S.current)return;let E=null;if(l.current&&l.current.contains(document.activeElement)){let n=null==(e=document.activeElement)?void 0:e.getBoundingClientRect(),o=l.current.getBoundingClientRect();(E={type:"top",offset:(null!=(t=null==n?void 0:n.top)?t:0)-o.top}).offset>o.height/2&&(E.type="bottom",E.offset=(null!=(r=null==n?void 0:n.bottom)?r:0)-o.bottom)}let D=s.current;!b&&s.current&&(D.style.top="0px",D.style.bottom="",D.style.maxHeight=(null!=(g=null==(n=window.visualViewport)?void 0:n.height)?g:window.innerHeight)+"px");let O=function(e){var t,r,n,o;let i,{placement:a,targetNode:s,overlayNode:l,scrollNode:u,padding:c,shouldFlip:d,boundaryElement:p,offset:f,crossOffset:h,maxHeight:m,arrowSize:y=0,arrowBoundaryOffset:g=0}=e,b=l instanceof HTMLElement?function(e){let t=e.offsetParent;if(t&&t===document.body&&"static"===window.getComputedStyle(t).position&&!SV(t)&&(t=document.documentElement),null==t)for(t=e.parentElement;t&&!SV(t);)t=t.parentElement;return t||document.documentElement}(l):document.documentElement,v=b===document.documentElement,w=window.getComputedStyle(b).position,x=v?SF(s):SB(s,b);if(!v){let{marginTop:e,marginLeft:t}=window.getComputedStyle(s);x.top+=parseInt(e,10)||0,x.left+=parseInt(t,10)||0}let E=SF(l),S={top:parseInt((i=window.getComputedStyle(l)).marginTop,10)||0,bottom:parseInt(i.marginBottom,10)||0,left:parseInt(i.marginLeft,10)||0,right:parseInt(i.marginRight,10)||0};E.width+=(null!=(t=S.left)?t:0)+(null!=(r=S.right)?r:0),E.height+=(null!=(n=S.top)?n:0)+(null!=(o=S.bottom)?o:0);let D={top:u.scrollTop,left:u.scrollLeft,width:u.scrollWidth,height:u.scrollHeight},O=SA(p),P=SA(b),k="BODY"===p.tagName?SF(b):SB(b,p);return"HTML"===b.tagName&&"BODY"===p.tagName&&(P.scroll.top=0,P.scroll.left=0),function(e,t,r,n,o,i,a,s,l,u,c,d,p,f,h,m){var y,g,b,v,w,x,E,S,D,O,P,k,C,j;let T,R,N,A=SI(e),{size:$,crossAxis:I,crossSize:M,placement:L,crossPlacement:F}=A,B=SM(t,s,r,A,c,d,u,p,h,m),V=c,U=SL(s,u,t,o,i+c,A);if(a&&n[$]>U){let e=SI(`${Sk[L]} ${F}`),n=SM(t,s,r,e,c,d,u,p,h,m);SL(s,u,t,o,i+c,e)>U&&(A=e,B=n,V=c)}let W="bottom";"top"===A.axis?"top"===A.placement?W="top":"bottom"===A.placement&&(W="bottom"):"top"===A.crossAxis&&("top"===A.crossPlacement?W="bottom":"bottom"===A.crossPlacement&&(W="top"));let z=S$(I,B[I],r[M],s,l,i,u);B[I]+=z;let K=(w=B,x=r.height,E=W,T=p?u.height:s[ST.height],R=null!=w.top?u.top+w.top:u.top+(T-(null!=(S=w.bottom)?S:0)-x),N="top"!==E?Math.max(0,s.height+s.top+(null!=(D=s.scroll.top)?D:0)-R-((null!=(O=o.top)?O:0)+(null!=(P=o.bottom)?P:0)+i)):Math.max(0,R+x-(s.top+(null!=(k=s.scroll.top)?k:0))-((null!=(C=o.top)?C:0)+(null!=(j=o.bottom)?j:0)+i)),Math.min(s.height-2*i,N));f&&f<K&&(K=f),r.height=Math.min(r.height,K),z=S$(I,(B=SM(t,s,r,A,V,d,u,p,h,m))[I],r[M],s,l,i,u),B[I]+=z;let H={},G=t[I]+.5*t[M]-B[I]-o[SP[I]],q=h/2+m,Z="left"===SP[I]?(null!=(y=o.left)?y:0)+(null!=(g=o.right)?g:0):(null!=(b=o.top)?b:0)+(null!=(v=o.bottom)?v:0),Y=r[M]-Z-h/2-m,J=SS(G,t[I]+h/2-(B[I]+o[SP[I]]),t[I]+t[M]-h/2-(B[I]+o[SP[I]]));return H[I]=SS(J,q,Y),{position:B,maxHeight:K,arrowOffsetLeft:H.left,arrowOffsetTop:H.top,placement:A.placement}}(a,x,E,D,S,c,d,O,P,k,f,h,!!w&&"static"!==w,m,y,g)}({placement:(w=u,"rtl"===o?w.replace("start","right").replace("end","left"):w.replace("start","left").replace("end","right")),overlayNode:s.current,targetNode:a.current,scrollNode:l.current||s.current,padding:c,shouldFlip:d,boundaryElement:p,offset:f,crossOffset:h,maxHeight:b,arrowSize:i,arrowBoundaryOffset:v});if(O.position){if(D.style.top="",D.style.bottom="",D.style.left="",D.style.right="",Object.keys(O.position).forEach(e=>D.style[e]=O.position[e]+"px"),D.style.maxHeight=null!=O.maxHeight?O.maxHeight+"px":"",E&&document.activeElement&&l.current){let e=document.activeElement.getBoundingClientRect(),t=l.current.getBoundingClientRect(),r=e[E.type]-t[E.type];l.current.scrollTop+=r-E.offset}x(O)}},E);bx(D,E),bx(()=>(window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)}),[n=D]),SW({ref:s,onResize:D}),SW({ref:a,onResize:D});let O=(0,hk.useRef)(!1);bx(()=>{let e,t=()=>{O.current=!0,clearTimeout(e),e=setTimeout(()=>{O.current=!1},500),D()},r=()=>{O.current&&t()};return null==Sz||Sz.addEventListener("resize",t),null==Sz||Sz.addEventListener("scroll",r),()=>{null==Sz||Sz.removeEventListener("resize",t),null==Sz||Sz.removeEventListener("scroll",r)}},[D]);let P=(0,hk.useCallback)(()=>{O.current||null==g||g()},[g,O]);return!function(e){let{triggerRef:t,isOpen:r,onClose:n}=e;(0,hk.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||SU.get(t.current);o&&o()};return window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("scroll",e,!0)}},[r,n,t])}({triggerRef:a,isOpen:y,onClose:g&&P}),{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:D}}({...l,targetRef:r,overlayRef:n,isOpen:t.isOpen,onClose:i&&!u?t.close:null});return!function(e={}){let{isDisabled:t}=e;bx(()=>{if(!t){let e,t,r,n;return 1==++SZ&&(d=vc()?(r=null,n=b_(SJ(document,"touchstart",r=>{((e=xt(r.target,!0))!==document.documentElement||e!==document.body)&&e instanceof HTMLElement&&"auto"===window.getComputedStyle(e).overscrollBehavior&&(t=SY(e,"overscrollBehavior","contain"))},{passive:!1,capture:!0}),SJ(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}),SJ(document,"touchend",()=>{t&&t()},{passive:!1,capture:!0}),SJ(document,"focus",e=>{var t;let n=e.target;((t=n)instanceof HTMLInputElement&&!Sq.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable)&&((()=>{if(r)return;let e=window.pageXOffset,t=window.pageYOffset;r=b_(SJ(window,"scroll",()=>{window.scrollTo(0,0)}),SY(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),SY(document.documentElement,"overflow","hidden"),SY(document.body,"marginTop",`-${t}px`),()=>{window.scrollTo(e,t)}),window.scrollTo(0,0)})(),n.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{n.style.transform="",SG&&(SG.height<window.innerHeight?requestAnimationFrame(()=>{SX(n)}):SG.addEventListener("resize",()=>SX(n),{once:!0}))}))},!0)),()=>{null==t||t(),null==r||r(),n()}):b_(SY(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),SY(document.documentElement,"overflow","hidden"))),()=>{0==--SZ&&d()}}},[t])}({isDisabled:i||!t.isOpen}),bx(()=>{if(t.isOpen&&n.current){if(!i)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}),a=t(e);if(a===NodeFilter.FILTER_ACCEPT&&i(e),a!==NodeFilter.FILTER_REJECT){let e=o.nextNode();for(;null!=e;)i(e),e=o.nextNode()}},i=e=>{var t;let r=null!=(t=Sx.get(e))?t:0;("true"!==e.getAttribute("aria-hidden")||0!==r)&&(0===r&&e.setAttribute("aria-hidden","true"),n.add(e),Sx.set(e,r+1))};SE.length&&SE[SE.length-1].disconnect(),o(t);let a=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)}});a.observe(t,{childList:!0,subtree:!0});let s={visibleNodes:r,hiddenNodes:n,observe(){a.observe(t,{childList:!0,subtree:!0})},disconnect(){a.disconnect()}};return SE.push(s),()=>{for(let e of(a.disconnect(),n)){let t=Sx.get(e);null!=t&&(1===t?(e.removeAttribute("aria-hidden"),Sx.delete(e)):Sx.set(e,t-1))}s===SE[SE.length-1]?(SE.pop(),SE.length&&SE[SE.length-1].observe()):SE.splice(SE.indexOf(s),1)}}([null!=(r=null==o?void 0:o.current)?r:n.current]);var e,r,a=null!=(e=null==o?void 0:o.current)?e:n.current;let t=SE[SE.length-1];return t&&!t.visibleNodes.has(a)?(t.visibleNodes.add(a),()=>{t.visibleNodes.delete(a)}):void 0}},[i,t.isOpen,n,o]),{popoverProps:bL(c,f),arrowProps:h,underlayProps:p,placement:m}}({...n,offset:null!=(o=n.offset)?o:8,arrowSize:s,groupRef:p?c:u},e),g=n.popoverRef,b=function(e,t=!0){let[r,n]=(0,hk.useState)(!0),o=r&&t;return bx(()=>{if(o&&e.current&&"getAnimations"in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,o]),S1(e,o,(0,hk.useCallback)(()=>n(!1),[])),o}(g,!!y)||n.isEntering||!1,v=bV({...n,defaultClassName:"react-aria-Popover",values:{trigger:n.trigger||null,placement:y,isEntering:b,isExiting:t}}),w=!n.isNonModal||"SubmenuTrigger"===n.trigger,[x,E]=(0,hk.useState)(!1);bx(()=>{g.current&&E(w&&!g.current.querySelector("[role=dialog]"))},[g,w]),(0,hk.useEffect)(()=>{x&&g.current&&!g.current.contains(document.activeElement)&&v7(g.current)},[x,g]);let S={...f.style,...v.style},D=hC().createElement("div",{...bL(b0(n),f),...v,role:x?"dialog":void 0,tabIndex:x?-1:void 0,"aria-label":n["aria-label"],"aria-labelledby":n["aria-labelledby"],ref:g,slot:n.slot||void 0,style:S,dir:n.dir,"data-trigger":n.trigger,"data-placement":y,"data-entering":b||void 0,"data-exiting":t||void 0},!n.isNonModal&&hC().createElement(S0,{onDismiss:e.close}),hC().createElement(S_.Provider,{value:{...m,placement:y,ref:a}},v.children),hC().createElement(S0,{onDismiss:e.close}));return p?hC().createElement(Sd,{...n,shouldContainFocus:x,isExiting:t,portalContainer:null!=(i=null!=r?r:null==c?void 0:c.current)?i:void 0},D):hC().createElement(Sd,{...n,shouldContainFocus:x,isExiting:t,portalContainer:r},!n.isNonModal&&e.isOpen&&hC().createElement("div",{"data-testid":"underlay",...h,style:{position:"fixed",inset:0}}),hC().createElement("div",{ref:u,style:{display:"contents"}},hC().createElement(S3.Provider,{value:u},D)))}function S7(e){return(null==e?void 0:e.start)!=null&&null!=e.end}let S9=(0,hk.createContext)(null),S8=(0,hk.createContext)(null),De=(0,hk.createContext)(null),Dt=(0,hk.createContext)(null),Dr=(0,hk.forwardRef)(function(e,t){var r,n;[e,t]=bW(e,t,S9);let{validationBehavior:o}=bU(Sb)||{},i=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",a=function(e){var t;let r=S2(e),[n,o]=xJ(e.value,e.defaultValue||null,e.onChange),i=n||e.placeholderValue||null,[a,s]=E6(i,e.granularity),l=null!=n?n.toDate(null!=s?s:"UTC"):null,u="hour"===a||"minute"===a||"second"===a,c=null==(t=e.shouldCloseOnSelect)||t,[d,p]=(0,hk.useState)(null),[f,h]=(0,hk.useState)(null);if(n&&(d=n,"hour"in n&&(f=n)),i&&!(a in i))throw Error("Invalid granularity "+a+" for value "+i.toString());let m=(null==n?void 0:n.calendar.identifier)==="gregory"&&"BC"===n.era,y=(0,hk.useMemo)(()=>({granularity:a,timeZone:s,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:m}),[a,e.hourCycle,e.shouldForceLeadingZeros,s,e.hideTimeZone,m]),{minValue:g,maxValue:b,isDateUnavailable:v}=e,w=(0,hk.useMemo)(()=>EX(n,g,b,v,y),[n,g,b,v,y]),x=EK({...e,value:n,builtinValidation:w}),E=x.displayValidation.isInvalid,S=e.validationState||(E?"invalid":null),D=(e,t)=>{o("timeZone"in t?t.set(_u(e)):_c(e,t)),p(null),h(null),x.commitValidation()};return{...x,value:n,setValue:o,dateValue:d,timeValue:f,setDateValue:t=>{let n="function"==typeof c?c():c;u?f||n?D(t,f||E2(e.defaultValue||e.placeholderValue)):p(t):(o(t),x.commitValidation()),n&&r.setOpen(!1)},setTimeValue:e=>{d&&e?D(d,e):h(e)},granularity:a,hasTime:u,...r,setOpen(t){!t&&!n&&d&&u&&D(d,f||E2(e.defaultValue||e.placeholderValue)),r.setOpen(t)},validationState:S,isInvalid:E,formatValue:(e,t)=>l?new _B(e,E1(t,y)).format(l):"",getDateFormatter:(e,t)=>new _B(e,E1({},{...y,...t}))}}({...e,validationBehavior:i}),s=(0,hk.useRef)(null),[l,u]=bz(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,fieldProps:p,buttonProps:f,dialogProps:h,calendarProps:m,descriptionProps:y,errorMessageProps:g,...b}=function(e,t,r){var n;let o=b$(),i=b$(),a=b$(),s=_L((n=Eu)&&n.__esModule?n.default:n,"@react-aria/datepicker"),{isInvalid:l,validationErrors:u,validationDetails:c}=t.displayValidation,{labelProps:d,fieldProps:p,descriptionProps:f,errorMessageProps:h}=EN({...e,labelElementType:"span",isInvalid:l,errorMessage:e.errorMessage||u}),m=Ej(t,r),y=p["aria-labelledby"]||p.id,{locale:g}=wk(),b=t.formatValue(g,{month:"long"}),v=_7(b?s.format("selectedDateDescription",{date:b}):""),w=[v["aria-describedby"],p["aria-describedby"]].filter(Boolean).join(" ")||void 0,x=b0(e),E=(0,hk.useMemo)(()=>ED(r),[r]),S=(0,hk.useRef)(!1),{focusWithinProps:D}=wr({...e,isDisabled:t.isOpen,onBlurWithin:t=>{let r=document.getElementById(i);if(!(null==r?void 0:r.contains(t.relatedTarget))){var n,o;S.current=!1,null==(n=e.onBlur)||n.call(e,t),null==(o=e.onFocusChange)||o.call(e,!1)}},onFocusWithin:t=>{if(!S.current){var r,n;S.current=!0,null==(r=e.onFocus)||r.call(e,t),null==(n=e.onFocusChange)||n.call(e,!0)}}});return{groupProps:bL(x,m,p,v,D,{role:"group","aria-disabled":e.isDisabled||null,"aria-labelledby":y,"aria-describedby":w,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...d,onClick:()=>{E.focusFirst()}},fieldProps:{...p,id:a,[EI]:"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,[Ez]:t,autoFocus:e.autoFocus,name:e.name},descriptionProps:f,errorMessageProps:h,buttonProps:{...v,id:o,"aria-haspopup":"dialog","aria-label":s.format("calendar"),"aria-labelledby":`${o} ${y}`,"aria-describedby":w,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:i,"aria-labelledby":`${o} ${y}`},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}}({...bK(e),label:u,validationBehavior:i},a,s),[v,w]=(0,hk.useState)(null),x=(0,hk.useCallback)(()=>{s.current&&w(s.current.offsetWidth+"px")},[]);SW({ref:s,onResize:x});let{focusProps:E,isFocused:S,isFocusVisible:D}=wn({within:!0}),O=bV({...e,values:{state:a,isFocusWithin:S,isFocusVisible:D,isDisabled:e.isDisabled||!1,isInvalid:a.isInvalid,isOpen:a.isOpen},defaultClassName:"react-aria-DatePicker"}),P=b0(e);return delete P.id,hC().createElement(bB,{values:[[De,a],[Ei,{...c,ref:s,isInvalid:a.isInvalid}],[Sr,p],[wp,{...f,isPressed:a.isOpen}],[Sv,{...d,ref:l,elementType:"span"}],[x4,m],[Sf,a],[S4,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":v}}],[Sp,h],[wm,{slots:{description:y,errorMessage:g}}],[Sm,b]]},hC().createElement("div",{...E,...P,...O,ref:t,slot:e.slot||void 0,"data-focus-within":S||void 0,"data-invalid":a.isInvalid||void 0,"data-focus-visible":D||void 0,"data-disabled":e.isDisabled||void 0,"data-open":a.isOpen||void 0}))}),Dn=(0,hk.forwardRef)(function(e,t){var r,n;[e,t]=bW(e,t,S8);let{validationBehavior:o}=bU(Sb)||{},i=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",a=function(e){var t,r,n;let o=S2(e),[i,a]=xJ(e.value,e.defaultValue||null,e.onChange),[s,l]=(0,hk.useState)(()=>i||{start:null,end:null});null==i&&s.start&&s.end&&l(s={start:null,end:null});let u=i||s,c=e=>{l(e||{start:null,end:null}),S7(e)?a(e):a(null)},[d,p]=E6((null==u?void 0:u.start)||(null==u?void 0:u.end)||e.placeholderValue||null,e.granularity),f="hour"===d||"minute"===d||"second"===d,h=null==(n=e.shouldCloseOnSelect)||n,[m,y]=(0,hk.useState)(null),[g,b]=(0,hk.useState)(null);u&&S7(u)&&(m=u,"hour"in u.start&&(g=u));let v=(e,t)=>{c({start:"timeZone"in t.start?t.start.set(_u(e.start)):_c(e.start,t.start),end:"timeZone"in t.end?t.end.set(_u(e.end)):_c(e.end,t.end)}),y(null),b(null),C.commitValidation()},w=t=>{let r="function"==typeof h?h():h;f?S7(t)&&(null==g?void 0:g.start)&&(null==g?void 0:g.end)?v(t,{start:(null==g?void 0:g.start)||E2(e.placeholderValue),end:(null==g?void 0:g.end)||E2(e.placeholderValue)}):y(t):S7(t)?(c(t),C.commitValidation()):y(t),r&&o.setOpen(!1)},x=e=>{S7(m)&&S7(e)?v(m,e):b(e)},E=(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,S=(0,hk.useMemo)(()=>({granularity:d,timeZone:p,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:E}),[d,e.hourCycle,e.shouldForceLeadingZeros,p,e.hideTimeZone,E]),{minValue:D,maxValue:O,isDateUnavailable:P}=e,k=(0,hk.useMemo)(()=>{var e,t;let r;return r=EZ(EX(null!=(e=null==u?void 0:u.start)?e:null,D,O,P,S),EX(null!=(t=null==u?void 0:u.end)?t:null,D,O,P,S)),(null==u?void 0:u.end)!=null&&null!=u.start&&0>u.end.compare(u.start)&&(r=EZ(r,{isInvalid:!0,validationErrors:[(_R.getGlobalDictionaryForPackage("@react-stately/datepicker")||EY).getStringForLocale("rangeReversed",EJ())],validationDetails:{...EB,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),r},[u,D,O,P,S]),C=EK({...e,value:i,name:(0,hk.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:k}),j=C.displayValidation.isInvalid,T=e.validationState||(j?"invalid":null);return{...C,value:u,setValue:c,dateRange:m,timeRange:g,granularity:d,hasTime:f,setDate(e,t){var r,n;"start"===e?w({start:t,end:null!=(r=null==m?void 0:m.end)?r:null}):w({start:null!=(n=null==m?void 0:m.start)?n:null,end:t})},setTime(e,t){var r,n;"start"===e?x({start:t,end:null!=(r=null==g?void 0:g.end)?r:null}):x({start:null!=(n=null==g?void 0:g.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:x,...o,setOpen(t){!t&&!((null==u?void 0:u.start)&&(null==u?void 0:u.end))&&S7(m)&&f&&v(m,{start:(null==g?void 0:g.start)||E2(e.placeholderValue),end:(null==g?void 0:g.end)||E2(e.placeholderValue)}),o.setOpen(t)},validationState:T,isInvalid:j,formatValue(t,r){let n;if(!u||!u.start||!u.end)return null;let o="timeZone"in u.start?u.start.timeZone:void 0,i=e.granularity||(u.start&&"minute"in u.start?"minute":"day"),a="timeZone"in u.end?u.end.timeZone:void 0,s=e.granularity||(u.end&&"minute"in u.end?"minute":"day"),l=E1(r,{granularity:i,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(a||"UTC"),p=new _B(t,l);if(o===a&&i===s&&0!==u.start.compare(u.end)){try{let e=p.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=p}else n=new _B(t,E1(r,{granularity:s,timeZone:a,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:p.format(c),end:n.format(d)}},getDateFormatter:(e,t)=>new _B(e,E1({},{...S,...t}))}}({...e,validationBehavior:i}),s=(0,hk.useRef)(null),[l,u]=bz(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,startFieldProps:p,endFieldProps:f,buttonProps:h,dialogProps:m,calendarProps:y,descriptionProps:g,errorMessageProps:b,...v}=function(e,t,r){var n,o,i,a,s,l;let u=_L((l=Eu)&&l.__esModule?l.default:l,"@react-aria/datepicker"),{isInvalid:c,validationErrors:d,validationDetails:p}=t.displayValidation,{labelProps:f,fieldProps:h,descriptionProps:m,errorMessageProps:y}=EN({...e,labelElementType:"span",isInvalid:c,errorMessage:e.errorMessage||d}),g=h["aria-labelledby"]||h.id,{locale:b}=wk(),v=t.formatValue(b,{month:"long"}),w=_7(v?u.format("selectedRangeDescription",{startDate:v.start,endDate:v.end}):""),x={"aria-label":u.format("startDate"),"aria-labelledby":g},E={"aria-label":u.format("endDate"),"aria-labelledby":g},S=b$(),D=b$(),O=Ej(t,r),P=[w["aria-describedby"],h["aria-describedby"]].filter(Boolean).join(" ")||void 0,k=(0,hk.useMemo)(()=>ED(r,{accept:e=>e.id!==S}),[r,S]),C={[EM]:k,[EI]:"presentation","aria-describedby":P,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},j=b0(e),T=(0,hk.useRef)(!1),{focusWithinProps:R}=wr({...e,isDisabled:t.isOpen,onBlurWithin:t=>{let r=document.getElementById(D);if(!(null==r?void 0:r.contains(t.relatedTarget))){var n,o;T.current=!1,null==(n=e.onBlur)||n.call(e,t),null==(o=e.onFocusChange)||o.call(e,!1)}},onFocusWithin:t=>{if(!T.current){var r,n;T.current=!0,null==(r=e.onFocus)||r.call(e,t),null==(n=e.onFocusChange)||n.call(e,!0)}}}),N=(0,hk.useRef)(EU),A=(0,hk.useRef)(EU);return{groupProps:bL(j,O,h,w,R,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":P,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...f,onClick:()=>{k.focusFirst()}},buttonProps:{...w,id:S,"aria-haspopup":"dialog","aria-label":u.format("calendar"),"aria-labelledby":`${S} ${g}`,"aria-describedby":P,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:D,"aria-labelledby":`${S} ${g}`},startFieldProps:{...x,...C,value:null!=(a=null==(n=t.value)?void 0:n.start)?a:null,onChange:e=>t.setDateTime("start",e),autoFocus:e.autoFocus,name:e.startName,[Ez]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){N.current=e,t.updateValidation(EZ(e,A.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...E,...C,value:null!=(s=null==(o=t.value)?void 0:o.end)?s:null,onChange:e=>t.setDateTime("end",e),name:e.endName,[Ez]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){A.current=e,t.updateValidation(EZ(N.current,e))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:m,errorMessageProps:y,calendarProps:{autoFocus:!0,value:(null==(i=t.dateRange)?void 0:i.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:p}}({...bK(e),label:u,validationBehavior:i},a,s),[w,x]=(0,hk.useState)(null),E=(0,hk.useCallback)(()=>{s.current&&x(s.current.offsetWidth+"px")},[]);SW({ref:s,onResize:E});let{focusProps:S,isFocused:D,isFocusVisible:O}=wn({within:!0}),P=bV({...e,values:{state:a,isFocusWithin:D,isFocusVisible:O,isDisabled:e.isDisabled||!1,isInvalid:a.isInvalid,isOpen:a.isOpen},defaultClassName:"react-aria-DateRangePicker"}),k=b0(e);return delete k.id,hC().createElement(bB,{values:[[Dt,a],[Ei,{...c,ref:s,isInvalid:a.isInvalid}],[wp,{...h,isPressed:a.isOpen}],[Sv,{...d,ref:l,elementType:"span"}],[x3,y],[Sf,a],[S4,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":w}}],[Sp,m],[Sr,{slots:{start:p,end:f}}],[wm,{slots:{description:g,errorMessage:b}}],[Sm,v]]},hC().createElement("div",{...S,...k,...P,ref:t,slot:e.slot||void 0,"data-focus-within":D||void 0,"data-invalid":a.isInvalid||void 0,"data-focus-visible":O||void 0,"data-disabled":e.isDisabled||void 0,"data-open":a.isOpen||void 0}))});function Do(e){return hC().createElement(wP,e)}function Di(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 w3||e instanceof w9||e instanceof _e)return t?_d(e,t):e;{let r=ys()(e).toDate(),n=new w3(r.getFullYear(),r.getMonth()+1,r.getDate());return t?_d(n,t):n}}function Da(e){if(e)return e.toDate(_E())}function Ds(e){if("string"==typeof e&&0!==e.trim().length)try{return new Intl.Locale(e.replace(/[_@]/g,"-")).toString()}catch{return}}function Dl(e){let t=e??"",r=Ds(t);if(!r)return t;try{return new Intl.DisplayNames([r],{type:"language"}).of(r)??t}catch{return t}}function Du(){let e=window.i18next.language,t=Ds(e)??e;return"ht"===t&&(t="fr-HT"),t}if("u">typeof navigator){let e=navigator;ed=Array.isArray(e.languages)?e.languages[0]:e.language}else if("u">typeof process){let e=process.env;ed=e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}var Dc=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch{return"en-US"}}(ed||"en-US"),Dd=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},Dp={};for(let e=1;e<100;e++)Dp[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var Df={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},Dh="[1234567890一二三四五六七八九〇\\d]",Dm={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},Dy={},Dg={"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},Db={zone:Dg,year:Dp,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:{}},Dv={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(Dg).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,}"},Dw={...Dv,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}"},D_={},Dx=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(t=Dc){return D_[t.toLowerCase()]||(D_[t.toLowerCase()]=new e(t)),D_[t.toLowerCase()]}constructor(e=Dc){this.locale=e,this.lookups={...Db},this.vars={...Dv};let t=new Intl.NumberFormat(this.locale);this.numberingSystem=t.resolvedOptions().numberingSystem,this.dateOptions=new Intl.DateTimeFormat(this.locale).resolvedOptions(),this.baseName=new Intl.Locale(this.locale).baseName,this.build()}toInt(e){if("number"==typeof e)return e;if("string"!=typeof e)return;if("latn"===this.numberingSystem&&!this.baseName.startsWith("zh")){let t=parseInt(e,10);if(!isNaN(t))return t}let t="";for(let 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=Dm: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(Dy[e])return Dy[e];if("fullwide"===e||"hanidec"===e)return{group:Dh,lookup:{...Dm}};let t=Df[e];if(!t)return{group:"\\d",lookup:{...Dm}};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 Dy[e]={group:`[${r}-${n}]`,lookup:o},Dy[e]}(this.numberingSystem);for(let r in this.lookups.digit=t,Dw)Dw.hasOwnProperty(r)&&(this.vars[r]=Dw[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,i)=>{e[r+o+(i<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 i=Intl.DateTimeFormat(this.locale,{dateStyle:o});for(let a=0;a<12;a++){let s=i.formatToParts(r[a]).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]=a+1)}}let o=Intl.DateTimeFormat(this.locale,{month:"short"});for(let i=0;i<12;i++){let a=o.formatToParts(r[i]).find(n).value.toLocaleLowerCase(this.locale);a=a.replace(/\.$/,""),e[`${a}\\.?`]=!0,t[a]=i+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 i=Intl.DateTimeFormat(this.locale,{weekday:o});for(let a=0;a<7;a++){let s=i.formatToParts(e[a]).find(t).value.toLocaleLowerCase(this.locale);"short"===o?(s=s.replace(/\.$/,""),r.push(`${s}\\.?`)):r.push(s),n[s]=a}}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 i=0;i<2;i++){let a=o.formatToParts(e[i]).find(t);if(!a)return;let s=a.value.toLocaleLowerCase(this.locale);r.push(s),n[s]=12*i}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")}},DE=["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"],DS={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},DD=()=>new Date;function DO(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 DP=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 i=e.handler(o);if(i){for(let[e,t]of Object.entries(i))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)}},Dk=["year","month","day","hour","minute","second","millisecond","offset"],DC={};function Dj(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 DT=[[/([^\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"]],DR={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," "],...DT],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:DT,id:DT,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function DN(e,t=Dc){let r=function(e){if(!DC[e]){var t,r;let n,o,i=Dx.factory(e);DC[e]=new DP({doneChecker:Dj,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:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? ?(_OFFSET_|Z)?$"),handler:DO(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:DO(["","year","month","day","hour","minute","second","millisecond","zone"])},{name:"timestampWithOffsetAndZone",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? (_OFFSET_|Z)\\s*(_ZONE_)$"),handler:DO(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:i.compile(`^(${Dh}{2,4})\\s*\u5E74\\s*(${Dh}{1,2})\\s*\u6708\\s*(${Dh}{1,2})\\s*\u65E5$`),handler:DO(["","year","month","day"])},{name:"korean",regex:i.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:DO(["","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:DO(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let t=DD(),r=e[1].toLowerCase();switch(r){case"tomorrow":t.setUTCDate(t.getUTCDate()+1);break;case"yesterday":t.setUTCDate(t.getUTCDate()-1)}let n={year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate()};return"now"===r&&(n.hour=t.getUTCHours(),n.minute=t.getUTCMinutes(),n.second=t.getUTCSeconds(),n.millisecond=t.getUTCMilliseconds()),console.log("today=>",r,n),n}},{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?DS[r]:(r=r.replace(/s$/,"")).toLowerCase())&&(r="day",t*=7),("-"===e||n)&&(t*=-1);let o=DD();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:i.compile("(?:^|[\\sT])(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?(Z)?$"),handler:DO(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:i.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:DO(["","hour","minute","second","millisecond","zone"])},{name:"hms12",regex:i.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:DO(["","hour","minute","second","meridiem"])},{name:"hms24",regex:i.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:DO(["","hour","minute","second","millisecond"])},{name:"hm12",regex:i.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:DO(["","hour","minute","meridiem"])},{name:"hm24",regex:i.compile("(_H24_):(_MIN_)"),handler:DO(["","hour","minute"])},{name:"h12",regex:i.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:DO(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:DO(["","year","month","day"])},{name:"yearMonthnameDay",regex:i.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:DO(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:i.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:DO(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:i.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:DO(["","monthname","day","","year"])},{name:"dayMonthname",regex:i.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:DO(["","day","","monthname"])},{name:"monthnameDay",regex:i.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:DO(["","monthname","day"])},{name:"hmsNoMeridiem",regex:i.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:DO(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:i.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:DO(["","hour","minute"])},{name:"ymd",regex:i.compile("(_YEAR4_)([.-])(_MONTH_)\\2+(_DAY_)"),handler:DO(["","year","","month","day"])},{name:"mdy",regex:i.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:DO(["","month","","day","year"])},{name:"dmy",regex:i.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:DO(["","day","month","year"])},{name:"yearLoose",regex:i.compile("_YEAR4_"),handler:DO(["year"])},{name:"dayMonthnameLoose",regex:i.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:DO(["","day","monthname"])},{name:"monthnameDayLoose",regex:i.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:DO(["","monthname","day"])},{name:"monthname",regex:i.compile("_MONTHNAME_"),handler:DO(["monthname"])},{name:"year4",regex:i.compile("_YEAR4_"),handler:DO(["year"])},{name:"md",regex:i.compile("(_MONTH_)[/-](_DAY_)"),handler:DO(["","month","day"])},{name:"dm",regex:i.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:DO(["","day","month"])},{name:"day",regex:i.compile("_DAY_"),handler:DO(["day"])},{name:"year2",regex:i.compile("_YEAR2_"),handler:DO(["year"])},{name:"onlyZone",regex:i.compile("_ZONE_"),handler:DO(["zone"])}],o=i.baseName.slice(0,5),DE.includes(o)?n:n.filter(e=>!["mdy","md"].includes(e.name))),formatter:(r=i,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(Dk.includes(n)){let e=r.toInt(o);"number"==typeof e&&(t[n]=e)}return t.year<100&&(t.year=Dp[t.year]),t.year&&"buddhist"===r.dateOptions.calendar&&(t.year-=543),t})})}return DC[e]}(t),n=function(e,t){let r=DR[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 DA(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let t=new Dd(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 Dd(t.valueOf()-60*e.offset*1e3):t}function D$(e,t=Dc){let r=DN(e,t),n=r.invalid?new Dd(NaN):DA(r);return n.isValid()||(n.invalid=`Unable to parse date "${e}"`),n}function DI(e,t=Dc){return e instanceof Date?new Dd(e.valueOf()):"number"==typeof e?new Dd(e):D$(e,t)}Date.fromString=Dd.fromString=D$,Date.fromAny=Dd.fromAny=DI,"u">typeof window&&(window.anyDateParser={fromString:D$,fromAny:DI,fromObject:DA,attempt:DN});var DM=r(4397),DL=r(7657),DF=r(254);function DB(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}ys().extend(yl),ys().extend(DL),ys().extend(DM);let DV="YYYY-MM-DDTHH:mm:ss.SSSZZ";function DU(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&ys()(e,DV).isValid()}function DW(e){return ys()(e).isToday()}function Dz(e){return DU(e)?ys()(e,DV).toDate():null}function DK(e,t=!1){let r=ys()(e);return t&&(r=r.utc()),r.format(DV)}function DH(e){return ys()(e).toDate()}var DG=new WeakMap;let Dq=new class{register(e,t){DB(this,DG).set(e,t)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let t=`${e.language}-${e.region}`;if(DB(this,DG).has(t))return DB(this,DG).get(t)}if(e.language&&DB(this,DG).has(e.language))return DB(this,DG).get(e.language);let t=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return DB(this,DG).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,DG,{writable:!0,value:new Map})}};function DZ(e,t){Dq.register(e,t)}function DY(e){let t=e??Du();return Dq.getCalendar(t instanceof Intl.Locale?t:new Intl.Locale(t))}let DJ={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function DX(e,t={}){let r=DN(e,Du());if(r.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!(0,DF.A)(r.day)&&(0,DF.A)(r.month)&&(r=Object.assign({},nb(r,"day"),{month:r.day})),r.month&&(r.month-=1),r.day&&(r=Object.assign({},nb(r,"day"),{date:r.day}));let n=ys()().set(r).toDate();return(0,DF.A)(r.year)&&(t.year=!1),(0,DF.A)(r.month)&&(t.month=!1),(0,DF.A)(r.date)&&(t.day=!1),DQ(n,t)}function DQ(e,t){let r,n=t?.locale??Du(),o=new Intl.Locale(n),{calendar:i,mode:a,time:s,day:l,month:u,year:c,noToday:d,numberingSystem:p}={...DJ,...{noToday:"am"===o.language},...t},f={calendar:i??DY(o),year:c?"numeric":void 0,month:u?"short":void 0,day:l?"2-digit":void 0,numberingSystem:p},h=ys()(e).isToday();if(h&&!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,f).formatToParts(e);("en"===o.language||"am"===o.language)&&"standard"==a&&c&&l&&(t=t.map(D0("-"))),"wide"==a&&(t=t.map(D0(" — "))),"ethiopic"===f.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||h&&"for today"===s)&&(r+=`, ${D1(e)}`),r}let D0=e=>(t,r,n)=>"literal"!==t.type||" "!==t.value||r<n.length-1&&"era"===n[r+1].type?t:{type:"literal",value:e};function D1(e){return e.toLocaleTimeString(Du(),{hour:"2-digit",minute:"2-digit"})}function D2(e,t){return DQ(e,{...t,time:!0})}function D4(e,t){let r=DY("string"==typeof t?new Intl.Locale(t):t);return r?_d(e,xW(r)):e}function D3(e,t){return new Intl.DurationFormat(Du(),t).format(e)}function D6(e,t){if(null==e)return null;if("string"==typeof e){let r=DN(e,Du());return r.invalid?(console.warn(`Could not interpret '${e}' as a date`),null):(r.day&&!r.month&&(r={...nb(r,"day"),...{month:r.day}}),r.month&&(r.month-=1),r.day&&(r={...nb(r,"day"),...{date:r.day}}),ys()(t).set(r))}return ys()(e)}let D5=["years","months","days","hours","minutes","seconds"],D7={second:"seconds",minute:"minutes",hour:"hours",day:"days",month:"months",year:"years"},D9={seconds:45,minutes:45,hours:22,days:26,months:11,years:1/0};function D8(e,t=ys()(),r){let n,o=ys()(t),i=D6(e,o);if(null==i)return null;if("string"==typeof r){let e=D7[r]??r;return{[e]:o.diff(i,e)}}let{thresholds:a,largestUnit:s,smallestUnit:l}=r??{};if(void 0!==s||void 0!==l){let e,t=l?D7[l]??l:void 0;return e="auto"===s||void 0===s?function(e,t,r){let n=D5.indexOf(r);for(let o=0;o<D5.length;o++){let i=D5[o];if(t.diff(e,i)>0)return o<=n?i:r}return r}(i,o,t??"seconds"):D7[s]??s,function(e,t,r,n){let o=D5.indexOf(r),i=D5.indexOf(n),a=D5.slice(o,i+1),s={},l=e;for(let e of a){let r=t.diff(l,e);s[e]=r,l=l.add(r,e)}return s}(i,o,e,t??e)}let u=(n=function(e){let t={...D9};if(e)for(let[r,n]of Object.entries(e))void 0!==n&&(t[D7[r]??r]=n);return t}(a),o.diff(i,"seconds")<n.seconds?"seconds":o.diff(i,"minutes")<n.minutes?"minutes":o.diff(i,"hours")<n.hours?"hours":o.diff(i,"days")<n.days?"days":o.diff(i,"months")<n.months?"months":"years");return{[u]:o.diff(i,u)}}let Oe={style:"short",localeMatcher:"lookup"};function Ot(e,t=ys()(),r){let n=D8(e,t,r);return null==n?null:D3(n,"object"==typeof r&&r.formatOptions?{...Oe,...r.formatOptions}:Oe)}let Or=(0,hk.createContext)(null);function On(){let e=mP({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,t=(0,hk.useMemo)(()=>{let t=Du();return e[t]&&(t=e[t]),t},[window.i18next.language]),r=(0,hk.useMemo)(()=>{let e=DY(t);return void 0!==e?xW(e):void 0},[t]),n=(0,hk.useMemo)(()=>new Intl.Locale(t,{calendar:r?.identifier}),[t,r]),o=(0,hk.useMemo)(()=>r?_d(_v(_E()),r):_v(_E()),[r]);return{calendar:r,intlLocale:n,today_:o}}let Oo=new w3(1793,1,1);var Oi={};function Oa(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}Oi={"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:"數字欄位"}};let Os=new Map,Ol=!1;try{Ol="exceptZero"===new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay}catch{}let Ou=!1;try{Ou="unit"===new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style}catch{}let Oc={degree:{narrow:{default:"\xb0","ja-JP":" 度","zh-TW":"度","sl-SI":" \xb0"}}};class Od{format(e){let t="";if(t=Ol||null==this.options.signDisplay?this.numberFormatter.format(e):function(e,t,r){if("auto"===t)return e.format(r);{if("never"===t)return e.format(Math.abs(r));let n=!1;if("always"===t?n=r>0||Object.is(r,0):"exceptZero"===t&&(Object.is(r,-0)||Object.is(r,0)?r=Math.abs(r):n=r>0),!n)return e.format(r);{let t=e.format(-r),n=e.format(r),o=t.replace(n,"").replace(/\u200e|\u061C/,"");return 1!=[...o].length&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),t.replace(n,"!!!").replace(o,"+").replace("!!!",n)}}}(this.numberFormatter,this.options.signDisplay,e),"unit"===this.options.style&&!Ou){var r;let{unit:e,unitDisplay:n="short",locale:o}=this.resolvedOptions();if(!e)return t;let i=null==(r=Oc[e])?void 0:r[n];t+=i[o]||i.default}return t}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,t){if("function"==typeof this.numberFormatter.formatRange)return this.numberFormatter.formatRange(e,t);if(t<e)throw RangeError("End date must be >= start date");return`${this.format(e)} \u{2013} ${this.format(t)}`}formatRangeToParts(e,t){if("function"==typeof this.numberFormatter.formatRangeToParts)return this.numberFormatter.formatRangeToParts(e,t);if(t<e)throw RangeError("End date must be >= start date");let r=this.numberFormatter.formatToParts(e),n=this.numberFormatter.formatToParts(t);return[...r.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...n.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return Ol||null==this.options.signDisplay||(e={...e,signDisplay:this.options.signDisplay}),Ou||"unit"!==this.options.style||(e={...e,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,t={}){this.numberFormatter=function(e,t={}){let{numberingSystem:r}=t;if(r&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${r}`),"unit"===t.style&&!Ou){var n;let{unit:e,unitDisplay:r="short"}=t;if(!e)throw Error('unit option must be provided with style: "unit"');if(!(null==(n=Oc[e])?void 0:n[r]))throw Error(`Unsupported unit ${e} with unitDisplay = ${r}`);t={...t,style:"decimal"}}let o=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(Os.has(o))return Os.get(o);let i=new Intl.NumberFormat(e,t);return Os.set(o,i),i}(e,t),this.options=t}}function Op(e={}){let{locale:t}=wk();return(0,hk.useMemo)(()=>new Od(t,e),[t,e])}var Of={};function Oh(e){var t;let r=(0,hk.useRef)(void 0),{value:n,textValue:o,minValue:i,maxValue:a,isDisabled:s,isReadOnly:l,isRequired:u,onIncrement:c,onIncrementPage:d,onDecrement:p,onDecrementPage:f,onDecrementToMin:h,onIncrementToMax:m}=e,y=_L((t=Of)&&t.__esModule?t.default:t,"@react-aria/spinbutton");(0,hk.useEffect)(()=>()=>clearTimeout(r.current),[]);let g=(0,hk.useRef)(!1),b=()=>{g.current=!0},v=()=>{g.current=!1},w=""===o?y.format("Empty"):(o||`${n}`).replace("-","−");(0,hk.useEffect)(()=>{g.current&&(bG&&bG.clear("assertive"),bq(w,"assertive"))},[w]);let x=bE(e=>{clearTimeout(r.current),null==c||c(),r.current=window.setTimeout(()=>{(void 0===a||isNaN(a)||void 0===n||isNaN(n)||n<a)&&x(60)},e)}),E=bE(e=>{clearTimeout(r.current),null==p||p(),r.current=window.setTimeout(()=>{(void 0===i||isNaN(i)||void 0===n||isNaN(n)||n>i)&&E(60)},e)}),S=e=>{e.preventDefault()},{addGlobalListener:D,removeAllGlobalListeners:O}=vk();return{spinButtonProps:{role:"spinbutton","aria-valuenow":void 0===n||isNaN(n)?void 0:n,"aria-valuetext":w,"aria-valuemin":i,"aria-valuemax":a,"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(f){e.preventDefault(),null==f||f();break}case"ArrowDown":case"Down":p&&(e.preventDefault(),null==p||p());break;case"Home":h&&(e.preventDefault(),null==h||h());break;case"End":m&&(e.preventDefault(),null==m||m())}},onFocus:b,onBlur:v},incrementButtonProps:{onPressStart:()=>{x(400),D(window,"contextmenu",S)},onPressEnd:()=>{clearTimeout(r.current),O()},onFocus:b,onBlur:v},decrementButtonProps:{onPressStart:()=>{E(400),D(window,"contextmenu",S)},onPressEnd:()=>{clearTimeout(r.current),O()},onFocus:b,onBlur:v}}}Of={"ar-AE":{Empty:"فارغ"},"bg-BG":{Empty:"Изпразни"},"cs-CZ":{Empty:"Pr\xe1zdn\xe9"},"da-DK":{Empty:"Tom"},"de-DE":{Empty:"Leer"},"el-GR":{Empty:"Άδειο"},"en-US":{Empty:"Empty"},"es-ES":{Empty:"Vac\xedo"},"et-EE":{Empty:"T\xfchjenda"},"fi-FI":{Empty:"Tyhj\xe4"},"fr-FR":{Empty:"Vide"},"he-IL":{Empty:"ריק"},"hr-HR":{Empty:"Prazno"},"hu-HU":{Empty:"\xdcres"},"it-IT":{Empty:"Vuoto"},"ja-JP":{Empty:"空"},"ko-KR":{Empty:"비어 있음"},"lt-LT":{Empty:"Tuščias"},"lv-LV":{Empty:"Tukšs"},"nb-NO":{Empty:"Tom"},"nl-NL":{Empty:"Leeg"},"pl-PL":{Empty:"Pusty"},"pt-BR":{Empty:"Vazio"},"pt-PT":{Empty:"Vazio"},"ro-RO":{Empty:"Gol"},"ru-RU":{Empty:"Не заполнено"},"sk-SK":{Empty:"Pr\xe1zdne"},"sl-SI":{Empty:"Prazen"},"sr-SP":{Empty:"Prazno"},"sv-SE":{Empty:"Tomt"},"tr-TR":{Empty:"Boş"},"uk-UA":{Empty:"Пусто"},"zh-CN":{Empty:"空"},"zh-TW":{Empty:"空白"}};let Om=RegExp("^.*\\(.*\\).*$"),Oy=["latn","arab","hanidec","deva","beng"];class Og{parse(e){return Ov(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,t,r){return Ov(this.locale,this.options,e).isValidPartialNumber(e,t,r)}getNumberingSystem(e){return Ov(this.locale,this.options,e).options.numberingSystem}constructor(e,t={}){this.locale=e,this.options=t}}let Ob=new Map;function Ov(e,t,r){let n=Ow(e,t);if(!e.includes("-nu-")&&!n.isValidPartialNumber(r)){for(let o of Oy)if(o!==n.options.numberingSystem){let n=Ow(e+(e.includes("-u-")?"-nu-":"-u-nu-")+o,t);if(n.isValidPartialNumber(r))return n}}return n}function Ow(e,t){let r=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():""),n=Ob.get(r);return n||(n=new O_(e,t),Ob.set(r,n)),n}class O_{parse(e){let t=this.sanitize(e);if(this.symbols.group&&(t=OS(t,this.symbols.group,"")),this.symbols.decimal&&(t=t.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(t=t.replace(this.symbols.minusSign,"-")),t=t.replace(this.symbols.numeral,this.symbols.index),"percent"===this.options.style){let e=t.indexOf("-"),r=(t=t.replace("-","")).indexOf(".");-1===r&&(r=t.length),t=t.replace(".",""),t=r-2==0?`0.${t}`:r-2==-1?`0.0${t}`:r-2==-2?"0.00":`${t.slice(0,r-2)}.${t.slice(r-2)}`,e>-1&&(t=`-${t}`)}let r=t?+t:NaN;if(isNaN(r))return NaN;if("percent"===this.options.style){var n,o;let e={...this.options,style:"decimal",minimumFractionDigits:Math.min((null!=(n=this.options.minimumFractionDigits)?n:0)+2,20),maximumFractionDigits:Math.min((null!=(o=this.options.maximumFractionDigits)?o:0)+2,20)};return new Og(this.locale,e).parse(new Od(this.locale,e).format(r))}return"accounting"===this.options.currencySign&&Om.test(e)&&(r*=-1),r}sanitize(e){return e=e.replace(this.symbols.literals,""),this.symbols.minusSign&&(e=e.replace("-",this.symbols.minusSign)),"arab"===this.options.numberingSystem&&(this.symbols.decimal&&(e=(e=e.replace(",",this.symbols.decimal)).replace(String.fromCharCode(1548),this.symbols.decimal)),this.symbols.group&&(e=OS(e,".",this.symbols.group))),"fr-FR"===this.options.locale&&this.symbols.group&&(e=OS(e," ",this.symbols.group),e=OS(e,/\u00A0/g,this.symbols.group)),e}isValidPartialNumber(e,t=-1/0,r=1/0){return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&t<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&r>0&&(e=e.slice(this.symbols.plusSign.length)),!(this.symbols.group&&e.startsWith(this.symbols.group)||this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&0===this.options.maximumFractionDigits)&&(this.symbols.group&&(e=OS(e,this.symbols.group,"")),e=e.replace(this.symbols.numeral,""),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,"")),0===e.length)}constructor(e,t={}){var r,n;this.locale=e,this.formatter=new Intl.NumberFormat(e,t),this.options=this.formatter.resolvedOptions(),this.symbols=function(e,t,r,n){var o,i,a,s,l;let u=new Intl.NumberFormat(e,{...r,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:"auto",roundingMode:"halfExpand"}),c=u.formatToParts(-10000.111),d=u.formatToParts(10000.111),p=OE.map(e=>u.formatToParts(e)),f=null!=(l=null==(o=c.find(e=>"minusSign"===e.type))?void 0:o.value)?l:"-",h=null==(i=d.find(e=>"plusSign"===e.type))?void 0:i.value;h||(null==n?void 0:n.signDisplay)!=="exceptZero"&&(null==n?void 0:n.signDisplay)!=="always"||(h="+");let m=null==(a=new Intl.NumberFormat(e,{...r,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(e=>"decimal"===e.type))?void 0:a.value,y=null==(s=c.find(e=>"group"===e.type))?void 0:s.value,g=[...new Set([...c.filter(e=>!Ox.has(e.type)).map(e=>OD(e.value)),...p.flatMap(e=>e.filter(e=>!Ox.has(e.type)).map(e=>OD(e.value)))])].sort((e,t)=>t.length-e.length),b=0===g.length?RegExp("[\\p{White_Space}]","gu"):RegExp(`${g.join("|")}|[\\p{White_Space}]`,"gu"),v=[...new Intl.NumberFormat(r.locale,{useGrouping:!1}).format(0x24cb016ea)].reverse(),w=new Map(v.map((e,t)=>[e,t]));return{minusSign:f,plusSign:h,decimal:m,group:y,literals:b,numeral:RegExp(`[${v.join("")}]`,"g"),index:e=>String(w.get(e))}}(e,this.formatter,this.options,t),"percent"===this.options.style&&((null!=(r=this.options.minimumFractionDigits)?r:0)>18||(null!=(n=this.options.maximumFractionDigits)?n:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}}let Ox=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),OE=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function OS(e,t,r){return e.replaceAll?e.replaceAll(t,r):e.split(t).join(r)}function OD(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function OO(e,t,r){let n="+"===e?t+r:t-r;if(t%1!=0||r%1!=0){let o=t.toString().split("."),i=r.toString().split("."),a=Math.pow(10,Math.max(o[1]&&o[1].length||0,i[1]&&i[1].length||0));t=Math.round(t*a),r=Math.round(r*a),n=("+"===e?t+r:t-r)/a}return n}let OP=(0,hk.createContext)(null),Ok=(0,hk.createContext)(null),OC=(0,hk.forwardRef)(function(e,t){var r,n;[e,t]=bW(e,t,OP);let{validationBehavior:o}=bU(Sb)||{},i=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",{locale:a}=wk(),s=function(e){let{minValue:t,maxValue:r,step:n,formatOptions:o,value:i,defaultValue:a=NaN,onChange:s,locale:l,isDisabled:u,isReadOnly:c}=e;null===i&&(i=NaN),void 0===i||isNaN(i)||(i=void 0===n||isNaN(n)?SS(i,t,r):SO(i,t,r,n)),isNaN(a)||(a=void 0===n||isNaN(n)?SS(a,t,r):SO(a,t,r,n));let[d,p]=xJ(i,isNaN(a)?NaN:a,s),[f,h]=(0,hk.useState)(()=>isNaN(d)?"":new Od(l,o).format(d)),m=(0,hk.useMemo)(()=>new Og(l,o),[l,o]),y=(0,hk.useMemo)(()=>m.getNumberingSystem(f),[m,f]),g=(0,hk.useMemo)(()=>new Od(l,{...o,numberingSystem:y}),[l,o,y]),b=(0,hk.useMemo)(()=>g.resolvedOptions(),[g]),v=(0,hk.useCallback)(e=>isNaN(e)||null===e?"":g.format(e),[g]),w=EK({...e,value:d}),x=void 0===n||isNaN(n)?1:n;"percent"===b.style&&(void 0===n||isNaN(n))&&(x=.01);let[E,S]=(0,hk.useState)(d),[D,O]=(0,hk.useState)(l),[P,k]=(0,hk.useState)(o);Object.is(d,E)&&l===D&&o===P||(h(v(d)),S(d),O(l),k(o));let C=(0,hk.useMemo)(()=>m.parse(f),[m,f]),j=(e,n=0)=>{if(isNaN(C))return SO(isNaN(n)?0:n,t,r,x);{let n=SO(C,t,r,x);return"+"===e&&n>C||"-"===e&&n<C?n:SO(OO(e,C,x),t,r,x)}},T=(0,hk.useMemo)(()=>!u&&!c&&(isNaN(C)||void 0===r||isNaN(r)||SO(C,t,r,x)>C||OO("+",C,x)<=r),[u,c,t,r,x,C]),R=(0,hk.useMemo)(()=>!u&&!c&&(isNaN(C)||void 0===t||isNaN(t)||SO(C,t,r,x)<C||OO("-",C,x)>=t),[u,c,t,r,x,C]);return{...w,validate:e=>m.isValidPartialNumber(e,t,r),increment:()=>{let e=j("+",t);e===d&&h(v(e)),p(e),w.commitValidation()},incrementToMax:()=>{null!=r&&(p(SO(r,t,r,x)),w.commitValidation())},decrement:()=>{let e=j("-",r);e===d&&h(v(e)),p(e),w.commitValidation()},decrementToMin:()=>{null!=t&&(p(t),w.commitValidation())},canIncrement:T,canDecrement:R,minValue:t,maxValue:r,numberValue:C,setNumberValue:p,setInputValue:h,inputValue:f,commit:()=>{let e;if(!f.length){p(NaN),h(void 0===i?"":v(d));return}isNaN(C)?h(v(d)):(e=void 0===n||isNaN(n)?SS(C,t,r):SO(C,t,r,n),p(e=m.parse(v(e))),h(v(void 0===i?e:d)))}}}({...e,locale:a,validationBehavior:i}),l=(0,hk.useRef)(null),[u,c]=bz(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:d,groupProps:p,inputProps:f,incrementButtonProps:h,decrementButtonProps:m,descriptionProps:y,errorMessageProps:g,...b}=function(e,t,r){var n,o;let i,{id:a,decrementAriaLabel:s,incrementAriaLabel:l,isDisabled:u,isReadOnly:c,isRequired:d,minValue:p,maxValue:f,autoFocus:h,label:m,formatOptions:y,onBlur:g=()=>{},onFocus:b,onFocusChange:v,onKeyDown:w,onKeyUp:x,description:E,errorMessage:S,isWheelDisabled:D,...O}=e,{increment:P,incrementToMax:k,decrement:C,decrementToMin:j,numberValue:T,inputValue:R,commit:N,commitValidation:A}=t,$=_L((o=Oi)&&o.__esModule?o.default:o,"@react-aria/numberfield"),I=b$(a),{focusProps:M}=v9({onBlur(){N()}}),L=Op(y),F=(0,hk.useMemo)(()=>L.resolvedOptions(),[L]),B=Op({...y,currencySign:void 0}),V=(0,hk.useMemo)(()=>isNaN(T)?"":B.format(T),[B,T]),{spinButtonProps:U,incrementButtonProps:W,decrementButtonProps:z}=Oh({isDisabled:u,isReadOnly:c,isRequired:d,maxValue:f,minValue:p,onIncrement:P,onIncrementToMax:k,onDecrement:C,onDecrementToMin:j,value:T,textValue:V}),[K,H]=(0,hk.useState)(!1),{focusWithinProps:G}=wr({isDisabled:u,onFocusWithinChange:H});!function(e,t){let{onScroll:r,isDisabled:n}=e,o=(0,hk.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),r&&r({deltaX:e.deltaX,deltaY:e.deltaY}))},[r]);_3(t,"wheel",n?void 0:o)}({onScroll:(0,hk.useCallback)(e=>{!(Math.abs(e.deltaY)<=Math.abs(e.deltaX))&&(e.deltaY>0?P():e.deltaY<0&&C())},[C,P]),isDisabled:D||u||c||!K},r);let q=(null!=(n=F.maximumFractionDigits)?n:0)>0,Z=void 0===t.minValue||isNaN(t.minValue)||t.minValue<0,Y="numeric";vl()?Z?Y="text":q&&(Y="decimal"):vf()&&(Z?Y="numeric":q&&(Y="decimal"));let J=b0(e),X=(0,hk.useCallback)(e=>{"Enter"===e.key?(N(),A()):e.continuePropagation()},[N,A]),{isInvalid:Q,validationErrors:ee,validationDetails:et}=t.displayValidation,{labelProps:er,inputProps:en,descriptionProps:eo,errorMessageProps:ei}=function(e,t,r){let n=bE(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,hk.useEffect)(()=>{if(!Oa()||!r.current)return;let e=r.current;return e.addEventListener("beforeinput",n,!1),()=>{e.removeEventListener("beforeinput",n,!1)}},[r,n]);let o=Oa()?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:i,inputProps:a,descriptionProps:s,errorMessageProps:l,...u}=function(e,t){let{inputElementType:r="input",isDisabled:n=!1,isRequired:o=!1,isReadOnly:i=!1,type:a="text",validationBehavior:s="aria"}=e,[l,u]=xJ(e.value,e.defaultValue||"",e.onChange),{focusableProps:c}=wt(e,t),d=EK({...e,value:l}),{isInvalid:p,validationErrors:f,validationDetails:h}=d.displayValidation,{labelProps:m,fieldProps:y,descriptionProps:g,errorMessageProps:b}=EN({...e,isInvalid:p,errorMessage:e.errorMessage||f}),v=b0(e,{labelable:!0}),w={type:a,pattern:e.pattern};return ER(t,l,u),EA(e,d,t),(0,hk.useEffect)(()=>{if(t.current instanceof b7(t.current).HTMLTextAreaElement){let e=t.current;Object.defineProperty(e,"defaultValue",{get:()=>e.value,set:()=>{},configurable:!0})}},[t]),{labelProps:m,inputProps:bL(v,"input"===r?w:void 0,{disabled:n,readOnly:i,required:o&&"native"===s,"aria-required":o&&"aria"===s||void 0,"aria-invalid":p||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(hC().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,...y}),descriptionProps:g,errorMessageProps:b,isInvalid:p,validationErrors:f,validationDetails:h}}(e,r),c=(0,hk.useRef)(null);return{inputProps:bL(a,{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:i,descriptionProps:s,errorMessageProps:l,...u}}({...O,...J,name:void 0,label:m,autoFocus:h,isDisabled:u,isReadOnly:c,isRequired:d,validate:void 0,[Ez]:t,value:R,defaultValue:void 0,autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:I,type:"text",inputMode:Y,onChange:e=>{t.validate(e)&&t.setInputValue(e)},onBlur:g,onFocus:b,onFocusChange:v,onKeyDown:(0,hk.useMemo)(()=>b_(X,w),[X,w]),onKeyUp:x,description:E,errorMessage:S},t,r);ER(r,t.numberValue,t.setNumberValue);let ea=bL(U,M,en,{role:null,"aria-roledescription":vc()?null:$.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 es=e=>{var t;document.activeElement!==r.current&&("mouse"===e.pointerType?null==(t=r.current)||t.focus():e.target.focus())},el=e["aria-label"]||("string"==typeof e.label?e.label:"");el||(i=null!=e.label?er.id:e["aria-labelledby"]);let eu=b$(),ec=b$(),ed=bL(W,{"aria-label":l||$.format("increase",{fieldLabel:el}).trim(),id:i&&!l?eu:null,"aria-labelledby":i&&!l?`${eu} ${i}`:null,"aria-controls":I,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:es}),ep=bL(z,{"aria-label":s||$.format("decrease",{fieldLabel:el}).trim(),id:i&&!s?ec:null,"aria-labelledby":i&&!s?`${ec} ${i}`:null,"aria-controls":I,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:es});return{groupProps:{...G,role:"group","aria-disabled":u,"aria-invalid":Q?"true":void 0},labelProps:er,inputProps:ea,incrementButtonProps:ed,decrementButtonProps:ep,errorMessageProps:ei,descriptionProps:eo,isInvalid:Q,validationErrors:ee,validationDetails:et}}({...bK(e),label:c,validationBehavior:i},s,l),v=bV({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:b.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),w=b0(e);return delete w.id,hC().createElement(bB,{values:[[Ok,s],[Ei,p],[Es,{...f,ref:l}],[Sv,{...d,ref:u}],[wp,{slots:{increment:h,decrement:m}}],[wm,{slots:{description:y,errorMessage:g}}],[Sm,b]]},hC().createElement("div",{...w,...v,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-required":e.isRequired||void 0,"data-invalid":b.isInvalid||void 0}),e.name&&hC().createElement("input",{type:"hidden",name:e.name,value:isNaN(s.numberValue)?"":s.numberValue}))});function Oj(e,t){return Number.parseInt(DQ(e,{calendar:t.calendar,locale:t.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}let OT=(0,hk.forwardRef)(function(e,t){let{className:r}=e,n=(0,hk.useContext)(x6),o=(0,hk.useContext)(x5),i=n??o,a=(0,hk.useContext)(Or),s=_E(),l=DQ(i.visibleRange.start.toDate(s),{calendar:a.calendar,locale:a.baseName,day:!1,year:!1,noToday:!0}),u=Oj(i.visibleRange.start.toDate(s),a),c=i.maxValue?Oj(i.maxValue.toDate(s),a):void 0,d=i.minValue?Oj(i.minValue.toDate(s),a):void 0,p=(0,hk.useCallback)(e=>{i.setFocusedDate(i.focusedDate.cycle("year",e-i.focusedDate.year))},[]);return i&&(0,yP.jsxs)("span",{ref:t,className:r,children:[(0,yP.jsx)("span",{children:l}),(0,yP.jsxs)(OC,{formatOptions:{useGrouping:!1},maxValue:c,minValue:d,onChange:p,value:u,children:[(0,yP.jsx)(El,{}),(0,yP.jsxs)(Ea,{children:[(0,yP.jsx)(wf,{slot:"increment",children:(0,yP.jsx)(y6,{size:8})}),(0,yP.jsx)(wf,{slot:"decrement",children:(0,yP.jsx)(y2,{size:8})})]})]})]})}),OR="-esm-openconceptlab__datepicker-module__inputGroup___gBam-",ON="-esm-openconceptlab__datepicker-module__inputSegment___wIJDZ",OA="-esm-openconceptlab__datepicker-module__dateInputWrapper___LiY68",O$="-esm-openconceptlab__datepicker-module__invalidText___A4cv4",OI="-esm-openconceptlab__datepicker-module__flatButton___HcpME",OM="-esm-openconceptlab__datepicker-module__flatButtonMd___eFpyF",OL="-esm-openconceptlab__datepicker-module__flatButtonSm___tsawR",OF="-esm-openconceptlab__datepicker-module__flatButtonLg___4HG5y";function OB({children:e}){let t=(0,hk.useContext)(De),r=(0,hk.useContext)(Dt),n=t??r,o=m6(()=>n?.close());return(0,yP.jsx)(Sh,{className:"-esm-openconceptlab__datepicker-module__dialog___DaqYi",ref:o,children:e})}let OV=(0,hk.forwardRef)(function({variant:e,today_:t,minDate:r,maxDate:n},o){let i="range"===e;return(0,yP.jsx)(S6,{ref:o,className:"-esm-openconceptlab__datepicker-module__popover___nAPzC",placement:"bottom start",offset:1,isNonModal:!0,children:(0,yP.jsx)(OB,{children:(0,yP.jsxs)(i?x9:x7,{...i?{minValue:r,maxValue:n,className:"cds--date-picker__calendar"}:{},children:[(0,yP.jsxs)("header",{className:"-esm-openconceptlab__datepicker-module__header___rPv3L",children:[(0,yP.jsx)(wf,{className:yC()(OI,OM),slot:"previous",children:(0,yP.jsx)(gr,{size:16})}),(0,yP.jsx)(OT,{className:"-esm-openconceptlab__datepicker-module__monthYear___Rw4qE"}),(0,yP.jsx)(wf,{className:yC()(OI,OM),slot:"next",children:(0,yP.jsx)(gn,{size:16})})]}),(0,yP.jsx)(Ee,{className:"-esm-openconceptlab__datepicker-module__calendarGrid___yKV-n",children:e=>(0,yP.jsx)(Eo,{className:yC()("cds--date-picker__day",{"-esm-openconceptlab__datepicker-module__today___KzMTn":0===t.compare(e)}),date:e},e.toString())})]})})})}),OU=(0,hk.forwardRef)(function(e,t){let r=(0,hk.useContext)(De),[n,o]=bW({slot:e.slot},t,Sr),{locale:i}=wk(),a=Se({...n,locale:i,createCalendar:xW}),s=(0,hk.useRef)(null),{fieldProps:l,inputProps:u}=EL({...n,inputRef:s},a,o),c=(0,hk.useCallback)(()=>{a.isDisabled||r.toggle()},[]);return(0,yP.jsxs)(bB,{values:[[Sn,a],[Es,{...u,ref:s}],[Ei,{...l,ref:o,isInvalid:a.isInvalid}]],children:[(0,yP.jsx)(Ea,{...e,id:e.id,ref:t,slot:e.slot||void 0,className:e.className,isDisabled:a.isDisabled,isInvalid:a.isInvalid,onClick:c,children:a.segments.map((t,r)=>(0,hk.cloneElement)(e.children(t),{key:r}))}),(0,yP.jsx)(El,{})]})}),OW=(0,hk.forwardRef)(function(e,t){let r=(0,hk.useContext)(De),n=(0,hk.useContext)(Dt);return(r??n).isInvalid?(0,yP.jsx)(bc,{ref:t,size:16,...e}):(0,yP.jsx)(y1,{ref:t,size:16,...e})});class Oz{of(e){return this.dictionary.getStringForLocale(e,this.locale)}constructor(e,t){this.locale=e,this.dictionary=t}}let OK=new Map,OH=(0,hk.forwardRef)(function({segment:e,...t},r){let n=(0,hk.useContext)(Sn),o=bw(r),{segmentProps:i}=function(e,t,r){let n,o,i,a,s=(0,hk.useRef)(""),{locale:l,direction:u}=wk(),c=function(){var e;let{locale:t}=wk(),r=_M((e=Eu)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,hk.useMemo)(()=>{try{return new Intl.DisplayNames(t,{type:"dateTimeField"})}catch{return new Oz(t,r)}},[t,r])}(),{ariaLabel:d,ariaLabelledBy:p,ariaDescribedBy:f,focusManager:h}=E$.get(t),m=e.isPlaceholder?"":e.text,y=(0,hk.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),g=_H({month:"long",timeZone:y.timeZone}),b=_H({hour:"numeric",hour12:y.hour12,timeZone:y.timeZone});if("month"!==e.type||e.isPlaceholder)"hour"!==e.type||e.isPlaceholder||(m=b.format(t.dateValue));else{let e=g.format(t.dateValue);m=e!==m?`${m} \u{2013} ${e}`:e}let{spinButtonProps:v}=Oh({value:e.value,textValue:m,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,hk.useMemo)(()=>new Og(l,{maximumFractionDigits:0}),[l]),x=()=>{if(e.text===e.placeholder&&h.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:E}=(n=function(e){let{locale:t}=wk(),r=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(OK.has(r))return OK.get(r);let n=new Intl.Collator(t,e);return OK.set(r,n),n}({usage:"search",sensitivity:"base"}),o=(0,hk.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===n.compare(e.slice(0,t.length),t)),[n]),i=(0,hk.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===n.compare(e.slice(-t.length),t)),[n]),a=(0,hk.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 i=e.slice(r,r+o);if(0===n.compare(t,i))return!0}return!1},[n]),(0,hk.useMemo)(()=>({startsWith:o,endsWith:i,contains:a}),[o,i,a])),S=_H({hour:"numeric",hour12:!0}),D=(0,hk.useMemo)(()=>{let e=new Date;return e.setHours(0),S.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[S]),O=(0,hk.useMemo)(()=>{let e=new Date;return e.setHours(12),S.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[S]),P=_H({year:"numeric",era:"narrow",timeZone:"UTC"}),k=(0,hk.useMemo)(()=>{if("era"!==e.type)return[];let r=_d(new w3(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:P.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},[P,t.calendar,e.type]),C=r=>{if(t.isDisabled||t.isReadOnly)return;let n=s.current+r;switch(e.type){case"dayPeriod":if(E(D,r))t.setSegment("dayPeriod",0);else if(E(O,r))t.setSegment("dayPeriod",12);else break;h.focusNext();break;case"era":{let e=k.find(e=>E(e.formatted,r));e&&(t.setSegment("era",e.era),h.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!w.isValidPartialNumber(n))return;let o=w.parse(n),i=o,a=0===e.minValue;if("hour"===e.type&&t.dateFormatter.resolvedOptions().hour12){switch(t.dateFormatter.resolvedOptions().hourCycle){case"h11":o>11&&(i=w.parse(r));break;case"h12":a=!1,o>12&&(i=w.parse(r))}void 0!==e.value&&e.value>=12&&o>1&&(o+=12)}else void 0!==e.maxValue&&o>e.maxValue&&(i=w.parse(r));if(isNaN(o))return;let l=0!==i||a;l&&t.setSegment(e.type,i),void 0!==e.maxValue&&(Number(o+"0")>e.maxValue||n.length>=String(e.maxValue).length)?(s.current="",l&&h.focusNext()):s.current=n}}};_3((0,hk.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 j=(0,hk.useRef)("");_3(r,"beforeinput",n=>{if(r.current)switch(n.preventDefault(),n.inputType){case"deleteContentBackward":case"deleteContentForward":w.isValidPartialNumber(e.text)&&!t.isReadOnly&&x();break;case"insertCompositionText":j.current=r.current.textContent,r.current.textContent=r.current.textContent;break;default:null!=n.data&&C(n.data)}}),_3(r,"input",e=>{let{inputType:t,data:n}=e;"insertCompositionText"===t&&(r.current&&(r.current.textContent=j.current),null!=n&&(E(D,n)||E(O,n))&&C(n))}),bx(()=>{let e=r.current;return()=>{document.activeElement===e&&(h.focusPrevious()||h.focusNext())}},[r,h]);let T=vc()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,hk.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])||t.isInvalid||(f=void 0);let R=b$(),N=!t.isDisabled&&!t.isReadOnly&&e.isEditable,A="literal"===e.type?"":c.of(e.type),$=_0({"aria-label":`${A}${d?`, ${d}`:""}${p?", ":""}`,"aria-labelledby":p});if("literal"===e.type)return{segmentProps:{"aria-hidden":!0}};let I={caretColor:"transparent"};if("rtl"===u){I.unicodeBidi="embed";let t=y[e.type];("numeric"===t||"2-digit"===t)&&(I.direction="ltr")}return{segmentProps:bL(v,$,{id:R,...T,"aria-invalid":t.isInvalid?"true":void 0,"aria-describedby":f,"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(hC().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&&(vs()?e.metaKey:e.ctrlKey)&&e.preventDefault(),!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey)switch(e.key){case"Backspace":case"Delete":e.preventDefault(),e.stopPropagation(),x()}},onFocus:()=>{s.current="",r.current&&xe(r.current,{containingElement:xt(r.current)});let e=window.getSelection();null==e||e.collapse(r.current)},style:I,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}(e,n,o),{focusProps:a,isFocused:s,isFocusVisible:l}=wn(),{hoverProps:u,isHovered:c}=wl({...t,isDisabled:n.isDisabled||"literal"===e.type}),d=function(e){let{className:t,style:r,children:n,defaultClassName:o,defaultChildren:i,defaultStyle:a,values:s}=e;return(0,hk.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof r?r({...s,defaultStyle:a||{}}):r,u="function"==typeof n?n({...s,defaultChildren:i}):null==n?i:n,{className:e??o,style:l||a?{...a,...l}:void 0,children:u??i,"data-rac":""}},[t,r,n,o,i,a,s])}({...t,values:{...e,isReadOnly:!e.isEditable,isInvalid:n.isInvalid,isDisabled:n.isDisabled,isHovered:c,isFocused:s,isFocusVisible:l},defaultChildren:e.text}),p=(0,hk.useCallback)(e=>{e.stopPropagation()},[]);return(0,yP.jsx)("span",{...bL(b0(t),i,a,u),...d,ref:o,style:i.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:p})}),OG={short:!1,size:"md"},Oq=(0,hk.forwardRef)(function(e,t){let{className:r,defaultValue:n,isDisabled:o,invalid:i,invalidText:a,isInvalid:s,label:l,labelText:u,light:c,maxDate:d,minDate:p,onChange:f,onChangeRaw:h,short:m,size:y,value:g,...b}={...OG,...e},{calendar:v,intlLocale:w,today_:x}=On(),E=(0,hk.useId)(),S=!!(u??l),D=(0,hk.useMemo)(()=>Di(n,v),[n,v]),O=(0,hk.useMemo)(()=>Di(g,v,!0),[g,v]),P=(0,hk.useMemo)(()=>Di(d,v),[d,v]),k=(0,hk.useMemo)(()=>Di(p??Oo,v),[p,v]),C=(0,hk.useMemo)(()=>i||s,[i,s]),j=(0,hk.useMemo)(()=>(h&&f&&console.error("An OpenmrsDatePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),h??(e=>f?.(Da(e)))),[h,f]);return(0,yP.jsx)(Do,{locale:w.toString(),children:(0,yP.jsx)("div",{className:yC()("cds--form-item",r),children:(0,yP.jsx)(bB,{values:[[Or,w]],children:(0,yP.jsxs)(Dr,{className:yC()("cds--date-picker","cds--date-picker--single",{"cds--date-picker--short":m,"cds--date-picker--light":c}),defaultValue:D,isDisabled:o,isInvalid:C,maxValue:P,minValue:k,value:O,shouldForceLeadingZeros:"en"===w.language||void 0,...b,onChange:j,children:[(0,yP.jsxs)("div",{className:"cds--date-picker-container",children:[S&&(0,yP.jsx)(Sw,{className:yC()("cds--label",{"cds--label--disabled":o}),htmlFor:E,children:u??l}),(0,yP.jsxs)(Ea,{className:OR,children:[(0,yP.jsx)(OU,{id:S?E:void 0,ref:t,className:yC()("cds--date-picker-input__wrapper","-esm-openconceptlab__datepicker-module__inputWrapper___uKdT1",{"-esm-openconceptlab__datepicker-module__inputWrapperSm___0RXJc":"sm"===y,"-esm-openconceptlab__datepicker-module__inputWrapperMd___4Vff1":"md"===y||!y||0===y.length,"-esm-openconceptlab__datepicker-module__inputWrapperLg___VCRm5":"lg"===y}),children:e=>"era"!==e.type?(0,yP.jsx)(OH,{className:ON,segment:e}):(0,yP.jsx)(hC().Fragment,{})}),(0,yP.jsx)(wf,{className:yC()(OI,{[OL]:"sm"===y,[OM]:"md"===y||!y||0===y.length,[OF]:"lg"===y}),children:(0,yP.jsx)(OW,{})})]}),(0,yP.jsx)(Sy,{className:O$,children:a})]}),(0,yP.jsx)(OV,{variant:"single",today_:x})]})})})})}),OZ=(0,hk.forwardRef)(function({className:e,defaultValue:t,invalid:r,invalidText:n,isDisabled:o,isInvalid:i,label:a,labelText:s,light:l,maxDate:u,minDate:c,onChange:d,onChangeRaw:p,size:f="md",value:h,...m},y){let{calendar:g,intlLocale:b,today_:v}=On(),w=(0,hk.useId)(),x=!!(s??a),E=(0,hk.useMemo)(()=>{if(h)return{start:Di(h[0],g,!1),end:Di(h[1],g,!1)}},[h,g]),S=(0,hk.useMemo)(()=>{if(t)return{start:Di(t[0],g,!1),end:Di(t[1],g,!1)}},[t,g]),D=(0,hk.useMemo)(()=>Di(c??Oo,g,!0),[c,g]),O=(0,hk.useMemo)(()=>Di(u,g,!0),[u,g]),P=(0,hk.useMemo)(()=>r||i,[r,i]),k=(0,hk.useMemo)(()=>(p&&d&&console.error("An OpenmrsDateRangePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),p??(e=>d?.([Da(e.start),Da(e.end)]))),[p,d]);return(0,yP.jsx)(Do,{locale:b.toString(),children:(0,yP.jsx)("div",{className:yC()("cds--form-item",e),children:(0,yP.jsx)(bB,{values:[[Or,b]],children:(0,yP.jsx)(Dn,{id:x?w:void 0,className:yC()("cds--date-picker",{"cds--date-picker--light":l,"cds--date-picker--disabled":o}),isInvalid:P,shouldForceLeadingZeros:"en"===b.language||void 0,maxValue:O,minValue:D,value:E,defaultValue:S,ref:y,isDisabled:o,...m,onChange:k,children:(0,yP.jsxs)("div",{className:"cds--date-picker-container",children:[x&&(0,yP.jsx)(Sw,{className:yC()("cds--label",{"cds--label--disabled":o}),htmlFor:w,children:s??a}),(0,yP.jsxs)(Ea,{className:OR,children:[(0,yP.jsxs)("div",{className:yC()("-esm-openconceptlab__datepicker-module__inputsWrapper___xXRQI",{"-esm-openconceptlab__datepicker-module__inputsWrapperSm___nL+b6":"sm"===f,"-esm-openconceptlab__datepicker-module__inputsWrapperMd___Kgcps":"md"===f||!f||0===f.length,"-esm-openconceptlab__datepicker-module__inputsWrapperLg___raaSN":"lg"===f}),children:[(0,yP.jsx)(Si,{className:yC()("cds--date-picker-input__wrapper","-esm-openconceptlab__datepicker-module__startInput___cWw-5",OA),slot:"start",children:e=>(0,yP.jsx)(OH,{className:ON,segment:e})}),(0,yP.jsx)("div",{className:"-esm-openconceptlab__datepicker-module__separator___Ddb4g",children:(0,yP.jsx)("span",{"aria-hidden":"true","data-readonly":!0,children:"–"})}),(0,yP.jsx)(Si,{className:yC()("cds--date-picker-input__wrapper","-esm-openconceptlab__datepicker-module__endInput___xdYOl",OA),slot:"end",children:e=>(0,yP.jsx)(OH,{className:ON,segment:e})})]}),(0,yP.jsx)(wf,{className:yC()(OI,{[OL]:"sm"===f,[OM]:"md"===f||!f||0===f.length,[OF]:"lg"===f}),children:(0,yP.jsx)(OW,{})})]}),(0,yP.jsx)(Sy,{className:O$,children:n}),(0,yP.jsx)(OV,{variant:"range",today_:v,minDate:D,maxDate:O})]})})})})})}),OY=({diagnoses:e})=>{let{diagnosisTags:t}=mP({externalModuleName:"@openmrs/esm-styleguide"});return(0,yP.jsx)("div",{className:"-esm-openconceptlab__diagnosis-tags-module__container___1iigI",children:e.map(e=>{let{rank:r,uuid:n,display:o}=e,i=t[1===r?"primaryColor":"secondaryColor"];return(0,yP.jsx)(yA.vwO,{type:i,children:o},n)})})},OJ={action:"-esm-openconceptlab__empty-card-module__action___oG778",content:"-esm-openconceptlab__empty-card-module__content___YUXvR",desktopHeading:"-esm-openconceptlab__empty-card-module__desktopHeading___EljiH",tabletHeading:"-esm-openconceptlab__empty-card-module__tabletHeading___8mc7w",tile:"-esm-openconceptlab__empty-card-module__tile___3-rRO"},OX=({width:e="64",height:t="64"})=>(0,yP.jsx)("svg",{width:e,height:t,viewBox:"0 0 64 64",children:(0,yP.jsx)("use",{href:"#omrs-empty-data-illustration"})}),OQ=e=>{let t="tablet"===m0(),r=e.launchForm;return(0,yP.jsx)(yA.Wdr,{className:OJ.layer,children:(0,yP.jsxs)(yA.FAs,{className:OJ.tile,children:[(0,yP.jsx)("div",{className:t?OJ.tabletHeading:OJ.desktopHeading,children:(0,yP.jsx)("h4",{children:e.headerTitle})}),(0,yP.jsx)(OX,{}),(0,yP.jsx)("p",{className:OJ.content,children:sf("emptyStateText","There are no {{displayText}} to display",{displayText:e.displayText})}),(0,yP.jsx)("p",{className:OJ.action,children:r&&(0,yP.jsx)(yA.$nd,{onClick:()=>r(),kind:"ghost",size:t?"lg":"sm",children:sf("recordNewEntry","Record {{ displayText }}",{displayText:e.displayText})})})]})})},O0=({error:e,headerTitle:t})=>{let r="tablet"===m0();return(0,yP.jsx)(yA.Wdr,{children:(0,yP.jsxs)(yA.FAs,{className:"-esm-openconceptlab__error-state-module__tile___mzWLn",children:[(0,yP.jsx)("div",{className:r?"-esm-openconceptlab__error-state-module__tabletHeading___l7Cpn":"-esm-openconceptlab__error-state-module__desktopHeading___p57fl",children:(0,yP.jsx)("h4",{children:t})}),(0,yP.jsxs)("p",{className:"-esm-openconceptlab__error-state-module__errorMessage___0fU6v",children:[sf("error","Error")," ",`${e?.response?.status}: `,e?.response?.statusText]}),(0,yP.jsx)("p",{className:"-esm-openconceptlab__error-state-module__errorCopy___xkVog",children:sf("errorCopy")})]})})},O1=O0,O2=hC().forwardRef((e,t)=>{let{slotName:r,basePath:n,componentContext:o,state:i}=m4(),a=window.location??{pathname:""},s=hW(r??"");return e.isChildOfHeader&&r&&s.length>0?(0,yP.jsxs)(yA.f8J,{"aria-label":sf("leftNavigation","Left navigation"),className:"-esm-openconceptlab__left-nav-module__leftNav___czP9T",expanded:!0,isFixedNav:!0,ref:t,...e,children:[(0,yP.jsx)(hH,{name:"global-nav-menu-slot"}),r?(0,yP.jsx)(mg,{value:o,fallback:(0,yP.jsx)(hH,{name:r,state:{basePath:n,currentPath:a,...i}}),children:(0,yP.jsx)(hj.Provider,{value:o,children:(0,yP.jsx)(hH,{name:r,state:{basePath:n,currentPath:a,...i}})})}):null]}):null}),O4=({selectedLocationUuid:e,defaultLocationUuid:t,locationTag:r,locationsPerRequest:n=50,onChange:o})=>{let[i,a]=(0,hk.useState)(""),s=(0,hk.useId)(),{location:l}=function(e){let t=e?`/ws/fhir2/R4/Location?_id=${e}`:null,{data:r,error:n,isLoading:o}=mR()(t,af,{shouldRetryOnError:e=>!!e?.response?.status&&e.response.status>=500});return(0,hk.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:p,error:f,setPage:h}=function(e,t=0,r=""){let n=mj(r),{data:o,isLoading:i,isValidating:a,setSize:s,error:l}=mH()(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 i=`${ac}/Location?`,a=new URLSearchParams;return a.append("_summary","data"),t&&a.append("_count",""+t),r&&a.append("_getpagesoffset",""+r*t),e&&a.append("_tag",e),"string"==typeof n&&""!==n&&a.append("name:contains",n),i+a.toString()},af);return(0,hk.useMemo)(()=>({locations:o?.length?o?.flatMap(e=>e?.data?.entry??[]):[],isLoading:i,totalResults:o?.[0]?.data?.total,hasMore:!!o?.length&&o?.[o.length-1]?.data?.link?.some(e=>"next"===e.relation),loadingNewData:a,error:l||null,setPage:s}),[i,o,a,s,l])}(r,n,i),m=(0,hk.useMemo)(()=>l&&!i&&t?[l,...u.filter(({resource:e})=>e.id!==t)]:u??[],[l,u,t,i]),y=(0,hk.useCallback)(e=>{o(),a(e.trim())},[o]),g=m5((0,hk.useCallback)(()=>{!p&&d&&h(e=>e+1)},[p,d,h])),b=d?Math.max(0,Math.floor(m.length-n/2)):-1;return(0,yP.jsxs)(yP.Fragment,{children:[(0,yP.jsx)(yA.vji,{"aria-describedby":f?`${s}-error`:void 0,labelText:sf("searchForLocation"),id:s,placeholder:sf("searchForLocation"),onChange:e=>y(e.target.value),size:"lg"}),f&&(0,yP.jsx)("div",{className:"-esm-openconceptlab__location-picker-module__errorNotification___NfvTe",id:`${s}-error`,children:(0,yP.jsx)(yA.jeF,{kind:"error",subtitle:sf("errorLoadingLoginLocations","Unable to load login locations. Please try again or contact support if the problem persists."),title:sf("error","Error")})}),(0,yP.jsx)("div",{className:"-esm-openconceptlab__location-picker-module__searchResults___agplm",children:c?(0,yP.jsx)("div",{className:"-esm-openconceptlab__location-picker-module__loadingContainer___EHghS",children:Array.from({length:5}).map((e,t)=>(0,yP.jsx)(yA.Psq,{className:"-esm-openconceptlab__location-picker-module__radioButtonSkeleton___up5rH",role:"progressbar"},t))}):(0,yP.jsxs)(yP.Fragment,{children:[(0,yP.jsx)("div",{className:"-esm-openconceptlab__location-picker-module__locationResultsContainer___06YOS",children:m.length>0?(0,yP.jsx)(yA.zWQ,{name:"loginLocations",onChange:e=>{o(e?.toString())},orientation:"vertical",valueSelected:e,children:m.map((e,t)=>(0,yP.jsx)(yA.aaP,{className:"-esm-openconceptlab__location-picker-module__locationRadioButton___yKif7",id:e.resource.id,labelText:(0,yP.jsx)("span",{ref:t===b?g:null,children:e.resource.name}),name:e.resource.name,value:e.resource.id},e.resource.id))}):(0,yP.jsx)("div",{className:"-esm-openconceptlab__location-picker-module__emptyState___cPWp8",children:(0,yP.jsx)("p",{className:"-esm-openconceptlab__location-picker-module__locationNotFound___b14++",children:sf("noResultsToDisplay")})})}),p&&(0,yP.jsx)("div",{className:"-esm-openconceptlab__location-picker-module__loadingIcon___GVlrq",children:(0,yP.jsx)(yA.OuH,{description:sf("loading")})})]})})]})},O3=q("modalState",{modalContainer:null,modalStack:[]}),O6=0;async function O5(e,t,r={}){let n=hi(t),o=null;if(e){if(!n)throw Error(`No modal named '${t}' has been registered.`);let{load:i}=n,a=await i(),s=O6++;o=await hS({...a,name:`${t}-${s}`},{...r,domElement:e})}else $(`Failed to launch modal. Please notify your administrator. Modal name: ${t}`);return o}function O7(e){return"TO_BE_DELETED"===e.state||"DELETED"===e.state}function O9(e,t){t?.unmount&&(t.unmountPromise?.catch(()=>{}),t.unmount().catch(t=>{console.error(`The modal '${e}' failed to unmount`,t)}))}function O8(e){return e.find(e=>!O7(e))}function Pe(e,t){e.container&&(e.container.style.visibility=t?"unset":"hidden")}let Pt=window.getComputedStyle(document.body).overflow;function Pr({modalStack:e,modalContainer:t}){if(t)if(e.length){t.style.visibility||(addEventListener("keydown",Po),document.body.style.overflow="hidden",t.style.visibility="unset");let r=O8(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",O5(r,e.modalName,e.props).then(n=>{O7(e)?O9(e.modalName,n):n?(e.parcel=n,t.prepend(r),Pe(e,O8(O3.getState().modalStack)===e),n.mountPromise.then(()=>{O7(e)||(e.state="MOUNTED")},t=>{$(t),e.parcel=null,Pn(e)})):Pn(e)},t=>{$(t),Pn(e)});break}case"MOUNTING":case"MOUNTED":Pe(e,e===r);break;case"TO_BE_DELETED":e.state="DELETED",e.onClose(),O9(e.modalName,e.parcel),e.container?.remove(),setTimeout(()=>{let t=O3.getState();O3.setState({...t,modalStack:t.modalStack.filter(t=>t!==e)})},0)}})}else t.style.removeProperty("visibility"),document.body.style.overflow=Pt,removeEventListener("keydown",Po)}function Pn(e){if(O7(e))return;e.state="TO_BE_DELETED";let t=O3.getState();O3.setState({...t,modalStack:[...t.modalStack]})}function Po(e){"Escape"===e.key&&function(){let[e]=O3.getState().modalStack;e&&Pn(e)}()}function Pi(e){O3.subscribe(Pr),O3.setState({...O3.getState(),modalContainer:e})}function Pa(e,t={},r=()=>{}){let n=()=>{let e=O3.getState().modalStack.find(e=>e.onClose===r);e&&Pn(e)};if(hi(e)){var o;let i,a;o={state:"NEW",onClose:r,modalName:e,props:{close:n,...t}},a=[o,...(i=O3.getState()).modalStack],O3.setState({...i,modalStack:a})}else $(`Failed to launch modal. Please notify your administrator. Modal name: "${e}"`);return n}let Ps=({notification:e})=>{let{description:t,action:r,kind:n,critical:o,title:i,onAction:a}=e;return(0,yP.jsx)(yA.kZS,{actionButtonLabel:r,kind:n||"info",lowContrast:o,subtitle:t,title:i||"",inline:!0,onActionButtonClick:a})},Pl=({subject:e})=>{let[t,r]=(0,hk.useState)([]);return(0,hk.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,yP.jsx)(yP.Fragment,{children:t.map(e=>(0,yP.jsx)(Ps,{notification:e},e.id))})},Pu=({notification:e})=>{let{actionButtonLabel:t,onActionButtonClick:r=()=>{},subtitle:n,kind:o,title:i,critical:a,progressActionLabel:s,id:l,...u}=e,[c,d]=(0,hk.useState)(t);return(0,yP.jsx)(yA.kZS,{kind:o||"info",actionButtonLabel:c,ariaLabel:sf("closesActionableNotification","Closes actionable notification"),onActionButtonClick:()=>{r(),s&&d(s)},statusIconDescription:sf("actionableNotification","Actionable notification"),subtitle:n,title:i,lowContrast:a,inline:!0,...u})},Pc=({subject:e})=>{let[t,r]=(0,hk.useState)([]);return(0,hk.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,yP.jsx)(yP.Fragment,{children:t.map(e=>(0,yP.jsx)(Pu,{notification:e},e.id))})};var Pd=Object.prototype.hasOwnProperty;let Pp=function(e){if(null==e)return!0;if(tw(e)&&(tb(e)||"string"==typeof e||"function"==typeof e.splice||tS(e)||tR(e)||tg(e)))return!e.length;var t=rj(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(td(e))return!rc(e).length;for(var r in e)if(Pd.call(e,r))return!1;return!0},Pf=new ep.Subject,Ph=0,Pm=new ep.Subject,Py=0;function Pg(e){e&&(0,hG.createRoot)(e).render((0,yP.jsx)(Pl,{subject:Pf}))}function Pb(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&(t instanceof Error||!Pp(t)))?(e.description instanceof Error&&(e.description=e.description.toLocaleString()),setTimeout(()=>{Pf.next({...e,id:Ph++})},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function Pv(e){e&&(0,hG.createRoot)(e).render((0,yP.jsx)(Pc,{subject:Pm}))}function Pw(e){var t;e&&("string"==typeof(t=e.actionButtonLabel)?t.trim().length>0:"object"==typeof t&&!Pp(t))?setTimeout(()=>{Pm.next({...e,id:Py++})},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}let P_=["NORMAL","HIGH","CRITICALLY_HIGH","OFF_SCALE_HIGH","LOW","CRITICALLY_LOW","OFF_SCALE_LOW"],Px=["critically_low","critically_high","high","low","normal","off_scale_low","off_scale_high"],PE={container:"-esm-openconceptlab__numeric-observation-module__container___gS0Wg",card:"-esm-openconceptlab__numeric-observation-module__card___w0fF5","abnormal-value":"-esm-openconceptlab__numeric-observation-module__abnormal-value___xuX3W","critical-value":"-esm-openconceptlab__numeric-observation-module__critical-value___Jynsn",cell:"-esm-openconceptlab__numeric-observation-module__cell___tMhBJ","critically-high":"-esm-openconceptlab__numeric-observation-module__critically-high___3L2wx","critically-low":"-esm-openconceptlab__numeric-observation-module__critically-low___XP+HX",high:"-esm-openconceptlab__numeric-observation-module__high___JV9do",low:"-esm-openconceptlab__numeric-observation-module__low___-uDKD","label-container":"-esm-openconceptlab__numeric-observation-module__label-container___vTf2y","value-container":"-esm-openconceptlab__numeric-observation-module__value-container___xTUIC",label:"-esm-openconceptlab__numeric-observation-module__label___-pfmb",value:"-esm-openconceptlab__numeric-observation-module__value___1A4zt",units:"-esm-openconceptlab__numeric-observation-module__units___SzvX+","pad-right":"-esm-openconceptlab__numeric-observation-module__pad-right___ND9XL","off-scale-low":"-esm-openconceptlab__numeric-observation-module__off-scale-low___gFAv9","off-scale-high":"-esm-openconceptlab__numeric-observation-module__off-scale-high___aSEmX",arrow:"-esm-openconceptlab__numeric-observation-module__arrow___9bvsX"},PS=({value:e,unit:t,label:r,interpretation:n,referenceRange:o,conceptUuid:i,variant:a="card",patientUuid:s})=>{let l=(0,hk.useId)(),{referenceRange:u,isLoading:c}=function(e,t){let r=null;e&&(r=t?`${au}/conceptreferencerange/?patient=${t}&concept=${e}&v=full`:`${au}/conceptreferencerange/?concept=${e}&v=full`);let{data:n,error:o,isLoading:i}=mR()(r,af),a=n?.data?.results?.[0];return{referenceRange:a?{hiNormal:a.hiNormal??null,hiAbsolute:a.hiAbsolute??null,hiCritical:a.hiCritical??null,lowNormal:a.lowNormal??null,lowAbsolute:a.lowAbsolute??null,lowCritical:a.lowCritical??null}:void 0,error:o,isLoading:i}}(o||n?void 0:i,s),d=o??u,p=(0,hk.useMemo)(()=>{if(n)return n?"--"===n?"normal":P_.includes(n)?n.toLowerCase():Px.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",f="critically_low"===p||"critically_high"===p||"off_scale_low"===p||"off_scale_high"===p,h="normal"!==p,m=r?`omrs-numeric-obs-label-${r.replaceAll(/\s+/g,"-").toLowerCase()}-${l}`:void 0,y=`omrs-numeric-obs-value-${l}`,g=`omrs-numeric-obs-unit-${l}`,b=null!=e&&""!==e,v=b?e:sf("notAvailable","Not available"),w=yC()({[PE["critically-low"]]:"critically_low"===p||"off_scale_low"===p,[PE["critically-high"]]:"critically_high"===p||"off_scale_high"===p,[PE.low]:"low"===p,[PE.high]:"high"===p,[PE["off-scale-low"]]:"off_scale_low"===p,[PE["off-scale-high"]]:"off_scale_high"===p}),x=yC()({[PE.container]:!0,[PE.card]:!0,[PE["critical-value"]]:f,[PE["abnormal-value"]]:h&&!f}),E=yC()({[PE.cell]:!0,[w]:!0});return"cell"===a?(0,yP.jsxs)("div",{className:E,children:[v,b&&t?` ${t}`:""]}):(0,yP.jsxs)("section",{className:x,"data-testid":"numeric-observation-card",children:[r&&(0,yP.jsxs)("div",{className:PE["label-container"],children:[(0,yP.jsx)("span",{id:m,className:PE.label,children:r}),h&&(0,yP.jsx)("span",{className:PE[p.replace("_","-")],title:sf("abnormalValue","Abnormal value")})]}),(0,yP.jsxs)("div",{className:PE["value-container"],children:[(0,yP.jsx)("span",{id:y,"aria-labelledby":m&&g?`${m} ${g}`:m||g||void 0,className:PE.value,children:v}),b&&t&&(0,yP.jsx)("span",{id:g,className:PE.units,children:t})]})]})},PD="-esm-openconceptlab__page-header-module__pageHeader___6TOjO",PO=e=>{if("children"in e){let{children:t,className:r,...n}=e;return(0,yP.jsx)("div",{className:yC()(PD,r),...n,children:t})}{let{title:t,illustration:r,className:n,...o}=e;return(0,yP.jsx)("div",{className:yC()(PD,n),...o,children:(0,yP.jsx)(PP,{title:t,illustration:r})})}},PP=({title:e,illustration:t,className:r})=>{let[n,o]=(0,hk.useState)(null);return(0,hk.useEffect)(()=>{n9("@openmrs/esm-styleguide").then(e=>{o(e)})},[]),(0,yP.jsxs)("div",{className:yC()("-esm-openconceptlab__page-header-module__pageHeaderContent___mCImT",r),children:[t,(0,yP.jsxs)("div",{className:"-esm-openconceptlab__page-header-module__pageLabels___kqDS+",children:[n?.implementationName&&(0,yP.jsx)("p",{children:sf(n.implementationName)}),(0,yP.jsx)("p",{className:"-esm-openconceptlab__page-header-module__pageName___SbZBC",children:e})]})]})},Pk=({totalItems:e,pageSize:t,onPageNumberChange:r,pageNumber:n,dashboardLinkUrl:o,currentItems:i,dashboardLinkLabel:a})=>{let{pageSizes:s,pageItemsCount:l}=m8(t,e,n,i),u="tablet"===m0(),c=sf("paginationItemsCount","{{pageItemsCount}} / {{totalItems}} items",{totalItems:e,pageItemsCount:l});return(0,yP.jsx)(yP.Fragment,{children:e>0&&(0,yP.jsxs)("div",{className:yC()({"-esm-openconceptlab__pagination-module__tablet___82gj1":u,"-esm-openconceptlab__pagination-module__desktop___6yI8e":!u}),children:[(0,yP.jsxs)("div",{children:[c,o&&(0,yP.jsx)(hT,{to:o,className:"-esm-openconceptlab__pagination-module__configurableLink___oIqma",children:a??sf("seeAll","See all")})]}),(0,yP.jsx)(yA.dKS,{className:"-esm-openconceptlab__pagination-module__pagination___A-Lcg",page:n,pageSize:t,pageSizes:s,totalItems:e,onChange:r,pageRangeText:(e,t)=>sf("paginationOfPages","of {{count}} pages",{count:t}),size:u?"lg":"sm"})]})})};function PC(e){return PT(PN(e,"usual","official"))}function Pj(e){return PC(e)}function PT(e){var t;let r;return e?e.text??(r=(t=e).given??[],(t.family?r.concat(t.family):r).join(" ")):""}function PR(e){return PT(e)}function PN(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 PA(e,t=ys()()){let r=ys()(t),n=D6(e,r);if(null==n)return null;let o=r.diff(n,"hours"),i=r.diff(n,"days"),a=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(i<2)u.hours=o;else if(a<4)u.days=i;else if(l<1){let e=r.subtract(a,"weeks").diff(n,"days");u.weeks=a,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 P$(e,t=ys()()){let r=PA(e,t);if(null==r)return null;let n={style:"short",localeMatcher:"lookup"};return"minutes"in r&&0===r.minutes&&(n.minutesDisplay="always"),D3(r,n)}let PI={container:"-esm-openconceptlab__patient-banner-patient-info-module__container___iC32K",activePatientContainer:"-esm-openconceptlab__patient-banner-patient-info-module__activePatientContainer___OoDPd",patientBanner:"-esm-openconceptlab__patient-banner-patient-info-module__patientBanner___swajU",patientName:"-esm-openconceptlab__patient-banner-patient-info-module__patientName___+2+Xi",patientAvatar:"-esm-openconceptlab__patient-banner-patient-info-module__patientAvatar___Rdf75",patientAvatarButton:"-esm-openconceptlab__patient-banner-patient-info-module__patientAvatarButton___A1q8c",patientInfo:"-esm-openconceptlab__patient-banner-patient-info-module__patientInfo___L-cOQ",demographics:"-esm-openconceptlab__patient-banner-patient-info-module__demographics___IDhb0",row:"-esm-openconceptlab__patient-banner-patient-info-module__row___TP7gU",flexRow:"-esm-openconceptlab__patient-banner-patient-info-module__flexRow___vNMt2",tagsSlot:"-esm-openconceptlab__patient-banner-patient-info-module__tagsSlot___0Dvjn",identifiers:"-esm-openconceptlab__patient-banner-patient-info-module__identifiers___d3GTJ",identifier:"-esm-openconceptlab__patient-banner-patient-info-module__identifier___kc6eq",primaryIdentifier:"-esm-openconceptlab__patient-banner-patient-info-module__primaryIdentifier___ZxRUU",secondaryIdentifier:"-esm-openconceptlab__patient-banner-patient-info-module__secondaryIdentifier___eQh8x",value:"-esm-openconceptlab__patient-banner-patient-info-module__value___CoAOR",tag:"-esm-openconceptlab__patient-banner-patient-info-module__tag___InccN",gender:"-esm-openconceptlab__patient-banner-patient-info-module__gender___vfinx",separator:"-esm-openconceptlab__patient-banner-patient-info-module__separator___3OIBl",tooltipPadding:"-esm-openconceptlab__patient-banner-patient-info-module__tooltipPadding___hBqWG",tooltipSmallText:"-esm-openconceptlab__patient-banner-patient-info-module__tooltipSmallText___bPnkq",actionsButtonText:"-esm-openconceptlab__patient-banner-patient-info-module__actionsButtonText___VNvm7"};function PM({showIdentifierLabel:e,type:t,value:r}){return(0,yP.jsx)("span",{className:PI.primaryIdentifier,children:(0,yP.jsxs)(yA.vwO,{className:PI.tag,type:"gray",children:[e&&t?.text&&(0,yP.jsxs)("span",{className:PI.label,children:[t.text,": "]}),(0,yP.jsx)("span",{className:PI.value,children:r})]})})}function PL({showIdentifierLabel:e,type:t,value:r}){return(0,yP.jsxs)(yA.lRv,{className:PI.secondaryIdentifier,id:`patient-banner-identifier-${r}`,children:[e&&(0,yP.jsxs)("span",{className:PI.label,children:[t?.text,": "]}),(0,yP.jsx)("span",{className:PI.value,children:r})]})}function PF({identifiers:e,showIdentifierLabel:t}){let{excludePatientIdentifierCodeTypes:r}=mP(),{primaryIdentifierCode:n}=yr(),o=e?.filter(e=>{let t=e.type?.coding?.[0]?.code;return t&&!r?.uuids.includes(t)})??[];return(0,yP.jsx)(yP.Fragment,{children:o?.length?o.map(({value:e,type:r},i)=>(0,yP.jsxs)(hC().Fragment,{children:[(0,yP.jsx)("span",{className:PI.identifier,children:r?.coding?.[0]?.code===n?(0,yP.jsx)(PM,{showIdentifierLabel:t,type:r,value:e}):(0,yP.jsx)(PL,{showIdentifierLabel:t,type:r,value:e})}),i<o.length-1&&(0,yP.jsx)("span",{className:PI.separator,children:"\xb7"})]},e)):""})}let PB={Female:gm,Male:gy,Other:gg,Unknown:gb},PV=({gender:e})=>{let t=PB[e];return t?(0,yP.jsx)(t,{fill:"#525252"}):null},PU={male:"Male",female:"Female",other:"Other",unknown:"Unknown"};function PW({patient:e,renderedFrom:t}){var r;let n,o,i=PC(e),a=e?.gender&&(o=PU[n=(r=e.gender).toLowerCase()]??"Unknown",{displayText:sf(n,r),iconKey:o}),s=(0,hk.useMemo)(()=>({patientUuid:e.id,patient:e,renderedFrom:t}),[e.id,e,t]);return(0,yP.jsxs)("div",{className:PI.patientInfo,children:[(0,yP.jsx)("div",{className:yC()(PI.row,PI.patientNameRow),children:(0,yP.jsxs)("div",{className:PI.flexRow,children:[(0,yP.jsx)("span",{className:PI.patientName,children:i}),a&&(0,yP.jsxs)("div",{className:PI.gender,children:[(0,yP.jsx)(PV,{gender:a.iconKey}),(0,yP.jsx)("span",{children:a.displayText})]}),(0,yP.jsx)(hH,{className:PI.tagsSlot,name:"patient-banner-tags-slot",state:s})]})}),(0,yP.jsxs)("div",{className:PI.demographics,children:[e.birthDate&&(0,yP.jsxs)(yP.Fragment,{children:[(0,yP.jsx)("span",{children:P$(e.birthDate)}),(0,yP.jsx)("span",{className:PI.separator,children:"\xb7"}),(0,yP.jsx)("span",{children:DX(e.birthDate,{time:!1})}),(0,yP.jsx)("span",{className:PI.separator,children:"\xb7"})]}),(0,yP.jsx)(PF,{identifiers:e.identifier,showIdentifierLabel:!0}),(0,yP.jsx)(hH,{className:PI.extensionSlot,name:"patient-banner-bottom-slot",state:s})]})]})}var Pz=r(8282);function PK({patient:e,patientUuid:t,actionsSlotName:r,additionalActionsSlotState:n}){let[o,i]=(0,hk.useState)(!1),{extensions:a}=hz(r),s="tablet"===m0(),l=m6(()=>i(!1),o),u=(0,hk.useRef)(null),c=(0,hk.useRef)(null),d=(0,hk.useId)(),p=`patient-actions-menu-trigger-${d}`,f=`patient-actions-menu-${d}`,h=(0,hk.useCallback)(()=>i(e=>!e),[]),m=(0,hk.useCallback)(()=>{i(!1),u.current?.focus()},[]),y=(0,hk.useCallback)(e=>{if("Escape"===e.key&&o){e.stopPropagation(),m();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),i=o<0?t.length-1:o>=t.length?0:o;t[i]?.focus()}},[m,o]);(0,hk.useEffect)(()=>{if(o&&c.current){let e=c.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[o]);let g=(0,hk.useMemo)(()=>({patientUuid:t,patient:e,closeMenu:m,...n}),[t,e,m,n]);return 0===a.length?null:(0,yP.jsx)("div",{className:"-esm-openconceptlab__patient-banner-actions-menu-module__overflowMenuContainer___FbFcO",children:(0,yP.jsxs)("div",{"data-overflow-menu":!0,className:yC()("cds--overflow-menu",yM),ref:l,children:[(0,yP.jsxs)("button",{className:yC()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":o},yB),"aria-controls":f,"aria-expanded":o,"aria-haspopup":"true",id:p,onClick:h,onKeyDown:y,ref:u,children:[(0,yP.jsx)("span",{className:"-esm-openconceptlab__patient-banner-actions-menu-module__actionsButtonText___hk4xW",children:sf("actions","Actions")})," ",(0,yP.jsx)(Pz.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}})]}),(0,yP.jsxs)("div",{className:yC()("cds--overflow-menu-options","cds--overflow-menu--flip",yL,{[yF]:o}),"aria-labelledby":p,"data-floating-menu-direction":"bottom",id:f,onKeyDown:y,ref:c,role:"menu",tabIndex:-1,children:[(0,yP.jsx)("ul",{className:yC()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":s}),children:(0,yP.jsx)(hH,{name:r,state:g},r)}),(0,yP.jsx)("span",{})]})]})})}var PH=r(5570),PG=r.n(PH);function Pq(e){let{patientPhotoConceptUuid:t}=mP({externalModuleName:"@openmrs/esm-styleguide"}),r=t?`${au}/obs?patient=${e}&concept=${t}&v=full`:null,{data:n,error:o,isLoading:i}=h8()(e?r:null,af),a=n?.data?.results[0];return{data:a?{dateTime:a?.obsDatetime,imageSrc:a?.value?.links?.uri}:null,error:o,isLoading:i}}let PZ=({width:e=56,height:t=56,"aria-label":r})=>{let{t:n}=(0,h7.useTranslation)();return(0,yP.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,yP.jsx)("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),(0,yP.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"})]})},PY="-esm-openconceptlab__patient-photo-module__avatar___thboZ";function PJ({patientUuid:e,patientName:t,alt:r}){let{data:n,isLoading:o}=Pq(e),[i,a]=(0,hk.useState)(null),[s,l]=(0,hk.useState)(!1),u=(0,hk.useMemo)(()=>PG().generate(e),[e]);(0,hk.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||(a(e),l(!1))},r.onerror=()=>{t||(a(null),l(!1))},r.src=e,()=>{t=!0}}a(null),l(!1)},[n?.imageSrc]);let c=(0,hk.useMemo)(()=>r||(i?sf("patientPhotoAlt","Profile photo of {{patientName}}",{patientName:t}):sf("patientAvatarAlt","Avatar for {{patientName}}",{patientName:t})),[r,i,t]);return o||s?(0,yP.jsx)(yA.ryE,{className:"-esm-openconceptlab__patient-photo-module__skeleton___WWtyX","data-testid":"skeleton-icon"}):n?.imageSrc&&!i?(0,yP.jsx)(PZ,{"aria-label":sf("patientPhotoPlaceholder","Photo placeholder for {{patientName}}",{patientName:t})}):i?(0,yP.jsx)("div",{"aria-label":c,children:(0,yP.jsx)("img",{className:PY,src:i,alt:c,title:t})}):(0,yP.jsx)("div",{"aria-label":c,children:(0,yP.jsx)("div",{className:PY,title:t,style:{backgroundImage:u.toDataUrl(),backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:(0,yP.jsx)("span",{className:"-esm-openconceptlab__patient-photo-module__initials___xLeEF",children:function(e,t=3){return e.split(/\s+/).filter(Boolean).slice(0,t).map(e=>e[0]).join("")}(t)})})})}let PX=["omrs-pict-appointments","omrs-pict-assessment-1","omrs-pict-assessment-2","omrs-pict-blood-bank","omrs-pict-cardiology","omrs-pict-ct-scan","omrs-pict-dentistry","omrs-pict-digital-trust","omrs-pict-emergency-department","omrs-pict-facility","omrs-pict-geriatrics","omrs-pict-gynaecology","omrs-pict-in-patient","omrs-pict-laboratory","omrs-pict-labs-2","omrs-pict-obstetrics","omrs-pict-patient-search","omrs-pict-patients","omrs-pict-payments-desk","omrs-pict-pharmacy","omrs-pict-pharmacy-2","omrs-pict-registration","omrs-pict-service-queues","omrs-pict-stock-management","omrs-pict-transfer","omrs-pict-triage","omrs-pict-x-ray"],PQ=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(kw,{ref:t,pictogram:"omrs-pict-appointments",pictogramProps:e})})),P0=PQ,P1=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(kw,{ref:t,pictogram:"omrs-pict-assessment-1",pictogramProps:e})})),P2=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(kw,{ref:t,pictogram:"omrs-pict-assessment-2",pictogramProps:e})})),P4=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(kw,{ref:t,pictogram:"omrs-pict-blood-bank",pictogramProps:e})})),P3=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(kw,{ref:t,pictogram:"omrs-pict-cardiology",pictogramProps:e})})),P6=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(kw,{ref:t,pictogram:"omrs-pict-ct-scan",pictogramProps:e})})),P5=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(kw,{ref:t,pictogram:"omrs-pict-dentistry",pictogramProps:e})})),P7=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(kw,{ref:t,pictogram:"omrs-pict-digital-trust",pictogramProps:e})})),P9=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(kw,{ref:t,pictogram:"omrs-pict-emergency-department",pictogramProps:e})})),P8=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(kw,{ref:t,pictogram:"omrs-pict-facility",pictogramProps:e})})),ke=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(kw,{ref:t,pictogram:"omrs-pict-geriatrics",pictogramProps:e})})),kt=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(kw,{ref:t,pictogram:"omrs-pict-gynaecology",pictogramProps:e})})),kr=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(kw,{ref:t,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),kn=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(kw,{ref:t,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),ko=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(kw,{ref:t,pictogram:"omrs-pict-labs-2",pictogramProps:e})})),ki=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(kw,{ref:t,pictogram:"omrs-pict-obstetrics",pictogramProps:e})})),ka=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(kw,{ref:t,pictogram:"omrs-pict-patient-search",pictogramProps:e})})),ks=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(kw,{ref:t,pictogram:"omrs-pict-patients",pictogramProps:e})})),kl=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(kw,{ref:t,pictogram:"omrs-pict-payments-desk",pictogramProps:e})})),ku=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(kw,{ref:t,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),kc=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(kw,{ref:t,pictogram:"omrs-pict-pharmacy-2",pictogramProps:e})})),kd=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(kw,{ref:t,pictogram:"omrs-pict-registration",pictogramProps:e})})),kp=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(kw,{ref:t,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),kf=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(kw,{ref:t,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),kh=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(kw,{ref:t,pictogram:"omrs-pict-transfer",pictogramProps:e})})),km=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(kw,{ref:t,pictogram:"omrs-pict-triage",pictogramProps:e})})),ky=(0,hk.memo)((0,hk.forwardRef)(function(e,t){return(0,yP.jsx)(kw,{ref:t,pictogram:"omrs-pict-x-ray",pictogramProps:e})})),kg=P8,kb=ks,kv=(0,hk.memo)((0,hk.forwardRef)(function({pictogram:e,fallback:t,...r},n){let o=(0,hk.useRef)(document.getElementById(e));return(0,hk.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,yP.jsx)(mg,{value:o.current,fallback:t,children:(0,yP.jsx)(kw,{ref:n,pictogram:e,pictogramProps:r})})})),kw=(0,hk.memo)((0,hk.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,yP.jsx)("svg",{ref:r,className:yC()("-esm-openconceptlab__pictograms-module__pictogram___ooPKM",n),height:o,width:o,children:(0,yP.jsx)("use",{href:`#${e}`})})})),k_=({children:e})=>"tablet"===m0()?(0,yP.jsx)(yA.Wdr,{children:e}):(0,yP.jsx)(yP.Fragment,{children:e}),kx=({snackbar:e,closeSnackbar:t})=>{let{actionButtonLabel:r="",kind:n="success",onActionButtonClick:o=()=>{},isLowContrast:i="error"!==n,progressActionLabel:a,subtitle:s="",timeoutInMs:l=5e3,autoClose:u="error"!==n,title:c,id:d,...p}=e,[f,h]=(0,hk.useState)(r),[m,y]=(0,hk.useState)(!0),[g,b]=(0,hk.useState)(!1),v=(0,hk.useCallback)(()=>{setTimeout(t,250)},[t]),w=(0,hk.useCallback)(()=>{b(!0),v()},[v]);return(0,hk.useEffect)(()=>{if(u){let e=setTimeout(w,l);return()=>clearTimeout(e)}},[l,u,w]),(0,hk.useEffect)(()=>{y(!1),window.setTimeout(()=>{y(!0)},0)},[]),(0,yP.jsx)(yA.kZS,{actionButtonLabel:f,"aria-label":sf("closeSnackbar","Close snackbar"),className:yC()("-esm-openconceptlab__snackbar-module__slideIn___senVE",{"-esm-openconceptlab__snackbar-module__animated___8eltL":m,"-esm-openconceptlab__snackbar-module__slideOut___BIIXm":g}),kind:n,lowContrast:i,onActionButtonClick:()=>{o(),w(),a&&h(a)},onClose:v,statusIconDescription:sf("snackbarNotification","Snackbar notification"),subtitle:s,title:c,...p})},kE=({subject:e})=>{let[t,r]=(0,hk.useState)([]),n=(0,hk.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]);return(0,hk.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,yP.jsx)(yP.Fragment,{children:t.map(e=>(0,yP.jsx)(kx,{snackbar:e,closeSnackbar:()=>n(e)},e.id))})},kS=new ep.Subject,kD=0;function kO(e){e&&(0,hG.createRoot)(e).render((0,yP.jsx)(kE,{subject:kS}))}function kP(e){var t;e&&"string"==typeof(t=e.title)&&t.trim().length>0?setTimeout(()=>{kS.next({...e,id:kD++})},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}let kk=({toast:e,closeToast:t})=>{let{description:r,kind:n,critical:o,title:i,actionButtonLabel:a,onActionButtonClick:s=()=>{}}=e,l=(0,hk.useCallback)(()=>{s(),t()},[t,s]);return(0,yP.jsx)("div",{children:(0,yP.jsx)(yA.kZS,{actionButtonLabel:a,kind:n||"info",lowContrast:o,subtitle:r,title:i||"",onActionButtonClick:l,onClose:t})})},kC=({subject:e})=>{let[t,r]=(0,hk.useState)([]),n=(0,hk.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]);return(0,hk.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,yP.jsx)(yP.Fragment,{children:t.map(e=>(0,yP.jsx)(kk,{toast:e,closeToast:()=>n(e)},e.id))})},kj=new ep.Subject,kT=0;function kR(e){e&&(0,hG.createRoot)(e).render((0,yP.jsx)(kC,{subject:kj}))}function kN(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!Pp(t))?setTimeout(()=>{kj.next({...e,id:kT++})},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}function kA(e,t=!1){if(t)return!0;let r=kF[e];return!r||!r()}function k$(e,t){let r=kG.getState()?.workspaceGroup,n=r?.name;n&&e===n&&kJ(()=>{let n=k2(e);n&&(n.setState({},!0),n.subscribe(()=>{})()),"function"==typeof r?.cleanup&&r.cleanup(),kG.setState(e=>({...e,workspaceGroup:void 0})),"function"==typeof t&&t()},n?e=>e.currentWorkspaceGroup===n:()=>!0)}function kI(e,t){let{name:r,additionalProps:n}=t;hd(r);let o=()=>{kz(e.name,{ignoreChanges:!0,onWorkspaceClose:()=>kM(r,n),closeWorkspaceGroup:!1})};kA(e.name)?o():kQ("closing-workspace-launching-new-workspace",o,e.title??e.name)}function kM(e,t){let r=hd(e),n=kG.getState().workspaceGroup;if(n&&!n.members?.includes(e))return void k$(n.name,()=>{kM(e,t)});let o=kG.getState().workspaceGroup?.name,i={...r,title:k0(r,t),closeWorkspace:(t={})=>kz(e,t),closeWorkspaceWithSavedChanges:t=>kz(e,{ignoreChanges:!0,...t}),promptBeforeClosing:t=>{var r,n;return r=e,n=t,void(kF[r]=n)},setTitle:(t,r)=>{i.title=t,i.titleNode=r,kG.setState(t=>{let r=t.openWorkspaces.map(t=>t.name===e?i:t);return{...t,openWorkspaces:r}})},currentWorkspaceGroup:o,additionalProps:t??{}};function a(e,t){kG.setState(r=>{let n=[e,...t??r.openWorkspaces],o=kY(e);return{...r,openWorkspaces:n,workspaceWindowState:o}})}o&&k2(o,t);let s=kG.getState().openWorkspaces,l=s.findIndex(t=>t.name===e),u=s.find(e=>e.type==i.type);if(0===s.length)a(i);else if(s[0].canHide||0===l)if(l>=0){let t=s[l];a({...t,additionalProps:i.additionalProps,...t.title===k0(t,t.additionalProps)&&{title:k0(i,i.additionalProps)}},s.filter(t=>t.name!=e))}else u?(a(u,kG.getState().openWorkspaces.filter(e=>e.type!=i.type)),kI(u,{name:e,additionalProps:t})):a(i);else kI(s[0],{name:e,additionalProps:t})}function kL({targetUrl:e,contextKey:t,workspaceName:r,additionalProps:n}){kK(t),kM(r,n),i8({to:e})}let kF={};function kB(e,t){kF[e]=t}function kV(e){return kF[e]}function kU(){let e=kG.getState();kG.setState({...e,prompt:null})}let kW={ignoreChanges:!1,onWorkspaceClose:()=>{},closeWorkspaceGroup:!0};function kz(e,t={}){t={...kW,...t};let r=()=>{let r=kG.getState();r.openWorkspaces.find(t=>t.name===e);let n=r.openWorkspaces.filter(t=>t.name!=e),o=kG.getState().workspaceGroup?.name;o&&t.closeWorkspaceGroup&&k$(o),kF[e]=()=>!1,kG.setState(e=>({...e,prompt:null,openWorkspaces:n,workspaceWindowState:kY(n?.[0])})),t?.onWorkspaceClose?.()};return kA(e,t?.ignoreChanges)?(r(),!0):(kQ("closing-workspace",r,hd(e).title??e),!1)}function kK(e){kG.getState().context!=e&&kG.setState({context:e,openWorkspaces:[],prompt:null})}let kH={context:"",openWorkspaces:[],prompt:null,workspaceWindowState:"normal",workspaceGroup:void 0},kG=q("workspace",kH);function kq(){return kG}function kZ(e){let t=kG.getState();kG.setState({...t,workspaceWindowState:e})}function kY(e){return e?.preferredWindowSize??"normal"}function kJ(e=()=>{},t=()=>!0){let r=kG.getState().openWorkspaces.filter(t).every(({name:e})=>kA(e)),n=()=>{k1(),e?.()};r?n():kQ("closing-all-workspaces",n)}function kX(){let{workspaceWindowState:e,openWorkspaces:t,prompt:r,workspaceGroup:n}=hI(kG);return(0,hk.useMemo)(()=>({active:t.length>0,prompt:r,workspaceWindowState:e,workspaces:t,workspaceGroup:n}),[t,e,r,n])}function kQ(e,t=()=>{},r=""){let n;switch(e){case"closing-workspace":n={title:sf("unsavedChangesTitleText","Unsaved changes"),body:sf("unsavedChangesInOpenedWorkspace","You may have unsaved changes in the opened workspace. Do you want to discard these changes?"),onConfirm:()=>{t?.()},confirmText:sf("discard","Discard")};break;case"closing-all-workspaces":{let e=kG.getState().openWorkspaces.filter(({name:e})=>!kA(e)).map(({title:e},t)=>`${t+1}. ${e}`);n={title:sf("closingAllWorkspacesPromptTitle","You have unsaved changes"),body:sf("closingAllWorkspacesPromptBody","There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",{workspaceNames:e.join(",")}),onConfirm:()=>{t?.()},confirmText:sf("closeAllOpenedWorkspaces","Discard changes in {{count}} workspaces",{count:e.length})};break}case"closing-workspace-launching-new-workspace":n={title:sf("unsavedChangesTitleText","Unsaved changes"),body:sf("unsavedChangesInWorkspace",'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',{workspaceName:r}),onConfirm:()=>{kG.setState(e=>({...e,prompt:null})),t?.()},confirmText:sf("openAnyway","Open anyway")};break;default:console.error(`Workspace system trying to open unknown prompt type "${e}" in function "showWorkspacePrompts"`),t?.();return}kG.setState(e=>({...e,prompt:n}))}function k0(e,t){return t?.workspaceTitle??e.title}function k1(){kG.setState(kH)}function k2(e,t={}){if(!e||"default"===e)return;let r=Y(e,{});return t&&r.setState(e=>({...e,...t})),r}let k4="-esm-openconceptlab__action-menu-button-module__container___F68g0",k3="-esm-openconceptlab__action-menu-button-module__elementContainer___D1ACn",k6="-esm-openconceptlab__action-menu-button-module__active___HAE75";function k5({getIcon:e,formOpenInTheBackground:t,tagContent:r}){return(0,yP.jsxs)(yP.Fragment,{children:[e({size:16}),t?(0,yP.jsx)("span",{className:"-esm-openconceptlab__action-menu-button-module__interruptedTag___CQ2Xs",children:"!"}):(0,yP.jsx)("span",{className:"-esm-openconceptlab__action-menu-button-module__countTag___3mn9k",children:r})]})}let k7=({getIcon:e,label:t,iconDescription:r,handler:n,type:o,tagContent:i})=>{let a=m0(),{workspaces:s,workspaceWindowState:l}=kX(),u=s?.findIndex(({type:e})=>e===o)??-1,c="hidden"!==l&&0===u,d=u>0||0===u&&"hidden"===l;return"tablet"===a||"phone"===a?(0,yP.jsxs)(yA.$nd,{className:yC()(k4,{[k6]:c}),iconDescription:r,kind:"ghost",onClick:n,role:"button",tabIndex:0,size:"md",children:[(0,yP.jsx)("span",{className:k3,children:(0,yP.jsx)(k5,{formOpenInTheBackground:d,getIcon:e,tagContent:i})}),(0,yP.jsx)("span",{children:t})]}):(0,yP.jsx)(yA.K0,{align:"left","aria-label":r,className:yC()(k4,{[k6]:c}),enterDelayMs:300,kind:"ghost",label:t,onClick:n,size:"md",children:(0,yP.jsx)("div",{className:k3,children:(0,yP.jsx)(k5,{formOpenInTheBackground:d,getIcon:e,tagContent:i})})})};var k9=r(4240),k8=r(8622),Ce=/[\\^$.*+?()[\]{}|]/g,Ct=RegExp(Ce.source);let Cr=function(e){return(e=na(e))&&Ct.test(e)?e.replace(Ce,"\\$&"):e};function Cn({contextKey:e}){let{prompt:t}=kX();return(0,hk.useEffect)(()=>{RegExp(`/${Cr(e)}(/|$)`).test(window.location.pathname)||console.warn(`WorkspaceContainer has provided an invalid context key: "${e}". The context key must be part of the URL path, with no initial or trailing slash.`)},[]),(0,hk.useEffect)(()=>(kK(e),()=>{kK(null)}),[e]),(0,hk.useEffect)(()=>{let t=t=>{let{detail:{cancelNavigation:r,newUrl:n}}=t,o=RegExp(`/${Cr(e)}(/|$)`),i=new URL(n),a=o.test(i.pathname),s=kG.getState().openWorkspaces.every(({name:e})=>kA(e));a||(s?k1():(r?.(),kJ(()=>{i8({to:n})})))};return window.addEventListener("single-spa:before-routing-event",t),()=>{window.removeEventListener("single-spa:before-routing-event",t)}},[]),null!=t?(0,yP.jsxs)(yA.KXP,{open:!0,onClose:kU,children:[(0,yP.jsx)(yA.rQ0,{title:t.title}),(0,yP.jsx)(yA.cwr,{children:(0,yP.jsx)("p",{className:"-esm-openconceptlab__workspace-notification-module__messageBody___dkytJ",children:t.body})}),(0,yP.jsxs)(yA.jlY,{children:[(0,yP.jsx)(yA.$nd,{kind:"secondary",onClick:kU,children:t.cancelText??sf("cancel")}),(0,yP.jsx)(yA.$nd,{kind:"danger",onClick:t.onConfirm,children:t.confirmText??sf("confirm")})]})]}):null}function Co(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 Ci(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Co(Object(r),!0).forEach(function(t){Cs(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Co(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Ca(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 Cs(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cl(e){return(Cl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Cu(e,t){return(Cu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Cc(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Cd=function(e){var t=hk.Component;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");a.prototype=Object.create(t&&t.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),t&&Cu(a,t);var r,n,o,i=(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=Cl(a);e=r?Reflect.construct(t,arguments,Cl(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 Cc(this)});function a(e){var t;if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,a),Cs(Cc(t=i.call(this,e)),"handleRef",function(e){t.el=e}),Cs(Cc(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}))}),Cs(Cc(t),"getParcelProps",function(){var e=Ci(Ci({},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,Ci({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 hQ&&hQ.Consumer?hk.createElement(hQ.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):null;var t=hQ&&hQ.Consumer?hk.createElement(hQ.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):void 0;return hk.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},t)}}],Ca(a.prototype,n),o&&Ca(a,o),a}();Cs(Cd,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});function Cp({workspace:e,additionalPropsFromPage:t}){let[r,n]=(0,hk.useState)(),o=function(e){let[t,r]=(0,hk.useState)({}),[n,o]=(0,hk.useState)(e);return(0,hk.useEffect)(()=>{n!==e&&o(e)},[e]),(0,hk.useEffect)(()=>{let e,t=k2(n);return t&&(r(t.getState()),e=t.subscribe(r)),()=>{t&&e?.()}},[n]),t}(e.currentWorkspaceGroup);(0,hk.useEffect)(()=>{let t=!0;return e.load().then(e=>{t&&n(e)}),()=>{t=!1}},[e]);let i=(0,hk.useMemo)(()=>e&&{closeWorkspace:e.closeWorkspace,closeWorkspaceWithSavedChanges:e.closeWorkspaceWithSavedChanges,promptBeforeClosing:e.promptBeforeClosing,setTitle:e.setTitle,...t,...o,...e.additionalProps},[e,t,o]);return r?(0,yP.jsx)(Cd,{config:r,mountParcel:hO,...i},e.name):(0,yP.jsx)(yA.OuH,{className:"-esm-openconceptlab__workspace-module__loader___jEP+q",description:`${sf("loading","Loading")} ...`})}function Cf({isWithinWorkspace:e,name:t,actionMenuProps:r={}}){let[n,o]=(0,hk.useState)(!1),i=(0,hk.useRef)(window.innerHeight),{featureName:a}=(0,hk.useContext)(hj),s=m0();(0,hk.useEffect)(()=>{let e=()=>{o(!m1(s)&&i.current>window.innerHeight),i.current!=window.innerHeight&&(i.current=window.innerHeight)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[i]);let l=`action-menu-${t&&"default"!=t?t:a}-items-slot`;return(0,yP.jsx)("aside",{className:yC()("-esm-openconceptlab__action-menu-module__sideRail___iVmKs",{"-esm-openconceptlab__action-menu-module__withinWorkspace___YZfet":e,"-esm-openconceptlab__action-menu-module__sideRailHidden___bCdyQ":n,"-esm-openconceptlab__action-menu-module__sideRailVisible___+oJCY":!n}),children:(0,yP.jsx)("div",{className:"-esm-openconceptlab__action-menu-module__container___sf6Et",children:(0,yP.jsx)(hH,{className:"-esm-openconceptlab__action-menu-module__chartExtensions___l+r+Y",name:l,state:r})})})}function Ch({contextKey:e,overlay:t,showSiderailAndBottomNav:r,additionalWorkspaceProps:n,actionMenuProps:o}){let i=m0(),{workspaces:a,workspaceWindowState:s,workspaceGroup:l}=kX(),u=l?.name,c=a[0],d="hidden"===s||null==c,p=c?.width??(t?"wider":"narrow"),f=(0,hk.useMemo)(()=>r||u&&!d,[u,d,r]);return mS(!d&&!m1(i)),(0,yP.jsxs)(yP.Fragment,{children:[(0,yP.jsxs)("div",{className:r?"-esm-openconceptlab__workspace-module__workspaceContainerWithActionMenu___kZRyN":"-esm-openconceptlab__workspace-module__workspaceContainerWithoutActionMenu___1OJIb",children:[(0,yP.jsx)("aside",{className:yC()(t?"-esm-openconceptlab__workspace-module__workspaceOverlayOuterContainer___8RiIj":"-esm-openconceptlab__workspace-module__workspaceWindowSpacer___F1W-O",{"-esm-openconceptlab__workspace-module__hiddenRelative___7oRNR":d,"-esm-openconceptlab__workspace-module__narrowWorkspace___R3CN9":"narrow"===p,"-esm-openconceptlab__workspace-module__widerWorkspace___L-pDK":"wider"===p,"-esm-openconceptlab__workspace-module__extraWideWorkspace___D50Zj":"extra-wide"===p}),children:(0,yP.jsx)("div",{className:yC()("-esm-openconceptlab__workspace-module__workspaceFixedContainer___9E2Or",{"-esm-openconceptlab__workspace-module__maximizedWindow___d+PZ5":"maximized"===s,"-esm-openconceptlab__workspace-module__hiddenFixed___kBFgl":d}),children:a.map((e,t)=>(0,yP.jsx)("div",{className:yC()("-esm-openconceptlab__workspace-module__workspaceInnerContainer___VEPNB",{"-esm-openconceptlab__workspace-module__hiddenExtraWorkspace___E7d4h":0!==t}),children:(0,yP.jsx)(hk.Suspense,{fallback:null,children:(0,yP.jsx)(h7.I18nextProvider,{i18n:window.i18next,defaultNS:e.moduleName,children:(0,yP.jsx)(Cm,{workspaceInstance:e,additionalWorkspaceProps:n})})})},`workspace-container-${e?e.name:`empty-${t}`}`))})}),(0,yP.jsx)(Cn,{contextKey:e})]}),f&&(0,yP.jsx)(Cf,{name:u,isWithinWorkspace:!r,actionMenuProps:o})]})}function Cm({workspaceInstance:e,additionalWorkspaceProps:t}){let{t:r}=(0,h7.useTranslation)(),n=m0(),{workspaceWindowState:o,workspaceGroup:i}=kX(),a=i?.name,s="maximized"===o;(0,hk.useEffect)(()=>{let t=r(e.title);t!==e.title&&e.setTitle(t)},[e.title,r,e.setTitle]);let{featureName:l}=(0,hk.useContext)(hj),u=(0,hk.useCallback)(()=>{kZ(s?"normal":"maximized")},[s]),{canHide:c=!1,canMaximize:d=!1,currentWorkspaceGroup:p="",closeWorkspace:f}=(0,hk.useMemo)(()=>e??{},[e]),h=(0,hk.useMemo)(()=>({...t,...e?.additionalProps}),[t,e]);return e&&(0,yP.jsxs)(yP.Fragment,{children:[(0,yP.jsxs)(yA.Y9Y,{"aria-label":sf("workspaceHeader","Workspace Header"),className:"-esm-openconceptlab__workspace-module__header___nMH1R",children:[!m1(n)&&!c&&(0,yP.jsx)(yA.dJ2,{"aria-label":sf("close","Close"),renderMenuIcon:(0,yP.jsx)(yY,{}),onClick:()=>f()}),(0,yP.jsx)(yA.bCw,{prefix:"",children:e.titleNode??r(e.title)}),(0,yP.jsx)("div",{className:"-esm-openconceptlab__workspace-module__overlayHeaderSpacer___vxoMd"}),(0,yP.jsxs)(yA.wdv,{className:"-esm-openconceptlab__workspace-module__headerButtons___lek95",children:[(0,yP.jsx)(hH,{name:`workspace-header-group-${e.currentWorkspaceGroup}-slot`,state:h}),(0,yP.jsx)(hH,{name:`workspace-header-type-${e.type}-slot`,state:h}),(0,yP.jsx)(hH,{name:`workspace-header-${l}-slot`,state:h}),m1(n)&&(0,yP.jsxs)(yP.Fragment,{children:[(d||s)&&(0,yP.jsx)(yA.V8d,{"aria-label":s?sf("minimize","Minimize"):sf("maximize","Maximize"),onClick:u,children:s?(0,yP.jsx)(k9.Xj,{}):(0,yP.jsx)(k9.hz,{})}),c&&!a?(0,yP.jsx)(yA.V8d,{"aria-label":sf("hide","Hide"),onClick:()=>kZ("hidden"),children:(0,yP.jsx)(yJ,{})}):(0,yP.jsx)(yA.V8d,{"aria-label":sf("close","Close"),onClick:()=>f?.(),children:(0,yP.jsx)(gi,{})})]}),"tablet"===n&&c&&(0,yP.jsx)(yA.V8d,{"aria-label":sf("close","Close"),onClick:()=>f?.(),children:(0,yP.jsx)(k8.d3,{})})]})]}),(0,yP.jsx)("div",{className:yC()("-esm-openconceptlab__workspace-module__workspaceContent___FFe+u",{"-esm-openconceptlab__workspace-module__marginWorkspaceContent___SEV31":!!p}),children:(0,yP.jsx)(Cp,{workspace:e,additionalPropsFromPage:t},e.name)})]})}async function Cy(e,t){let{openedGroup:r}=hf.getState();if(r){if(r.groupName===e&&Cv(r.props,t))return!0;else if(!await Cw({reason:"CLOSE_WORKSPACE_GROUP",explicit:!1}))return!1}return hf.setState(r=>({...r,openedGroup:{groupName:e,props:t},openedWindows:[]})),!0}async function Cg(e){let{openedGroup:t,openedWindows:r}=hf.getState();if(t){if(r.length>0&&!(e||await Cw({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})))return!1;hf.setState(e=>({...e,openedGroup:null,openedWindows:[]}))}return!0}async function Cb(e,t=null,r=null,n=null){let o=hf.getState();if(!o.registeredWorkspacesByName[e])throw Error(`Unable to launch workspace ${e}. Workspace is not registered`);let i=hh(e);if(!i)throw Error(`Unable to launch workspace ${e}. Workspace is not registered to a workspace window`);let{openedGroup:a}=o,{name:s}=i,l=hm(s);if(!l)throw Error(`Unable to launch workspace ${e}. Workspace window ${i.name} is not registered to a workspace group`);let u=hy(e);if(a&&(a.groupName!==l.name||!Cv(a.props,n)))return!!await Cw({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})&&(hf.setState({...o,openedGroup:{groupName:l.name,props:n},openedWindows:[{windowName:s,openedWorkspaces:[CD(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0);if(u>=0){let n=o.openedWindows[u],i=o.openedGroup?.props??{},a=o.isMostRecentlyOpenedWindowHidden,{openedWorkspaces:c}=n;if(Cv(n.props,r)){let d=c.find(t=>t.workspaceName===e);return d&&Cv(d.props,t)?((a||u!==o.openedWindows.length-1)&&hf.setState(C_.restoreWindow(o,s)),!0):!!await Cw({reason:"CLOSE_WORKSPACE",explicit:!1,windowName:s,workspaceName:e})&&(hf.setState({...o,openedGroup:{groupName:l.name,props:o?.openedGroup?.props??i},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[CD(e,t)],props:n?.props??r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return!!await Cw({reason:"CLOSE_WINDOW",explicit:!1,windowName:s})&&(hf.setState({...o,openedGroup:{groupName:l.name,props:i??o?.openedGroup?.props},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[CD(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return"closable"!=l.persistence?(hf.setState({...o,openedGroup:{groupName:l.name,props:n??o?.openedGroup?.props??null},openedWindows:[...o.openedWindows,{windowName:s,openedWorkspaces:[CD(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0):!!await Cw({reason:"CLOSE_OTHER_WINDOWS",explicit:!1,windowNameToSpare:i.name})&&(hf.setState({...o,openedGroup:{groupName:l.name,props:n??o?.openedGroup?.props??null},openedWindows:[{windowName:s,openedWorkspaces:[CD(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}function Cv(e,t){return null==e||null==t||L(e,t)}function Cw(e){function t(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}let{openedWindows:r,workspaceTitleByWorkspaceName:n}=hf.getState(),o=[];switch(e.reason){case"CLOSE_WORKSPACE_GROUP":o=r.flatMap(e=>t(e));break;case"CLOSE_WINDOW":{let n=r.find(t=>t.windowName===e.windowName);if(!n)throw Error(`Window ${e.windowName} not found in opened windows.`);o=t(n);break}case"CLOSE_WORKSPACE":{let n=r.find(t=>t.windowName===e.windowName);if(!n)throw Error(`Window ${e.windowName} not found in opened windows.`);o=t(n,e.workspaceName);break}case"CLOSE_OTHER_WINDOWS":o=r.filter(t=>t.windowName!==e.windowNameToSpare).flatMap(e=>t(e))}return 0===o.length?Promise.resolve(!0):new Promise(e=>{let t=Pa("workspace2-close-prompt",{size:"sm",onConfirm:()=>{t(),e(!0)},onCancel:()=>{t(),e(!1)},affectedWorkspaceTitles:o.map(e=>n[e.workspaceName])})})}let C_={setWindowMaximized(e,t,r){let n=e.openedWindows.findIndex(e=>e.windowName===t),o=[...e.openedWindows],i={...o[n],maximized:r};return o[n]=i,{...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=hy(t);if(r<0)return e;let n={...e.openedWindows[r]},o=n.openedWorkspaces.findIndex(e=>e.workspaceName===t),i=[...e.openedWindows];n.openedWorkspaces=n.openedWorkspaces.slice(0,o);let a=e.isMostRecentlyOpenedWindowHidden;if(0===n.openedWorkspaces.length){let t=r===e.openedWindows.length-1;i.splice(r,1),t&&i.length>0&&(a=!1)}else i[r]=n;return{...e,openedWindows:i,isMostRecentlyOpenedWindowHidden:a}},openChildWorkspace(e,t,r,n){let o=e.registeredWorkspacesByName[r];if(!o)throw Error(`No workspace named "${r}" registered`);let i=e.registeredWorkspacesByName[t];if(!i)throw Error(`No workspace named "${t}" registered`);if(i.window!==o.window)throw Error(`Child workspace ${r} does not belong to the same workspace window as parent workspace ${t}`);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{openedWorkspaces:s}=e.openedWindows[a],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{openedWindows:e.openedWindows.map((e,t)=>t==a?{...e,openedWorkspaces:[...u,CD(r,n)]}:e)}},setHasUnsavedChanges(e,t,r){let n=hy(t);if(n<0)return e;let o={...e.openedWindows[n]},i=o.openedWorkspaces.findIndex(e=>e.workspaceName===t);if(i<0)return e;o.openedWorkspaces[i]={...o.openedWorkspaces[i],hasUnsavedChanges:r};let a=[...e.openedWindows];return a[n]=o,{...e,openedWindows:a}},setWorkspaceTitle(e,t,r){let n={...e.workspaceTitleByWorkspaceName};return null===r?delete n[t]:n[t]=r,{...e,workspaceTitleByWorkspaceName:n}}};function Cx(){return hM(hf,C_)}let CE=()=>(0,hk.useContext)(hQ),CS=()=>Object.keys(hf.getState().registeredWorkspacesByName);function CD(e,t){return{workspaceName:e,props:t??{},hasUnsavedChanges:!1,uuid:d9()}}let CO={workspaceOuterContainer:"-esm-openconceptlab__workspace2-module__workspaceOuterContainer___jaqGm",narrowWorkspace:"-esm-openconceptlab__workspace2-module__narrowWorkspace___o1wsL",widerWorkspace:"-esm-openconceptlab__workspace2-module__widerWorkspace___gdEOi",extraWideWorkspace:"-esm-openconceptlab__workspace2-module__extraWideWorkspace___U9xlJ",workspaceMiddleContainer:"-esm-openconceptlab__workspace2-module__workspaceMiddleContainer___0AdtX",maximized:"-esm-openconceptlab__workspace2-module__maximized___aKCbE",hidden:"-esm-openconceptlab__workspace2-module__hidden___n1US5",workspaceInnerContainer:"-esm-openconceptlab__workspace2-module__workspaceInnerContainer___1g+qk",workspaceSpacer:"-esm-openconceptlab__workspace2-module__workspaceSpacer___P2T9y",loader:"-esm-openconceptlab__workspace2-module__loader___fCfzZ",hiddenExtraWorkspace:"-esm-openconceptlab__workspace2-module__hiddenExtraWorkspace___hvPSi",header:"-esm-openconceptlab__workspace2-module__header___MXXx9",headerButtons:"-esm-openconceptlab__workspace2-module__headerButtons___sJdnC",workspaceContent:"-esm-openconceptlab__workspace2-module__workspaceContent___6NuXT",overlayHeaderSpacer:"-esm-openconceptlab__workspace2-module__overlayHeaderSpacer___PLO6T",isActionMenuOpened:"-esm-openconceptlab__workspace2-module__isActionMenuOpened___X3Vj6",showActionMenu:"-esm-openconceptlab__workspace2-module__showActionMenu___HSun1",marginWorkspaceContent:"-esm-openconceptlab__workspace2-module__marginWorkspaceContent___DCfWz",workspaceContainerWithActionMenu:"-esm-openconceptlab__workspace2-module__workspaceContainerWithActionMenu___G9MdI",workspaceFixedContainer:"-esm-openconceptlab__workspace2-module__workspaceFixedContainer___uIldI",workspaceContainerWithoutActionMenu:"-esm-openconceptlab__workspace2-module__workspaceContainerWithoutActionMenu___lBudZ"},CP=({title:e,children:t,hasUnsavedChanges:r=!1})=>{let n=m0(),{setWindowMaximized:o,hideWindow:i,setHasUnsavedChanges:a,openedWindows:s,openedGroup:l,registeredGroupsByName:u,registeredWindowsByName:c,registeredWorkspacesByName:d,workspaceTitleByWorkspaceName:p,setWorkspaceTitle:f,isMostRecentlyOpenedWindowHidden:h}=Cx(),{workspaceName:m,isRootWorkspace:y,closeWorkspace:g,showActionMenu:b}=CE(),v=hy(m),w=s[v],x=w?.openedWorkspaces.find(e=>e.workspaceName===m);if((0,hk.useEffect)(()=>{x?.hasUnsavedChanges!=r&&a(m,r??!1)},[x?.hasUnsavedChanges,r,m,a]),(0,hk.useEffect)(()=>{p[m]!==e&&f(m,e)},[p,m,e,f]),v<0||null==l||null==x)return null;let E=u[l.groupName];if(!E)throw Error(`Cannot find registered workspace group ${l.groupName}`);let S=d[m].window,D=c[S];if(!D)throw Error(`Cannot find registered workspace window ${S}`);let{icon:O,canMaximize:P}=D,k="closable"===E.persistence,C=!!O&&!k,{maximized:j}=w,T=D?.width??"narrow",R=Object.values(c).some(e=>e.group===l.groupName&&void 0!==e.icon),N=v<s.length-1||h;return(0,yP.jsxs)("div",{className:yC()(CO.workspaceOuterContainer,{[CO.narrowWorkspace]:"narrow"===T,[CO.widerWorkspace]:"wider"===T,[CO.extraWideWorkspace]:"extra-wide"===T,[CO.isActionMenuOpened]:R}),children:[(0,yP.jsx)("div",{className:yC()(CO.workspaceSpacer,{[CO.hidden]:N})}),(0,yP.jsx)("div",{className:yC()(CO.workspaceMiddleContainer,{[CO.maximized]:j,[CO.hidden]:N,[CO.isRootWorkspace]:y,[CO.showActionMenu]:b}),children:(0,yP.jsxs)("div",{className:yC()(CO.workspaceInnerContainer,{[CO.maximized]:j,[CO.hidden]:N,[CO.isRootWorkspace]:y}),children:[(0,yP.jsxs)(yA.Y9Y,{"aria-label":sf("workspaceHeader"),className:CO.header,children:[(0,yP.jsx)(yA.bCw,{prefix:"",children:e}),(0,yP.jsx)("div",{className:CO.overlayHeaderSpacer}),(0,yP.jsx)(yA.wdv,{className:CO.headerButtons,children:m1(n)?(0,yP.jsxs)(yP.Fragment,{children:[(P||j)&&(0,yP.jsx)(yA.V8d,{"aria-label":j?sf("minimize"):sf("maximize"),onClick:()=>o(S,!j),children:j?(0,yP.jsx)(k9.Xj,{}):(0,yP.jsx)(k9.hz,{})}),C&&(0,yP.jsx)(yA.V8d,{"aria-label":sf("hide"),onClick:()=>i(),children:(0,yP.jsx)(yJ,{})}),!k&&(0,yP.jsx)(yA.V8d,{"aria-label":sf("close"),onClick:()=>g({closeWindow:!0}),children:(0,yP.jsx)(gi,{})})]}):(0,yP.jsxs)(yP.Fragment,{children:[C&&(0,yP.jsx)(yA.V8d,{"aria-label":sf("hide"),onClick:()=>i(),children:(0,yP.jsx)(k8.d3,{})}),(0,yP.jsx)(yA.V8d,{"aria-label":sf("close"),onClick:()=>{k?Cg():g({closeWindow:!0})},children:(0,yP.jsx)(gi,{})})]})})]}),(0,yP.jsx)("div",{className:yC()(CO.workspaceContent),children:t})]})})]})},Ck="-esm-openconceptlab__action-menu-button2-module__container___pahg-",CC="-esm-openconceptlab__action-menu-button2-module__elementContainer___PzOdc",Cj="-esm-openconceptlab__action-menu-button2-module__active___4O4Bs",CT="-esm-openconceptlab__action-menu-button2-module__focused___+k5kD";function CR({getIcon:e,hasUnsavedChanges:t,tagContent:r}){return(0,yP.jsxs)(yP.Fragment,{children:[e({size:16}),t?(0,yP.jsx)("span",{className:"-esm-openconceptlab__action-menu-button2-module__interruptedTag___mS2yr",children:"!"}):(0,yP.jsx)("span",{className:"-esm-openconceptlab__action-menu-button2-module__countTag___rb5CW",children:r})]})}let CN=({icon:e,label:t,tagContent:r,workspaceToLaunch:n,onBeforeWorkspaceLaunch:o})=>{let i=m0(),{openedWindows:a,restoreWindow:s,hideWindow:l,isMostRecentlyOpenedWindowHidden:u}=Cx(),{extension:c}=(0,hk.useContext)(hj),d=a.findIndex(e=>e.windowName===c?.extensionId),p=a[d],f=null!=p,h=f&&(d<a.length-1||u),m=f&&!h,y=p?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,g=async()=>{if(f)h?s(p.windowName):l();else if(await (o?.()??!0)){let{workspaceName:e,workspaceProps:t,windowProps:r}=n;Cb(e,t,r)}};return"tablet"===i||"phone"===i?(0,yP.jsxs)(yA.$nd,{className:yC()(Ck,{[Cj]:f&&!m,[CT]:m}),iconDescription:t,kind:"ghost",onClick:g,role:"button",tabIndex:0,size:"md",children:[(0,yP.jsx)("span",{className:CC,children:(0,yP.jsx)(CR,{hasUnsavedChanges:y,getIcon:e,tagContent:r})}),(0,yP.jsx)("span",{children:t})]}):(0,yP.jsx)(yA.K0,{align:"left","aria-label":t,className:yC()(Ck,{[Cj]:f&&!m,[CT]:m}),enterDelayMs:300,kind:"ghost",label:t,onClick:g,size:"md",children:(0,yP.jsx)("div",{className:CC,children:(0,yP.jsx)(CR,{hasUnsavedChanges:y,getIcon:e,tagContent:r})})})};function CA({showContactDetails:e,toggleContactDetails:t,className:r}){return(0,yP.jsx)(yA.$nd,{className:r,iconDescription:"Toggle contact details",kind:"ghost",onClick:t,renderIcon:e?go:gt,children:e?sf("showLess","Show less"):sf("showMore","Show more")})}let C$={contactDetails:"-esm-openconceptlab__patient-banner-contact-details-module__contactDetails___rhdjA",deceased:"-esm-openconceptlab__patient-banner-contact-details-module__deceased___K4NPg",heading:"-esm-openconceptlab__patient-banner-contact-details-module__heading___zj6Zt",row:"-esm-openconceptlab__patient-banner-contact-details-module__row___+Bx+P",col:"-esm-openconceptlab__patient-banner-contact-details-module__col___0H31P",relationship:"-esm-openconceptlab__patient-banner-contact-details-module__relationship___CZmay"},CI=({patientUuid:e})=>{let{cohorts:t=[],isLoading:r}=function(e){let t=e?`${au}/cohortm/cohortmember?patient=${e}&v=custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))`:null,{data:r,isLoading:n}=h8()(t,af),o=r?.data?.results.map(e=>({uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}));return(0,hk.useMemo)(()=>({cohorts:o,isLoading:n}),[n,o])}(e);return(0,yP.jsxs)(yP.Fragment,{children:[(0,yP.jsxs)("p",{className:C$.heading,children:[sf("patientLists","Patient Lists")," (",t?.length??0,")"]}),r?(0,yP.jsx)(yA.OuH,{description:`${sf("loading","Loading")} ...`,role:"progressbar"}):(0,yP.jsxs)("ul",{children:[(()=>{if(t?.length>0){let e=t.sort((e,t)=>DH(e?.startDate).getTime()-DH(t?.startDate).getTime()).slice(0,3);return e?.map(e=>(0,yP.jsx)("li",{children:(0,yP.jsx)(hT,{to:`${window.spaBase}/home/patient-lists/${e.uuid}`,children:e.name},e.uuid)},e.uuid))}return(0,yP.jsx)("li",{children:"--"})})(),t.length>3&&(0,yP.jsx)("li",{className:C$.link,children:(0,yP.jsx)(hT,{to:`${window.spaBase}/home/patient-lists`,children:sf("seeMoreLists","See {{count}} more lists",{count:t?.length-3})})})]})]})},CM=({patientId:e})=>{let{patient:t,isLoading:r}=yt(e),n=t?.address?.find(e=>"home"===e.use),o=e=>e.split("#")[1];return r?(0,yP.jsx)(yA.OuH,{description:`${sf("loading","Loading")} ...`,role:"progressbar"}):(0,yP.jsxs)(yP.Fragment,{children:[(0,yP.jsx)("p",{className:C$.heading,children:sf("address","Address")}),(0,yP.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,yP.jsxs)("li",{children:[sf(o(t.url),o(t.url)),": ",t.valueString]},`address-${e}-${r}`)):(0,yP.jsxs)("li",{children:[sf(e,e),": ",t]},`address-${e}`)):(0,yP.jsx)("li",{children:"--"})})]})},CL=({patientUuid:e})=>{let{isLoading:t,contactAttributes:r}=(e=>{let{contactAttributeTypes:t=[]}=mP({externalModuleName:"@openmrs/esm-patient-banner-app"}),{attributes:r,error:n,isLoading:o}=(e=>{let{data:t,error:r,isLoading:n}=mR()(`${au}/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)))`,af);return{isLoading:n,attributes:t?.data.person.attributes??[],error:r}})(e);return{contactAttributes:(0,hk.useMemo)(()=>r.filter(({attributeType:e})=>t?.some(t=>e.uuid===t)),[r,t]),isLoading:o,error:n}})(e),n=(0,hk.useMemo)(()=>r?[...r?.map(e=>[e.attributeType.display?sf(e.attributeType.display,e.attributeType.display):"",e.value])]:[],[r]);return(0,yP.jsxs)(yP.Fragment,{children:[(0,yP.jsx)("p",{className:C$.heading,children:sf("contactDetails","Contact Details")}),t?(0,yP.jsx)(yA.OuH,{description:`${sf("loading","Loading")} ...`,role:"progressbar"}):(0,yP.jsx)("ul",{children:n.length?n.map(([e,t],r)=>(0,yP.jsxs)("li",{children:[e,": ",t]},`${e}-${t}-${r}`)):(0,yP.jsx)("li",{children:"--"})})]})},CF=({patientId:e})=>{let{data:t,isLoading:r}=function(e){let t=`${au}/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:i}=h8()(e?t:null,af),a=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?a:null,error:n,isLoading:o,isValidating:i}}(e);return(0,yP.jsxs)(yP.Fragment,{children:[(0,yP.jsx)("p",{className:C$.heading,children:sf("relationships","Relationships")}),r?(0,yP.jsx)(yA.OuH,{description:`${sf("loading","Loading")} ...`,role:"progressbar"}):(0,yP.jsx)("ul",{children:t&&t.length>0?(0,yP.jsx)(yP.Fragment,{children:t.map(e=>(0,yP.jsxs)("li",{className:C$.relationship,children:[(0,yP.jsx)("div",{children:(0,yP.jsx)(hT,{to:`${window.spaBase}/patient/${e.relativeUuid}/chart`,children:e.display})}),(0,yP.jsx)("div",{children:e.relationshipType}),(0,yP.jsx)("div",{children:`${e.relativeAge?e.relativeAge:"--"} ${e.relativeAge?1===e.relativeAge?sf("yearAbbreviation","yr"):sf("yearsAbbreviation","yrs"):""}`})]},e.uuid))}):(0,yP.jsx)("li",{children:"--"})})]})};function CB({patientId:e,deceased:t}){return(0,yP.jsxs)("div",{className:yC()(C$.contactDetails,{[C$.deceased]:t}),children:[(0,yP.jsxs)("div",{className:C$.row,children:[(0,yP.jsx)("div",{className:C$.col,children:(0,yP.jsx)(CM,{patientId:e})}),(0,yP.jsx)("div",{className:C$.col,children:(0,yP.jsx)(CL,{patientUuid:e})})]}),(0,yP.jsxs)("div",{className:C$.row,children:[(0,yP.jsx)("div",{className:C$.col,children:(0,yP.jsx)(CF,{patientId:e})}),(0,yP.jsx)("div",{className:C$.col,children:(0,yP.jsx)(CI,{patientUuid:e})})]})]})}function CV(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 CU="-esm-openconceptlab__action-menu2-module__container___5s3CM";function CW({workspaceGroup:e,groupProps:t}){let r=m0(),{persistence:n}=e;return(0,yP.jsx)("aside",{className:"-esm-openconceptlab__action-menu2-module__sideRail___qwAz4",children:(0,yP.jsxs)("div",{className:CU,children:["closable"==n&&m1(r)&&(0,yP.jsx)(yA.K0,{align:"left",onClick:()=>Cg(),label:sf("close"),kind:"ghost",children:(0,yP.jsx)(gi,{})}),(0,yP.jsx)(hj.Provider,{value:{moduleName:e.moduleName,featureName:e.name},children:(0,yP.jsx)(hH,{className:CU,name:e.name,state:{groupProps:t}})})]})})}function Cz(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}}let CK=({lifeCycle:e,openedWorkspace:t,openedWindow:r,isRootWorkspace:n,isLeafWorkspace:o,showActionMenu:i})=>{let{openedGroup:a,closeWorkspace:s,openChildWorkspace:l}=Cx(),u=(0,hk.useMemo)(()=>t&&{closeWorkspace:async(e={})=>{let{closeWindow:n=!1,discardUnsavedChanges:o=!1}=e;return n?!!(o||await Cw({reason:"CLOSE_WINDOW",explicit:!0,windowName:r.windowName}))&&(s(r.openedWorkspaces[0].workspaceName),!0):!!(o||await Cw({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:r.windowName,workspaceName:t.workspaceName}))&&(s(t.workspaceName),!0)},launchChildWorkspace:async(e,n)=>{let o=t.workspaceName,{openedWorkspaces:i}=r,a=i.findIndex(e=>e.workspaceName===o);-1===a||a!==i.length-1&&i.slice(a+1).some(e=>e.hasUnsavedChanges)&&!await Cw({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:r.windowName,workspaceName:i[a+1].workspaceName})||l(o,e,n||{})},workspaceName:t.workspaceName,workspaceProps:t.props,windowProps:r.props,groupProps:a&&a.props?a.props:null,isRootWorkspace:n,isLeafWorkspace:o,windowName:r.windowName,showActionMenu:i},[t,s,a,r]);if(!e){let{registeredWorkspacesByName:e}=hf.getState(),r=e[t.workspaceName],o=r&&r.window?r.window:void 0,{registeredWindowsByName:s}=hf.getState(),l=o?s[o]:void 0,u=l&&l.width?l.width:"narrow",c=Object.values(s).some(e=>e.group===a?.groupName&&void 0!==e.icon);return(0,yP.jsxs)("div",{className:yC()(CO.workspaceOuterContainer,{[CO.narrowWorkspace]:"narrow"===u,[CO.widerWorkspace]:"wider"===u,[CO.extraWideWorkspace]:"extra-wide"===u,[CO.isActionMenuOpened]:c}),children:[(0,yP.jsx)("div",{className:CO.workspaceSpacer}),(0,yP.jsx)("div",{className:yC()(CO.workspaceMiddleContainer,{[CO.isRootWorkspace]:n,[CO.showActionMenu]:i}),children:(0,yP.jsx)("div",{className:yC()(CO.workspaceInnerContainer,{[CO.isRootWorkspace]:n}),children:(0,yP.jsx)(yA.OuH,{className:CO.loader,description:`${sf("loading")} ...`})})})]})}return(0,yP.jsx)(Cd,{config:e,mountParcel:hO,...u},t.workspaceName)},CH=({openedWindow:e,showActionMenu:t})=>{let{openedWorkspaces:r}=e,[n,o]=(0,hk.useState)({}),{registeredWorkspacesByName:i}=hf.getState();return(0,hk.useEffect)(()=>{let e=!1;return Promise.all(r.map(async e=>{let{moduleName:t,component:r}=i[e.workspaceName];return[e.uuid,await yy(t,r)]})).then(t=>{e||o(Object.fromEntries(t))}),()=>{e=!0}},[r]),(0,yP.jsx)(yP.Fragment,{children:r.map((o,i)=>(0,yP.jsx)(CK,{openedWorkspace:o,openedWindow:e,lifeCycle:n[o.uuid],isRootWorkspace:0===i,isLeafWorkspace:i===r.length-1,showActionMenu:t},o.uuid))})};function CG(e){e&&(0,hG.createRoot)(e).render((0,yP.jsx)(Cq,{}))}function Cq(){let{openedGroup:e,openedWindows:t,registeredGroupsByName:r,registeredWindowsByName:n}=Cx();if((0,hk.useEffect)(()=>px("before-page-changed",t=>{let{newPage:n,cancelNavigation:o,oldUrl:i,newUrl:a}=t;if(!e)return;if(n)return void o(Cg().then(e=>!e));let s=r[e.groupName],l=s?.scopePattern;l&&function(e,t,r){try{let n=new RegExp(e),o=Cz(t),i=Cz(r);if(null===o.spaRelative||null===i.spaRelative)return!0;let a=n.exec(o.spaRelative),s=n.exec(i.spaRelative);if(a&&s||(a=n.exec(o.full),s=n.exec(i.full)),!a||!s)return!0;if(a.length>1)return!a.slice(1).every((e,t)=>e===s[t+1]);return!1}catch{return!0}}(l,i,a)&&o(Cg().then(e=>!e))}),[e,r]),!e)return null;let o=r[e.groupName],i=t.some(e=>e.maximized),{name:a}=o,s=Object.values(n).filter(e=>e.group===a&&void 0!==e.icon).sort((e,t)=>(e.order??Number.MAX_VALUE)-(t.order??Number.MAX_VALUE)).length>0;return(0,yP.jsxs)("div",{className:yC()("-esm-openconceptlab__workspace-windows-and-menu-module__workspaceWindowsAndMenuContainer___gN2f4",{"-esm-openconceptlab__workspace-windows-and-menu-module__overlay___fqI+X":o.overlay,"-esm-openconceptlab__workspace-windows-and-menu-module__hasMaximizedWindow___J7wBw":i}),children:[(0,yP.jsx)("div",{className:"-esm-openconceptlab__workspace-windows-and-menu-module__workspaceWindowsContainer___zpk7G",children:t.map(e=>(0,yP.jsx)(CH,{openedWindow:e,showActionMenu:s},e.windowName))}),s&&(0,yP.jsx)(CW,{workspaceGroup:o,groupProps:e.props})]})}function CZ(e,t,r){if(null==e)return r;let n=Ds(e);if(!n)return console.warn(`matchLocale: invalid requested locale tag: ${JSON.stringify(e)}`),r;let o=[];for(let e of t){let t=Ds(e);if(!t){console.warn(`matchLocale: skipping invalid available locale tag: ${JSON.stringify(e)}`);continue}o.push({canonical:t,original:e})}let i=n;for(;i;){let e=o.find(e=>e.canonical===i);if(e)return e.original;let t=i+"-",r=o.find(e=>e.canonical.startsWith(t));if(r)return r.original;if("ht"===i){i="fr-HT";continue}let n=i.lastIndexOf("-");if(-1===n)break;let a=(i=i.slice(0,n)).lastIndexOf("-");-1!==a&&i.length-a==2&&(i=i.slice(0,a))}return r}function CY(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}function CJ(e){return!!e&&e.constructor===Object}var CX=r(2722);function CQ(e){let[t,r,n]=e.split(".");return`${t}.${r}.${n}`}function C0(e,t){let r=function(e){let t=e.indexOf("-");if(t>=0){let r=CQ(e.slice(0,t)),n=e.slice(t+1);return`${r}-${n}`}return CQ(e)}(t);return CX.satisfies(r,e,{includePrerelease:!0})}async function C1(e,t={}){let r,{shouldRetry:n,getDelay:o,onError:i}=t;n=n??(e=>e<=5),o=o??(e=>(function(e,t=!1){return 1e3*Math.pow(2,t?e+1:e)})(e));let a=0;do try{return await C2(o(a)),await e()}catch(e){i?.(e,a),r=e}while(n(a++));throw r}async function C2(e){if(!(e<=0))return new Promise(t=>setTimeout(t,e))}},254(e,t,r){"use strict";r.d(t,{A:()=>n});let n=function(e){return null==e}}}]);
|
|
30
|
+
To fix this, ensure that you define the "name" field inside the feature flag definition.`,t);else console.warn(`A feature flag for ${e} could not be registered as it does not appear to have the required properties`,t)})}})(e,t))}function yE(){y_.sort((e,t)=>e.appName.localeCompare(t.appName,"en"));let e=new Map;for(let t of y_){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",i=document.getElementById(o),a=`single-spa-application:${n}`;if(i){let e=document.createElement("div");e.id=a,i?.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.
|
|
31
|
+
To fix this, ensure that you define the "route" (or alternatively the "routeRegex") field inside the extension definition.`,e):t.component?iH(e,()=>yg(t.appName,t.component),function(e,{online:t,offline:r,featureFlag:n}){return window.offlineEnabled?o=>!!(navigator.onLine&&(t??!0)||!navigator.onLine&&r)&&(!n||!!fp(n))&&e(o):e}(function e(t){if(Array.isArray(t)){let r=t.map(e);return e=>r.some(t=>t(e))}return"string"==typeof t?iX(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.
|
|
32
|
+
To fix this, ensure that you define the "component" field inside the page definition.`,e)}(n,t)}}let yS={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 yD(){document.body.classList.toggle("omrs-breakpoint-lt-tablet",window.innerWidth<yS.TABLET_MIN),document.body.classList.toggle("omrs-breakpoint-gt-phone",window.innerWidth>yS.PHONE_MAX),document.body.classList.toggle("omrs-breakpoint-gt-tablet",window.innerWidth>yS.TABLET_MAX),document.body.classList.toggle("omrs-breakpoint-lt-desktop",window.innerWidth<yS.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-small-desktop",window.innerWidth<yS.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-large-desktop",window.innerWidth<yS.LARGE_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-gt-small-desktop",window.innerWidth>yS.SMALL_DESKTOP_MAX)}let yO=!1;function yP(){yO||(window.addEventListener("resize",yD),yD(),yO=!0)}var yk=r(1085),yC=r(3373),yj=r.n(yC);function yT({title:e,children:t}){let r="tablet"===m1();return(0,yk.jsxs)("div",{className:yj()({"-esm-openconceptlab__card-header-module__tabletHeader___xhRSy":r,"-esm-openconceptlab__card-header-module__desktopHeader___aPTXc":!r}),children:[(0,yk.jsx)("h4",{children:e}),t]})}let yR=["red","magenta","purple","blue","teal","cyan","gray","green","warm-gray","cool-gray","high-contrast","outline"],yN={primaryColor:{_type:nv.String,_description:"The color for displaying primary diagnoses tags",_default:"red",_validators:[oD.oneOf(yR)]},secondaryColor:{_type:nv.String,_description:"The color for displaying secondary diagnoses tags",_default:"blue",_validators:[oD.oneOf(yR)]}},yA={"Brand color #1":{_default:"#005d5d",_type:nv.String},"Brand color #2":{_default:"#004144",_type:nv.String},"Brand color #3":{_default:"#007d79",_type:nv.String},excludePatientIdentifierCodeTypes:{uuids:{_type:nv.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:nv.UUID}}},implementationName:{_type:nv.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},patientPhotoConceptUuid:{_type:nv.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:nv.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:nv.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:nv.String}},diagnosisTags:yN};var y$=r(815);let yI={"carbon.table.batch.cancel":"cancel","carbon.table.batch.items.selected":"batchActionsItemsSelected","carbon.table.batch.item.selected":"batchActionItemSelected","carbon.table.batch.selectAll":"selectAll"},yM=e=>(0,yk.jsx)(y$.GGC,{translateWithId:(e,t)=>{let r=yI[e];return r?sf(r,e,t):e},...e}),yL="-esm-openconceptlab__custom-overflow-menu-module__container___QIBvW",yF="-esm-openconceptlab__custom-overflow-menu-module__menu___ZppPo",yB="-esm-openconceptlab__custom-overflow-menu-module__show___8rVUu",yV="-esm-openconceptlab__custom-overflow-menu-module__overflowMenuButton___0VKUu",yU=(0,hC.createContext)(null);function yW(){let e=(0,hC.useContext)(yU);if(!e)throw Error("useCustomOverflowMenu must be used within a CustomOverflowMenu");return e}function yz({menuTitle:e,children:t}){let[r,n]=hj().useState(!1),o=m5(()=>n(!1),r),i="tablet"===m1(),a=(0,hC.useCallback)(()=>n(e=>!e),[]),s=(0,hC.useRef)(null),l=(0,hC.useRef)(null),u=(0,hC.useId)(),c=`custom-overflow-menu-trigger-${u}`,d=`custom-overflow-menu-${u}`,p=(0,hC.useCallback)(()=>{n(!1),s.current?.focus()},[]),f=(0,hC.useMemo)(()=>({closeMenu:p}),[p]),h=(0,hC.useCallback)(e=>{"Escape"===e.key&&r&&(e.stopPropagation(),p())},[p,r]),m=hC.Children.toArray(t);(0,hC.useEffect)(()=>{if(r&&l.current){let e=l.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[r]);let y=(0,hC.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 i=o+t,a=i<0?r.length-1:i>=r.length?0:i;r[a]?.focus()},[]),g=m.map((e,t)=>(0,hC.isValidElement)(e)?(0,hC.cloneElement)(e,{closeMenu:p,handleOverflowMenuItemFocus:y,index:t}):e);return(0,yk.jsxs)("div",{"data-overflow-menu":!0,className:yj()("cds--overflow-menu",yL),ref:o,children:[(0,yk.jsx)("button",{className:yj()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":r},yV),"aria-controls":d,"aria-expanded":r,"aria-haspopup":"true",id:c,onClick:a,onKeyDown:h,ref:s,children:e}),(0,yk.jsxs)("div",{className:yj()("cds--overflow-menu-options","cds--overflow-menu--flip",yF,{[yB]:r}),"aria-labelledby":c,"data-floating-menu-direction":"bottom",id:d,onKeyDown:h,ref:l,role:"menu",tabIndex:-1,children:[(0,yk.jsx)("ul",{className:yj()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":i}),children:(0,yk.jsx)(yU.Provider,{value:f,children:g})}),(0,yk.jsx)("span",{})]})]})}function yK(e){let t=(0,hC.useContext)(yU);return(0,yk.jsx)(y$.XSD,{...e,closeMenu:t?.closeMenu})}var yH=r(6311);let yG=["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"],yq=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-activity",iconProps:e})})),yZ=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-add",iconProps:e})})),yY=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-arrow-down",iconProps:e})})),yJ=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-arrow-left",iconProps:e})})),yX=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-arrow-right",iconProps:e})})),yQ=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-arrow-up",iconProps:e})})),y0=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-baby",iconProps:e})})),y1=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-calendar-heat-map",iconProps:e})})),y2=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-calendar",iconProps:e})})),y4=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-caret-down",iconProps:e})})),y3=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-caret-left",iconProps:e})})),y6=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-caret-right",iconProps:e})})),y5=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-caret-up",iconProps:e})})),y7=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-chart-average",iconProps:e})})),y9=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-chart-line",iconProps:e})})),y8=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-checkmark-filled",iconProps:e})})),ge=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-checkmark-outline",iconProps:e})})),gt=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-chemistry",iconProps:e})})),gr=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-chevron-down",iconProps:e})})),gn=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-chevron-left",iconProps:e})})),go=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-chevron-right",iconProps:e})})),gi=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-chevron-up",iconProps:e})})),ga=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-close",iconProps:e})})),gs=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-close-filled",iconProps:e})})),gl=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-close-outline",iconProps:e})})),gu=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-document",iconProps:e})})),gc=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-document-attachment",iconProps:e})})),gd=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-download",iconProps:e})})),gp=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-drug-order",iconProps:e})})),gf=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-edit",iconProps:e})})),gh=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-event-schedule",iconProps:e})})),gm=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-events",iconProps:e})})),gy=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-gender-female",iconProps:e})})),gg=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-gender-male",iconProps:e})})),gb=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-gender-other",iconProps:e})})),gv=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-gender-unknown",iconProps:e})})),gw=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-generic-order-type",iconProps:e})})),g_=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-group",iconProps:e})})),gx=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-group-access",iconProps:e})})),gE=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-hospital-bed",iconProps:e})})),gS=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-image-medical",iconProps:e})})),gD=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-information",iconProps:e})})),gO=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-information-filled",iconProps:e})})),gP=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-information-square",iconProps:e})})),gk=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-inventory-management",iconProps:e})})),gC=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-lab-order",iconProps:e})})),gj=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-list-checked",iconProps:e})})),gT=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-location",iconProps:e})})),gR=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-material-order",iconProps:e})})),gN=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-maximize",iconProps:e})})),gA=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-medication",iconProps:e})})),g$=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-message-queue",iconProps:e})})),gI=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-microscope",iconProps:e})})),gM=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-mobile-check",iconProps:e})})),gL=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-money",iconProps:e})})),gF=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-mother",iconProps:e})})),gB=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-movement",iconProps:e})})),gV=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),gU=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),gW=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-password",iconProps:e})})),gz=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-pedestrian-family",iconProps:e})})),gK=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-pen",iconProps:e})})),gH=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-printer",iconProps:e})})),gG=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-procedure-order",iconProps:e})})),gq=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-programs",iconProps:e})})),gZ=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-referral-order",iconProps:e})})),gY=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-renew",iconProps:e})})),gJ=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-report",iconProps:e})})),gX=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-reset",iconProps:e})})),gQ=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-save",iconProps:e})})),g0=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-search",iconProps:e})})),g1=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-settings",iconProps:e})})),g2=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-switcher",iconProps:e})})),g4=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-shopping-cart",iconProps:e})})),g3=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-shopping-cart--arrow-down",iconProps:e})})),g6=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-sticky-note-add",iconProps:e})})),g5=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-syringe",iconProps:e})})),g7=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-table-of-contents",iconProps:e})})),g9=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-table",iconProps:e})})),g8=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-time",iconProps:e})})),be=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-tools",iconProps:e})})),bt=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-translate",iconProps:e})})),br=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-trash-can",iconProps:e})})),bn=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-tree-view--alt",iconProps:e})})),bo=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-two-factor-authentication",iconProps:e})})),bi=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-user-avatar",iconProps:e})})),ba=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-user-follow",iconProps:e})})),bs=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-user-xray",iconProps:e})})),bl=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-user",iconProps:e})})),bu=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-view-off",iconProps:e})})),bc=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-view",iconProps:e})})),bd=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(bb,{ref:t,icon:"omrs-icon-warning",iconProps:e})})),bp=bd,bf=gc,bh=gj,bm=gS,by=g3,bg=(0,hC.memo)((0,hC.forwardRef)(function({icon:e,fallback:t,...r},n){let o=(0,hC.useRef)(e?document.getElementById(e):void 0);return(0,hC.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,yk.jsx)(mb,{value:o.current,fallback:t,children:(0,yk.jsx)(bb,{ref:n,icon:e,iconProps:r})})})),bb=(0,hC.memo)((0,hC.forwardRef)(function({icon:e,iconProps:t},r){let{className:n,fill:o,size:i}=Object.assign({},{fill:"currentColor",size:20},t);(i<=0||i>72)&&(console.error(`Invalid size '${i}' specified for ${e}. Defaulting to 20.`),i=20);let a=(0,hC.useRef)(null);return(0,hC.useImperativeHandle)(r,()=>a.current),(0,hC.useEffect)(()=>{a.current&&"currentColor"!==o&&a.current.style.setProperty("--omrs-icon-fill",o)},[]),(0,yk.jsx)("svg",{ref:a,className:yj()("omrs-icon","-esm-openconceptlab__icons-module__icon___uq4qr",n),height:i,width:i,viewBox:"0 0 16 16",children:(0,yk.jsx)("use",{href:`#${e}`})})})),bv=({path:e,title:t,basePath:r,icon:n})=>{let{t:o}=(0,h9.useTranslation)(),i=(0,yH.useLocation)(),a=(0,hC.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=(i.pathname??"").split("/").slice(1).map(e=>decodeURIComponent(e));return n.some((e,t)=>r.every((e,r)=>n[t+r]===e))},[i.pathname,e]);return(0,yk.jsx)("div",{children:(0,yk.jsx)(hR,{className:yj()("cds--side-nav__link",{"active-left-nav-link":a}),to:`${r}/${encodeURIComponent(e)}`,children:(0,yk.jsxs)("span",{className:"-esm-openconceptlab__dashboard-module__menu___WbY42",children:[(0,yk.jsx)(bg,{icon:n,className:"-esm-openconceptlab__dashboard-module__icon___L-hKL",size:16}),(0,yk.jsx)("span",{children:o(t)})]})})},e)};function bw(e){return function({basePath:t}){return(0,yk.jsx)(yH.BrowserRouter,{children:(0,yk.jsx)(bv,{basePath:t,...e})})}}function b_(e){let t=(0,hC.useRef)(null);return(0,hC.useMemo)(()=>({get current(){return t.current},set current(value){t.current=value,"function"==typeof e?e(value):e&&(e.current=value)}}),[e])}function bx(...e){return(...t)=>{for(let r of e)"function"==typeof r&&r(...t)}}let bE="u">typeof document?hj().useLayoutEffect:()=>{};function bS(e){let t=(0,hC.useRef)(null);return bE(()=>{t.current=e},[e]),(0,hC.useCallback)((...e)=>{let r=t.current;return null==r?void 0:r(...e)},[])}let bD={prefix:String(Math.round(1e10*Math.random())),current:0},bO=hj().createContext(bD),bP=hj().createContext(!1),bk=("u">typeof window&&window.document&&window.document.createElement,new WeakMap),bC="function"==typeof hj().useId?function(e){let t=hj().useId(),[r]=(0,hC.useState)(bN()),n=r?"react-aria":`react-aria${bD.prefix}`;return e||`${n}-${t}`}:function(e){let t=(0,hC.useContext)(bO),r=function(e=!1){let t=(0,hC.useContext)(bO),r=(0,hC.useRef)(null);if(null===r.current&&!e){var n,o;let e=null==(o=hj().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||null==(n=o.ReactCurrentOwner)?void 0:n.current;if(e){let r=bk.get(e);null==r?bk.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==r.state&&(t.current=r.id,bk.delete(e))}r.current=++t.current}return r.current}(!!e),n=`react-aria${t.prefix}`;return e||`${n}-${r}`};function bj(){return!1}function bT(){return!0}function bR(e){return()=>{}}function bN(){return"function"==typeof hj().useSyncExternalStore?hj().useSyncExternalStore(bR,bj,bT):(0,hC.useContext)(bP)}let bA=!!("u">typeof window&&window.document&&window.document.createElement),b$=new Map;function bI(e){let[t,r]=(0,hC.useState)(e),n=(0,hC.useRef)(null),o=bC(t),i=(0,hC.useRef)(null);if(l&&l.register(i,o),bA){let e=b$.get(o);e&&!e.includes(n)?e.push(n):b$.set(o,[n])}return bE(()=>()=>{l&&l.unregister(i),b$.delete(o)},[o]),(0,hC.useEffect)(()=>{let e=n.current;return e&&r(e),()=>{e&&(n.current=null)}}),o}function bM(e=[]){let t=bI(),[r,n]=function(e){let[t,r]=(0,hC.useState)(e),n=(0,hC.useRef)(null),o=bS(()=>{if(!n.current)return;let e=n.current.next();if(e.done){n.current=null;return}t===e.value?o():r(e.value)});bE(()=>{n.current&&o()});let i=bS(e=>{n.current=e(t),o()});return[t,i]}(t),o=(0,hC.useCallback)(()=>{n(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,n]);return bE(o,[t,o,...e]),r}"u">typeof FinalizationRegistry&&(l=new FinalizationRegistry(e=>{b$.delete(e)}));let bL=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 i=t.length;for(r=0;r<i;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 bF(...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]=bx(r,o):("className"===e||"UNSAFE_className"===e)&&"string"==typeof r&&"string"==typeof o?t[e]=bL(r,o):"id"===e&&r&&o?t.id=function(e,t){if(e===t)return e;let r=b$.get(e);if(r)return r.forEach(e=>e.current=t),t;let n=b$.get(t);return n?(n.forEach(t=>t.current=e),e):t}(r,o):t[e]=void 0!==o?o:r}}return t}let bB=Symbol("default");function bV({values:e,children:t}){for(let[r,n]of e)t=hj().createElement(r.Provider,{value:n},t);return t}function bU(e){let{className:t,style:r,children:n,defaultClassName:o,defaultChildren:i,defaultStyle:a,values:s}=e;return(0,hC.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof r?r({...s,defaultStyle:a||{}}):r,u="function"==typeof n?n({...s,defaultChildren:i}):null==n?i:n,{className:null!=e?e:o,style:l||a?{...a,...l}:void 0,children:null!=u?u:i,"data-rac":""}},[t,r,n,o,i,a,s])}function bW(e,t){let r=(0,hC.useContext)(e);if(null===t)return null;if(r&&"object"==typeof r&&"slots"in r&&r.slots){let e=t||bB;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 bz(e,t,r){let{ref:n,...o}=bW(r,e.slot)||{},i=b_((0,hC.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])),a=bF(o,e);return"style"in o&&o.style&&"style"in e&&e.style&&("function"==typeof o.style||"function"==typeof e.style?a.style=t=>{let r="function"==typeof o.style?o.style(t):o.style,n={...t.defaultStyle,...r},i="function"==typeof e.style?e.style({...t,defaultStyle:n}):e.style;return{...n,...i}}:a.style={...o.style,...e.style}),[a,i]}function bK(e=!0){let[t,r]=(0,hC.useState)(e),n=(0,hC.useRef)(!1),o=(0,hC.useCallback)(e=>{n.current=!0,r(!!e)},[]);return bE(()=>{n.current||r(!1)},[]),[o,t]}function bH(e){let t=/^(data-.*)$/,r={};for(let n in e)t.test(n)||(r[n]=e[n]);return r}let bG=(0,hC.createContext)(null),bq=null;function bZ(e,t="assertive",r=7e3){bq?bq.announce(e,t,r):(bq=new bY,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?bq.announce(e,t,r):setTimeout(()=>{(null==bq?void 0:bq.isAttached())&&(null==bq||bq.announce(e,t,r))},100))}class bY{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 i=document.createElement("div");"object"==typeof e?(i.setAttribute("role","img"),i.setAttribute("aria-labelledby",e["aria-labelledby"])):i.textContent=e,"assertive"===t?null==(n=this.assertiveLog)||n.appendChild(i):null==(o=this.politeLog)||o.appendChild(i),""!==e&&setTimeout(()=>{i.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 bJ=new Set(["id"]),bX=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),bQ=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),b0=/^(data-.*)$/;function b1(e,t={}){let{labelable:r,isLink:n,propNames:o}=t,i={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(bJ.has(t)||r&&bX.has(t)||n&&bQ.has(t)||(null==o?void 0:o.has(t))||b0.test(t))&&(i[t]=e[t]);return i}let b2=["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"])'],b4=b2.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";b2.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let b3=b2.join(':not([hidden]):not([tabindex="-1"]),');function b6(e){return e.matches(b4)}function b5(e){return e.matches(b3)}let b7=e=>{var t;return null!=(t=null==e?void 0:e.ownerDocument)?t:document},b9=e=>e&&"window"in e&&e.window===e?e:b7(e).defaultView||window;function b8(e){if(function(){if(null==ve){ve=!1;try{document.createElement("div").focus({get preventScroll(){return ve=!0,!0}})}catch{}}return ve}())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 ve=null;function vt(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function vr(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function vn(e){let t=(0,hC.useRef)({isFocused:!1,observer:null});bE(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let r=bS(t=>{null==e||e(t)});return(0,hC.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(vt(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 vo=!1;function vi(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 va(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 vs(e){let t=null;return()=>(null==t&&(t=e()),t)}let vl=vs(function(){return va(/^Mac/i)}),vu=vs(function(){return va(/^iPhone/i)}),vc=vs(function(){return va(/^iPad/i)||vl()&&navigator.maxTouchPoints>1}),vd=vs(function(){return vu()||vc()});vs(function(){return vl()||vd()});let vp=vs(function(){return vi(/AppleWebKit/i)&&!vf()}),vf=vs(function(){return vi(/Chrome/i)}),vh=vs(function(){return vi(/Android/i)}),vm=vs(function(){return vi(/Firefox/i)}),vy=new Map,vg=new Set;function vb(){if("u"<typeof window)return;function e(e){return"propertyName"in e}let t=r=>{if(!e(r)||!r.target)return;let n=vy.get(r.target);if(n&&(n.delete(r.propertyName),0===n.size&&(r.target.removeEventListener("transitioncancel",t),vy.delete(r.target)),0===vy.size)){for(let e of vg)e();vg.clear()}};document.body.addEventListener("transitionrun",r=>{if(!e(r)||!r.target)return;let n=vy.get(r.target);n||(n=new Set,vy.set(r.target,n),r.target.addEventListener("transitioncancel",t,{once:!0})),n.add(r.propertyName)}),document.body.addEventListener("transitionend",t)}function vv(e){requestAnimationFrame(()=>{0===vy.size?e():vg.add(e)})}"u">typeof document&&("loading"!==document.readyState?vb():document.addEventListener("DOMContentLoaded",vb));let vw="default",v_="",vx=new WeakMap;function vE(e){if(vd())"disabled"===vw&&(vw="restoring",setTimeout(()=>{vv(()=>{if("restoring"===vw){let t=b7(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=v_||""),v_="",vw="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&vx.has(e)){let t=vx.get(e),r="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[r]&&(e.style[r]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),vx.delete(e)}}let vS=hj().createContext({register:()=>{}});function vD(e,t,r){if(!t.has(e))throw TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function vO(e,t,r){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}function vP(e,t,r){var n=vD(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 vk(e,t){bE(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function vC(){let e=(0,hC.useRef)(new Map),t=(0,hC.useCallback)((t,r,n,o)=>{let i=(null==o?void 0:o.once)?(...t)=>{e.current.delete(n),n(...t)}:n;e.current.set(n,{type:r,eventTarget:t,fn:i,options:o}),t.addEventListener(r,i,o)},[]),r=(0,hC.useCallback)((t,r,n,o)=>{var i;let a=(null==(i=e.current.get(n))?void 0:i.fn)||n;t.removeEventListener(r,a,o),e.current.delete(n)},[]),n=(0,hC.useCallback)(()=>{e.current.forEach((e,t)=>{r(e.eventTarget,e.type,t,e.options)})},[r]);return(0,hC.useEffect)(()=>n,[n]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:n}}vS.displayName="PressResponderContext";function vj(e,t){return!!t&&!!e&&e.contains(t)}function vT(e){return e.target}function vR(e,t,r=!0){var n,o;let{metaKey:i,ctrlKey:a,altKey:s,shiftKey:l}=t;vm()&&(null==(o=window.event)||null==(n=o.type)?void 0:n.startsWith("key"))&&"_blank"===e.target&&(vl()?i=!0:a=!0);let u=vp()&&vl()&&!vc()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:i,ctrlKey:a,altKey:s,shiftKey:l}):new MouseEvent("click",{metaKey:i,ctrlKey:a,altKey:s,shiftKey:l,bubbles:!0,cancelable:!0});vR.isOpening=r,b8(e),e.dispatchEvent(u),vR.isOpening=!1}function vN(e){return 0===e.mozInputSource&&!!e.isTrusted||(vh()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}vR.isOpening=!1;var vA=r(5427),v$=r.n(vA),vI=new WeakMap;class vM{continuePropagation(){vP(this,vI,!1)}get shouldStopPropagation(){var e;return e=vD(this,vI,"get"),e.get?e.get.call(this):e.value}constructor(e,t,r,n){var o;vO(this,vI,{writable:!0,value:void 0}),vP(this,vI,!0);let i=null!=(o=null==n?void 0:n.target)?o:r.currentTarget;const a=null==i?void 0:i.getBoundingClientRect();let s,l=0,u,c=null;null!=r.clientX&&null!=r.clientY&&(u=r.clientX,c=r.clientY),a&&(null!=u&&null!=c?(s=u-a.left,l=c-a.top):(s=a.width/2,l=a.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 vL=Symbol("linkClicked");function vF(e){let{onPress:t,onPressChange:r,onPressStart:n,onPressEnd:o,onPressUp:i,onClick:a,isDisabled:s,isPressed:l,preventFocusOnPress:u,shouldCancelOnPointerExit:c,allowTextSelectionOnPress:d,ref:p,...f}=function(e){let t=(0,hC.useContext)(vS);if(t){let{register:r,...n}=t;e=bF(n,e),r()}return vk(t,e.ref),e}(e),[h,m]=(0,hC.useState)(!1),y=(0,hC.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:g,removeAllGlobalListeners:b}=vC(),v=bS((e,t)=>{let o=y.current;if(s||o.didFirePressStart)return!1;let i=!0;if(o.isTriggeringEvent=!0,n){let r=new vM("pressstart",t,e);n(r),i=r.shouldStopPropagation}return r&&r(!0),o.isTriggeringEvent=!1,o.didFirePressStart=!0,m(!0),i}),w=bS((e,n,i=!0)=>{let a=y.current;if(!a.didFirePressStart)return!1;a.didFirePressStart=!1,a.isTriggeringEvent=!0;let l=!0;if(o){let t=new vM("pressend",n,e);o(t),l=t.shouldStopPropagation}if(r&&r(!1),m(!1),t&&i&&!s){let r=new vM("press",n,e);t(r),l&&(l=r.shouldStopPropagation)}return a.isTriggeringEvent=!1,l}),x=bS((e,t)=>{let r=y.current;if(s)return!1;if(i){r.isTriggeringEvent=!0;let n=new vM("pressup",t,e);return i(n),r.isTriggeringEvent=!1,n.shouldStopPropagation}return!0}),E=bS(e=>{let t=y.current;if(t.isPressed&&t.target){for(let r of(t.didFirePressStart&&null!=t.pointerType&&w(vU(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,b(),d||vE(t.target),t.disposables))r();t.disposables=[]}}),S=bS(e=>{c&&E(e)}),D=bS(e=>{null==a||a(e)}),O=bS((e,t)=>{if(a){let r=new MouseEvent("click",e);vr(r,t),a(vt(r))}}),P=(0,hC.useMemo)(()=>{let e=y.current,t={onKeyDown(t){if(vV(t.nativeEvent,t.currentTarget)&&vj(t.currentTarget,vT(t.nativeEvent))){var n;vW(vT(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=v(t,"keyboard");let n=t.currentTarget;g(b7(t.currentTarget),"keyup",bx(t=>{vV(t,n)&&!t.repeat&&vj(n,vT(t))&&e.target&&x(vU(e.target,t),"keyboard")},r),!0)}o&&t.stopPropagation(),t.metaKey&&vl()&&(null==(n=e.metaKeyEvents)||n.set(t.key,t.nativeEvent))}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||vj(t.currentTarget,vT(t.nativeEvent)))&&t&&0===t.button&&!e.isTriggeringEvent&&!vR.isOpening){let r=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||vN(t.nativeEvent))){let e=v(t,"virtual"),n=x(t,"virtual"),o=w(t,"virtual");D(t),r=e&&n&&o}else if(e.isPressed&&"keyboard"!==e.pointerType){let n=e.pointerType||t.nativeEvent.pointerType||"virtual";r=w(vU(t.currentTarget,t),n,!0),e.isOverTarget=!1,D(t),E(t)}e.ignoreEmulatedMouseEvents=!1,r&&t.stopPropagation()}}},r=t=>{var r,n,o;if(e.isPressed&&e.target&&vV(t,e.target)){vW(vT(t),t.key)&&t.preventDefault();let r=vT(t),o=vj(e.target,vT(t));w(vU(e.target,t),"keyboard",o),o&&O(t,e.target),b(),"Enter"!==t.key&&vB(e.target)&&vj(e.target,r)&&!t[vL]&&(t[vL]=!0,vR(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||!vj(t.currentTarget,vT(t.nativeEvent)))return;if(o=t.nativeEvent,!vh()&&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 i=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,d||function(e){if(vd()){if("default"===vw){let t=b7(e);v_=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}vw="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";vx.set(e,e.style[t]),e.style[t]="none"}}(e.target),i=v(t,e.pointerType);let o=vT(t.nativeEvent);"releasePointerCapture"in o&&o.releasePointerCapture(t.pointerId),g(b7(t.currentTarget),"pointerup",r,!1),g(b7(t.currentTarget),"pointercancel",n,!1)}i&&t.stopPropagation()},t.onMouseDown=t=>{if(vj(t.currentTarget,vT(t.nativeEvent))&&0===t.button){if(u){let r=function(e){for(;e&&!b6(e);)e=e.parentElement;let t=b9(e),r=t.document.activeElement;if(!r||r===e)return;vo=!0;let n=!1,o=e=>{(e.target===r||n)&&e.stopImmediatePropagation()},i=t=>{(t.target===r||n)&&(t.stopImmediatePropagation(),e||n||(n=!0,b8(r),l()))},a=t=>{(t.target===e||n)&&t.stopImmediatePropagation()},s=t=>{(t.target===e||n)&&(t.stopImmediatePropagation(),n||(n=!0,b8(r),l()))};t.addEventListener("blur",o,!0),t.addEventListener("focusout",i,!0),t.addEventListener("focusin",s,!0),t.addEventListener("focus",a,!0);let l=()=>{cancelAnimationFrame(u),t.removeEventListener("blur",o,!0),t.removeEventListener("focusout",i,!0),t.removeEventListener("focusin",s,!0),t.removeEventListener("focus",a,!0),vo=!1,n=!1},u=requestAnimationFrame(l);return l}(t.target);r&&e.disposables.push(r)}t.stopPropagation()}},t.onPointerUp=t=>{vj(t.currentTarget,vT(t.nativeEvent))&&"virtual"!==e.pointerType&&0===t.button&&x(t,e.pointerType||t.pointerType)},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!0,v(vU(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,w(vU(e.target,t),e.pointerType,!1),S(t))};let r=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target){if(vj(e.target,vT(t))&&null!=e.pointerType){let r=!1,n=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(r?E(t):(b8(e.target),e.target.click()))},80);g(t.currentTarget,"click",()=>r=!0,!0),e.disposables.push(()=>clearTimeout(n))}else E(t);e.isOverTarget=!1}},n=e=>{E(e)};t.onDragStart=e=>{vj(e.currentTarget,vT(e.nativeEvent))&&E(e)}}return t},[g,s,u,b,d,E,S,w,v,x,D,O]);return(0,hC.useEffect)(()=>{let e=null==p?void 0:p.current;e&&e instanceof b9(e).Element&&"auto"===b9(e).getComputedStyle(e).touchAction&&(e.style.touchAction="pan-x pan-y pinch-zoom")},[p]),(0,hC.useEffect)(()=>{let e=y.current;return()=>{var t;for(let r of(d||vE(null!=(t=e.target)?t:void 0),e.disposables))r();e.disposables=[]}},[d]),{isPressed:l||h,pressProps:bF(f,P)}}function vB(e){return"A"===e.tagName&&e.hasAttribute("href")}function vV(e,t){let{key:r,code:n}=e,o=t.getAttribute("role");return("Enter"===r||" "===r||"Spacebar"===r||"Space"===n)&&!(t instanceof b9(t).HTMLInputElement&&!vK(t,r)||t instanceof b9(t).HTMLTextAreaElement||t.isContentEditable)&&!(("link"===o||!o&&vB(t))&&"Enter"!==r)}function vU(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 vW(e,t){return e instanceof HTMLInputElement?!vK(e,t):!(e instanceof HTMLInputElement)&&(e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!vB(e))}let vz=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function vK(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:vz.has(e.type)}let vH=null,vG=new Set,vq=new Map,vZ=!1,vY=!1,vJ={Tab:!0,Escape:!0};function vX(e,t){for(let r of vG)r(e,t)}function vQ(e){vZ=!0,e.metaKey||!vl()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(vH="keyboard",vX("keyboard",e))}function v0(e){vH="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(vZ=!0,vX("pointer",e))}function v1(e){vN(e)&&(vZ=!0,vH="virtual")}function v2(e){e.target!==window&&e.target!==document&&!vo&&e.isTrusted&&(vZ||vY||(vH="virtual",vX("virtual",e)),vZ=!1,vY=!1)}function v4(){vo||(vZ=!1,vY=!0)}function v3(e){if("u"<typeof window||vq.get(b9(e)))return;let t=b9(e),r=b7(e),n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){vZ=!0,n.apply(this,arguments)},r.addEventListener("keydown",vQ,!0),r.addEventListener("keyup",vQ,!0),r.addEventListener("click",v1,!0),t.addEventListener("focus",v2,!0),t.addEventListener("blur",v4,!1),"u">typeof PointerEvent&&(r.addEventListener("pointerdown",v0,!0),r.addEventListener("pointermove",v0,!0),r.addEventListener("pointerup",v0,!0)),t.addEventListener("beforeunload",()=>{v6(e)},{once:!0}),vq.set(t,{focus:n})}let v6=(e,t)=>{let r=b9(e),n=b7(e);t&&n.removeEventListener("DOMContentLoaded",t),vq.has(r)&&(r.HTMLElement.prototype.focus=vq.get(r).focus,n.removeEventListener("keydown",vQ,!0),n.removeEventListener("keyup",vQ,!0),n.removeEventListener("click",v1,!0),r.removeEventListener("focus",v2,!0),r.removeEventListener("blur",v4,!1),"u">typeof PointerEvent&&(n.removeEventListener("pointerdown",v0,!0),n.removeEventListener("pointermove",v0,!0),n.removeEventListener("pointerup",v0,!0)),vq.delete(r))};function v5(){return"pointer"!==vH}"u">typeof document&&("loading"!==(f=b7(void 0)).readyState?v3(void 0):f.addEventListener("DOMContentLoaded",()=>{v3(void 0)}));let v7=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function v9(e){let t=b7(e),r=((e=document)=>e.activeElement)(t);"virtual"===vH?vv(()=>{((e=document)=>e.activeElement)(t)===r&&e.isConnected&&b8(e)}):b8(e)}function v8(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:o}=e,i=(0,hC.useCallback)(e=>{if(e.target===e.currentTarget)return n&&n(e),o&&o(!1),!0},[n,o]),a=vn(i),s=(0,hC.useCallback)(e=>{let t=b7(e.target),n=t?((e=document)=>e.activeElement)(t):((e=document)=>e.activeElement)();e.target===e.currentTarget&&n===vT(e.nativeEvent)&&(r&&r(e),o&&o(!0),a(e))},[o,r,a]);return{focusProps:{onFocus:!t&&(r||o||n)?s:void 0,onBlur:!t&&(n||o)?i:void 0}}}function we(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 wt=hj().createContext(null);function wr(e,t){let{focusProps:r}=v8(e),{keyboardProps:n}={keyboardProps:e.isDisabled?{}:{onKeyDown:we(e.onKeyDown),onKeyUp:we(e.onKeyUp)}},o=bF(r,n),i=function(e){let t=(0,hC.useContext)(wt)||{};vk(t,e);let{ref:r,...n}=t;return n}(t),a=e.isDisabled?{}:i,s=(0,hC.useRef)(e.autoFocus);(0,hC.useEffect)(()=>{s.current&&t.current&&v9(t.current),s.current=!1},[t]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:bF({...o,tabIndex:l},a)}}function wn(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:o}=e,i=(0,hC.useRef)({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:s}=vC(),l=(0,hC.useCallback)(e=>{e.currentTarget.contains(e.target)&&i.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(i.current.isFocusWithin=!1,s(),r&&r(e),o&&o(!1))},[r,o,i,s]),u=vn(l),c=(0,hC.useCallback)(e=>{if(!e.currentTarget.contains(e.target))return;let t=b7(e.target),r=((e=document)=>e.activeElement)(t);if(!i.current.isFocusWithin&&r===vT(e.nativeEvent)){n&&n(e),o&&o(!0),i.current.isFocusWithin=!0,u(e);let r=e.currentTarget;a(t,"focus",e=>{if(i.current.isFocusWithin&&!vj(r,e.target)){let n=new t.defaultView.FocusEvent("blur",{relatedTarget:e.target});vr(n,r),l(vt(n))}},{capture:!0})}},[n,o,u,a,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:l}}}function wo(e={}){var t;let{autoFocus:r=!1,isTextInput:n,within:o}=e,i=(0,hC.useRef)({isFocused:!1,isFocusVisible:r||v5()}),[a,s]=(0,hC.useState)(!1),[l,u]=(0,hC.useState)(()=>i.current.isFocused&&i.current.isFocusVisible),c=(0,hC.useCallback)(()=>u(i.current.isFocused&&i.current.isFocusVisible),[]),d=(0,hC.useCallback)(e=>{i.current.isFocused=e,s(e),c()},[c]);t={isTextInput:n},v3(),(0,hC.useEffect)(()=>{let e=(e,r)=>{var n;let o,a,s,l,u;n=!!(null==t?void 0:t.isTextInput),o=b7(null==r?void 0:r.target),a="u">typeof window?b9(null==r?void 0:r.target).HTMLInputElement:HTMLInputElement,s="u">typeof window?b9(null==r?void 0:r.target).HTMLTextAreaElement:HTMLTextAreaElement,l="u">typeof window?b9(null==r?void 0:r.target).HTMLElement:HTMLElement,u="u">typeof window?b9(null==r?void 0:r.target).KeyboardEvent:KeyboardEvent,(n=n||o.activeElement instanceof a&&!v7.has(o.activeElement.type)||o.activeElement instanceof s||o.activeElement instanceof l&&o.activeElement.isContentEditable)&&"keyboard"===e&&r instanceof u&&!vJ[r.key]||(e=>{i.current.isFocusVisible=e,c()})(v5())};return vG.add(e),()=>{vG.delete(e)}},[]);let{focusProps:p}=v8({isDisabled:o,onFocusChange:d}),{focusWithinProps:f}=wn({isDisabled:!o,onFocusWithinChange:d});return{isFocused:a,isFocusVisible:l,focusProps:o?f:p}}hj().forwardRef(function(e,t){let{children:r,...n}=e,o=b_(t),i={...n,ref:o};return hj().createElement(wt.Provider,{value:i},r)});let wi=!1,wa=0;function ws(e){"touch"===e.pointerType&&(wi=!0,setTimeout(()=>{wi=!1},50))}function wl(){if("u">typeof document)return"u">typeof PointerEvent&&document.addEventListener("pointerup",ws),wa++,()=>{!(--wa>0)&&"u">typeof PointerEvent&&document.removeEventListener("pointerup",ws)}}function wu(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:o}=e,[i,a]=(0,hC.useState)(!1),s=(0,hC.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,hC.useEffect)(wl,[]);let{addGlobalListener:l,removeAllGlobalListeners:u}=vC(),{hoverProps:c,triggerHoverEnd:d}=(0,hC.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),a(!1))},i={};return"u">typeof PointerEvent&&(i.onPointerEnter=n=>{wi&&"mouse"===n.pointerType||((n,i)=>{if(s.pointerType=i,o||"touch"===i||s.isHovered||!n.currentTarget.contains(n.target))return;s.isHovered=!0;let u=n.currentTarget;s.target=u,l(b7(n.target),"pointerover",t=>{s.isHovered&&s.target&&!vj(s.target,t.target)&&e(t,t.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:u,pointerType:i}),r&&r(!0),a(!0)})(n,n.pointerType)},i.onPointerLeave=t=>{!o&&t.currentTarget.contains(t.target)&&e(t,t.pointerType)}),{hoverProps:i,triggerHoverEnd:e}},[t,r,n,o,s,l,u]);return(0,hC.useEffect)(()=>{o&&d({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:c,isHovered:i}}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 wc=(0,hC.createContext)(!1);function wd(e){let t=(t,r)=>(0,hC.useContext)(wc)?null:e(t,r);return t.displayName=e.displayName||e.name,(0,hC.forwardRef)(t)}let wp=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),wf=(0,hC.createContext)({}),wh=wd(function(e,t){var r;[e,t]=bz(e,t,wf);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:i,isPressed:a}=function(e,t){let r,{elementType:n="button",isDisabled:o,onPress:i,onPressStart:a,onPressEnd:s,onPressUp:l,onPressChange:u,preventFocusOnPress:c,allowFocusWhenDisabled:d,onClick:p,href:f,target:h,rel:m,type:y="button"}=e;r="button"===n?{type:y,disabled:o}:{role:"button",href:"a"!==n||o?void 0:f,target:"a"===n?h:void 0,type:"input"===n?y:void 0,disabled:"input"===n?o:void 0,"aria-disabled":o&&"input"!==n?o:void 0,rel:"a"===n?m:void 0};let{pressProps:g,isPressed:b}=vF({onPressStart:a,onPressEnd:s,onPressChange:u,onPress:i,onPressUp:l,onClick:p,isDisabled:o,preventFocusOnPress:c,ref:t}),{focusableProps:v}=wr(e,t);d&&(v.tabIndex=o?-1:v.tabIndex);let w=bF(v,g,b1(e,{labelable:!0}));return{isPressed:b,buttonProps:bF(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}=wo(e),{hoverProps:c,isHovered:d}=wu({...e,isDisabled:e.isDisabled||o}),p={isHovered:d,isPressed:(n.isPressed||a)&&!o,isFocused:l,isFocusVisible:u,isDisabled:e.isDisabled||!1,isPending:null!=o&&o},f=bU({...e,values:p,defaultClassName:"react-aria-Button"}),h=bI(i.id),m=bI(),y=i["aria-labelledby"];o&&(y?y=`${y} ${m}`:i["aria-label"]&&(y=`${h} ${m}`));let g=(0,hC.useRef)(o);return(0,hC.useEffect)(()=>{let e={"aria-labelledby":y||h};!g.current&&l&&o?bZ(e,"assertive"):g.current&&l&&!o&&bZ(e,"assertive"),g.current=o},[o,l,y,h]),hj().createElement("button",{...b1(e,{propNames:wp}),...bF(i,s,c),...f,type:"submit"===i.type&&o?"button":i.type,id:h,ref:t,"aria-labelledby":y,slot:e.slot||void 0,"aria-disabled":o?"true":i["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":p.isPressed||void 0,"data-hovered":d||void 0,"data-focused":l||void 0,"data-pending":o||void 0,"data-focus-visible":u||void 0},hj().createElement(bG.Provider,{value:{id:m}},f.children))});(0,hC.createContext)(null),(0,hC.createContext)(null),(0,hC.createContext)(null),(0,hC.createContext)(null),(0,hC.createContext)(null);let wm=(0,hC.createContext)({}),wy=(0,hC.createContext)({}),wg=(0,hC.forwardRef)(function(e,t){[e,t]=bz(e,t,wy);let{elementType:r="span",...n}=e;return hj().createElement(r,{className:"react-aria-Text",...n,ref:t})}),wb=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),wv=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function ww(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 wb.has(t.script)}let t=e.split("-")[0];return wv.has(t)}let w_=Symbol.for("react-aria.i18n.locale");function wx(){let e="u">typeof window&&window[w_]||"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:ww(e)?"rtl":"ltr"}}let wE=wx(),wS=new Set;function wD(){for(let e of(wE=wx(),wS))e(wE)}function wO(){let e=bN(),[t,r]=(0,hC.useState)(wE);return((0,hC.useEffect)(()=>(0===wS.size&&window.addEventListener("languagechange",wD),wS.add(r),()=>{wS.delete(r),0===wS.size&&window.removeEventListener("languagechange",wD)}),[]),e)?{locale:"en-US",direction:"ltr"}:t}let wP=hj().createContext(null);function wk(e){let{locale:t,children:r}=e,n=wO(),o=hj().useMemo(()=>t?{locale:t,direction:ww(t)?"rtl":"ltr"}:n,[n,t]);return hj().createElement(wP.Provider,{value:o},r)}function wC(){let e=wO();return(0,hC.useContext)(wP)||e}var wj={};function wT(e,t){return e-t*Math.floor(e/t)}function wR(e,t,r,n){let o=(t=wA(e,t))-1,i=-2;return r<=2?i=0:wN(t)&&(i=-1),1721425+365*o+Math.floor(o/4)-Math.floor(o/100)+Math.floor(o/400)+Math.floor((367*r-362)/12+i+n)}function wN(e){return e%4==0&&(e%100!=0||e%400==0)}function wA(e,t){return"BC"===e?1-t:t}function w$(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}wj={"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 wI={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 wM{fromJulianDay(e){let t=e-1721426,r=Math.floor(t/146097),n=wT(t,146097),o=Math.floor(n/36524),i=wT(n,36524),a=Math.floor(i/1461),s=Math.floor(wT(i,1461)/365),[l,u]=w$(400*r+100*o+4*a+s+ +(4!==o&&4!==s)),c=e-wR(l,u,1,1),d=2;e<wR(l,u,3,1)?d=0:wN(u)&&(d=1);let p=Math.floor(((c+d)*12+373)/367),f=e-wR(l,u,p,1)+1;return new w6(l,u,p,f)}toJulianDay(e){return wR(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return wI[wN(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return wN(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 wL(e,t){let r=e.copy(),n="hour"in r?wq(r,t):0;wF(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,wB(r),wV(r),r.day+=7*(t.weeks||0),r.day+=t.days||0,r.day+=n,function(e){for(;e.day<1;)e.month--,wB(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,wB(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 i,a;let e=null==(i=(a=r.calendar).isInverseEra)?void 0:i.call(a,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 wF(e,t){var r,n;(null==(r=(n=e.calendar).isInverseEra)?void 0:r.call(n,e))&&(t=-t),e.year+=t}function wB(e){for(;e.month<1;)wF(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,wF(e,1)}function wV(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 wU(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),wV(e)}function wW(e){let t={};for(let r in e)"number"==typeof e[r]&&(t[r]=-e[r]);return t}function wz(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),wU(r),r}function wK(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),wH(r),r}function wH(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 wG(e,t){let r=e%t;return r<0&&(r+=t),r}function wq(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=wG(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=wG(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=wG(e.minute,60),r=Math.floor(e.hour/24),e.hour=wG(e.hour,24),r}function wZ(e,t){let r=e.copy();return wq(r,t),r}function wY(e,t,r,n){let o=e.copy();switch(t){case"era":{let t=e.calendar.getEras(),i=t.indexOf(e.era);if(i<0)throw Error("Invalid era: "+e.era);i=wX(i,r,0,t.length-1,null==n?void 0:n.round),o.era=t[i],wU(o);break}case"year":var i,a;(null==(i=(a=o.calendar).isInverseEra)?void 0:i.call(a,o))&&(r=-r),o.year=wX(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=wX(e.month,r,1,e.calendar.getMonthsInYear(e),null==n?void 0:n.round);break;case"day":o.day=wX(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),wU(o),o}function wJ(e,t,r,n){let o=e.copy();switch(t){case"hour":{let t=e.hour,i=0,a=23;if((null==n?void 0:n.hourCycle)===12){let e=t>=12;i=12*!!e,a=e?23:11}o.hour=wX(t,r,i,a,null==n?void 0:n.round);break}case"minute":o.minute=wX(e.minute,r,0,59,null==n?void 0:n.round);break;case"second":o.second=wX(e.second,r,0,59,null==n?void 0:n.round);break;case"millisecond":o.millisecond=wX(e.millisecond,r,0,999,null==n?void 0:n.round);break;default:throw Error("Unsupported field "+t)}return o}function wX(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 wQ(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?_s(wL(_d(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):_r(e)-e.offset)+(t.milliseconds||0),r+=1e3*(t.seconds||0),r+=6e4*(t.minutes||0),_p(_u(r+=36e5*(t.hours||0),e.timeZone),e.calendar)}function w0(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 w1(e){let t,r=_p(e,new wM);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 w2(e){return`${w1(e)}T${w0(e)}`}function w4(e){let t,r="object"==typeof e[0]?e.shift():new wM;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 w3=new WeakMap;class w6{copy(){return this.era?new w6(this.calendar,this.era,this.year,this.month,this.day):new w6(this.calendar,this.year,this.month,this.day)}add(e){return wL(this,e)}subtract(e){return wL(this,wW(e))}set(e){return wz(this,e)}cycle(e,t,r){return wY(this,e,t,r)}toDate(e){return _l(this,e)}toString(){return w1(this)}compare(e){return __(this,e)}constructor(...e){vO(this,w3,{writable:!0,value:void 0});let[t,r,n,o,i]=w4(e);this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=i,wU(this)}}var w5=new WeakMap;class w7{copy(){return new w7(this.hour,this.minute,this.second,this.millisecond)}add(e){return wZ(this,e)}subtract(e){return wZ(this,wW(e))}set(e){return wK(this,e)}cycle(e,t,r){return wJ(this,e,t,r)}toString(){return w0(this)}compare(e){var t,r;return t=this,r=e,_x(t)-_x(r)}constructor(e=0,t=0,r=0,n=0){vO(this,w5,{writable:!0,value:void 0}),this.hour=e,this.minute=t,this.second=r,this.millisecond=n,wH(this)}}var w9=new WeakMap;class w8{copy(){return this.era?new w8(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new w8(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return wL(this,e)}subtract(e){return wL(this,wW(e))}set(e){return wz(wK(this,e),e)}cycle(e,t,r){switch(e){case"era":case"year":case"month":case"day":return wY(this,e,t,r);default:return wJ(this,e,t,r)}}toDate(e,t){return _l(this,e,t)}toString(){return w2(this)}compare(e){var t,r;let n=__(this,e);return 0===n?(t=this,r=_d(e),_x(t)-_x(r)):n}constructor(...e){vO(this,w9,{writable:!0,value:void 0});let[t,r,n,o,i]=w4(e);this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=i,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,wU(this)}}var _e=new WeakMap;class _t{copy(){return this.era?new _t(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new _t(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return wQ(this,e)}subtract(e){return wQ(this,wW(e))}set(e,t){let r,n;return 0===(n=wK(wz(r=_d(this),e),e)).compare(r)?this:_p(_u(_s(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 i=_d(e),a=_p(wK(i,{hour:t}),new wM),s=[_s(a,e.timeZone,"earlier"),_s(a,e.timeZone,"later")].filter(t=>_u(t,e.timeZone).day===a.day)[0],l=_p(wK(i,{hour:o}),new wM),u=[_s(l,e.timeZone,"earlier"),_s(l,e.timeZone,"later")].filter(t=>_u(t,e.timeZone).day===l.day).pop(),c=_r(e)-e.offset,d=Math.floor(c/36e5),p=c%36e5;return _p(_u(c=36e5*wX(d,r,Math.floor(s/36e5),Math.floor(u/36e5),null==n?void 0:n.round)+p,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return wJ(e,t,r,n);case"era":case"year":case"month":case"day":return _p(_u(_s(wY(_d(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(_r(e)-e.offset)}toString(){var e;let t,r,n;return`${w2(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 _t){var r,n;return e.timeZone===t?e:(r=e,n=t,_p(_u(_r(r)-r.offset,n),r.calendar))}return _u(_s(e,t,void 0),t)})(e,this.timeZone).toDate().getTime()}constructor(...e){vO(this,_e,{writable:!0,value:void 0});let[t,r,n,o,i]=w4(e),a=e.shift(),s=e.shift();this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=i,this.timeZone=a,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,wU(this)}}function _r(e){return _n(wA((e=_p(e,new wM)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function _n(e,t,r,n,o,i,a){let s=new Date;return s.setUTCHours(n,o,i,a),s.setUTCFullYear(e,t-1,r),s.getTime()}function _o(e,t){if("UTC"===t)return 0;if(e>0&&t===_S())return -6e4*new Date(e).getTimezoneOffset();let{year:r,month:n,day:o,hour:i,minute:a,second:s}=_a(e,t);return _n(r,n,o,i,a,s,0)-1e3*Math.floor(e/1e3)}let _i=new Map;function _a(e,t){let r=_i.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"}),_i.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 _s(e,t,r="compatible"){var n,o,i;let a=_d(e);if("UTC"===t)return _r(a);if(t===_S()&&"compatible"===r){a=_p(a,new wM);let e=new Date,t=wA(a.era,a.year);return e.setFullYear(t,a.month-1,a.day),e.setHours(a.hour,a.minute,a.second,a.millisecond),e.getTime()}let s=_r(a),l=_o(s-864e5,t),u=_o(s+864e5,t),c=(n=a,((o=s-l)==(i=s-u)?[o]:[o,i]).filter(e=>{var r;let o;return r=n,o=_a(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 _l(e,t,r="compatible"){return new Date(_s(e,t,r))}function _u(e,t){let r=_o(e,t),n=new Date(e+r),o=n.getUTCFullYear();return new _t(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 _c(e){return new w6(e.calendar,e.era,e.year,e.month,e.day)}function _d(e,t){let r=0,n=0,o=0,i=0;if("timeZone"in e)({hour:r,minute:n,second:o,millisecond:i}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:o,millisecond:i}=t),new w8(e.calendar,e.era,e.year,e.month,e.day,r,n,o,i)}function _p(e,t){if(_y(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,wU(n),n}let _f={"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 _h(e,t){return t=_p(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function _m(e,t){return _y(e.calendar,t.calendar)&&_h(e,t)}function _y(e,t){var r,n,o,i;return null!=(i=null!=(o=null==(r=e.isEqual)?void 0:r.call(e,t))?o:null==(n=t.isEqual)?void 0:n.call(t,e))?i:e.identifier===t.identifier}let _g={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function _b(e,t,r){let n,o=Math.ceil(e.calendar.toJulianDay(e)+1-(r?_g[r]:(n=function(e){if(Intl.Locale){let t=_k.get(e);return!t&&(t=new Intl.Locale(e).maximize().region)&&_k.set(e,t),t}let t=e.split("-")[1];return"u"===t?void 0:t}(t))&&_f[n]||0))%7;return o<0&&(o+=7),o}function _v(e){return _u(Date.now(),e)}function _w(e){return _c(_v(e))}function __(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function _x(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let _E=null;function _S(){return null==_E&&(_E=new Intl.DateTimeFormat().resolvedOptions().timeZone),_E}function _D(e){return e.subtract({days:e.day-1})}function _O(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function _P(e,t,r){let n=_b(e,t,r);return e.subtract({days:n})}let _k=new Map;function _C(e,t){return e&&t?0>=e.compare(t)?e:t:e||t}function _j(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}let _T=Symbol.for("react-aria.i18n.locale"),_R=Symbol.for("react-aria.i18n.strings");class _N{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[_T];if(void 0===h){let e=window[_R];if(!e)return null;for(let r in h={},e)h[r]=new _N({[t]:e[r]},t)}let r=null==h?void 0:h[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 _A=new Map,_$=new Map;class _I{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,i=_A.get(o);return i||(i=new Intl.PluralRules(this.locale,{type:r}),_A.set(o,i)),"function"==typeof(n=t[i.select(e)]||t.other)?n():n}number(e){let t=_$.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),_$.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 _M=new WeakMap;function _L(e,t){let r;return t&&_N.getGlobalDictionaryForPackage(t)||((r=_M.get(e))||(r=new _N(e),_M.set(e,r)),r)}function _F(e,t){let{locale:r}=wC(),n=_L(e,t);return(0,hC.useMemo)(()=>new _I(r,n),[r,n])}let _B=new Map;class _V{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==_K&&(_K="h12"===new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle),_K&&(this.resolvedHourCycle||(this.resolvedHourCycle=function(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,"");let r=_W(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=_W(e,t),this.options=t}}let _U={true:{ja:"h11"},false:{}};function _W(e,t={}){if("boolean"==typeof t.hour12&&(null==_z&&(_z="24"===new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))),_z)){let r=_U[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(_B.has(r))return _B.get(r);let n=new Intl.DateTimeFormat(e,t);return _B.set(r,n),n}let _z=null,_K=null;function _H(e,t){let r=(0,hC.useRef)(null);return e&&r.current&&t(e,r.current)&&(e=r.current),r.current=e,e}function _G(e){e=_H(null!=e?e:{},_q);let{locale:t}=wC();return(0,hC.useMemo)(()=>new _V(t,e),[t,e])}function _q(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 _Z(e){return e&&e.__esModule?e.default:e}let _Y=new WeakMap;function _J(e){return(null==e?void 0:e.calendar.identifier)==="gregory"&&"BC"===e.era?"short":void 0}function _X(e,t,r,n){let o=_F(_Z(wj),"@react-aria/calendar"),i=_J(e)||_J(t),a=_G({month:"long",year:"numeric",era:i,calendar:e.calendar.identifier,timeZone:r}),s=_G({month:"long",year:"numeric",day:"numeric",era:i,calendar:e.calendar.identifier,timeZone:r});return(0,hC.useMemo)(()=>{if(_h(e,_D(e))){let i=e,s=t;if(e.calendar.getFormattableMonth&&(i=e.calendar.getFormattableMonth(e)),t.calendar.getFormattableMonth&&(s=t.calendar.getFormattableMonth(t)),_h(t,_O(e)))return a.format(i.toDate(r));if(_h(t,_O(t)))return n?_Q(a,o,i,s,r):a.formatRange(i.toDate(r),s.toDate(r))}return n?_Q(s,o,e,t,r):s.formatRange(e.toDate(r),t.toDate(r))},[e,t,a,s,o,r,n])}function _Q(e,t,r,n,o){let i=e.formatRangeToParts(r.toDate(o),n.toDate(o)),a=-1;for(let e=0;e<i.length;e++){let t=i[e];if("shared"===t.source&&"literal"===t.type)a=e;else if("endRange"===t.source)break}let s="",l="";for(let e=0;e<i.length;e++)e<a?s+=i[e].value:e>a&&(l+=i[e].value);return t.format("dateRange",{startDate:s,endDate:l})}function _0(e,t){let r=(0,hC.useRef)(!0),n=(0,hC.useRef)(null);(0,hC.useEffect)(()=>(r.current=!0,()=>{r.current=!1}),[]),(0,hC.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 _1(e,t){let{id:r,"aria-label":n,"aria-labelledby":o}=e;return r=bI(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 _2(e,t){var r,n;let o,i,a,s,l,u=_F((r=wj)&&r.__esModule?r.default:r,"@react-aria/calendar"),c=b1(e),d=_X(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),p=_X(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);_0(()=>{t.isFocused||bZ(p)},[p]);let f=(a=_F(_Z(wj),"@react-aria/calendar"),"highlightedRange"in t?{start:o,end:i}=t.highlightedRange||{}:o=i=null!=(n=t.value)?n:void 0,s=_G({weekday:"long",month:"long",year:"numeric",day:"numeric",era:_J(o)||_J(i),timeZone:t.timeZone}),l="anchorDate"in t?t.anchorDate:null,(0,hC.useMemo)(()=>{if(!l&&o&&i)if(_h(o,i)){let e=s.format(o.toDate(t.timeZone));return a.format("selectedDateDescription",{date:e})}else{let e=_Q(s,a,o,i,t.timeZone);return a.format("selectedRangeDescription",{dateRange:e})}return""},[o,i,l,t.timeZone,a,s]));_0(()=>{f&&bZ(f,"polite",4e3)},[f]);let h=bM([!!e.errorMessage,e.isInvalid,e.validationState]);_Y.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:h,selectedDateDescription:f});let[m,y]=(0,hC.useState)(!1),g=e.isDisabled||t.isNextVisibleRangeInvalid();g&&m&&(y(!1),t.setFocused(!0));let[b,v]=(0,hC.useState)(!1),w=e.isDisabled||t.isPreviousVisibleRangeInvalid();return w&&b&&(v(!1),t.setFocused(!0)),{calendarProps:bF(c,_1({id:e.id,"aria-label":[e["aria-label"],p].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:g,onFocusChange:y},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":u.format("previous"),isDisabled:w,onFocusChange:v},errorMessageProps:{id:h},title:d}}let _4={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 _3(e){let{children:t,elementType:r="div",isFocusable:n,style:o,...i}=e,{visuallyHiddenProps:a}=function(e={}){let{style:t,isFocusable:r}=e,[n,o]=(0,hC.useState)(!1),{focusWithinProps:i}=wn({isDisabled:!r,onFocusWithinChange:e=>o(e)}),a=(0,hC.useMemo)(()=>n?t:t?{..._4,...t}:_4,[n]);return{visuallyHiddenProps:{...i,style:a}}}(e);return hj().createElement(r,bF(i,a),t)}function _6(e,t,r,n){let o=bS(r),i=null==r;(0,hC.useEffect)(()=>{if(i||!e.current)return;let r=e.current;return r.addEventListener(t,o,n),()=>{r.removeEventListener(t,o,n)}},[e,t,n,i,o])}let _5=0,_7=new Map;function _9(e){let[t,r]=(0,hC.useState)();return bE(()=>{if(!e)return;let t=_7.get(e);if(t)r(t.element.id);else{let n=`react-aria-description-${_5++}`;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},_7.set(e,t)}return t.refCount++,()=>{t&&0==--t.refCount&&(t.element.remove(),_7.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function _8(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 xe(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 xt(e,t){if(e&&document.contains(e)){let a=document.scrollingElement||document.documentElement;if("hidden"===window.getComputedStyle(a).overflow)for(let t of function(e){let t=[];for(;e&&e!==document.documentElement;)_8(e,void 0)&&t.push(e),e=e.parentElement;return t}(e))!function(e,t){let r=xe(e,t,"left"),n=xe(e,t,"top"),o=t.offsetWidth,i=t.offsetHeight,a=e.scrollLeft,s=e.scrollTop,{borderTopWidth:l,borderLeftWidth:u,scrollPaddingTop:c,scrollPaddingRight:d,scrollPaddingBottom:p,scrollPaddingLeft:f}=getComputedStyle(e),h=a+parseInt(u,10),m=s+parseInt(l,10),y=h+e.clientWidth,g=m+e.clientHeight,b=parseInt(c,10)||0,v=parseInt(p,10)||0,w=parseInt(d,10)||0,x=parseInt(f,10)||0;r<=a+x?a=r-parseInt(u,10)-x:r+o>y-w&&(a+=r+o-y+w),n<=m+b?s=n-parseInt(l,10)-b:n+i>g-v&&(s+=n+i-g+v),e.scrollLeft=a,e.scrollTop=s}(t,e);else{var r,n,o,i;let{left:a,top:s}=e.getBoundingClientRect();null==e||null==(r=e.scrollIntoView)||r.call(e,{block:"nearest"});let{left:l,top:u}=e.getBoundingClientRect();(Math.abs(a-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==(i=e.scrollIntoView)||i.call(e,{block:"nearest"}))}}}function xr(e,t){let r=e;for(_8(r,t)&&(r=r.parentElement);r&&!_8(r,t);)r=r.parentElement;return r||document.scrollingElement||document.documentElement}class xn extends wM{fromJulianDay(e){let t=super.fromJulianDay(e);return new w6(this,wA(t.era,t.year)- -543,t.month,t.day)}toJulianDay(e){return super.toJulianDay(xo(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(xo(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function xo(e){let[t,r]=w$(e.year+-543);return new w6(t,r,e.month,e.day)}function xi(e,t,r,n){return e+365*t+Math.floor(t/4)+30*(r-1)+n-1}function xa(e,t){let r=Math.floor(4*(t-e)/1461),n=1+Math.floor((t-xi(e,r,1,1))/30),o=t+1-xi(e,r,n,1);return[r,n,o]}function xs(e){return Math.floor(e%4/3)}function xl(e,t){return t%13!=0?30:xs(e)+5}class xu{fromJulianDay(e){let[t,r,n]=xa(1723856,e),o="AM";return t<=0&&(o="AA",t+=5500),new w6(this,o,t,r,n)}toJulianDay(e){let t=e.year;return"AA"===e.era&&(t-=5500),xi(1723856,t,e.month,e.day)}getDaysInMonth(e){return xl(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+xs(e.year)}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class xc extends xu{fromJulianDay(e){let[t,r,n]=xa(1723856,e);return new w6(this,"AA",t+=5500,r,n)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class xd extends xu{fromJulianDay(e){let[t,r,n]=xa(1824665,e),o="CE";return t<=0&&(o="BCE",t=1-t),new w6(this,o,t,r,n)}toJulianDay(e){let t=e.year;return"BCE"===e.era&&(t=1-t),xi(1824665,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return"BCE"===e.era&&(t=1-t),xl(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 xp=765433;function xf(e){return 7>wT(7*e+1,19)}function xh(e){let t=Math.floor((235*e-234)/19),r=29*t+Math.floor((12084+13753*t)/25920);return 3>wT(3*(r+1),7)&&(r+=1),r}function xm(e){let t,r;return xh(e)+(t=xh(e-1),r=xh(e),xh(e+1)-r==356?2:+(r-t==382))}function xy(e){return xm(e+1)-xm(e)}function xg(e,t){if(t>=6&&!xf(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;let r=function(e){let t=xy(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*!!xf(e):30}class xb{fromJulianDay(e){let t=e-347997,r=Math.floor((25920*t/xp*19+234)/235)+1,n=xm(r),o=Math.floor(t-n);for(;o<1;)o=Math.floor(t-(n=xm(--r)));let i=1,a=0;for(;a<o;)a+=xg(r,i),i++;let s=o-(a-=xg(r,--i));return new w6(this,r,i,s)}toJulianDay(e){let t=xm(e.year);for(let r=1;r<e.month;r++)t+=xg(e.year,r);return t+e.day+347997}getDaysInMonth(e){return xg(e.year,e.month)}getMonthsInYear(e){return xf(e.year)?13:12}getDaysInYear(e){return xy(e.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,t){t.year!==e.year&&(xf(t.year)&&!xf(e.year)&&t.month>6?e.month--:!xf(t.year)&&xf(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class xv extends wM{fromJulianDay(e){let t,r,n,o=super.fromJulianDay(e),i=o.year-78,a=e-wR(o.era,o.year,1,1);if(a<80?(i--,a+=(t=wN(o.year-1)?31:30)+155+90+10):(t=wN(o.year)?31:30,a-=80),a<t)r=1,n=a+1;else{let e=a-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 w6(this,i,r,n)}toJulianDay(e){let t,r,[n,o]=w$(e.year+78);return(wN(o)?(t=31,r=wR(n,o,3,21)):(t=30,r=wR(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&&wN(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 xw(e,t,r,n){return n+Math.ceil(29.5*(r-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function x_(e,t,r){let n=Math.floor((30*(r-t)+10646)/10631),o=Math.min(12,Math.ceil((r-(29+xw(t,n,1,1)))/29.5)+1),i=r-xw(t,n,o,1)+1;return new w6(e,n,o,i)}function xx(e){return(14+11*e)%30<11}class xE{fromJulianDay(e){return x_(this,1948440,e)}toJulianDay(e){return xw(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return 12===e.month&&xx(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return xx(e.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class xS extends xE{fromJulianDay(e){return x_(this,1948439,e)}toJulianDay(e){return xw(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function xD(e){return 460322+c[e-1300]}function xO(e,t){return(u[e-1300]&1<<11-(t-1))==0?29:30}function xP(e,t){let r=xD(e);for(let n=1;n<t;n++)r+=xO(e,n);return r}function xk(e){return c[e+1-1300]-c[e-1300]}class xC extends xE{fromJulianDay(e){let t=e-1948440,r=xD(1300),n=xD(1600);if(t<r||t>n)return super.fromJulianDay(e);{let e=1299,r=1,n=1;for(;n>0;){n=t-xD(++e)+1;let o=xk(e);if(n===o){r=12;break}if(n<o){let t=xO(e,r);for(r=1;n>t;)n-=t,t=xO(e,++r);break}}return new w6(this,e,r,t-xP(e,r)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+xP(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):xO(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):xk(e.year)}constructor(){if(super(),this.identifier="islamic-umalqura",u||(u=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),e=>e.charCodeAt(0)).buffer)),!c){c=new Uint32Array(301);let e=0;for(let t=1300;t<=1600;t++){c[t-1300]=e;for(let r=1;r<=12;r++)e+=xO(t,r)}}}}let xj=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],xT=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],xR=[1867,1911,1925,1988,2018],xN=["meiji","taisho","showa","heisei","reiwa"];function xA(e){let t=xj.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?xj.length-1:0===t?0:t-1}function x$(e){let t=xR[xN.indexOf(e.era)];if(!t)throw Error("Unknown era: "+e.era);return new w6(e.year+t,e.month,e.day)}class xI extends wM{fromJulianDay(e){let t=super.fromJulianDay(e),r=xA(t);return new w6(this,xN[r],t.year-xR[r],t.month,t.day)}toJulianDay(e){return super.toJulianDay(x$(e))}balanceDate(e){let t=x$(e),r=xA(t);xN[r]!==e.era&&(e.era=xN[r],e.year=t.year-xR[r]),this.constrainDate(e)}constrainDate(e){let t=xN.indexOf(e.era),r=xT[t];if(null!=r){let[n,o,i]=r,a=n-xR[t];e.year=Math.max(1,Math.min(a,e.year)),e.year===a&&(e.month=Math.min(o,e.month),e.month===o&&(e.day=Math.min(i,e.day)))}if(1===e.year&&t>=0){let[,r,n]=xj[t];e.month=Math.max(r,e.month),e.month===r&&(e.day=Math.max(n,e.day))}}getEras(){return xN}getYearsInEra(e){let t=xN.indexOf(e.era),r=xj[t],n=xj[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(x$(e))}getMinimumMonthInYear(e){let t=xM(e);return t?t[1]:1}getMinimumDayInMonth(e){let t=xM(e);return t&&e.month===t[1]?t[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function xM(e){if(1===e.year)return xj[xN.indexOf(e.era)]}let xL=[0,31,62,93,124,155,186,216,246,276,306,336];class xF{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),i=n-xL[o]+1;return new w6(this,r,o+1,i)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=xL[e.month-1],t+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>wT(25*e.year+11,33)?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function xB(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function xV(e){let t=e-1911;return t>0?["minguo",t]:["before_minguo",1-t]}class xU extends wM{fromJulianDay(e){let t=super.fromJulianDay(e),[r,n]=xV(wA(t.era,t.year));return new w6(this,r,n,t.month,t.day)}toJulianDay(e){return super.toJulianDay(xW(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[t,r]=xV(xB(e));e.era=t,e.year=r}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(xW(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function xW(e){let[t,r]=w$(xB(e));return new w6(t,r,e.month,e.day)}function xz(e){switch(e){case"buddhist":return new xn;case"ethiopic":return new xu;case"ethioaa":return new xc;case"coptic":return new xd;case"hebrew":return new xb;case"indian":return new xv;case"islamic-civil":return new xE;case"islamic-tbla":return new xS;case"islamic-umalqura":return new xC;case"japanese":return new xI;case"persian":return new xF;case"roc":return new xU;default:return new wM}}function xK(e,t,r){return null!=t&&0>e.compare(t)||null!=r&&e.compare(r)>0}function xH(e,t,r,n,o){let i={};for(let e in t)i[e]=Math.floor(t[e]/2),i[e]>0&&t[e]%2==0&&i[e]--;let a=xG(e,t,r).subtract(i);return xZ(e,a,t,r,n,o)}function xG(e,t,r,n,o){let i=e;if(t.years)i=_D(e.subtract({months:e.month-1}));else t.months?i=_D(e):t.weeks&&(i=_P(e,r));return xZ(e,i,t,r,n,o)}function xq(e,t,r,n,o){let i={...t};i.days?i.days--:i.weeks?i.weeks--:i.months?i.months--:i.years&&i.years--;let a=xG(e,t,r).subtract(i);return xZ(e,a,t,r,n,o)}function xZ(e,t,r,n,o,i){if(o&&e.compare(o)>=0){let e=_j(t,xG(_c(o),r,n));e&&(t=e)}if(i&&0>=e.compare(i)){let e=_C(t,xq(_c(i),r,n));e&&(t=e)}return t}function xY(e,t,r){if(t){let r=_j(e,_c(t));r&&(e=r)}if(r){let t=_C(e,_c(r));t&&(e=t)}return e}function xJ(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 xX(e,t,r){let[n,o]=(0,hC.useState)(e||t),i=(0,hC.useRef)(void 0!==e),a=void 0!==e;(0,hC.useEffect)(()=>{i.current,i.current=a},[a]);let s=a?e:n,l=(0,hC.useCallback)((e,...t)=>{let n=(e,...t)=>{r&&!Object.is(s,e)&&r(e,...t),a||(s=e)};"function"==typeof e?o((r,...o)=>{let i=e(a?s:r,...o);return(n(i,...t),a)?r:i}):(a||o(e),n(e,...t))},[a,s,r]);return[s,l]}function xQ(e){var t,r,n;let o=(0,hC.useMemo)(()=>new _V(e.locale),[e.locale]),i=(0,hC.useMemo)(()=>o.resolvedOptions(),[o]),{locale:a,createCalendar:s,visibleDuration:l={months:1},minValue:u,maxValue:c,selectionAlignment:d,isDateUnavailable:p,pageBehavior:f="visible",firstDayOfWeek:h}=e,m=(0,hC.useMemo)(()=>s(i.calendar),[s,i.calendar]),[y,g]=xX(e.value,null!=(t=e.defaultValue)?t:null,e.onChange),b=(0,hC.useMemo)(()=>y?_p(_c(y),m):null,[y,m]),v=(0,hC.useMemo)(()=>y&&"timeZone"in y?y.timeZone:i.timeZone,[y,i.timeZone]),[w,x]=xX((0,hC.useMemo)(()=>e.focusedValue?xY(_p(_c(e.focusedValue),m),u,c):void 0,[e.focusedValue,m,u,c]),(0,hC.useMemo)(()=>xY(e.defaultFocusedValue?_p(_c(e.defaultFocusedValue),m):b||_p(_w(v),m),u,c),[e.defaultFocusedValue,b,v,m,u,c]),e.onFocusChange),[E,S]=(0,hC.useState)(()=>{switch(d){case"start":return xG(w,l,a,u,c);case"end":return xq(w,l,a,u,c);default:return xH(w,l,a,u,c)}}),[D,O]=(0,hC.useState)(e.autoFocus||!1),P=(0,hC.useMemo)(()=>{let e={...l};return e.days?e.days--:e.days=-1,E.add(e)},[E,l]),[k,C]=(0,hC.useState)(m);if(!_y(m,k)){let e=_p(w,m);S(xH(e,l,a,u,c)),x(e),C(m)}function j(e){x(e=xY(e,u,c))}function T(t){if(!e.isDisabled&&!e.isReadOnly){let e=t;if(null===e)return void g(null);(e=xJ(e=xY(e,u,c),E,p))&&(e=_p(e,(null==y?void 0:y.calendar)||new wM),y&&"hour"in y?g(y.set(e)):g(e))}}xK(w,u,c)?x(xY(w,u,c)):0>w.compare(E)?S(xq(w,l,a,u,c)):w.compare(P)>0&&S(xG(w,l,a,u,c));let R=(0,hC.useMemo)(()=>!!b&&(!!(p&&p(b))||xK(b,u,c)),[b,p,u,c]),N=e.isInvalid||"invalid"===e.validationState||R,A=(0,hC.useMemo)(()=>"visible"===f?l:x0(l),[f,l]);return{isDisabled:null!=(r=e.isDisabled)&&r,isReadOnly:null!=(n=e.isReadOnly)&&n,value:b,setValue:T,visibleRange:{start:E,end:P},minValue:u,maxValue:c,focusedDate:w,timeZone:v,validationState:N?"invalid":null,isValueInvalid:N,setFocusedDate(e){j(e),O(!0)},focusNextDay(){j(w.add({days:1}))},focusPreviousDay(){j(w.subtract({days:1}))},focusNextRow(){l.days?this.focusNextPage():(l.weeks||l.months||l.years)&&j(w.add({weeks:1}))},focusPreviousRow(){l.days?this.focusPreviousPage():(l.weeks||l.months||l.years)&&j(w.subtract({weeks:1}))},focusNextPage(){let e=E.add(A);x(xY(w.add(A),u,c)),S(xG(xZ(w,e,A,a,u,c),A,a))},focusPreviousPage(){let e=E.subtract(A);x(xY(w.subtract(A),u,c)),S(xG(xZ(w,e,A,a,u,c),A,a))},focusSectionStart(){l.days?j(E):l.weeks?j(_P(w,a)):(l.months||l.years)&&j(_D(w))},focusSectionEnd(){l.days?j(P):l.weeks?j(_P(w,a,void 0).add({days:6})):(l.months||l.years)&&j(_O(w))},focusNextSection(e){e||l.days?l.days?this.focusNextPage():l.weeks?j(w.add({months:1})):(l.months||l.years)&&j(w.add({years:1})):j(w.add(x0(l)))},focusPreviousSection(e){e||l.days?l.days?this.focusPreviousPage():l.weeks?j(w.subtract({months:1})):(l.months||l.years)&&j(w.subtract({years:1})):j(w.subtract(x0(l)))},selectFocusedDate(){p&&p(w)||T(w)},selectDate(e){T(e)},isFocused:D,setFocused:O,isInvalid:e=>xK(e,u,c),isSelected(e){return null!=b&&_h(e,b)&&!this.isCellDisabled(e)&&!this.isCellUnavailable(e)},isCellFocused:e=>D&&w&&_h(e,w),isCellDisabled(t){return e.isDisabled||0>t.compare(E)||t.compare(P)>0||this.isInvalid(t)},isCellUnavailable:t=>!!e.isDateUnavailable&&e.isDateUnavailable(t),isPreviousVisibleRangeInvalid(){let e=E.subtract({days:1});return _h(e,E)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=P.add({days:1});return _h(e,P)||this.isInvalid(e)},getDatesInWeek(e,t=E){let r=t.add({weeks:e}),n=[],o=_b(r=_P(r,a,h),a,h);for(let e=0;e<o;e++)n.push(null);for(;n.length<7;){n.push(r);let e=r.add({days:1});if(_h(r,e))break;r=e}for(;n.length<7;)n.push(null);return n}}}function x0(e){let t={...e};for(let r in e)t[r]=1;return t}function x1(e,t){return e&&t?(0>t.compare(e)&&([e,t]=[t,e]),{start:_c(e),end:_c(t)}):null}function x2(e,t){return(e=_p(e,(null==t?void 0:t.calendar)||new wM),t&&"hour"in t)?t.set(e):e}function x4(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 x3=(0,hC.createContext)(null),x6=(0,hC.createContext)(null),x5=(0,hC.createContext)(null),x7=(0,hC.createContext)(null),x9=(0,hC.forwardRef)(function(e,t){[e,t]=bz(e,t,x3);let{locale:r}=wC(),n=xQ({...e,locale:r,createCalendar:e.createCalendar||xz}),{calendarProps:o,prevButtonProps:i,nextButtonProps:a,errorMessageProps:s,title:l}=_2(e,n),u=bU({...e,values:{state:n,isDisabled:e.isDisabled||!1,isInvalid:n.isValueInvalid},defaultClassName:"react-aria-Calendar"});return hj().createElement("div",{...u,...o,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":n.isValueInvalid||void 0},hj().createElement(bV,{values:[[wf,{slots:{previous:i,next:a}}],[wm,{"aria-hidden":!0,level:2,children:l}],[x5,n],[x3,e],[wy,{slots:{errorMessage:s}}]]},hj().createElement(_3,null,hj().createElement("h2",null,o["aria-label"])),u.children,hj().createElement(_3,null,hj().createElement("button",{"aria-label":a["aria-label"],disabled:a.isDisabled,onClick:()=>n.focusNextPage(),tabIndex:-1}))))}),x8=(0,hC.forwardRef)(function(e,t){var r,n;let o,i,a;[e,t]=bz(e,t,x6);let{locale:s}=wC(),l=function(e){let{value:t,defaultValue:r,onChange:n,createCalendar:o,locale:i,visibleDuration:a={months:1},minValue:s,maxValue:l,...u}=e,[c,d]=xX(t,r||null,n),[p,f]=(0,hC.useState)(null),h="center";if(c&&c.start&&c.end){let e=xH(_c(c.start),a,i,s,l).add(a).subtract({days:1});c.end.compare(e)>0&&(h="start")}let m=(0,hC.useRef)(null),[y,g]=(0,hC.useState)(null),b=(0,hC.useMemo)(()=>_j(s,null==y?void 0:y.start),[s,y]),v=(0,hC.useMemo)(()=>_C(l,null==y?void 0:y.end),[l,y]),w=xQ({...u,value:c&&c.start,createCalendar:o,locale:i,visibleDuration:a,minValue:b,maxValue:v,selectionAlignment:h}),x=t=>{t&&e.isDateUnavailable&&!e.allowsNonContiguousRanges?(m.current={start:x4(t,w,-1),end:x4(t,w,1)},g(m.current)):(m.current=null,g(null))},[E,S]=(0,hC.useState)(w.visibleRange);_m(w.visibleRange.start,E.start)&&_m(w.visibleRange.end,E.end)||(x(p),S(w.visibleRange));let D=e=>{e?(f(e),x(e)):(f(null),x(null))},O=p?x1(p,w.focusedDate):c&&x1(c.start,c.end),P=t=>{if(e.isReadOnly)return;let r=xJ(xY(t,b,v),w.visibleRange.start,e.isDateUnavailable);if(r)if(p){let e=x1(p,r);e&&d({start:x2(e.start,null==c?void 0:c.start),end:x2(e.end,null==c?void 0:c.end)}),D(null)}else D(r)},[k,C]=(0,hC.useState)(!1),{isDateUnavailable:j}=e,T=(0,hC.useMemo)(()=>!!c&&!p&&(!!(j&&(j(c.start)||j(c.end)))||xK(c.start,s,l)||xK(c.end,s,l)),[j,c,p,s,l]),R=e.isInvalid||"invalid"===e.validationState||T;return{...w,value:c,setValue:d,anchorDate:p,setAnchorDate:D,highlightedRange:O,validationState:R?"invalid":null,isValueInvalid:R,selectFocusedDate(){P(w.focusedDate)},selectDate:P,highlightDate(e){p&&w.setFocusedDate(e)},isSelected:e=>!!(O&&e.compare(O.start)>=0&&0>=e.compare(O.end)&&!w.isCellDisabled(e)&&!w.isCellUnavailable(e)),isInvalid(e){var t,r;return w.isInvalid(e)||xK(e,null==(t=m.current)?void 0:t.start,null==(r=m.current)?void 0:r.end)},isDragging:k,setDragging:C}}({...e,locale:s,createCalendar:e.createCalendar||xz}),{calendarProps:u,prevButtonProps:c,nextButtonProps:d,errorMessageProps:p,title:f}=(r=e,n=t,o=_2(r,l),i=(0,hC.useRef)(!1),_6(a=(0,hC.useRef)("u">typeof window?window:null),"pointerdown",e=>{i.current=0===e.width&&0===e.height}),_6(a,"pointerup",e=>{if(i.current){i.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())},_6(n,"touchmove",e=>{l.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),o),h=bU({...e,values:{state:l,isDisabled:e.isDisabled||!1,isInvalid:l.isValueInvalid},defaultClassName:"react-aria-RangeCalendar"});return hj().createElement("div",{...h,...u,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":l.isValueInvalid||void 0},hj().createElement(bV,{values:[[wf,{slots:{previous:c,next:d}}],[wm,{"aria-hidden":!0,level:2,children:f}],[x7,l],[x6,e],[wy,{slots:{errorMessage:p}}]]},hj().createElement(_3,null,hj().createElement("h2",null,u["aria-label"])),h.children,hj().createElement(_3,null,hj().createElement("button",{"aria-label":d["aria-label"],disabled:d.isDisabled,onClick:()=>l.focusNextPage(),tabIndex:-1}))))}),Ee=(0,hC.createContext)(null),Et=(0,hC.forwardRef)(function(e,t){var r,n;let o=(0,hC.useContext)(x5),i=(0,hC.useContext)(x7),a=bW(x3),s=bW(x6),l=null!=o?o:i,u=l.visibleRange.start;e.offset&&(u=u.add(e.offset));let c=null!=(r=null==a?void 0:a.firstDayOfWeek)?r:null==s?void 0:s.firstDayOfWeek,{gridProps:d,headerProps:p,weekDays:f,weeksInMonth:h}=function(e,t){let r,{startDate:n=t.visibleRange.start,endDate:o=t.visibleRange.end,firstDayOfWeek:i}=e,{direction:a}=wC(),s=_X(n,o,t.timeZone,!0),{ariaLabel:l,ariaLabelledBy:u}=_Y.get(t),c=_1({"aria-label":[l,s].filter(Boolean).join(", "),"aria-labelledby":u}),d=_G({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:p}=wC(),f=(0,hC.useMemo)(()=>{let e=_P(_w(t.timeZone),p,i);return[...Array(7).keys()].map(r=>{let n=e.add({days:r}).toDate(t.timeZone);return d.format(n)})},[p,t.timeZone,d,i]),h=(r=n.calendar.getDaysInMonth(n),Math.ceil((_b(_D(n),p,i)+r)/7));return{gridProps:bF(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"===a?t.focusNextDay():t.focusPreviousDay();break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),t.focusPreviousRow();break;case"ArrowRight":e.preventDefault(),e.stopPropagation(),"rtl"===a?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:f,weeksInMonth:h}}({startDate:u,endDate:_O(u),weekdayStyle:e.weekdayStyle,firstDayOfWeek:c},l);return hj().createElement(Ee.Provider,{value:{headerProps:p,weekDays:f,startDate:u,weeksInMonth:h}},hj().createElement("table",{...b1(e),...d,ref:t,style:e.style,className:null!=(n=e.className)?n:"react-aria-CalendarGrid"},"function"!=typeof e.children?e.children:hj().createElement(hj().Fragment,null,hj().createElement(Er,null,e=>hj().createElement(En,null,e)),hj().createElement(Eo,null,e.children))))}),Er=(0,hC.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e,{headerProps:i,weekDays:a}=(0,hC.useContext)(Ee);return hj().createElement("thead",{...b1(e),...i,ref:t,style:n,className:o||"react-aria-CalendarGridHeader"},hj().createElement("tr",null,a.map((e,t)=>hj().cloneElement(r(e),{key:t}))))}),En=(0,hC.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e;return hj().createElement("th",{...b1(e),ref:t,style:n,className:o||"react-aria-CalendarHeaderCell"},r)}),Eo=(0,hC.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e,i=(0,hC.useContext)(x5),a=(0,hC.useContext)(x7),s=null!=i?i:a,{startDate:l,weeksInMonth:u}=(0,hC.useContext)(Ee);return hj().createElement("tbody",{...b1(e),ref:t,style:n,className:o||"react-aria-CalendarGridBody"},[...Array(u).keys()].map(e=>hj().createElement("tr",{key:e},s.getDatesInWeek(e,l).map((e,t)=>e?hj().cloneElement(r(e),{key:t}):hj().createElement("td",{key:t})))))}),Ei=(0,hC.forwardRef)(function({date:e,...t},r){var n,o,i;let a=(0,hC.useContext)(x5),s=(0,hC.useContext)(x7),l=null!=a?a:s,{startDate:u}=null!=(n=(0,hC.useContext)(Ee))?n:{startDate:l.visibleRange.start},c=(0,hC.useRef)(null),{cellProps:d,buttonProps:p,...f}=function(e,t,r){var n;let o,{date:i,isDisabled:a}=e,{errorMessageId:s,selectedDateDescription:l}=_Y.get(t),u=_F((n=wj)&&n.__esModule?n.default:n,"@react-aria/calendar"),c=_G({weekday:"long",day:"numeric",month:"long",year:"numeric",era:_J(i),timeZone:t.timeZone}),d=t.isSelected(i),p=t.isCellFocused(i);a=a||t.isCellDisabled(i);let f=t.isCellUnavailable(i),h=!a&&!f,m=t.isValueInvalid&&!!("highlightedRange"in t?!t.anchorDate&&t.highlightedRange&&i.compare(t.highlightedRange.start)>=0&&0>=i.compare(t.highlightedRange.end):t.value&&_h(t.value,i));m&&(d=!0),i=_H(i,_m);let y=(0,hC.useMemo)(()=>i.toDate(t.timeZone),[i,t.timeZone]),g=_h(i,_w(t.timeZone)),b=(0,hC.useMemo)(()=>{let e="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(_h(i,t.value.start)||_h(i,t.value.end))&&(e=l+", "),e+=c.format(y),g?e=u.format(d?"todayDateSelected":"todayDate",{date:e}):d&&(e=u.format("dateSelected",{date:e})),t.minValue&&_h(i,t.minValue)?e+=", "+u.format("minimumDate"):t.maxValue&&_h(i,t.maxValue)&&(e+=", "+u.format("maximumDate")),e},[c,y,u,d,g,i,t,l]),v="";"anchorDate"in t&&p&&!t.isReadOnly&&h&&(v=t.anchorDate?u.format("finishRangeSelectionPrompt"):u.format("startRangeSelectionPrompt"));let w=_9(v),x=(0,hC.useRef)(!1),E=(0,hC.useRef)(!1),S=(0,hC.useRef)(void 0),{pressProps:D,isPressed:O}=vF({shouldCancelOnPointerExit:"anchorDate"in t&&!!t.anchorDate,preventFocusOnPress:!0,isDisabled:!h||t.isReadOnly,onPressStart(e){if(t.isReadOnly)return void t.setFocusedDate(i);if("highlightedRange"in t&&!t.anchorDate&&("mouse"===e.pointerType||"touch"===e.pointerType)){if(t.highlightedRange&&!m){if(_h(i,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(i),t.setDragging(!0),E.current=!0;return}else if(_h(i,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(i),t.setDragging(!0),E.current=!0;return}}let r=()=>{t.setDragging(!0),S.current=void 0,t.selectDate(i),t.setFocusedDate(i),x.current=!0};"touch"===e.pointerType?S.current=setTimeout(r,200):r()}},onPressEnd(){E.current=!1,x.current=!1,clearTimeout(S.current),S.current=void 0},onPress(){"anchorDate"in t||t.isReadOnly||(t.selectDate(i),t.setFocusedDate(i))},onPressUp(e){if(!t.isReadOnly&&("anchorDate"in t&&S.current&&(t.selectDate(i),t.setFocusedDate(i)),"anchorDate"in t))if(E.current)t.setAnchorDate(i);else if(t.anchorDate&&!x.current)t.selectDate(i),t.setFocusedDate(i);else if("keyboard"!==e.pointerType||t.anchorDate)"virtual"===e.pointerType&&(t.selectDate(i),t.setFocusedDate(i));else{t.selectDate(i);let e=i.add({days:1});t.isInvalid(e)&&(e=i.subtract({days:1})),t.isInvalid(e)||t.setFocusedDate(e)}}});a||(o=_h(i,t.focusedDate)?0:-1),(0,hC.useEffect)(()=>{p&&r.current&&(b8(r.current),"pointer"!==vH&&document.activeElement===r.current&&xt(r.current,{containingElement:xr(r.current)}))},[p,r]);let P=_G({day:"numeric",timeZone:t.timeZone,calendar:i.calendar.identifier}),k=(0,hC.useMemo)(()=>P.formatToParts(y).find(e=>"day"===e.type).value,[P,y]);return{cellProps:{role:"gridcell","aria-disabled":!h||void 0,"aria-selected":d||void 0,"aria-invalid":m||void 0},buttonProps:bF(D,{onFocus(){a||t.setFocusedDate(i)},tabIndex:o,role:"button","aria-disabled":!h||void 0,"aria-label":b,"aria-invalid":m||void 0,"aria-describedby":[m?s:void 0,w["aria-describedby"]].filter(Boolean).join(" ")||void 0,onPointerEnter(e){"highlightDate"in t&&("touch"!==e.pointerType||t.isDragging)&&h&&t.highlightDate(i)},onPointerDown(e){"releasePointerCapture"in e.target&&e.target.releasePointerCapture(e.pointerId)},onContextMenu(e){e.preventDefault()}}),isPressed:O,isFocused:p,isSelected:d,isDisabled:a,isUnavailable:f,isOutsideVisibleRange:0>i.compare(t.visibleRange.start)||i.compare(t.visibleRange.end)>0,isInvalid:m,formattedDate:k}}({date:e},l,c),{hoverProps:h,isHovered:m}=wu({...t,isDisabled:f.isDisabled}),{focusProps:y,isFocusVisible:g}=wo();g&&(g=f.isFocused);let b=(o=u,i=_p(i=e,o.calendar),o=_D(o),i=_D(i),o.era!==i.era||o.year!==i.year||o.month!==i.month),v=!1,w=!1;"highlightedRange"in l&&l.highlightedRange&&(v=_h(e,l.highlightedRange.start),w=_h(e,l.highlightedRange.end));let x=bU({...t,defaultChildren:f.formattedDate,defaultClassName:"react-aria-CalendarCell",values:{date:e,isHovered:m,isOutsideMonth:b,isFocusVisible:g,isSelectionStart:v,isSelectionEnd:w,...f}}),E={"data-focused":f.isFocused||void 0,"data-hovered":m||void 0,"data-pressed":f.isPressed||void 0,"data-unavailable":f.isUnavailable||void 0,"data-disabled":f.isDisabled||void 0,"data-focus-visible":g||void 0,"data-outside-visible-range":f.isOutsideVisibleRange||void 0,"data-outside-month":b||void 0,"data-selected":f.isSelected||void 0,"data-selection-start":v||void 0,"data-selection-end":w||void 0,"data-invalid":f.isInvalid||void 0};return hj().createElement("td",{...d,ref:r},hj().createElement("div",{...bF(b1(t),p,y,h,E,x),ref:c}))}),Ea=(0,hC.createContext)({}),Es=(0,hC.forwardRef)(function(e,t){var r,n;[e,t]=bz(e,t,Ea);let{isDisabled:o,isInvalid:i,onHoverStart:a,onHoverChange:s,onHoverEnd:l,...u}=e,{hoverProps:c,isHovered:d}=wu({onHoverStart:a,onHoverChange:s,onHoverEnd:l,isDisabled:o}),{isFocused:p,isFocusVisible:f,focusProps:h}=wo({within:!0});null!=o||(o=!!e["aria-disabled"]&&"false"!==e["aria-disabled"]),null!=i||(i=!!e["aria-invalid"]&&"false"!==e["aria-invalid"]);let m=bU({...e,values:{isHovered:d,isFocusWithin:p,isFocusVisible:f,isDisabled:o,isInvalid:i},defaultClassName:"react-aria-Group"});return hj().createElement("div",{...bF(u,h,c),...m,ref:t,role:null!=(r=e.role)?r:"group",slot:null!=(n=e.slot)?n:void 0,"data-focus-within":p||void 0,"data-hovered":d||void 0,"data-focus-visible":f||void 0,"data-disabled":o||void 0,"data-invalid":i||void 0},m.children)}),El=(0,hC.createContext)({}),Eu=wd(function(e,t){[e,t]=bz(e,t,El);let{hoverProps:r,isHovered:n}=wu(e),{isFocused:o,isFocusVisible:i,focusProps:a}=wo({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e["aria-invalid"]&&"false"!==e["aria-invalid"],l=bU({...e,values:{isHovered:n,isFocused:o,isFocusVisible:i,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:"react-aria-Input"});return hj().createElement("input",{...bF((e=>{let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,...o}=e;return o})(e),a,r),...l,ref:t,"data-focused":o||void 0,"data-disabled":e.disabled||void 0,"data-hovered":n||void 0,"data-focus-visible":i||void 0,"data-invalid":s||void 0})});var Ec={};Ec={"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 Ed=hj().createContext(null),Ep="react-aria-focus-scope-restore",Ef=null;function Eh(e){var t,r,n,o,i,a,s,l,u,c;let d,p,f,h,{children:m,contain:y,restoreFocus:g,autoFocus:b}=e,v=(0,hC.useRef)(null),w=(0,hC.useRef)(null),x=(0,hC.useRef)([]),{parentNode:E}=(0,hC.useContext)(Ed)||{},S=(0,hC.useMemo)(()=>new EC({scopeRef:x}),[x]);bE(()=>{let e=E||Ej.root;if(Ej.getTreeNode(e.scopeRef)&&Ef&&!Ev(Ef,e.scopeRef)){let t=Ej.getTreeNode(Ef);t&&(e=t)}e.addChild(S),Ej.addNode(S)},[S,E]),bE(()=>{let e=Ej.getTreeNode(x);e&&(e.contain=!!y)},[y]),bE(()=>{var e;let t=null==(e=v.current)?void 0:e.nextSibling,r=[],n=e=>e.stopPropagation();for(;t&&t!==w.current;)r.push(t),t.addEventListener(Ep,n),t=t.nextSibling;return x.current=r,()=>{for(let e of r)e.removeEventListener(Ep,n)}},[m]),bE(()=>{if(r||n)return;let e=t.current,o=b7(e?e[0]:void 0),i=e=>{let r=vT(e);Eg(r,t.current)?Ef=t:Eb(r)||(Ef=null)};return o.addEventListener("focusin",i,!1),null==e||e.forEach(e=>e.addEventListener("focusin",i,!1)),()=>{o.removeEventListener("focusin",i,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",i,!1))}},[t=x,r=g,n=y]),o=x,i=y,d=(0,hC.useRef)(void 0),p=(0,hC.useRef)(void 0),bE(()=>{let e=o.current;if(!i){p.current&&(cancelAnimationFrame(p.current),p.current=void 0);return}let t=b7(e?e[0]:void 0),r=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!Ey(o)||e.isComposing)return;let r=((e=document)=>e.activeElement)(t),n=o.current;if(!n||!Eg(r,n))return;let i=ED(Em(n),{tabbable:!0},n);if(!r)return;i.currentNode=r;let a=e.shiftKey?i.previousNode():i.nextNode();a||(i.currentNode=e.shiftKey?n[n.length-1].nextElementSibling:n[0].previousElementSibling,a=e.shiftKey?i.previousNode():i.nextNode()),e.preventDefault(),a&&Ew(a,!0)},n=e=>{(!Ef||Ev(Ef,o))&&Eg(vT(e),o.current)?(Ef=o,d.current=vT(e)):Ey(o)&&!Eb(vT(e),o)?d.current?d.current.focus():Ef&&Ef.current&&Ex(Ef.current):Ey(o)&&(d.current=vT(e))},a=e=>{p.current&&cancelAnimationFrame(p.current),p.current=requestAnimationFrame(()=>{let r=vH,n=("virtual"===r||null===r)&&vh()&&vf(),i=((e=document)=>e.activeElement)(t);if(!n&&i&&Ey(o)&&!Eb(i,o)){Ef=o;let t=vT(e);if(t&&t.isConnected){var a;d.current=t,null==(a=d.current)||a.focus()}else Ef.current&&Ex(Ef.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",a,!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",a,!1))}},[o,i]),bE(()=>()=>{p.current&&cancelAnimationFrame(p.current)},[p]),a=x,s=g,l=y,f=(0,hC.useRef)("u">typeof document?((e=document)=>e.activeElement)(b7(a.current?a.current[0]:void 0)):null),bE(()=>{let e=a.current,t=b7(e?e[0]:void 0);if(!s||l)return;let r=()=>{(!Ef||Ev(Ef,a))&&Eg(((e=document)=>e.activeElement)(t),a.current)&&(Ef=a)};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))}},[a,l]),bE(()=>{let e=b7(a.current?a.current[0]:void 0);if(!s)return;let t=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!Ey(a)||t.isComposing)return;let r=e.activeElement;if(!Eb(r,a)||!EE(a))return;let n=Ej.getTreeNode(a);if(!n)return;let o=n.nodeToRestore,i=ED(e.body,{tabbable:!0});i.currentNode=r;let s=t.shiftKey?i.previousNode():i.nextNode();if(o&&o.isConnected&&o!==e.body||(o=void 0,n.nodeToRestore=void 0),(!s||!Eb(s,a))&&o){i.currentNode=o;do s=t.shiftKey?i.previousNode():i.nextNode();while(Eb(s,a));(t.preventDefault(),t.stopPropagation(),s)?Ew(s,!0):Eb(o)?Ew(o,!0):r.blur()}};return l||e.addEventListener("keydown",t,!0),()=>{l||e.removeEventListener("keydown",t,!0)}},[a,s,l]),bE(()=>{var e;let t=b7(a.current?a.current[0]:void 0);if(!s)return;let r=Ej.getTreeNode(a);if(r)return r.nodeToRestore=null!=(e=f.current)?e:void 0,()=>{let e=Ej.getTreeNode(a);if(!e)return;let r=e.nodeToRestore,n=((e=document)=>e.activeElement)(t);if(s&&r&&(n&&Eb(n,a)||n===t.body&&EE(a))){let e=Ej.clone();requestAnimationFrame(()=>{if(t.activeElement===t.body){let t=e.getTreeNode(a);for(;t;){if(t.nodeToRestore&&t.nodeToRestore.isConnected)return void ES(t.nodeToRestore);t=t.parent}for(t=e.getTreeNode(a);t;){if(t.scopeRef&&t.scopeRef.current&&Ej.getTreeNode(t.scopeRef))return void ES(E_(t.scopeRef.current,!0));t=t.parent}}})}}},[a,s]),u=x,c=b,h=hj().useRef(c),(0,hC.useEffect)(()=>{h.current&&(Ef=u,!Eg(((e=document)=>e.activeElement)(b7(u.current?u.current[0]:void 0)),Ef.current)&&u.current&&Ex(u.current)),h.current=!1},[u]),(0,hC.useEffect)(()=>{let e=((e=document)=>e.activeElement)(b7(x.current?x.current[0]:void 0)),t=null;if(Eg(e,x.current)){for(let r of Ej.traverse())r.scopeRef&&Eg(e,r.scopeRef.current)&&(t=r);t===Ej.getTreeNode(x)&&(Ef=t.scopeRef)}},[x]),bE(()=>()=>{var e,t,r;let n=null!=(r=null==(t=Ej.getTreeNode(x))||null==(e=t.parent)?void 0:e.scopeRef)?r:null;(x===Ef||Ev(x,Ef))&&(!n||Ej.getTreeNode(n))&&(Ef=n),Ej.removeTreeNode(x)},[x]);let D=(0,hC.useMemo)(()=>{var e;return e=x,{focusNext(t={}){var r;let n=e.current,{from:o,tabbable:i,wrap:a,accept:s}=t,l=o||((e=document)=>e.activeElement)(b7(null!=(r=n[0])?r:void 0)),u=n[0].previousElementSibling,c=ED(Em(n),{tabbable:i,accept:s},n);c.currentNode=Eg(l,n)?l:u;let d=c.nextNode();return!d&&a&&(c.currentNode=u,d=c.nextNode()),d&&Ew(d,!0),d},focusPrevious(t={}){var r;let n=e.current,{from:o,tabbable:i,wrap:a,accept:s}=t,l=o||((e=document)=>e.activeElement)(b7(null!=(r=n[0])?r:void 0)),u=n[n.length-1].nextElementSibling,c=ED(Em(n),{tabbable:i,accept:s},n);c.currentNode=Eg(l,n)?l:u;let d=c.previousNode();return!d&&a&&(c.currentNode=u,d=c.previousNode()),d&&Ew(d,!0),d},focusFirst(t={}){let r=e.current,{tabbable:n,accept:o}=t,i=ED(Em(r),{tabbable:n,accept:o},r);i.currentNode=r[0].previousElementSibling;let a=i.nextNode();return a&&Ew(a,!0),a},focusLast(t={}){let r=e.current,{tabbable:n,accept:o}=t,i=ED(Em(r),{tabbable:n,accept:o},r);i.currentNode=r[r.length-1].nextElementSibling;let a=i.previousNode();return a&&Ew(a,!0),a}}},[]),O=(0,hC.useMemo)(()=>({focusManager:D,parentNode:S}),[S,D]);return hj().createElement(Ed.Provider,{value:O},hj().createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:v}),m,hj().createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:w}))}function Em(e){return e[0].parentElement}function Ey(e){let t=Ej.getTreeNode(Ef);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function Eg(e,t){return!!e&&!!t&&t.some(t=>t.contains(e))}function Eb(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:r}of Ej.traverse(Ej.getTreeNode(t)))if(r&&Eg(e,r.current))return!0;return!1}function Ev(e,t){var r;let n=null==(r=Ej.getTreeNode(t))?void 0:r.parent;for(;n;){if(n.scopeRef===e)return!0;n=n.parent}return!1}function Ew(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch{}}else try{v9(e)}catch{}}function E_(e,t=!0){let r=e[0].previousElementSibling,n=Em(e),o=ED(n,{tabbable:t},e);o.currentNode=r;let i=o.nextNode();return t&&!i&&((o=ED(n=Em(e),{tabbable:!1},e)).currentNode=r,i=o.nextNode()),i}function Ex(e,t=!0){Ew(E_(e,t))}function EE(e){let t=Ej.getTreeNode(Ef);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(null==t?void 0:t.scopeRef)===e}function ES(e){e.dispatchEvent(new CustomEvent(Ep,{bubbles:!0,cancelable:!0}))&&Ew(e)}function ED(e,t,r){var n,o,i;let a=(null==t?void 0:t.tabbable)?b5:b6,s=b7((null==e?void 0:e.nodeType)===Node.ELEMENT_NODE?e:null),l=(n=e||s,o=NodeFilter.SHOW_ELEMENT,i={acceptNode(e){var n;return(null==t||null==(n=t.from)?void 0:n.contains(e))?NodeFilter.FILTER_REJECT:a(e)&&function e(t,r){return"#comment"!==t.nodeName&&function(e){let t=b9(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||Eg(e,r))&&(!(null==t?void 0:t.accept)||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}},s.createTreeWalker(n,o,i));return(null==t?void 0:t.from)&&(l.currentNode=t.from),l}function EO(e,t={}){return{focusNext(r={}){let n=e.current;if(!n)return null;let{from:o,tabbable:i=t.tabbable,wrap:a=t.wrap,accept:s=t.accept}=r,l=o||((e=document)=>e.activeElement)(b7(n)),u=ED(n,{tabbable:i,accept:s});n.contains(l)&&(u.currentNode=l);let c=u.nextNode();return!c&&a&&(u.currentNode=n,c=u.nextNode()),c&&Ew(c,!0),c},focusPrevious(r=t){let n=e.current;if(!n)return null;let{from:o,tabbable:i=t.tabbable,wrap:a=t.wrap,accept:s=t.accept}=r,l=o||((e=document)=>e.activeElement)(b7(n)),u=ED(n,{tabbable:i,accept:s});if(n.contains(l))u.currentNode=l;else{let e=EP(u);return e&&Ew(e,!0),null!=e?e:null}let c=u.previousNode();if(!c&&a){u.currentNode=n;let e=EP(u);if(!e)return null;c=e}return c&&Ew(c,!0),null!=c?c:null},focusFirst(r=t){let n=e.current;if(!n)return null;let{tabbable:o=t.tabbable,accept:i=t.accept}=r,a=ED(n,{tabbable:o,accept:i}).nextNode();return a&&Ew(a,!0),a},focusLast(r=t){let n=e.current;if(!n)return null;let{tabbable:o=t.tabbable,accept:i=t.accept}=r,a=EP(ED(n,{tabbable:o,accept:i}));return a&&Ew(a,!0),null!=a?a:null}}}function EP(e){let t,r;do(t=e.lastChild())&&(r=t);while(t);return r}class Ek{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 EC({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&&Eg(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 Ek;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 EC({scopeRef:null}),this.fastMap.set(null,this.root)}}class EC{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 Ej=new Ek;function ET(e,t,r){let{direction:n}=wC(),o=(0,hC.useMemo)(()=>EO(t),[t]),i=()=>{var e;if(!t.current)return;let r=null==(e=window.event)?void 0:e.target,n=ED(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:a}=vF({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){"mouse"===e.pointerType&&i()},onPress(e){"mouse"!==e.pointerType&&i()}});return bF(a,{onKeyDown:i=>{if(i.currentTarget.contains(i.target)&&(i.altKey&&("ArrowDown"===i.key||"ArrowUp"===i.key)&&"setOpen"in e&&(i.preventDefault(),i.stopPropagation(),e.setOpen(!0)),!r))switch(i.key){case"ArrowLeft":if(i.preventDefault(),i.stopPropagation(),"rtl"===n){if(t.current){let e=i.target,r=ER(t.current,e.getBoundingClientRect().left,-1);r&&r.focus()}}else o.focusPrevious();break;case"ArrowRight":if(i.preventDefault(),i.stopPropagation(),"rtl"===n){if(t.current){let e=i.target,r=ER(t.current,e.getBoundingClientRect().left,1);r&&r.focus()}}else o.focusNext()}}})}function ER(e,t,r){let n=ED(e,{tabbable:!0}),o=n.nextNode(),i=null,a=1/0;for(;o;){let e=o.getBoundingClientRect().left-t,s=Math.abs(e);Math.sign(e)===r&&s<a&&(i=o,a=s),o=n.nextNode()}return i}function EN(e,t,r){let n=(0,hC.useRef)(t),o=bS(()=>{r&&r(n.current)});(0,hC.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 EA(e){let{description:t,errorMessage:r,isInvalid:n,validationState:o}=e,{labelProps:i,fieldProps:a}=function(e){let{id:t,label:r,"aria-labelledby":n,"aria-label":o,labelElementType:i="label"}=e;t=bI(t);let a=bI(),s={};return r&&(n=n?`${a} ${n}`:a,s={id:a,htmlFor:"label"===i?t:void 0}),{labelProps:s,fieldProps:_1({id:t,"aria-label":o,"aria-labelledby":n})}}(e),s=bM([!!t,!!r,n,o]),l=bM([!!t,!!r,n,o]);return{labelProps:i,fieldProps:a=bF(a,{"aria-describedby":[s,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),descriptionProps:{id:s},errorMessageProps:{id:l}}}function E$(e,t,r){let{validationBehavior:n,focus:o}=e;bE(()=>{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 i=bS(()=>{t.resetValidation()}),a=bS(e=>{var n,i;t.displayValidation.isInvalid||t.commitValidation();let a=null==r||null==(n=r.current)?void 0:n.form;!e.defaultPrevented&&r&&a&&function(e){for(let t=0;t<e.elements.length;t++){let r=e.elements[t];if(!r.validity.valid)return r}return null}(a)===r.current&&(o?o():null==(i=r.current)||i.focus(),vH="keyboard",vX("keyboard",null)),e.preventDefault()}),s=bS(()=>{t.commitValidation()});(0,hC.useEffect)(()=>{let e=null==r?void 0:r.current;if(!e)return;let t=e.form;return e.addEventListener("invalid",a),e.addEventListener("change",s),null==t||t.addEventListener("reset",i),()=>{e.removeEventListener("invalid",a),e.removeEventListener("change",s),null==t||t.removeEventListener("reset",i)}},[r,a,s,i,n])}let EI=new WeakMap,EM="__role_"+Date.now(),EL="__focusManager_"+Date.now();function EF(e,t,r){var n,o;let i,{isInvalid:a,validationErrors:s,validationDetails:l}=t.displayValidation,{labelProps:u,fieldProps:c,descriptionProps:d,errorMessageProps:p}=EA({...e,labelElementType:"span",isInvalid:a,errorMessage:e.errorMessage||s}),f=(0,hC.useRef)(null),{focusWithinProps:h}=wn({...e,onFocusWithin(r){var n;f.current=t.value,null==(n=e.onFocus)||n.call(e,r)},onBlurWithin:r=>{var n;t.confirmPlaceholder(),t.value!==f.current&&t.commitValidation(),null==(n=e.onBlur)||n.call(e,r)},onFocusWithinChange:e.onFocusChange}),m=_F((o=Ec)&&o.__esModule?o.default:o,"@react-aria/datepicker"),y="hour"===t.maxGranularity?"selectedTimeDescription":"selectedDateDescription",g="hour"===t.maxGranularity?"time":"date",b=_9(t.value?m.format(y,{[g]:t.formatValue({month:"long"})}):""),v="presentation"===e[EM]?c["aria-describedby"]:[b["aria-describedby"],c["aria-describedby"]].filter(Boolean).join(" ")||void 0,w=e[EL],x=(0,hC.useMemo)(()=>w||EO(r),[w,r]),E=ET(t,r,"presentation"===e[EM]);EI.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:[u.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:v,focusManager:x});let S=(0,hC.useRef)(e.autoFocus);i="presentation"===e[EM]?{role:"presentation"}:bF(c,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":v}),(0,hC.useEffect)(()=>{S.current&&x.focusFirst(),S.current=!1},[x]),EN(e.inputRef,t.value,t.setValue),E$({...e,focus(){x.focusFirst()}},t,e.inputRef);let D={type:"hidden",name:e.name,value:(null==(n=t.value)?void 0:n.toString())||"",disabled:e.isDisabled};"native"===e.validationBehavior&&(D.type="text",D.hidden=!0,D.required=e.isRequired,D.onChange=()=>{});let O=b1(e);return{labelProps:{...u,onClick:()=>{x.focusFirst()}},fieldProps:bF(O,i,E,h,{onKeyDown(t){e.onKeyDown&&e.onKeyDown(t)},onKeyUp(t){e.onKeyUp&&e.onKeyUp(t)},style:{unicodeBidi:"isolate"}}),inputProps:D,descriptionProps:d,errorMessageProps:p,isInvalid:a,validationErrors:s,validationDetails:l}}var EB={};EB={"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 EV={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},EU={...EV,customError:!0,valid:!1},EW={isInvalid:!1,validationDetails:EV,validationErrors:[]},Ez=(0,hC.createContext)({}),EK="__formValidationState"+Date.now();function EH(e){if(e[EK]){let{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:i}=e[EK];return{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:i}}return function(e){let{isInvalid:t,validationState:r,name:n,value:o,builtinValidation:i,validate:a,validationBehavior:s="aria"}=e;r&&(t||(t="invalid"===r));let l=void 0!==t?{isInvalid:t,validationErrors:[],validationDetails:EU}:null,u=(0,hC.useMemo)(()=>a&&null!=o?Eq(function(e,t){if("function"==typeof e){let r=e(t);if(r&&"boolean"!=typeof r)return EG(r)}return[]}(a,o)):null,[a,o]);(null==i?void 0:i.validationDetails.valid)&&(i=void 0);let c=(0,hC.useContext)(Ez),d=(0,hC.useMemo)(()=>n?Array.isArray(n)?n.flatMap(e=>EG(c[e])):EG(c[n]):[],[c,n]),[p,f]=(0,hC.useState)(c),[h,m]=(0,hC.useState)(!1);c!==p&&(f(c),m(!1));let y=(0,hC.useMemo)(()=>Eq(h?[]:d),[h,d]),g=(0,hC.useRef)(EW),[b,v]=(0,hC.useState)(EW),w=(0,hC.useRef)(EW),[x,E]=(0,hC.useState)(!1);return(0,hC.useEffect)(()=>{if(!x)return;E(!1);let e=u||i||g.current;EZ(e,w.current)||(w.current=e,v(e))}),{realtimeValidation:l||y||u||i||EW,displayValidation:"native"===s?l||y||b:l||y||u||i||b,updateValidation(e){"aria"!==s||EZ(b,e)?g.current=e:v(e)},resetValidation(){EZ(EW,w.current)||(w.current=EW,v(EW)),"native"===s&&E(!1),m(!0)},commitValidation(){"native"===s&&E(!0),m(!0)}}}(e)}function EG(e){return e?Array.isArray(e)?e:[e]:[]}function Eq(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:EU}:null}function EZ(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 EY(...e){let t=new Set,r=!1,n={...EV};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 EJ=new _N((ec=EB)&&ec.__esModule?ec.default:ec);function EX(){return"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US"}function EQ(e,t,r,n,o){let i=null!=e&&null!=r&&e.compare(r)>0,a=null!=e&&null!=t&&0>e.compare(t),s=null!=e&&(null==n?void 0:n(e))||!1,l=i||a||s,u=[];if(l){let e=EX(),n=new _I(e,_N.getGlobalDictionaryForPackage("@react-stately/datepicker")||EJ),l=new _V(e,E2({},o)),c=l.resolvedOptions().timeZone;a&&null!=t&&u.push(n.format("rangeUnderflow",{minValue:l.format(t.toDate(c))})),i&&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:i,rangeUnderflow:a,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!l}}}let E0={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},E1={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function E2(e,t){var r;e={...t.shouldForceLeadingZeros?E1:E0,...e};let n=t.granularity||"minute",o=Object.keys(e),i=o.indexOf(null!=(r=t.maxGranularity)?r:"year");i<0&&(i=0);let a=o.indexOf(n);if(a<0&&(a=2),i>a)throw Error("maxGranularity must be greater than granularity");let s=o.slice(i,a+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===i&&(s.era="short"),s}function E4(e){return e&&"hour"in e?e:new w7}function E3(e,t){return null===e?null:e?_p(e,t):void 0}function E6(e,t,r,n){if(e)return E3(e,r);let o=_p(_v(null!=n?n:_S()).set({hour:0,minute:0,second:0,millisecond:0}),r);return"year"===t||"month"===t||"day"===t?_c(o):n?o:_d(o)}function E5(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,i]=(0,hC.useState)([n,r]);return e&&(o[0]!==n||o[1]!==r)&&i([n,r]),t||(t=e?n:o[0]),[t,e?r:o[1]]}let E7=new _N({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"),E9={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},E8={year:5,month:2,day:7,hour:2,minute:15,second:15},Se={dayperiod:"dayPeriod"};function St(e){var t,r;let{locale:n,createCalendar:o,hideTimeZone:i,isDisabled:a=!1,isReadOnly:s=!1,isRequired:l=!1,minValue:u,maxValue:c,isDateUnavailable:d}=e,p=e.value||e.defaultValue||e.placeholderValue||null,[f,h]=E5(p,e.granularity),m=h||"UTC";if(p&&!(f in p))throw Error("Invalid granularity "+f+" for value "+p.toString());let y=(0,hC.useMemo)(()=>new _V(n),[n]),g=(0,hC.useMemo)(()=>o(y.resolvedOptions().calendar),[o,y]),[b,v]=xX(e.value,null!=(t=e.defaultValue)?t:null,e.onChange),w=(0,hC.useMemo)(()=>{var e;return null!=(e=E3(b,g))?e:null},[b,g]),[x,E]=(0,hC.useState)(()=>E6(e.placeholderValue,f,g,h)),S="gregory"===g.identifier&&"BC"===(w||x).era,D=(0,hC.useMemo)(()=>{var t;return{granularity:f,maxGranularity:null!=(t=e.maxGranularity)?t:"year",timeZone:h,hideTimeZone:i,hourCycle:e.hourCycle,showEra:S,shouldForceLeadingZeros:e.shouldForceLeadingZeros}},[e.maxGranularity,f,e.hourCycle,e.shouldForceLeadingZeros,h,i,S]),O=(0,hC.useMemo)(()=>E2({},D),[D]),P=(0,hC.useMemo)(()=>new _V(n,O),[n,O]),k=(0,hC.useMemo)(()=>P.resolvedOptions(),[P]),C=(0,hC.useMemo)(()=>P.formatToParts(new Date).filter(e=>E9[e.type]).reduce((e,t)=>(e[t.type]=!0,e),{}),[P]),[j,T]=(0,hC.useState)(()=>e.value||e.defaultValue?{...C}:{}),R=(0,hC.useRef)(null),N=(0,hC.useRef)(g);(0,hC.useEffect)(()=>{_y(g,N.current)||(N.current=g,E(t=>Object.keys(j).length>0?_p(t,g):E6(e.placeholderValue,f,g,h)))},[g,f,j,h,e.placeholderValue]),b&&Object.keys(j).length<Object.keys(C).length&&T(j={...C}),null==b&&Object.keys(j).length===Object.keys(C).length&&(T(j={}),E(E6(e.placeholderValue,f,g,h)));let A=w&&Object.keys(j).length>=Object.keys(C).length?w:x,$=t=>{if(e.isDisabled||e.isReadOnly)return;let r=Object.keys(j),n=Object.keys(C);null==t?(v(null),E(E6(e.placeholderValue,f,g,h)),T({})):r.length>=n.length||r.length===n.length-1&&C.dayPeriod&&!j.dayPeriod&&"dayPeriod"!==R.current?v(t=_p(t,(null==p?void 0:p.calendar)||new wM)):E(t),R.current=null},I=(0,hC.useMemo)(()=>A.toDate(m),[A,m]),M=(0,hC.useMemo)(()=>(function(e,t,r,n,o,i,a,s){let l=["hour","minute","second"],u=r.formatToParts(e),c=[];for(let e of u){var d,p;let r=E9[e.type];"era"===e.type&&1===i.getEras().length&&(r=!1);let u=E9[e.type]&&!t[e.type],f=E9[e.type]?(d=e.type,p=e.value,"era"===d||"dayPeriod"===d?p:"year"===d||"month"===d||"day"===d?E7.getStringForLocale(d,a):"––"):null,h={type:Se[e.type]||e.type,text:u?f:e.value,...Sr(o,e.type,n),isPlaceholder:u,placeholder:f,isEditable:r};"hour"===e.type?(c.push({type:"literal",text:"",...Sr(o,"literal",n),isPlaceholder:!1,placeholder:"",isEditable:!1}),c.push(h),e.type===s&&c.push({type:"literal",text:"",...Sr(o,"literal",n),isPlaceholder:!1,placeholder:"",isEditable:!1})):l.includes(e.type)&&e.type===s?(c.push(h),c.push({type:"literal",text:"",...Sr(o,"literal",n),isPlaceholder:!1,placeholder:"",isEditable:!1})):c.push(h)}return c})(I,j,P,k,A,g,n,f),[I,j,P,k,A,g,n,f]);C.era&&j.year&&!j.era?(j.era=!0,T({...j})):!C.era&&j.era&&(delete j.era,T({...j}));let L=e=>{j[e]=!0,"year"===e&&C.era&&(j.era=!0),T({...j})},F=(e,t)=>{if(j[e])$(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)}(A,e,t,k));else{L(e);let t=Object.keys(j),r=Object.keys(C);(t.length>=r.length||t.length===r.length-1&&C.dayPeriod&&!j.dayPeriod)&&$(A)}},B=(0,hC.useMemo)(()=>EQ(b,u,c,d,D),[b,u,c,d,D]),V=EH({...e,value:b,builtinValidation:B}),U=V.displayValidation.isInvalid,W=e.validationState||(U?"invalid":null);return{...V,value:w,dateValue:I,calendar:g,setValue:$,segments:M,dateFormatter:P,validationState:W,isInvalid:U,granularity:f,maxGranularity:null!=(r=e.maxGranularity)?r:"year",isDisabled:a,isReadOnly:s,isRequired:l,increment(e){F(e,1)},decrement(e){F(e,-1)},incrementPage(e){F(e,E8[e]||1)},decrementPage(e){F(e,-(E8[e]||1))},setSegment(e,t){L(e),$(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)}(A,e,t,k))},confirmPlaceholder(){if(e.isDisabled||e.isReadOnly)return;let t=Object.keys(j),r=Object.keys(C);t.length===r.length-1&&C.dayPeriod&&!j.dayPeriod&&(T(j={...C}),$(A.copy()))},clearSegment(t){delete j[t],R.current=t,T({...j});let r=E6(e.placeholderValue,f,g,h),n=A;if("dayPeriod"===t&&"hour"in A&&"hour"in r){let e=A.hour>=12,t=r.hour>=12;e&&!t?n=A.set({hour:A.hour-12}):!e&&t&&(n=A.set({hour:A.hour+12}))}else"hour"===t&&"hour"in A&&A.hour>=12&&j.dayPeriod?n=A.set({hour:r.hour+12}):t in A&&(n=A.set({[t]:r[t]}));v(null),$(n)},formatValue:e=>w?new _V(n,E2(e,D)).format(I):"",getDateFormatter:(e,t)=>new _V(e,E2({},{...D,...t}))}}function Sr(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 Sn=(0,hC.createContext)(null),So=(0,hC.createContext)(null),Si=(0,hC.createContext)(null),Sa=(0,hC.forwardRef)(function(e,t){let r=(0,hC.useContext)(So),n=(0,hC.useContext)(Si);return r||n?hj().createElement(Sl,{...e,ref:t}):hj().createElement(Ss,{...e,ref:t})}),Ss=(0,hC.forwardRef)((e,t)=>{let[r,n]=bz({slot:e.slot},t,Sn),{locale:o}=wC(),i=St({...r,locale:o,createCalendar:xz}),a=(0,hC.useRef)(null),{fieldProps:s,inputProps:l}=EF({...r,inputRef:a},i,n);return hj().createElement(bV,{values:[[So,i],[El,{...l,ref:a}],[Ea,{...s,ref:n,isInvalid:i.isInvalid,isDisabled:i.isDisabled}]]},hj().createElement(Sl,e))}),Sl=(0,hC.forwardRef)((e,t)=>{let{className:r,children:n}=e,o=(0,hC.useContext)(So),i=(0,hC.useContext)(Si),a=null!=o?o:i;return hj().createElement(hj().Fragment,null,hj().createElement(Es,{...e,ref:t,slot:e.slot||void 0,className:null!=r?r:"react-aria-DateInput",isInvalid:a.isInvalid,isDisabled:a.isDisabled},a.segments.map((e,t)=>(0,hC.cloneElement)(n(e),{key:t}))),hj().createElement(Eu,null))}),Su=(0,hC.createContext)({});function Sc({children:e}){let t=(0,hC.useMemo)(()=>({register:()=>{}}),[]);return hj().createElement(vS.Provider,{value:t},e)}hj().forwardRef(({children:e,...t},r)=>{let n=(0,hC.useRef)(!1),o=(0,hC.useContext)(vS);r=b_(r||(null==o?void 0:o.ref));let i=bF(o||{},{...t,ref:r,register(){n.current=!0,o&&o.register()}});return vk(o,r),(0,hC.useEffect)(()=>{n.current||(n.current=!0)},[]),hj().createElement(vS.Provider,{value:i},e)});let Sd=hj().createContext(null);function Sp(e){var t;let r=bN(),{portalContainer:n=r?null:document.body,isExiting:o}=e,[i,a]=(0,hC.useState)(!1),s=(0,hC.useMemo)(()=>({contain:i,setContain:a}),[i,a]),{getContainer:l}=null!=(t=(0,hC.useContext)(Su))?t:{};if(!e.portalContainer&&l&&(n=l()),!n)return null;let u=e.children;return e.disableFocusManagement||(u=hj().createElement(Eh,{restoreFocus:!0,contain:(e.shouldContainFocus||i)&&!o},u)),u=hj().createElement(Sd.Provider,{value:s},hj().createElement(Sc,null,u)),v$().createPortal(u,n)}let Sf=(0,hC.createContext)(null),Sh=(0,hC.createContext)(null),Sm=(0,hC.forwardRef)(function(e,t){let r=e["aria-labelledby"];[e,t]=bz(e,t,Sf);let{dialogProps:n,titleProps:o}=function(e,t){let r,n,{role:o="dialog"}=e,i=bM();i=e["aria-label"]?void 0:i;let a=(0,hC.useRef)(!1);return(0,hC.useEffect)(()=>{if(t.current&&!t.current.contains(document.activeElement)){v9(t.current);let e=setTimeout(()=>{document.activeElement===t.current&&(a.current=!0,t.current&&(t.current.blur(),v9(t.current)),a.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),bE(()=>{null==n||n(!0)},[n=null==(r=(0,hC.useContext)(Sd))?void 0:r.setContain]),{dialogProps:{...b1(e,{labelable:!0}),role:o,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||i,onBlur:e=>{a.current&&e.stopPropagation()}},titleProps:{id:i}}}({...e,"aria-labelledby":r},t),i=(0,hC.useContext)(Sh);n["aria-label"]||n["aria-labelledby"]||e["aria-labelledby"]&&(n["aria-labelledby"]=e["aria-labelledby"]);let a=bU({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(null==i?void 0:i.close)||(()=>{})}});return hj().createElement("section",{...b1(e),...n,...a,ref:t,slot:e.slot||void 0},hj().createElement(bV,{values:[[wm,{slots:{[bB]:{},title:{...o,level:2}}}],[wf,{slots:{[bB]:{},close:{onPress:()=>null==i?void 0:i.close()}}}]]},a.children))}),Sy=(0,hC.createContext)(null),Sg=(0,hC.forwardRef)(function(e,t){let r=(0,hC.useContext)(Sy);return(null==r?void 0:r.isInvalid)?hj().createElement(Sb,{...e,ref:t}):null}),Sb=(0,hC.forwardRef)((e,t)=>{let r=(0,hC.useContext)(Sy),n=b1(e),o=bU({...e,defaultClassName:"react-aria-FieldError",defaultChildren:0===r.validationErrors.length?void 0:r.validationErrors.join(" "),values:r});return null==o.children?null:hj().createElement(wg,{slot:"errorMessage",...n,...o,ref:t})}),Sv=(0,hC.createContext)(null),Sw=(0,hC.createContext)({}),S_=wd(function(e,t){[e,t]=bz(e,t,Sw);let{elementType:r="label",...n}=e;return hj().createElement(r,{className:"react-aria-Label",...n,ref:t})}),Sx=(0,hC.createContext)({placement:"bottom"}),SE=new WeakMap,SS=[];function SD(e,t=-1/0,r=1/0){return Math.min(Math.max(e,t),r)}function SO(e,t){let r=e,n=t.toString(),o=n.indexOf("."),i=o>=0?n.length-o:0;if(i>0){let e=Math.pow(10,i);r=Math.round(r*e)/e}return r}function SP(e,t,r,n){t=Number(t),r=Number(r);let o=(e-(isNaN(t)?0:t))%n,i=SO(2*Math.abs(o)>=n?e+Math.sign(o)*(n-Math.abs(o)):e-o,n);return isNaN(t)?!isNaN(r)&&i>r&&(i=Math.floor(SO(r/n,n))*n):i<t?i=t:!isNaN(r)&&i>r&&(i=t+Math.floor(SO((r-t)/n,n))*n),i=SO(i,n)}let Sk={top:"top",bottom:"top",left:"left",right:"left"},SC={top:"bottom",bottom:"top",left:"right",right:"left"},Sj={top:"left",left:"top"},ST={top:"height",left:"width"},SR={width:"totalWidth",height:"totalHeight"},SN={},SA="u">typeof document?window.visualViewport:null;function S$(e){var t,r,n,o,i;let a=0,s=0,l=0,u=0,c=0,d=0,p={},f=(null!=(t=null==SA?void 0:SA.scale)?t:1)>1;if("BODY"===e.tagName){let t=document.documentElement;l=t.clientWidth,u=t.clientHeight,a=null!=(r=null==SA?void 0:SA.width)?r:l,s=null!=(n=null==SA?void 0:SA.height)?n:u,p.top=t.scrollTop||e.scrollTop,p.left=t.scrollLeft||e.scrollLeft,SA&&(c=SA.offsetTop,d=SA.offsetLeft)}else({width:a,height:s,top:c,left:d}=SB(e)),p.top=e.scrollTop,p.left=e.scrollLeft,l=a,u=s;return vp()&&("BODY"===e.tagName||"HTML"===e.tagName)&&f&&(p.top=0,p.left=0,c=null!=(o=null==SA?void 0:SA.pageTop)?o:0,d=null!=(i=null==SA?void 0:SA.pageLeft)?i:0),{width:a,height:s,totalWidth:l,totalHeight:u,scroll:p,top:c,left:d}}function SI(e,t,r,n,o,i,a){var s;let l=null!=(s=o.scroll[e])?s:0,u=n[ST[e]],c=n.scroll[Sk[e]]+i,d=u+n.scroll[Sk[e]]-i,p=t-l+a[e]-n[Sk[e]],f=t-l+r+a[e]-n[Sk[e]];return p<c?c-p:f>d?Math.max(d-f,c-p):0}function SM(e){if(SN[e])return SN[e];let[t,r]=e.split(" "),n=Sk[t]||"right",o=Sj[n];Sk[r]||(r="center");let i=ST[n],a=ST[o];return SN[e]={placement:t,crossPlacement:r,axis:n,crossAxis:o,size:i,crossSize:a},SN[e]}function SL(e,t,r,n,o,i,a,s,l,u){var c,d,p,f,h;let{placement:m,crossPlacement:y,axis:g,crossAxis:b,size:v,crossSize:w}=n,x={};x[b]=null!=(c=e[b])?c:0,"center"===y?x[b]+=((null!=(d=e[w])?d:0)-(null!=(p=r[w])?p:0))/2:y!==b&&(x[b]+=(null!=(f=e[w])?f:0)-(null!=(h=r[w])?h:0)),x[b]+=i;let E=e[b]-r[w]+l+u,S=e[b]+e[w]-l-u;if(x[b]=SD(x[b],E,S),m===g){let r=s?a[v]:t[SR[v]];x[SC[g]]=Math.floor(r-e[g]+o)}else x[g]=Math.floor(e[g]+e[v]+o);return x}function SF(e,t,r,n,o,i){var a,s,l;let{placement:u,axis:c,size:d}=i;return u===c?Math.max(0,r[c]-e[c]-(null!=(a=e.scroll[c])?a:0)+t[c]-(null!=(s=n[c])?s:0)-n[SC[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[SC[c]]-o)}function SB(e){let{top:t,left:r,width:n,height:o}=e.getBoundingClientRect(),{scrollTop:i,scrollLeft:a,clientTop:s,clientLeft:l}=document.documentElement;return{top:t+i-s,left:r+a-l,width:n,height:o}}function SV(e,t){let r,n=window.getComputedStyle(e);if("fixed"===n.position){let{top:t,left:n,width:o,height:i}=e.getBoundingClientRect();r={top:t,left:n,width:o,height:i}}else{r=SB(e);let n=SB(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 SU(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 SW=new WeakMap;function Sz(e){let{ref:t,box:r,onResize:n}=e;(0,hC.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 SK="u">typeof document?window.visualViewport:null;function SH(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 SG=[],Sq="u">typeof document&&window.visualViewport,SZ=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),SY=0;function SJ(e,t,r){let n=e.style[t];return e.style[t]=r,()=>{e.style[t]=n}}function SX(e,t,r,n){return e.addEventListener(t,r,n),()=>{e.removeEventListener(t,r,n)}}function SQ(e){let t=document.scrollingElement||document.documentElement,r=e;for(;r&&r!==t;){let e=xr(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 S0={};function S1(e){var t;let{onDismiss:r,...n}=e,o=_1(n,_F((t=S0)&&t.__esModule?t.default:t,"@react-aria/overlays").format("dismiss"));return hj().createElement(_3,null,hj().createElement("button",{...o,tabIndex:-1,onClick:()=>{r&&r()},style:{width:1,height:1}}))}function S2(e,t,r){bE(()=>{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,vA.flushSync)(()=>{r()})}).catch(()=>{}),()=>{n=!0}}},[e,t,r])}function S4(e){let[t,r]=xX(e.isOpen,e.defaultOpen||!1,e.onOpenChange),n=(0,hC.useCallback)(()=>{r(!0)},[r]),o=(0,hC.useCallback)(()=>{r(!1)},[r]),i=(0,hC.useCallback)(()=>{r(!t)},[r,t]);return{isOpen:t,setOpen:r,open:n,close:o,toggle:i}}S0={"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 S3=(0,hC.createContext)(null),S6=(0,hC.createContext)(null),S5=(0,hC.forwardRef)(function(e,t){[e,t]=bz(e,t,S3);let r=(0,hC.useContext)(Sh),n=S4(e),o=null==e.isOpen&&null==e.defaultOpen&&r?r:n,i=function(e,t){let[r,n]=(0,hC.useState)(t?"open":"closed");switch(r){case"open":t||n("exiting");break;case"closed":case"exiting":t&&n("open")}let o="exiting"===r;return S2(e,o,(0,hC.useCallback)(()=>{n(e=>"exiting"===e?"closed":e)},[])),o}(t,o.isOpen)||e.isExiting||!1,a=(0,hC.useContext)(wc),{direction:s}=wC();if(a){let t=e.children;return"function"==typeof t&&(t=t({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),hj().createElement(hj().Fragment,null,t)}return!o||o.isOpen||i?hj().createElement(S7,{...e,triggerRef:e.triggerRef,state:o,popoverRef:t,isExiting:i,dir:s}):null});function S7({state:e,isExiting:t,UNSTABLE_portalContainer:r,...n}){var o,i;let a=(0,hC.useRef)(null),[s,l]=(0,hC.useState)(0),u=(0,hC.useRef)(null),c=(0,hC.useContext)(S6),p=c&&"SubmenuTrigger"===n.trigger;bE(()=>{a.current&&e.isOpen&&l(a.current.getBoundingClientRect().width)},[e.isOpen,a]);let{popoverProps:f,underlayProps:h,arrowProps:m,placement:y}=function(e,t){let{triggerRef:r,popoverRef:n,groupRef:o,isNonModal:i,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:s,...l}=e,u="SubmenuTrigger"===l.trigger,{overlayProps:c,underlayProps:p}=function(e,t){let{onClose:r,shouldCloseOnBlur:n,isOpen:o,isDismissable:i=!1,isKeyboardDismissDisabled:a=!1,shouldCloseOnInteractOutside:s}=e;(0,hC.useEffect)(()=>{if(o&&!SG.includes(t))return SG.push(t),()=>{let e=SG.indexOf(t);e>=0&&SG.splice(e,1)}},[o,t]);let l=()=>{SG[SG.length-1]===t&&r&&r()};!function(e){let{ref:t,onInteractOutside:r,isDisabled:n,onInteractOutsideStart:o}=e,i=(0,hC.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),a=bS(e=>{r&&SH(e,t)&&(o&&o(e),i.current.isPointerDown=!0)}),s=bS(e=>{r&&r(e)});(0,hC.useEffect)(()=>{let e=i.current;if(n)return;let r=b7(t.current);if("u">typeof PointerEvent){let n=r=>{e.isPointerDown&&SH(r,t)&&s(r),e.isPointerDown=!1};return r.addEventListener("pointerdown",a,!0),r.addEventListener("pointerup",n,!0),()=>{r.removeEventListener("pointerdown",a,!0),r.removeEventListener("pointerup",n,!0)}}},[t,n,a,s])}({ref:t,onInteractOutside:i&&o?e=>{(!s||s(e.target))&&(SG[SG.length-1]===t&&(e.stopPropagation(),e.preventDefault()),l())}:void 0,onInteractOutsideStart:e=>{(!s||s(e.target))&&SG[SG.length-1]===t&&(e.stopPropagation(),e.preventDefault())}});let{focusWithinProps:u}=wn({isDisabled:!n,onBlurWithin:e=>{!(!e.relatedTarget||Eb(e.relatedTarget,Ef))&&(!s||s(e.relatedTarget))&&(null==r||r())}});return{overlayProps:{onKeyDown:e=>{"Escape"!==e.key||a||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:!i||u,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:s},null!=o?o:n),{overlayProps:f,arrowProps:h,placement:m}=function(e){var t,r,n;let{direction:o}=wC(),{arrowSize:i=0,targetRef:a,overlayRef:s,scrollRef:l=s,placement:u="bottom",containerPadding:c=12,shouldFlip:d=!0,boundaryElement:p="u">typeof document?document.body:null,offset:f=0,crossOffset:h=0,shouldUpdatePosition:m=!0,isOpen:y=!0,onClose:g,maxHeight:b,arrowBoundaryOffset:v=0}=e,[w,x]=(0,hC.useState)(null),E=[m,u,s.current,a.current,l.current,c,d,p,f,h,y,o,b,v,i],S=(0,hC.useRef)(null==SK?void 0:SK.scale);(0,hC.useEffect)(()=>{y&&(S.current=null==SK?void 0:SK.scale)},[y]);let D=(0,hC.useCallback)(()=>{var e,t,r,n,g,w;if(!1===m||!y||!s.current||!a.current||!p||(null==SK?void 0:SK.scale)!==S.current)return;let E=null;if(l.current&&l.current.contains(document.activeElement)){let n=null==(e=document.activeElement)?void 0:e.getBoundingClientRect(),o=l.current.getBoundingClientRect();(E={type:"top",offset:(null!=(t=null==n?void 0:n.top)?t:0)-o.top}).offset>o.height/2&&(E.type="bottom",E.offset=(null!=(r=null==n?void 0:n.bottom)?r:0)-o.bottom)}let D=s.current;!b&&s.current&&(D.style.top="0px",D.style.bottom="",D.style.maxHeight=(null!=(g=null==(n=window.visualViewport)?void 0:n.height)?g:window.innerHeight)+"px");let O=function(e){var t,r,n,o;let i,{placement:a,targetNode:s,overlayNode:l,scrollNode:u,padding:c,shouldFlip:d,boundaryElement:p,offset:f,crossOffset:h,maxHeight:m,arrowSize:y=0,arrowBoundaryOffset:g=0}=e,b=l instanceof HTMLElement?function(e){let t=e.offsetParent;if(t&&t===document.body&&"static"===window.getComputedStyle(t).position&&!SU(t)&&(t=document.documentElement),null==t)for(t=e.parentElement;t&&!SU(t);)t=t.parentElement;return t||document.documentElement}(l):document.documentElement,v=b===document.documentElement,w=window.getComputedStyle(b).position,x=v?SB(s):SV(s,b);if(!v){let{marginTop:e,marginLeft:t}=window.getComputedStyle(s);x.top+=parseInt(e,10)||0,x.left+=parseInt(t,10)||0}let E=SB(l),S={top:parseInt((i=window.getComputedStyle(l)).marginTop,10)||0,bottom:parseInt(i.marginBottom,10)||0,left:parseInt(i.marginLeft,10)||0,right:parseInt(i.marginRight,10)||0};E.width+=(null!=(t=S.left)?t:0)+(null!=(r=S.right)?r:0),E.height+=(null!=(n=S.top)?n:0)+(null!=(o=S.bottom)?o:0);let D={top:u.scrollTop,left:u.scrollLeft,width:u.scrollWidth,height:u.scrollHeight},O=S$(p),P=S$(b),k="BODY"===p.tagName?SB(b):SV(b,p);return"HTML"===b.tagName&&"BODY"===p.tagName&&(P.scroll.top=0,P.scroll.left=0),function(e,t,r,n,o,i,a,s,l,u,c,d,p,f,h,m){var y,g,b,v,w,x,E,S,D,O,P,k,C,j;let T,R,N,A=SM(e),{size:$,crossAxis:I,crossSize:M,placement:L,crossPlacement:F}=A,B=SL(t,s,r,A,c,d,u,p,h,m),V=c,U=SF(s,u,t,o,i+c,A);if(a&&n[$]>U){let e=SM(`${SC[L]} ${F}`),n=SL(t,s,r,e,c,d,u,p,h,m);SF(s,u,t,o,i+c,e)>U&&(A=e,B=n,V=c)}let W="bottom";"top"===A.axis?"top"===A.placement?W="top":"bottom"===A.placement&&(W="bottom"):"top"===A.crossAxis&&("top"===A.crossPlacement?W="bottom":"bottom"===A.crossPlacement&&(W="top"));let z=SI(I,B[I],r[M],s,l,i,u);B[I]+=z;let K=(w=B,x=r.height,E=W,T=p?u.height:s[SR.height],R=null!=w.top?u.top+w.top:u.top+(T-(null!=(S=w.bottom)?S:0)-x),N="top"!==E?Math.max(0,s.height+s.top+(null!=(D=s.scroll.top)?D:0)-R-((null!=(O=o.top)?O:0)+(null!=(P=o.bottom)?P:0)+i)):Math.max(0,R+x-(s.top+(null!=(k=s.scroll.top)?k:0))-((null!=(C=o.top)?C:0)+(null!=(j=o.bottom)?j:0)+i)),Math.min(s.height-2*i,N));f&&f<K&&(K=f),r.height=Math.min(r.height,K),z=SI(I,(B=SL(t,s,r,A,V,d,u,p,h,m))[I],r[M],s,l,i,u),B[I]+=z;let H={},G=t[I]+.5*t[M]-B[I]-o[Sk[I]],q=h/2+m,Z="left"===Sk[I]?(null!=(y=o.left)?y:0)+(null!=(g=o.right)?g:0):(null!=(b=o.top)?b:0)+(null!=(v=o.bottom)?v:0),Y=r[M]-Z-h/2-m,J=SD(G,t[I]+h/2-(B[I]+o[Sk[I]]),t[I]+t[M]-h/2-(B[I]+o[Sk[I]]));return H[I]=SD(J,q,Y),{position:B,maxHeight:K,arrowOffsetLeft:H.left,arrowOffsetTop:H.top,placement:A.placement}}(a,x,E,D,S,c,d,O,P,k,f,h,!!w&&"static"!==w,m,y,g)}({placement:(w=u,"rtl"===o?w.replace("start","right").replace("end","left"):w.replace("start","left").replace("end","right")),overlayNode:s.current,targetNode:a.current,scrollNode:l.current||s.current,padding:c,shouldFlip:d,boundaryElement:p,offset:f,crossOffset:h,maxHeight:b,arrowSize:i,arrowBoundaryOffset:v});if(O.position){if(D.style.top="",D.style.bottom="",D.style.left="",D.style.right="",Object.keys(O.position).forEach(e=>D.style[e]=O.position[e]+"px"),D.style.maxHeight=null!=O.maxHeight?O.maxHeight+"px":"",E&&document.activeElement&&l.current){let e=document.activeElement.getBoundingClientRect(),t=l.current.getBoundingClientRect(),r=e[E.type]-t[E.type];l.current.scrollTop+=r-E.offset}x(O)}},E);bE(D,E),bE(()=>(window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)}),[n=D]),Sz({ref:s,onResize:D}),Sz({ref:a,onResize:D});let O=(0,hC.useRef)(!1);bE(()=>{let e,t=()=>{O.current=!0,clearTimeout(e),e=setTimeout(()=>{O.current=!1},500),D()},r=()=>{O.current&&t()};return null==SK||SK.addEventListener("resize",t),null==SK||SK.addEventListener("scroll",r),()=>{null==SK||SK.removeEventListener("resize",t),null==SK||SK.removeEventListener("scroll",r)}},[D]);let P=(0,hC.useCallback)(()=>{O.current||null==g||g()},[g,O]);return!function(e){let{triggerRef:t,isOpen:r,onClose:n}=e;(0,hC.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||SW.get(t.current);o&&o()};return window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("scroll",e,!0)}},[r,n,t])}({triggerRef:a,isOpen:y,onClose:g&&P}),{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:D}}({...l,targetRef:r,overlayRef:n,isOpen:t.isOpen,onClose:i&&!u?t.close:null});return!function(e={}){let{isDisabled:t}=e;bE(()=>{if(!t){let e,t,r,n;return 1==++SY&&(d=vd()?(r=null,n=bx(SX(document,"touchstart",r=>{((e=xr(r.target,!0))!==document.documentElement||e!==document.body)&&e instanceof HTMLElement&&"auto"===window.getComputedStyle(e).overscrollBehavior&&(t=SJ(e,"overscrollBehavior","contain"))},{passive:!1,capture:!0}),SX(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}),SX(document,"touchend",()=>{t&&t()},{passive:!1,capture:!0}),SX(document,"focus",e=>{var t;let n=e.target;((t=n)instanceof HTMLInputElement&&!SZ.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable)&&((()=>{if(r)return;let e=window.pageXOffset,t=window.pageYOffset;r=bx(SX(window,"scroll",()=>{window.scrollTo(0,0)}),SJ(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),SJ(document.documentElement,"overflow","hidden"),SJ(document.body,"marginTop",`-${t}px`),()=>{window.scrollTo(e,t)}),window.scrollTo(0,0)})(),n.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{n.style.transform="",Sq&&(Sq.height<window.innerHeight?requestAnimationFrame(()=>{SQ(n)}):Sq.addEventListener("resize",()=>SQ(n),{once:!0}))}))},!0)),()=>{null==t||t(),null==r||r(),n()}):bx(SJ(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),SJ(document.documentElement,"overflow","hidden"))),()=>{0==--SY&&d()}}},[t])}({isDisabled:i||!t.isOpen}),bE(()=>{if(t.isOpen&&n.current){if(!i)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}),a=t(e);if(a===NodeFilter.FILTER_ACCEPT&&i(e),a!==NodeFilter.FILTER_REJECT){let e=o.nextNode();for(;null!=e;)i(e),e=o.nextNode()}},i=e=>{var t;let r=null!=(t=SE.get(e))?t:0;("true"!==e.getAttribute("aria-hidden")||0!==r)&&(0===r&&e.setAttribute("aria-hidden","true"),n.add(e),SE.set(e,r+1))};SS.length&&SS[SS.length-1].disconnect(),o(t);let a=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)}});a.observe(t,{childList:!0,subtree:!0});let s={visibleNodes:r,hiddenNodes:n,observe(){a.observe(t,{childList:!0,subtree:!0})},disconnect(){a.disconnect()}};return SS.push(s),()=>{for(let e of(a.disconnect(),n)){let t=SE.get(e);null!=t&&(1===t?(e.removeAttribute("aria-hidden"),SE.delete(e)):SE.set(e,t-1))}s===SS[SS.length-1]?(SS.pop(),SS.length&&SS[SS.length-1].observe()):SS.splice(SS.indexOf(s),1)}}([null!=(r=null==o?void 0:o.current)?r:n.current]);var e,r,a=null!=(e=null==o?void 0:o.current)?e:n.current;let t=SS[SS.length-1];return t&&!t.visibleNodes.has(a)?(t.visibleNodes.add(a),()=>{t.visibleNodes.delete(a)}):void 0}},[i,t.isOpen,n,o]),{popoverProps:bF(c,f),arrowProps:h,underlayProps:p,placement:m}}({...n,offset:null!=(o=n.offset)?o:8,arrowSize:s,groupRef:p?c:u},e),g=n.popoverRef,b=function(e,t=!0){let[r,n]=(0,hC.useState)(!0),o=r&&t;return bE(()=>{if(o&&e.current&&"getAnimations"in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,o]),S2(e,o,(0,hC.useCallback)(()=>n(!1),[])),o}(g,!!y)||n.isEntering||!1,v=bU({...n,defaultClassName:"react-aria-Popover",values:{trigger:n.trigger||null,placement:y,isEntering:b,isExiting:t}}),w=!n.isNonModal||"SubmenuTrigger"===n.trigger,[x,E]=(0,hC.useState)(!1);bE(()=>{g.current&&E(w&&!g.current.querySelector("[role=dialog]"))},[g,w]),(0,hC.useEffect)(()=>{x&&g.current&&!g.current.contains(document.activeElement)&&v9(g.current)},[x,g]);let S={...f.style,...v.style},D=hj().createElement("div",{...bF(b1(n),f),...v,role:x?"dialog":void 0,tabIndex:x?-1:void 0,"aria-label":n["aria-label"],"aria-labelledby":n["aria-labelledby"],ref:g,slot:n.slot||void 0,style:S,dir:n.dir,"data-trigger":n.trigger,"data-placement":y,"data-entering":b||void 0,"data-exiting":t||void 0},!n.isNonModal&&hj().createElement(S1,{onDismiss:e.close}),hj().createElement(Sx.Provider,{value:{...m,placement:y,ref:a}},v.children),hj().createElement(S1,{onDismiss:e.close}));return p?hj().createElement(Sp,{...n,shouldContainFocus:x,isExiting:t,portalContainer:null!=(i=null!=r?r:null==c?void 0:c.current)?i:void 0},D):hj().createElement(Sp,{...n,shouldContainFocus:x,isExiting:t,portalContainer:r},!n.isNonModal&&e.isOpen&&hj().createElement("div",{"data-testid":"underlay",...h,style:{position:"fixed",inset:0}}),hj().createElement("div",{ref:u,style:{display:"contents"}},hj().createElement(S6.Provider,{value:u},D)))}function S9(e){return(null==e?void 0:e.start)!=null&&null!=e.end}let S8=(0,hC.createContext)(null),De=(0,hC.createContext)(null),Dt=(0,hC.createContext)(null),Dr=(0,hC.createContext)(null),Dn=(0,hC.forwardRef)(function(e,t){var r,n;[e,t]=bz(e,t,S8);let{validationBehavior:o}=bW(Sv)||{},i=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",a=function(e){var t;let r=S4(e),[n,o]=xX(e.value,e.defaultValue||null,e.onChange),i=n||e.placeholderValue||null,[a,s]=E5(i,e.granularity),l=null!=n?n.toDate(null!=s?s:"UTC"):null,u="hour"===a||"minute"===a||"second"===a,c=null==(t=e.shouldCloseOnSelect)||t,[d,p]=(0,hC.useState)(null),[f,h]=(0,hC.useState)(null);if(n&&(d=n,"hour"in n&&(f=n)),i&&!(a in i))throw Error("Invalid granularity "+a+" for value "+i.toString());let m=(null==n?void 0:n.calendar.identifier)==="gregory"&&"BC"===n.era,y=(0,hC.useMemo)(()=>({granularity:a,timeZone:s,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:m}),[a,e.hourCycle,e.shouldForceLeadingZeros,s,e.hideTimeZone,m]),{minValue:g,maxValue:b,isDateUnavailable:v}=e,w=(0,hC.useMemo)(()=>EQ(n,g,b,v,y),[n,g,b,v,y]),x=EH({...e,value:n,builtinValidation:w}),E=x.displayValidation.isInvalid,S=e.validationState||(E?"invalid":null),D=(e,t)=>{o("timeZone"in t?t.set(_c(e)):_d(e,t)),p(null),h(null),x.commitValidation()};return{...x,value:n,setValue:o,dateValue:d,timeValue:f,setDateValue:t=>{let n="function"==typeof c?c():c;u?f||n?D(t,f||E4(e.defaultValue||e.placeholderValue)):p(t):(o(t),x.commitValidation()),n&&r.setOpen(!1)},setTimeValue:e=>{d&&e?D(d,e):h(e)},granularity:a,hasTime:u,...r,setOpen(t){!t&&!n&&d&&u&&D(d,f||E4(e.defaultValue||e.placeholderValue)),r.setOpen(t)},validationState:S,isInvalid:E,formatValue:(e,t)=>l?new _V(e,E2(t,y)).format(l):"",getDateFormatter:(e,t)=>new _V(e,E2({},{...y,...t}))}}({...e,validationBehavior:i}),s=(0,hC.useRef)(null),[l,u]=bK(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,fieldProps:p,buttonProps:f,dialogProps:h,calendarProps:m,descriptionProps:y,errorMessageProps:g,...b}=function(e,t,r){var n;let o=bI(),i=bI(),a=bI(),s=_F((n=Ec)&&n.__esModule?n.default:n,"@react-aria/datepicker"),{isInvalid:l,validationErrors:u,validationDetails:c}=t.displayValidation,{labelProps:d,fieldProps:p,descriptionProps:f,errorMessageProps:h}=EA({...e,labelElementType:"span",isInvalid:l,errorMessage:e.errorMessage||u}),m=ET(t,r),y=p["aria-labelledby"]||p.id,{locale:g}=wC(),b=t.formatValue(g,{month:"long"}),v=_9(b?s.format("selectedDateDescription",{date:b}):""),w=[v["aria-describedby"],p["aria-describedby"]].filter(Boolean).join(" ")||void 0,x=b1(e),E=(0,hC.useMemo)(()=>EO(r),[r]),S=(0,hC.useRef)(!1),{focusWithinProps:D}=wn({...e,isDisabled:t.isOpen,onBlurWithin:t=>{let r=document.getElementById(i);if(!(null==r?void 0:r.contains(t.relatedTarget))){var n,o;S.current=!1,null==(n=e.onBlur)||n.call(e,t),null==(o=e.onFocusChange)||o.call(e,!1)}},onFocusWithin:t=>{if(!S.current){var r,n;S.current=!0,null==(r=e.onFocus)||r.call(e,t),null==(n=e.onFocusChange)||n.call(e,!0)}}});return{groupProps:bF(x,m,p,v,D,{role:"group","aria-disabled":e.isDisabled||null,"aria-labelledby":y,"aria-describedby":w,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...d,onClick:()=>{E.focusFirst()}},fieldProps:{...p,id:a,[EM]:"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,[EK]:t,autoFocus:e.autoFocus,name:e.name},descriptionProps:f,errorMessageProps:h,buttonProps:{...v,id:o,"aria-haspopup":"dialog","aria-label":s.format("calendar"),"aria-labelledby":`${o} ${y}`,"aria-describedby":w,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:i,"aria-labelledby":`${o} ${y}`},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}}({...bH(e),label:u,validationBehavior:i},a,s),[v,w]=(0,hC.useState)(null),x=(0,hC.useCallback)(()=>{s.current&&w(s.current.offsetWidth+"px")},[]);Sz({ref:s,onResize:x});let{focusProps:E,isFocused:S,isFocusVisible:D}=wo({within:!0}),O=bU({...e,values:{state:a,isFocusWithin:S,isFocusVisible:D,isDisabled:e.isDisabled||!1,isInvalid:a.isInvalid,isOpen:a.isOpen},defaultClassName:"react-aria-DatePicker"}),P=b1(e);return delete P.id,hj().createElement(bV,{values:[[Dt,a],[Ea,{...c,ref:s,isInvalid:a.isInvalid}],[Sn,p],[wf,{...f,isPressed:a.isOpen}],[Sw,{...d,ref:l,elementType:"span"}],[x3,m],[Sh,a],[S3,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":v}}],[Sf,h],[wy,{slots:{description:y,errorMessage:g}}],[Sy,b]]},hj().createElement("div",{...E,...P,...O,ref:t,slot:e.slot||void 0,"data-focus-within":S||void 0,"data-invalid":a.isInvalid||void 0,"data-focus-visible":D||void 0,"data-disabled":e.isDisabled||void 0,"data-open":a.isOpen||void 0}))}),Do=(0,hC.forwardRef)(function(e,t){var r,n;[e,t]=bz(e,t,De);let{validationBehavior:o}=bW(Sv)||{},i=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",a=function(e){var t,r,n;let o=S4(e),[i,a]=xX(e.value,e.defaultValue||null,e.onChange),[s,l]=(0,hC.useState)(()=>i||{start:null,end:null});null==i&&s.start&&s.end&&l(s={start:null,end:null});let u=i||s,c=e=>{l(e||{start:null,end:null}),S9(e)?a(e):a(null)},[d,p]=E5((null==u?void 0:u.start)||(null==u?void 0:u.end)||e.placeholderValue||null,e.granularity),f="hour"===d||"minute"===d||"second"===d,h=null==(n=e.shouldCloseOnSelect)||n,[m,y]=(0,hC.useState)(null),[g,b]=(0,hC.useState)(null);u&&S9(u)&&(m=u,"hour"in u.start&&(g=u));let v=(e,t)=>{c({start:"timeZone"in t.start?t.start.set(_c(e.start)):_d(e.start,t.start),end:"timeZone"in t.end?t.end.set(_c(e.end)):_d(e.end,t.end)}),y(null),b(null),C.commitValidation()},w=t=>{let r="function"==typeof h?h():h;f?S9(t)&&(null==g?void 0:g.start)&&(null==g?void 0:g.end)?v(t,{start:(null==g?void 0:g.start)||E4(e.placeholderValue),end:(null==g?void 0:g.end)||E4(e.placeholderValue)}):y(t):S9(t)?(c(t),C.commitValidation()):y(t),r&&o.setOpen(!1)},x=e=>{S9(m)&&S9(e)?v(m,e):b(e)},E=(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,S=(0,hC.useMemo)(()=>({granularity:d,timeZone:p,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:E}),[d,e.hourCycle,e.shouldForceLeadingZeros,p,e.hideTimeZone,E]),{minValue:D,maxValue:O,isDateUnavailable:P}=e,k=(0,hC.useMemo)(()=>{var e,t;let r;return r=EY(EQ(null!=(e=null==u?void 0:u.start)?e:null,D,O,P,S),EQ(null!=(t=null==u?void 0:u.end)?t:null,D,O,P,S)),(null==u?void 0:u.end)!=null&&null!=u.start&&0>u.end.compare(u.start)&&(r=EY(r,{isInvalid:!0,validationErrors:[(_N.getGlobalDictionaryForPackage("@react-stately/datepicker")||EJ).getStringForLocale("rangeReversed",EX())],validationDetails:{...EV,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),r},[u,D,O,P,S]),C=EH({...e,value:i,name:(0,hC.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:k}),j=C.displayValidation.isInvalid,T=e.validationState||(j?"invalid":null);return{...C,value:u,setValue:c,dateRange:m,timeRange:g,granularity:d,hasTime:f,setDate(e,t){var r,n;"start"===e?w({start:t,end:null!=(r=null==m?void 0:m.end)?r:null}):w({start:null!=(n=null==m?void 0:m.start)?n:null,end:t})},setTime(e,t){var r,n;"start"===e?x({start:t,end:null!=(r=null==g?void 0:g.end)?r:null}):x({start:null!=(n=null==g?void 0:g.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:x,...o,setOpen(t){!t&&!((null==u?void 0:u.start)&&(null==u?void 0:u.end))&&S9(m)&&f&&v(m,{start:(null==g?void 0:g.start)||E4(e.placeholderValue),end:(null==g?void 0:g.end)||E4(e.placeholderValue)}),o.setOpen(t)},validationState:T,isInvalid:j,formatValue(t,r){let n;if(!u||!u.start||!u.end)return null;let o="timeZone"in u.start?u.start.timeZone:void 0,i=e.granularity||(u.start&&"minute"in u.start?"minute":"day"),a="timeZone"in u.end?u.end.timeZone:void 0,s=e.granularity||(u.end&&"minute"in u.end?"minute":"day"),l=E2(r,{granularity:i,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(a||"UTC"),p=new _V(t,l);if(o===a&&i===s&&0!==u.start.compare(u.end)){try{let e=p.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=p}else n=new _V(t,E2(r,{granularity:s,timeZone:a,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:p.format(c),end:n.format(d)}},getDateFormatter:(e,t)=>new _V(e,E2({},{...S,...t}))}}({...e,validationBehavior:i}),s=(0,hC.useRef)(null),[l,u]=bK(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,startFieldProps:p,endFieldProps:f,buttonProps:h,dialogProps:m,calendarProps:y,descriptionProps:g,errorMessageProps:b,...v}=function(e,t,r){var n,o,i,a,s,l;let u=_F((l=Ec)&&l.__esModule?l.default:l,"@react-aria/datepicker"),{isInvalid:c,validationErrors:d,validationDetails:p}=t.displayValidation,{labelProps:f,fieldProps:h,descriptionProps:m,errorMessageProps:y}=EA({...e,labelElementType:"span",isInvalid:c,errorMessage:e.errorMessage||d}),g=h["aria-labelledby"]||h.id,{locale:b}=wC(),v=t.formatValue(b,{month:"long"}),w=_9(v?u.format("selectedRangeDescription",{startDate:v.start,endDate:v.end}):""),x={"aria-label":u.format("startDate"),"aria-labelledby":g},E={"aria-label":u.format("endDate"),"aria-labelledby":g},S=bI(),D=bI(),O=ET(t,r),P=[w["aria-describedby"],h["aria-describedby"]].filter(Boolean).join(" ")||void 0,k=(0,hC.useMemo)(()=>EO(r,{accept:e=>e.id!==S}),[r,S]),C={[EL]:k,[EM]:"presentation","aria-describedby":P,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},j=b1(e),T=(0,hC.useRef)(!1),{focusWithinProps:R}=wn({...e,isDisabled:t.isOpen,onBlurWithin:t=>{let r=document.getElementById(D);if(!(null==r?void 0:r.contains(t.relatedTarget))){var n,o;T.current=!1,null==(n=e.onBlur)||n.call(e,t),null==(o=e.onFocusChange)||o.call(e,!1)}},onFocusWithin:t=>{if(!T.current){var r,n;T.current=!0,null==(r=e.onFocus)||r.call(e,t),null==(n=e.onFocusChange)||n.call(e,!0)}}}),N=(0,hC.useRef)(EW),A=(0,hC.useRef)(EW);return{groupProps:bF(j,O,h,w,R,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":P,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...f,onClick:()=>{k.focusFirst()}},buttonProps:{...w,id:S,"aria-haspopup":"dialog","aria-label":u.format("calendar"),"aria-labelledby":`${S} ${g}`,"aria-describedby":P,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:D,"aria-labelledby":`${S} ${g}`},startFieldProps:{...x,...C,value:null!=(a=null==(n=t.value)?void 0:n.start)?a:null,onChange:e=>t.setDateTime("start",e),autoFocus:e.autoFocus,name:e.startName,[EK]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){N.current=e,t.updateValidation(EY(e,A.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...E,...C,value:null!=(s=null==(o=t.value)?void 0:o.end)?s:null,onChange:e=>t.setDateTime("end",e),name:e.endName,[EK]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){A.current=e,t.updateValidation(EY(N.current,e))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:m,errorMessageProps:y,calendarProps:{autoFocus:!0,value:(null==(i=t.dateRange)?void 0:i.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:p}}({...bH(e),label:u,validationBehavior:i},a,s),[w,x]=(0,hC.useState)(null),E=(0,hC.useCallback)(()=>{s.current&&x(s.current.offsetWidth+"px")},[]);Sz({ref:s,onResize:E});let{focusProps:S,isFocused:D,isFocusVisible:O}=wo({within:!0}),P=bU({...e,values:{state:a,isFocusWithin:D,isFocusVisible:O,isDisabled:e.isDisabled||!1,isInvalid:a.isInvalid,isOpen:a.isOpen},defaultClassName:"react-aria-DateRangePicker"}),k=b1(e);return delete k.id,hj().createElement(bV,{values:[[Dr,a],[Ea,{...c,ref:s,isInvalid:a.isInvalid}],[wf,{...h,isPressed:a.isOpen}],[Sw,{...d,ref:l,elementType:"span"}],[x6,y],[Sh,a],[S3,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":w}}],[Sf,m],[Sn,{slots:{start:p,end:f}}],[wy,{slots:{description:g,errorMessage:b}}],[Sy,v]]},hj().createElement("div",{...S,...k,...P,ref:t,slot:e.slot||void 0,"data-focus-within":D||void 0,"data-invalid":a.isInvalid||void 0,"data-focus-visible":O||void 0,"data-disabled":e.isDisabled||void 0,"data-open":a.isOpen||void 0}))});function Di(e){return hj().createElement(wk,e)}function Da(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 w6||e instanceof w8||e instanceof _t)return t?_p(e,t):e;{let r=yl()(e).toDate(),n=new w6(r.getFullYear(),r.getMonth()+1,r.getDate());return t?_p(n,t):n}}function Ds(e){if(e)return e.toDate(_S())}function Dl(e){if("string"==typeof e&&0!==e.trim().length)try{return new Intl.Locale(e.replace(/[_@]/g,"-")).toString()}catch{return}}function Du(e){let t=e??"",r=Dl(t);if(!r)return t;try{return new Intl.DisplayNames([r],{type:"language"}).of(r)??t}catch{return t}}function Dc(){let e=window.i18next.language,t=Dl(e)??e;return"ht"===t&&(t="fr-HT"),t}if("u">typeof navigator){let e=navigator;ed=Array.isArray(e.languages)?e.languages[0]:e.language}else if("u">typeof process){let e=process.env;ed=e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}var Dd=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch{return"en-US"}}(ed||"en-US"),Dp=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},Df={};for(let e=1;e<100;e++)Df[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var Dh={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},Dm="[1234567890一二三四五六七八九〇\\d]",Dy={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},Dg={},Db={"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},Dv={zone:Db,year:Df,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:{}},Dw={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(Db).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,}"},D_={...Dw,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}"},Dx={},DE=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(t=Dd){return Dx[t.toLowerCase()]||(Dx[t.toLowerCase()]=new e(t)),Dx[t.toLowerCase()]}constructor(e=Dd){this.locale=e,this.lookups={...Dv},this.vars={...Dw};let t=new Intl.NumberFormat(this.locale);this.numberingSystem=t.resolvedOptions().numberingSystem,this.dateOptions=new Intl.DateTimeFormat(this.locale).resolvedOptions(),this.baseName=new Intl.Locale(this.locale).baseName,this.build()}toInt(e){if("number"==typeof e)return e;if("string"!=typeof e)return;if("latn"===this.numberingSystem&&!this.baseName.startsWith("zh")){let t=parseInt(e,10);if(!isNaN(t))return t}let t="";for(let 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=Dy: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(Dg[e])return Dg[e];if("fullwide"===e||"hanidec"===e)return{group:Dm,lookup:{...Dy}};let t=Dh[e];if(!t)return{group:"\\d",lookup:{...Dy}};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 Dg[e]={group:`[${r}-${n}]`,lookup:o},Dg[e]}(this.numberingSystem);for(let r in this.lookups.digit=t,D_)D_.hasOwnProperty(r)&&(this.vars[r]=D_[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,i)=>{e[r+o+(i<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 i=Intl.DateTimeFormat(this.locale,{dateStyle:o});for(let a=0;a<12;a++){let s=i.formatToParts(r[a]).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]=a+1)}}let o=Intl.DateTimeFormat(this.locale,{month:"short"});for(let i=0;i<12;i++){let a=o.formatToParts(r[i]).find(n).value.toLocaleLowerCase(this.locale);a=a.replace(/\.$/,""),e[`${a}\\.?`]=!0,t[a]=i+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 i=Intl.DateTimeFormat(this.locale,{weekday:o});for(let a=0;a<7;a++){let s=i.formatToParts(e[a]).find(t).value.toLocaleLowerCase(this.locale);"short"===o?(s=s.replace(/\.$/,""),r.push(`${s}\\.?`)):r.push(s),n[s]=a}}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 i=0;i<2;i++){let a=o.formatToParts(e[i]).find(t);if(!a)return;let s=a.value.toLocaleLowerCase(this.locale);r.push(s),n[s]=12*i}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")}},DS=["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"],DD={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},DO=()=>new Date;function DP(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 Dk=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 i=e.handler(o);if(i){for(let[e,t]of Object.entries(i))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)}},DC=["year","month","day","hour","minute","second","millisecond","offset"],Dj={};function DT(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 DR=[[/([^\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"]],DN={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," "],...DR],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:DR,id:DR,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function DA(e,t=Dd){let r=function(e){if(!Dj[e]){var t,r;let n,o,i=DE.factory(e);Dj[e]=new Dk({doneChecker:DT,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:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? ?(_OFFSET_|Z)?$"),handler:DP(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:DP(["","year","month","day","hour","minute","second","millisecond","zone"])},{name:"timestampWithOffsetAndZone",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? (_OFFSET_|Z)\\s*(_ZONE_)$"),handler:DP(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:i.compile(`^(${Dm}{2,4})\\s*\u5E74\\s*(${Dm}{1,2})\\s*\u6708\\s*(${Dm}{1,2})\\s*\u65E5$`),handler:DP(["","year","month","day"])},{name:"korean",regex:i.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:DP(["","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:DP(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let t=DO(),r=e[1].toLowerCase();switch(r){case"tomorrow":t.setUTCDate(t.getUTCDate()+1);break;case"yesterday":t.setUTCDate(t.getUTCDate()-1)}let n={year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate()};return"now"===r&&(n.hour=t.getUTCHours(),n.minute=t.getUTCMinutes(),n.second=t.getUTCSeconds(),n.millisecond=t.getUTCMilliseconds()),console.log("today=>",r,n),n}},{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?DD[r]:(r=r.replace(/s$/,"")).toLowerCase())&&(r="day",t*=7),("-"===e||n)&&(t*=-1);let o=DO();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:i.compile("(?:^|[\\sT])(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?(Z)?$"),handler:DP(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:i.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:DP(["","hour","minute","second","millisecond","zone"])},{name:"hms12",regex:i.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:DP(["","hour","minute","second","meridiem"])},{name:"hms24",regex:i.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:DP(["","hour","minute","second","millisecond"])},{name:"hm12",regex:i.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:DP(["","hour","minute","meridiem"])},{name:"hm24",regex:i.compile("(_H24_):(_MIN_)"),handler:DP(["","hour","minute"])},{name:"h12",regex:i.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:DP(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:DP(["","year","month","day"])},{name:"yearMonthnameDay",regex:i.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:DP(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:i.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:DP(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:i.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:DP(["","monthname","day","","year"])},{name:"dayMonthname",regex:i.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:DP(["","day","","monthname"])},{name:"monthnameDay",regex:i.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:DP(["","monthname","day"])},{name:"hmsNoMeridiem",regex:i.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:DP(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:i.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:DP(["","hour","minute"])},{name:"ymd",regex:i.compile("(_YEAR4_)([.-])(_MONTH_)\\2+(_DAY_)"),handler:DP(["","year","","month","day"])},{name:"mdy",regex:i.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:DP(["","month","","day","year"])},{name:"dmy",regex:i.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:DP(["","day","month","year"])},{name:"yearLoose",regex:i.compile("_YEAR4_"),handler:DP(["year"])},{name:"dayMonthnameLoose",regex:i.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:DP(["","day","monthname"])},{name:"monthnameDayLoose",regex:i.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:DP(["","monthname","day"])},{name:"monthname",regex:i.compile("_MONTHNAME_"),handler:DP(["monthname"])},{name:"year4",regex:i.compile("_YEAR4_"),handler:DP(["year"])},{name:"md",regex:i.compile("(_MONTH_)[/-](_DAY_)"),handler:DP(["","month","day"])},{name:"dm",regex:i.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:DP(["","day","month"])},{name:"day",regex:i.compile("_DAY_"),handler:DP(["day"])},{name:"year2",regex:i.compile("_YEAR2_"),handler:DP(["year"])},{name:"onlyZone",regex:i.compile("_ZONE_"),handler:DP(["zone"])}],o=i.baseName.slice(0,5),DS.includes(o)?n:n.filter(e=>!["mdy","md"].includes(e.name))),formatter:(r=i,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(DC.includes(n)){let e=r.toInt(o);"number"==typeof e&&(t[n]=e)}return t.year<100&&(t.year=Df[t.year]),t.year&&"buddhist"===r.dateOptions.calendar&&(t.year-=543),t})})}return Dj[e]}(t),n=function(e,t){let r=DN[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 D$(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let t=new Dp(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 Dp(t.valueOf()-60*e.offset*1e3):t}function DI(e,t=Dd){let r=DA(e,t),n=r.invalid?new Dp(NaN):D$(r);return n.isValid()||(n.invalid=`Unable to parse date "${e}"`),n}function DM(e,t=Dd){return e instanceof Date?new Dp(e.valueOf()):"number"==typeof e?new Dp(e):DI(e,t)}Date.fromString=Dp.fromString=DI,Date.fromAny=Dp.fromAny=DM,"u">typeof window&&(window.anyDateParser={fromString:DI,fromAny:DM,fromObject:D$,attempt:DA});var DL=r(4397),DF=r(7657),DB=r(254);function DV(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}yl().extend(yu),yl().extend(DF),yl().extend(DL);let DU="YYYY-MM-DDTHH:mm:ss.SSSZZ";function DW(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&yl()(e,DU).isValid()}function Dz(e){return yl()(e).isToday()}function DK(e){return DW(e)?yl()(e,DU).toDate():null}function DH(e,t=!1){let r=yl()(e);return t&&(r=r.utc()),r.format(DU)}function DG(e){return yl()(e).toDate()}var Dq=new WeakMap;let DZ=new class{register(e,t){DV(this,Dq).set(e,t)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let t=`${e.language}-${e.region}`;if(DV(this,Dq).has(t))return DV(this,Dq).get(t)}if(e.language&&DV(this,Dq).has(e.language))return DV(this,Dq).get(e.language);let t=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return DV(this,Dq).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,Dq,{writable:!0,value:new Map})}};function DY(e,t){DZ.register(e,t)}function DJ(e){let t=e??Dc();return DZ.getCalendar(t instanceof Intl.Locale?t:new Intl.Locale(t))}let DX={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function DQ(e,t={}){let r=DA(e,Dc());if(r.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!(0,DB.A)(r.day)&&(0,DB.A)(r.month)&&(r=Object.assign({},nb(r,"day"),{month:r.day})),r.month&&(r.month-=1),r.day&&(r=Object.assign({},nb(r,"day"),{date:r.day}));let n=yl()().set(r).toDate();return(0,DB.A)(r.year)&&(t.year=!1),(0,DB.A)(r.month)&&(t.month=!1),(0,DB.A)(r.date)&&(t.day=!1),D0(n,t)}function D0(e,t){let r,n=t?.locale??Dc(),o=new Intl.Locale(n),{calendar:i,mode:a,time:s,day:l,month:u,year:c,noToday:d,numberingSystem:p}={...DX,...{noToday:"am"===o.language},...t},f={calendar:i??DJ(o),year:c?"numeric":void 0,month:u?"short":void 0,day:l?"2-digit":void 0,numberingSystem:p},h=yl()(e).isToday();if(h&&!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,f).formatToParts(e);("en"===o.language||"am"===o.language)&&"standard"==a&&c&&l&&(t=t.map(D1("-"))),"wide"==a&&(t=t.map(D1(" — "))),"ethiopic"===f.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||h&&"for today"===s)&&(r+=`, ${D2(e)}`),r}let D1=e=>(t,r,n)=>"literal"!==t.type||" "!==t.value||r<n.length-1&&"era"===n[r+1].type?t:{type:"literal",value:e};function D2(e){return e.toLocaleTimeString(Dc(),{hour:"2-digit",minute:"2-digit"})}function D4(e,t){return D0(e,{...t,time:!0})}function D3(e,t){let r=DJ("string"==typeof t?new Intl.Locale(t):t);return r?_p(e,xz(r)):e}function D6(e,t){return new Intl.DurationFormat(Dc(),t).format(e)}function D5(e,t){if(null==e)return null;if("string"==typeof e){let r=DA(e,Dc());return r.invalid?(console.warn(`Could not interpret '${e}' as a date`),null):(r.day&&!r.month&&(r={...nb(r,"day"),...{month:r.day}}),r.month&&(r.month-=1),r.day&&(r={...nb(r,"day"),...{date:r.day}}),yl()(t).set(r))}return yl()(e)}let D7=["years","months","days","hours","minutes","seconds"],D9={second:"seconds",minute:"minutes",hour:"hours",day:"days",month:"months",year:"years"},D8={seconds:45,minutes:45,hours:22,days:26,months:11,years:1/0};function Oe(e,t=yl()(),r){let n,o=yl()(t),i=D5(e,o);if(null==i)return null;if("string"==typeof r){let e=D9[r]??r;return{[e]:o.diff(i,e)}}let{thresholds:a,largestUnit:s,smallestUnit:l}=r??{};if(void 0!==s||void 0!==l){let e,t=l?D9[l]??l:void 0;return e="auto"===s||void 0===s?function(e,t,r){let n=D7.indexOf(r);for(let o=0;o<D7.length;o++){let i=D7[o];if(t.diff(e,i)>0)return o<=n?i:r}return r}(i,o,t??"seconds"):D9[s]??s,function(e,t,r,n){let o=D7.indexOf(r),i=D7.indexOf(n),a=D7.slice(o,i+1),s={},l=e;for(let e of a){let r=t.diff(l,e);s[e]=r,l=l.add(r,e)}return s}(i,o,e,t??e)}let u=(n=function(e){let t={...D8};if(e)for(let[r,n]of Object.entries(e))void 0!==n&&(t[D9[r]??r]=n);return t}(a),o.diff(i,"seconds")<n.seconds?"seconds":o.diff(i,"minutes")<n.minutes?"minutes":o.diff(i,"hours")<n.hours?"hours":o.diff(i,"days")<n.days?"days":o.diff(i,"months")<n.months?"months":"years");return{[u]:o.diff(i,u)}}let Ot={style:"short",localeMatcher:"lookup"};function Or(e,t=yl()(),r){let n=Oe(e,t,r);return null==n?null:D6(n,"object"==typeof r&&r.formatOptions?{...Ot,...r.formatOptions}:Ot)}let On=(0,hC.createContext)(null);function Oo(){let e=mk({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,t=(0,hC.useMemo)(()=>{let t=Dc();return e[t]&&(t=e[t]),t},[window.i18next.language]),r=(0,hC.useMemo)(()=>{let e=DJ(t);return void 0!==e?xz(e):void 0},[t]),n=(0,hC.useMemo)(()=>new Intl.Locale(t,{calendar:r?.identifier}),[t,r]),o=(0,hC.useMemo)(()=>r?_p(_w(_S()),r):_w(_S()),[r]);return{calendar:r,intlLocale:n,today_:o}}let Oi=new w6(1793,1,1);var Oa={};function Os(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}Oa={"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:"數字欄位"}};let Ol=new Map,Ou=!1;try{Ou="exceptZero"===new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay}catch{}let Oc=!1;try{Oc="unit"===new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style}catch{}let Od={degree:{narrow:{default:"\xb0","ja-JP":" 度","zh-TW":"度","sl-SI":" \xb0"}}};class Op{format(e){let t="";if(t=Ou||null==this.options.signDisplay?this.numberFormatter.format(e):function(e,t,r){if("auto"===t)return e.format(r);{if("never"===t)return e.format(Math.abs(r));let n=!1;if("always"===t?n=r>0||Object.is(r,0):"exceptZero"===t&&(Object.is(r,-0)||Object.is(r,0)?r=Math.abs(r):n=r>0),!n)return e.format(r);{let t=e.format(-r),n=e.format(r),o=t.replace(n,"").replace(/\u200e|\u061C/,"");return 1!=[...o].length&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),t.replace(n,"!!!").replace(o,"+").replace("!!!",n)}}}(this.numberFormatter,this.options.signDisplay,e),"unit"===this.options.style&&!Oc){var r;let{unit:e,unitDisplay:n="short",locale:o}=this.resolvedOptions();if(!e)return t;let i=null==(r=Od[e])?void 0:r[n];t+=i[o]||i.default}return t}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,t){if("function"==typeof this.numberFormatter.formatRange)return this.numberFormatter.formatRange(e,t);if(t<e)throw RangeError("End date must be >= start date");return`${this.format(e)} \u{2013} ${this.format(t)}`}formatRangeToParts(e,t){if("function"==typeof this.numberFormatter.formatRangeToParts)return this.numberFormatter.formatRangeToParts(e,t);if(t<e)throw RangeError("End date must be >= start date");let r=this.numberFormatter.formatToParts(e),n=this.numberFormatter.formatToParts(t);return[...r.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...n.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return Ou||null==this.options.signDisplay||(e={...e,signDisplay:this.options.signDisplay}),Oc||"unit"!==this.options.style||(e={...e,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,t={}){this.numberFormatter=function(e,t={}){let{numberingSystem:r}=t;if(r&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${r}`),"unit"===t.style&&!Oc){var n;let{unit:e,unitDisplay:r="short"}=t;if(!e)throw Error('unit option must be provided with style: "unit"');if(!(null==(n=Od[e])?void 0:n[r]))throw Error(`Unsupported unit ${e} with unitDisplay = ${r}`);t={...t,style:"decimal"}}let o=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(Ol.has(o))return Ol.get(o);let i=new Intl.NumberFormat(e,t);return Ol.set(o,i),i}(e,t),this.options=t}}function Of(e={}){let{locale:t}=wC();return(0,hC.useMemo)(()=>new Op(t,e),[t,e])}var Oh={};function Om(e){var t;let r=(0,hC.useRef)(void 0),{value:n,textValue:o,minValue:i,maxValue:a,isDisabled:s,isReadOnly:l,isRequired:u,onIncrement:c,onIncrementPage:d,onDecrement:p,onDecrementPage:f,onDecrementToMin:h,onIncrementToMax:m}=e,y=_F((t=Oh)&&t.__esModule?t.default:t,"@react-aria/spinbutton");(0,hC.useEffect)(()=>()=>clearTimeout(r.current),[]);let g=(0,hC.useRef)(!1),b=()=>{g.current=!0},v=()=>{g.current=!1},w=""===o?y.format("Empty"):(o||`${n}`).replace("-","−");(0,hC.useEffect)(()=>{g.current&&(bq&&bq.clear("assertive"),bZ(w,"assertive"))},[w]);let x=bS(e=>{clearTimeout(r.current),null==c||c(),r.current=window.setTimeout(()=>{(void 0===a||isNaN(a)||void 0===n||isNaN(n)||n<a)&&x(60)},e)}),E=bS(e=>{clearTimeout(r.current),null==p||p(),r.current=window.setTimeout(()=>{(void 0===i||isNaN(i)||void 0===n||isNaN(n)||n>i)&&E(60)},e)}),S=e=>{e.preventDefault()},{addGlobalListener:D,removeAllGlobalListeners:O}=vC();return{spinButtonProps:{role:"spinbutton","aria-valuenow":void 0===n||isNaN(n)?void 0:n,"aria-valuetext":w,"aria-valuemin":i,"aria-valuemax":a,"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(f){e.preventDefault(),null==f||f();break}case"ArrowDown":case"Down":p&&(e.preventDefault(),null==p||p());break;case"Home":h&&(e.preventDefault(),null==h||h());break;case"End":m&&(e.preventDefault(),null==m||m())}},onFocus:b,onBlur:v},incrementButtonProps:{onPressStart:()=>{x(400),D(window,"contextmenu",S)},onPressEnd:()=>{clearTimeout(r.current),O()},onFocus:b,onBlur:v},decrementButtonProps:{onPressStart:()=>{E(400),D(window,"contextmenu",S)},onPressEnd:()=>{clearTimeout(r.current),O()},onFocus:b,onBlur:v}}}Oh={"ar-AE":{Empty:"فارغ"},"bg-BG":{Empty:"Изпразни"},"cs-CZ":{Empty:"Pr\xe1zdn\xe9"},"da-DK":{Empty:"Tom"},"de-DE":{Empty:"Leer"},"el-GR":{Empty:"Άδειο"},"en-US":{Empty:"Empty"},"es-ES":{Empty:"Vac\xedo"},"et-EE":{Empty:"T\xfchjenda"},"fi-FI":{Empty:"Tyhj\xe4"},"fr-FR":{Empty:"Vide"},"he-IL":{Empty:"ריק"},"hr-HR":{Empty:"Prazno"},"hu-HU":{Empty:"\xdcres"},"it-IT":{Empty:"Vuoto"},"ja-JP":{Empty:"空"},"ko-KR":{Empty:"비어 있음"},"lt-LT":{Empty:"Tuščias"},"lv-LV":{Empty:"Tukšs"},"nb-NO":{Empty:"Tom"},"nl-NL":{Empty:"Leeg"},"pl-PL":{Empty:"Pusty"},"pt-BR":{Empty:"Vazio"},"pt-PT":{Empty:"Vazio"},"ro-RO":{Empty:"Gol"},"ru-RU":{Empty:"Не заполнено"},"sk-SK":{Empty:"Pr\xe1zdne"},"sl-SI":{Empty:"Prazen"},"sr-SP":{Empty:"Prazno"},"sv-SE":{Empty:"Tomt"},"tr-TR":{Empty:"Boş"},"uk-UA":{Empty:"Пусто"},"zh-CN":{Empty:"空"},"zh-TW":{Empty:"空白"}};let Oy=RegExp("^.*\\(.*\\).*$"),Og=["latn","arab","hanidec","deva","beng"];class Ob{parse(e){return Ow(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,t,r){return Ow(this.locale,this.options,e).isValidPartialNumber(e,t,r)}getNumberingSystem(e){return Ow(this.locale,this.options,e).options.numberingSystem}constructor(e,t={}){this.locale=e,this.options=t}}let Ov=new Map;function Ow(e,t,r){let n=O_(e,t);if(!e.includes("-nu-")&&!n.isValidPartialNumber(r)){for(let o of Og)if(o!==n.options.numberingSystem){let n=O_(e+(e.includes("-u-")?"-nu-":"-u-nu-")+o,t);if(n.isValidPartialNumber(r))return n}}return n}function O_(e,t){let r=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():""),n=Ov.get(r);return n||(n=new Ox(e,t),Ov.set(r,n)),n}class Ox{parse(e){let t=this.sanitize(e);if(this.symbols.group&&(t=OD(t,this.symbols.group,"")),this.symbols.decimal&&(t=t.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(t=t.replace(this.symbols.minusSign,"-")),t=t.replace(this.symbols.numeral,this.symbols.index),"percent"===this.options.style){let e=t.indexOf("-"),r=(t=t.replace("-","")).indexOf(".");-1===r&&(r=t.length),t=t.replace(".",""),t=r-2==0?`0.${t}`:r-2==-1?`0.0${t}`:r-2==-2?"0.00":`${t.slice(0,r-2)}.${t.slice(r-2)}`,e>-1&&(t=`-${t}`)}let r=t?+t:NaN;if(isNaN(r))return NaN;if("percent"===this.options.style){var n,o;let e={...this.options,style:"decimal",minimumFractionDigits:Math.min((null!=(n=this.options.minimumFractionDigits)?n:0)+2,20),maximumFractionDigits:Math.min((null!=(o=this.options.maximumFractionDigits)?o:0)+2,20)};return new Ob(this.locale,e).parse(new Op(this.locale,e).format(r))}return"accounting"===this.options.currencySign&&Oy.test(e)&&(r*=-1),r}sanitize(e){return e=e.replace(this.symbols.literals,""),this.symbols.minusSign&&(e=e.replace("-",this.symbols.minusSign)),"arab"===this.options.numberingSystem&&(this.symbols.decimal&&(e=(e=e.replace(",",this.symbols.decimal)).replace(String.fromCharCode(1548),this.symbols.decimal)),this.symbols.group&&(e=OD(e,".",this.symbols.group))),"fr-FR"===this.options.locale&&this.symbols.group&&(e=OD(e," ",this.symbols.group),e=OD(e,/\u00A0/g,this.symbols.group)),e}isValidPartialNumber(e,t=-1/0,r=1/0){return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&t<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&r>0&&(e=e.slice(this.symbols.plusSign.length)),!(this.symbols.group&&e.startsWith(this.symbols.group)||this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&0===this.options.maximumFractionDigits)&&(this.symbols.group&&(e=OD(e,this.symbols.group,"")),e=e.replace(this.symbols.numeral,""),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,"")),0===e.length)}constructor(e,t={}){var r,n;this.locale=e,this.formatter=new Intl.NumberFormat(e,t),this.options=this.formatter.resolvedOptions(),this.symbols=function(e,t,r,n){var o,i,a,s,l;let u=new Intl.NumberFormat(e,{...r,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:"auto",roundingMode:"halfExpand"}),c=u.formatToParts(-10000.111),d=u.formatToParts(10000.111),p=OS.map(e=>u.formatToParts(e)),f=null!=(l=null==(o=c.find(e=>"minusSign"===e.type))?void 0:o.value)?l:"-",h=null==(i=d.find(e=>"plusSign"===e.type))?void 0:i.value;h||(null==n?void 0:n.signDisplay)!=="exceptZero"&&(null==n?void 0:n.signDisplay)!=="always"||(h="+");let m=null==(a=new Intl.NumberFormat(e,{...r,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(e=>"decimal"===e.type))?void 0:a.value,y=null==(s=c.find(e=>"group"===e.type))?void 0:s.value,g=[...new Set([...c.filter(e=>!OE.has(e.type)).map(e=>OO(e.value)),...p.flatMap(e=>e.filter(e=>!OE.has(e.type)).map(e=>OO(e.value)))])].sort((e,t)=>t.length-e.length),b=0===g.length?RegExp("[\\p{White_Space}]","gu"):RegExp(`${g.join("|")}|[\\p{White_Space}]`,"gu"),v=[...new Intl.NumberFormat(r.locale,{useGrouping:!1}).format(0x24cb016ea)].reverse(),w=new Map(v.map((e,t)=>[e,t]));return{minusSign:f,plusSign:h,decimal:m,group:y,literals:b,numeral:RegExp(`[${v.join("")}]`,"g"),index:e=>String(w.get(e))}}(e,this.formatter,this.options,t),"percent"===this.options.style&&((null!=(r=this.options.minimumFractionDigits)?r:0)>18||(null!=(n=this.options.maximumFractionDigits)?n:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}}let OE=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),OS=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function OD(e,t,r){return e.replaceAll?e.replaceAll(t,r):e.split(t).join(r)}function OO(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function OP(e,t,r){let n="+"===e?t+r:t-r;if(t%1!=0||r%1!=0){let o=t.toString().split("."),i=r.toString().split("."),a=Math.pow(10,Math.max(o[1]&&o[1].length||0,i[1]&&i[1].length||0));t=Math.round(t*a),r=Math.round(r*a),n=("+"===e?t+r:t-r)/a}return n}let Ok=(0,hC.createContext)(null),OC=(0,hC.createContext)(null),Oj=(0,hC.forwardRef)(function(e,t){var r,n;[e,t]=bz(e,t,Ok);let{validationBehavior:o}=bW(Sv)||{},i=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",{locale:a}=wC(),s=function(e){let{minValue:t,maxValue:r,step:n,formatOptions:o,value:i,defaultValue:a=NaN,onChange:s,locale:l,isDisabled:u,isReadOnly:c}=e;null===i&&(i=NaN),void 0===i||isNaN(i)||(i=void 0===n||isNaN(n)?SD(i,t,r):SP(i,t,r,n)),isNaN(a)||(a=void 0===n||isNaN(n)?SD(a,t,r):SP(a,t,r,n));let[d,p]=xX(i,isNaN(a)?NaN:a,s),[f,h]=(0,hC.useState)(()=>isNaN(d)?"":new Op(l,o).format(d)),m=(0,hC.useMemo)(()=>new Ob(l,o),[l,o]),y=(0,hC.useMemo)(()=>m.getNumberingSystem(f),[m,f]),g=(0,hC.useMemo)(()=>new Op(l,{...o,numberingSystem:y}),[l,o,y]),b=(0,hC.useMemo)(()=>g.resolvedOptions(),[g]),v=(0,hC.useCallback)(e=>isNaN(e)||null===e?"":g.format(e),[g]),w=EH({...e,value:d}),x=void 0===n||isNaN(n)?1:n;"percent"===b.style&&(void 0===n||isNaN(n))&&(x=.01);let[E,S]=(0,hC.useState)(d),[D,O]=(0,hC.useState)(l),[P,k]=(0,hC.useState)(o);Object.is(d,E)&&l===D&&o===P||(h(v(d)),S(d),O(l),k(o));let C=(0,hC.useMemo)(()=>m.parse(f),[m,f]),j=(e,n=0)=>{if(isNaN(C))return SP(isNaN(n)?0:n,t,r,x);{let n=SP(C,t,r,x);return"+"===e&&n>C||"-"===e&&n<C?n:SP(OP(e,C,x),t,r,x)}},T=(0,hC.useMemo)(()=>!u&&!c&&(isNaN(C)||void 0===r||isNaN(r)||SP(C,t,r,x)>C||OP("+",C,x)<=r),[u,c,t,r,x,C]),R=(0,hC.useMemo)(()=>!u&&!c&&(isNaN(C)||void 0===t||isNaN(t)||SP(C,t,r,x)<C||OP("-",C,x)>=t),[u,c,t,r,x,C]);return{...w,validate:e=>m.isValidPartialNumber(e,t,r),increment:()=>{let e=j("+",t);e===d&&h(v(e)),p(e),w.commitValidation()},incrementToMax:()=>{null!=r&&(p(SP(r,t,r,x)),w.commitValidation())},decrement:()=>{let e=j("-",r);e===d&&h(v(e)),p(e),w.commitValidation()},decrementToMin:()=>{null!=t&&(p(t),w.commitValidation())},canIncrement:T,canDecrement:R,minValue:t,maxValue:r,numberValue:C,setNumberValue:p,setInputValue:h,inputValue:f,commit:()=>{let e;if(!f.length){p(NaN),h(void 0===i?"":v(d));return}isNaN(C)?h(v(d)):(e=void 0===n||isNaN(n)?SD(C,t,r):SP(C,t,r,n),p(e=m.parse(v(e))),h(v(void 0===i?e:d)))}}}({...e,locale:a,validationBehavior:i}),l=(0,hC.useRef)(null),[u,c]=bK(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:d,groupProps:p,inputProps:f,incrementButtonProps:h,decrementButtonProps:m,descriptionProps:y,errorMessageProps:g,...b}=function(e,t,r){var n,o;let i,{id:a,decrementAriaLabel:s,incrementAriaLabel:l,isDisabled:u,isReadOnly:c,isRequired:d,minValue:p,maxValue:f,autoFocus:h,label:m,formatOptions:y,onBlur:g=()=>{},onFocus:b,onFocusChange:v,onKeyDown:w,onKeyUp:x,description:E,errorMessage:S,isWheelDisabled:D,...O}=e,{increment:P,incrementToMax:k,decrement:C,decrementToMin:j,numberValue:T,inputValue:R,commit:N,commitValidation:A}=t,$=_F((o=Oa)&&o.__esModule?o.default:o,"@react-aria/numberfield"),I=bI(a),{focusProps:M}=v8({onBlur(){N()}}),L=Of(y),F=(0,hC.useMemo)(()=>L.resolvedOptions(),[L]),B=Of({...y,currencySign:void 0}),V=(0,hC.useMemo)(()=>isNaN(T)?"":B.format(T),[B,T]),{spinButtonProps:U,incrementButtonProps:W,decrementButtonProps:z}=Om({isDisabled:u,isReadOnly:c,isRequired:d,maxValue:f,minValue:p,onIncrement:P,onIncrementToMax:k,onDecrement:C,onDecrementToMin:j,value:T,textValue:V}),[K,H]=(0,hC.useState)(!1),{focusWithinProps:G}=wn({isDisabled:u,onFocusWithinChange:H});!function(e,t){let{onScroll:r,isDisabled:n}=e,o=(0,hC.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),r&&r({deltaX:e.deltaX,deltaY:e.deltaY}))},[r]);_6(t,"wheel",n?void 0:o)}({onScroll:(0,hC.useCallback)(e=>{!(Math.abs(e.deltaY)<=Math.abs(e.deltaX))&&(e.deltaY>0?P():e.deltaY<0&&C())},[C,P]),isDisabled:D||u||c||!K},r);let q=(null!=(n=F.maximumFractionDigits)?n:0)>0,Z=void 0===t.minValue||isNaN(t.minValue)||t.minValue<0,Y="numeric";vu()?Z?Y="text":q&&(Y="decimal"):vh()&&(Z?Y="numeric":q&&(Y="decimal"));let J=b1(e),X=(0,hC.useCallback)(e=>{"Enter"===e.key?(N(),A()):e.continuePropagation()},[N,A]),{isInvalid:Q,validationErrors:ee,validationDetails:et}=t.displayValidation,{labelProps:er,inputProps:en,descriptionProps:eo,errorMessageProps:ei}=function(e,t,r){let n=bS(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,hC.useEffect)(()=>{if(!Os()||!r.current)return;let e=r.current;return e.addEventListener("beforeinput",n,!1),()=>{e.removeEventListener("beforeinput",n,!1)}},[r,n]);let o=Os()?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:i,inputProps:a,descriptionProps:s,errorMessageProps:l,...u}=function(e,t){let{inputElementType:r="input",isDisabled:n=!1,isRequired:o=!1,isReadOnly:i=!1,type:a="text",validationBehavior:s="aria"}=e,[l,u]=xX(e.value,e.defaultValue||"",e.onChange),{focusableProps:c}=wr(e,t),d=EH({...e,value:l}),{isInvalid:p,validationErrors:f,validationDetails:h}=d.displayValidation,{labelProps:m,fieldProps:y,descriptionProps:g,errorMessageProps:b}=EA({...e,isInvalid:p,errorMessage:e.errorMessage||f}),v=b1(e,{labelable:!0}),w={type:a,pattern:e.pattern};return EN(t,l,u),E$(e,d,t),(0,hC.useEffect)(()=>{if(t.current instanceof b9(t.current).HTMLTextAreaElement){let e=t.current;Object.defineProperty(e,"defaultValue",{get:()=>e.value,set:()=>{},configurable:!0})}},[t]),{labelProps:m,inputProps:bF(v,"input"===r?w:void 0,{disabled:n,readOnly:i,required:o&&"native"===s,"aria-required":o&&"aria"===s||void 0,"aria-invalid":p||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(hj().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,...y}),descriptionProps:g,errorMessageProps:b,isInvalid:p,validationErrors:f,validationDetails:h}}(e,r),c=(0,hC.useRef)(null);return{inputProps:bF(a,{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:i,descriptionProps:s,errorMessageProps:l,...u}}({...O,...J,name:void 0,label:m,autoFocus:h,isDisabled:u,isReadOnly:c,isRequired:d,validate:void 0,[EK]:t,value:R,defaultValue:void 0,autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:I,type:"text",inputMode:Y,onChange:e=>{t.validate(e)&&t.setInputValue(e)},onBlur:g,onFocus:b,onFocusChange:v,onKeyDown:(0,hC.useMemo)(()=>bx(X,w),[X,w]),onKeyUp:x,description:E,errorMessage:S},t,r);EN(r,t.numberValue,t.setNumberValue);let ea=bF(U,M,en,{role:null,"aria-roledescription":vd()?null:$.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 es=e=>{var t;document.activeElement!==r.current&&("mouse"===e.pointerType?null==(t=r.current)||t.focus():e.target.focus())},el=e["aria-label"]||("string"==typeof e.label?e.label:"");el||(i=null!=e.label?er.id:e["aria-labelledby"]);let eu=bI(),ec=bI(),ed=bF(W,{"aria-label":l||$.format("increase",{fieldLabel:el}).trim(),id:i&&!l?eu:null,"aria-labelledby":i&&!l?`${eu} ${i}`:null,"aria-controls":I,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:es}),ep=bF(z,{"aria-label":s||$.format("decrease",{fieldLabel:el}).trim(),id:i&&!s?ec:null,"aria-labelledby":i&&!s?`${ec} ${i}`:null,"aria-controls":I,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:es});return{groupProps:{...G,role:"group","aria-disabled":u,"aria-invalid":Q?"true":void 0},labelProps:er,inputProps:ea,incrementButtonProps:ed,decrementButtonProps:ep,errorMessageProps:ei,descriptionProps:eo,isInvalid:Q,validationErrors:ee,validationDetails:et}}({...bH(e),label:c,validationBehavior:i},s,l),v=bU({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:b.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),w=b1(e);return delete w.id,hj().createElement(bV,{values:[[OC,s],[Ea,p],[El,{...f,ref:l}],[Sw,{...d,ref:u}],[wf,{slots:{increment:h,decrement:m}}],[wy,{slots:{description:y,errorMessage:g}}],[Sy,b]]},hj().createElement("div",{...w,...v,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-required":e.isRequired||void 0,"data-invalid":b.isInvalid||void 0}),e.name&&hj().createElement("input",{type:"hidden",name:e.name,value:isNaN(s.numberValue)?"":s.numberValue}))});function OT(e,t){return Number.parseInt(D0(e,{calendar:t.calendar,locale:t.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}let OR=(0,hC.forwardRef)(function(e,t){let{className:r}=e,n=(0,hC.useContext)(x5),o=(0,hC.useContext)(x7),i=n??o,a=(0,hC.useContext)(On),s=_S(),l=D0(i.visibleRange.start.toDate(s),{calendar:a.calendar,locale:a.baseName,day:!1,year:!1,noToday:!0}),u=OT(i.visibleRange.start.toDate(s),a),c=i.maxValue?OT(i.maxValue.toDate(s),a):void 0,d=i.minValue?OT(i.minValue.toDate(s),a):void 0,p=(0,hC.useCallback)(e=>{i.setFocusedDate(i.focusedDate.cycle("year",e-i.focusedDate.year))},[]);return i&&(0,yk.jsxs)("span",{ref:t,className:r,children:[(0,yk.jsx)("span",{children:l}),(0,yk.jsxs)(Oj,{formatOptions:{useGrouping:!1},maxValue:c,minValue:d,onChange:p,value:u,children:[(0,yk.jsx)(Eu,{}),(0,yk.jsxs)(Es,{children:[(0,yk.jsx)(wh,{slot:"increment",children:(0,yk.jsx)(y5,{size:8})}),(0,yk.jsx)(wh,{slot:"decrement",children:(0,yk.jsx)(y4,{size:8})})]})]})]})}),ON="-esm-openconceptlab__datepicker-module__inputGroup___gBam-",OA="-esm-openconceptlab__datepicker-module__inputSegment___wIJDZ",O$="-esm-openconceptlab__datepicker-module__dateInputWrapper___LiY68",OI="-esm-openconceptlab__datepicker-module__invalidText___A4cv4",OM="-esm-openconceptlab__datepicker-module__flatButton___HcpME",OL="-esm-openconceptlab__datepicker-module__flatButtonMd___eFpyF",OF="-esm-openconceptlab__datepicker-module__flatButtonSm___tsawR",OB="-esm-openconceptlab__datepicker-module__flatButtonLg___4HG5y";function OV({children:e}){let t=(0,hC.useContext)(Dt),r=(0,hC.useContext)(Dr),n=t??r,o=m5(()=>n?.close());return(0,yk.jsx)(Sm,{className:"-esm-openconceptlab__datepicker-module__dialog___DaqYi",ref:o,children:e})}let OU=(0,hC.forwardRef)(function({variant:e,today_:t,minDate:r,maxDate:n},o){let i="range"===e;return(0,yk.jsx)(S5,{ref:o,className:"-esm-openconceptlab__datepicker-module__popover___nAPzC",placement:"bottom start",offset:1,isNonModal:!0,children:(0,yk.jsx)(OV,{children:(0,yk.jsxs)(i?x8:x9,{...i?{minValue:r,maxValue:n,className:"cds--date-picker__calendar"}:{},children:[(0,yk.jsxs)("header",{className:"-esm-openconceptlab__datepicker-module__header___rPv3L",children:[(0,yk.jsx)(wh,{className:yj()(OM,OL),slot:"previous",children:(0,yk.jsx)(gn,{size:16})}),(0,yk.jsx)(OR,{className:"-esm-openconceptlab__datepicker-module__monthYear___Rw4qE"}),(0,yk.jsx)(wh,{className:yj()(OM,OL),slot:"next",children:(0,yk.jsx)(go,{size:16})})]}),(0,yk.jsx)(Et,{className:"-esm-openconceptlab__datepicker-module__calendarGrid___yKV-n",children:e=>(0,yk.jsx)(Ei,{className:yj()("cds--date-picker__day",{"-esm-openconceptlab__datepicker-module__today___KzMTn":0===t.compare(e)}),date:e},e.toString())})]})})})}),OW=(0,hC.forwardRef)(function(e,t){let r=(0,hC.useContext)(Dt),[n,o]=bz({slot:e.slot},t,Sn),{locale:i}=wC(),a=St({...n,locale:i,createCalendar:xz}),s=(0,hC.useRef)(null),{fieldProps:l,inputProps:u}=EF({...n,inputRef:s},a,o),c=(0,hC.useCallback)(()=>{a.isDisabled||r.toggle()},[]);return(0,yk.jsxs)(bV,{values:[[So,a],[El,{...u,ref:s}],[Ea,{...l,ref:o,isInvalid:a.isInvalid}]],children:[(0,yk.jsx)(Es,{...e,id:e.id,ref:t,slot:e.slot||void 0,className:e.className,isDisabled:a.isDisabled,isInvalid:a.isInvalid,onClick:c,children:a.segments.map((t,r)=>(0,hC.cloneElement)(e.children(t),{key:r}))}),(0,yk.jsx)(Eu,{})]})}),Oz=(0,hC.forwardRef)(function(e,t){let r=(0,hC.useContext)(Dt),n=(0,hC.useContext)(Dr);return(r??n).isInvalid?(0,yk.jsx)(bd,{ref:t,size:16,...e}):(0,yk.jsx)(y2,{ref:t,size:16,...e})});class OK{of(e){return this.dictionary.getStringForLocale(e,this.locale)}constructor(e,t){this.locale=e,this.dictionary=t}}let OH=new Map,OG=(0,hC.forwardRef)(function({segment:e,...t},r){let n=(0,hC.useContext)(So),o=b_(r),{segmentProps:i}=function(e,t,r){let n,o,i,a,s=(0,hC.useRef)(""),{locale:l,direction:u}=wC(),c=function(){var e;let{locale:t}=wC(),r=_L((e=Ec)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,hC.useMemo)(()=>{try{return new Intl.DisplayNames(t,{type:"dateTimeField"})}catch{return new OK(t,r)}},[t,r])}(),{ariaLabel:d,ariaLabelledBy:p,ariaDescribedBy:f,focusManager:h}=EI.get(t),m=e.isPlaceholder?"":e.text,y=(0,hC.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),g=_G({month:"long",timeZone:y.timeZone}),b=_G({hour:"numeric",hour12:y.hour12,timeZone:y.timeZone});if("month"!==e.type||e.isPlaceholder)"hour"!==e.type||e.isPlaceholder||(m=b.format(t.dateValue));else{let e=g.format(t.dateValue);m=e!==m?`${m} \u{2013} ${e}`:e}let{spinButtonProps:v}=Om({value:e.value,textValue:m,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,hC.useMemo)(()=>new Ob(l,{maximumFractionDigits:0}),[l]),x=()=>{if(e.text===e.placeholder&&h.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:E}=(n=function(e){let{locale:t}=wC(),r=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(OH.has(r))return OH.get(r);let n=new Intl.Collator(t,e);return OH.set(r,n),n}({usage:"search",sensitivity:"base"}),o=(0,hC.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===n.compare(e.slice(0,t.length),t)),[n]),i=(0,hC.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===n.compare(e.slice(-t.length),t)),[n]),a=(0,hC.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 i=e.slice(r,r+o);if(0===n.compare(t,i))return!0}return!1},[n]),(0,hC.useMemo)(()=>({startsWith:o,endsWith:i,contains:a}),[o,i,a])),S=_G({hour:"numeric",hour12:!0}),D=(0,hC.useMemo)(()=>{let e=new Date;return e.setHours(0),S.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[S]),O=(0,hC.useMemo)(()=>{let e=new Date;return e.setHours(12),S.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[S]),P=_G({year:"numeric",era:"narrow",timeZone:"UTC"}),k=(0,hC.useMemo)(()=>{if("era"!==e.type)return[];let r=_p(new w6(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:P.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},[P,t.calendar,e.type]),C=r=>{if(t.isDisabled||t.isReadOnly)return;let n=s.current+r;switch(e.type){case"dayPeriod":if(E(D,r))t.setSegment("dayPeriod",0);else if(E(O,r))t.setSegment("dayPeriod",12);else break;h.focusNext();break;case"era":{let e=k.find(e=>E(e.formatted,r));e&&(t.setSegment("era",e.era),h.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!w.isValidPartialNumber(n))return;let o=w.parse(n),i=o,a=0===e.minValue;if("hour"===e.type&&t.dateFormatter.resolvedOptions().hour12){switch(t.dateFormatter.resolvedOptions().hourCycle){case"h11":o>11&&(i=w.parse(r));break;case"h12":a=!1,o>12&&(i=w.parse(r))}void 0!==e.value&&e.value>=12&&o>1&&(o+=12)}else void 0!==e.maxValue&&o>e.maxValue&&(i=w.parse(r));if(isNaN(o))return;let l=0!==i||a;l&&t.setSegment(e.type,i),void 0!==e.maxValue&&(Number(o+"0")>e.maxValue||n.length>=String(e.maxValue).length)?(s.current="",l&&h.focusNext()):s.current=n}}};_6((0,hC.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 j=(0,hC.useRef)("");_6(r,"beforeinput",n=>{if(r.current)switch(n.preventDefault(),n.inputType){case"deleteContentBackward":case"deleteContentForward":w.isValidPartialNumber(e.text)&&!t.isReadOnly&&x();break;case"insertCompositionText":j.current=r.current.textContent,r.current.textContent=r.current.textContent;break;default:null!=n.data&&C(n.data)}}),_6(r,"input",e=>{let{inputType:t,data:n}=e;"insertCompositionText"===t&&(r.current&&(r.current.textContent=j.current),null!=n&&(E(D,n)||E(O,n))&&C(n))}),bE(()=>{let e=r.current;return()=>{document.activeElement===e&&(h.focusPrevious()||h.focusNext())}},[r,h]);let T=vd()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,hC.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])||t.isInvalid||(f=void 0);let R=bI(),N=!t.isDisabled&&!t.isReadOnly&&e.isEditable,A="literal"===e.type?"":c.of(e.type),$=_1({"aria-label":`${A}${d?`, ${d}`:""}${p?", ":""}`,"aria-labelledby":p});if("literal"===e.type)return{segmentProps:{"aria-hidden":!0}};let I={caretColor:"transparent"};if("rtl"===u){I.unicodeBidi="embed";let t=y[e.type];("numeric"===t||"2-digit"===t)&&(I.direction="ltr")}return{segmentProps:bF(v,$,{id:R,...T,"aria-invalid":t.isInvalid?"true":void 0,"aria-describedby":f,"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(hj().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&&(vl()?e.metaKey:e.ctrlKey)&&e.preventDefault(),!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey)switch(e.key){case"Backspace":case"Delete":e.preventDefault(),e.stopPropagation(),x()}},onFocus:()=>{s.current="",r.current&&xt(r.current,{containingElement:xr(r.current)});let e=window.getSelection();null==e||e.collapse(r.current)},style:I,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}(e,n,o),{focusProps:a,isFocused:s,isFocusVisible:l}=wo(),{hoverProps:u,isHovered:c}=wu({...t,isDisabled:n.isDisabled||"literal"===e.type}),d=function(e){let{className:t,style:r,children:n,defaultClassName:o,defaultChildren:i,defaultStyle:a,values:s}=e;return(0,hC.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof r?r({...s,defaultStyle:a||{}}):r,u="function"==typeof n?n({...s,defaultChildren:i}):null==n?i:n,{className:e??o,style:l||a?{...a,...l}:void 0,children:u??i,"data-rac":""}},[t,r,n,o,i,a,s])}({...t,values:{...e,isReadOnly:!e.isEditable,isInvalid:n.isInvalid,isDisabled:n.isDisabled,isHovered:c,isFocused:s,isFocusVisible:l},defaultChildren:e.text}),p=(0,hC.useCallback)(e=>{e.stopPropagation()},[]);return(0,yk.jsx)("span",{...bF(b1(t),i,a,u),...d,ref:o,style:i.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:p})}),Oq={short:!1,size:"md"},OZ=(0,hC.forwardRef)(function(e,t){let{className:r,defaultValue:n,isDisabled:o,invalid:i,invalidText:a,isInvalid:s,label:l,labelText:u,light:c,maxDate:d,minDate:p,onChange:f,onChangeRaw:h,short:m,size:y,value:g,...b}={...Oq,...e},{calendar:v,intlLocale:w,today_:x}=Oo(),E=(0,hC.useId)(),S=!!(u??l),D=(0,hC.useMemo)(()=>Da(n,v),[n,v]),O=(0,hC.useMemo)(()=>Da(g,v,!0),[g,v]),P=(0,hC.useMemo)(()=>Da(d,v),[d,v]),k=(0,hC.useMemo)(()=>Da(p??Oi,v),[p,v]),C=(0,hC.useMemo)(()=>i||s,[i,s]),j=(0,hC.useMemo)(()=>(h&&f&&console.error("An OpenmrsDatePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),h??(e=>f?.(Ds(e)))),[h,f]);return(0,yk.jsx)(Di,{locale:w.toString(),children:(0,yk.jsx)("div",{className:yj()("cds--form-item",r),children:(0,yk.jsx)(bV,{values:[[On,w]],children:(0,yk.jsxs)(Dn,{className:yj()("cds--date-picker","cds--date-picker--single",{"cds--date-picker--short":m,"cds--date-picker--light":c}),defaultValue:D,isDisabled:o,isInvalid:C,maxValue:P,minValue:k,value:O,shouldForceLeadingZeros:"en"===w.language||void 0,...b,onChange:j,children:[(0,yk.jsxs)("div",{className:"cds--date-picker-container",children:[S&&(0,yk.jsx)(S_,{className:yj()("cds--label",{"cds--label--disabled":o}),htmlFor:E,children:u??l}),(0,yk.jsxs)(Es,{className:ON,children:[(0,yk.jsx)(OW,{id:S?E:void 0,ref:t,className:yj()("cds--date-picker-input__wrapper","-esm-openconceptlab__datepicker-module__inputWrapper___uKdT1",{"-esm-openconceptlab__datepicker-module__inputWrapperSm___0RXJc":"sm"===y,"-esm-openconceptlab__datepicker-module__inputWrapperMd___4Vff1":"md"===y||!y||0===y.length,"-esm-openconceptlab__datepicker-module__inputWrapperLg___VCRm5":"lg"===y}),children:e=>"era"!==e.type?(0,yk.jsx)(OG,{className:OA,segment:e}):(0,yk.jsx)(hj().Fragment,{})}),(0,yk.jsx)(wh,{className:yj()(OM,{[OF]:"sm"===y,[OL]:"md"===y||!y||0===y.length,[OB]:"lg"===y}),children:(0,yk.jsx)(Oz,{})})]}),(0,yk.jsx)(Sg,{className:OI,children:a})]}),(0,yk.jsx)(OU,{variant:"single",today_:x})]})})})})}),OY=(0,hC.forwardRef)(function({className:e,defaultValue:t,invalid:r,invalidText:n,isDisabled:o,isInvalid:i,label:a,labelText:s,light:l,maxDate:u,minDate:c,onChange:d,onChangeRaw:p,size:f="md",value:h,...m},y){let{calendar:g,intlLocale:b,today_:v}=Oo(),w=(0,hC.useId)(),x=!!(s??a),E=(0,hC.useMemo)(()=>{if(h)return{start:Da(h[0],g,!1),end:Da(h[1],g,!1)}},[h,g]),S=(0,hC.useMemo)(()=>{if(t)return{start:Da(t[0],g,!1),end:Da(t[1],g,!1)}},[t,g]),D=(0,hC.useMemo)(()=>Da(c??Oi,g,!0),[c,g]),O=(0,hC.useMemo)(()=>Da(u,g,!0),[u,g]),P=(0,hC.useMemo)(()=>r||i,[r,i]),k=(0,hC.useMemo)(()=>(p&&d&&console.error("An OpenmrsDateRangePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),p??(e=>d?.([Ds(e.start),Ds(e.end)]))),[p,d]);return(0,yk.jsx)(Di,{locale:b.toString(),children:(0,yk.jsx)("div",{className:yj()("cds--form-item",e),children:(0,yk.jsx)(bV,{values:[[On,b]],children:(0,yk.jsx)(Do,{id:x?w:void 0,className:yj()("cds--date-picker",{"cds--date-picker--light":l,"cds--date-picker--disabled":o}),isInvalid:P,shouldForceLeadingZeros:"en"===b.language||void 0,maxValue:O,minValue:D,value:E,defaultValue:S,ref:y,isDisabled:o,...m,onChange:k,children:(0,yk.jsxs)("div",{className:"cds--date-picker-container",children:[x&&(0,yk.jsx)(S_,{className:yj()("cds--label",{"cds--label--disabled":o}),htmlFor:w,children:s??a}),(0,yk.jsxs)(Es,{className:ON,children:[(0,yk.jsxs)("div",{className:yj()("-esm-openconceptlab__datepicker-module__inputsWrapper___xXRQI",{"-esm-openconceptlab__datepicker-module__inputsWrapperSm___nL+b6":"sm"===f,"-esm-openconceptlab__datepicker-module__inputsWrapperMd___Kgcps":"md"===f||!f||0===f.length,"-esm-openconceptlab__datepicker-module__inputsWrapperLg___raaSN":"lg"===f}),children:[(0,yk.jsx)(Sa,{className:yj()("cds--date-picker-input__wrapper","-esm-openconceptlab__datepicker-module__startInput___cWw-5",O$),slot:"start",children:e=>(0,yk.jsx)(OG,{className:OA,segment:e})}),(0,yk.jsx)("div",{className:"-esm-openconceptlab__datepicker-module__separator___Ddb4g",children:(0,yk.jsx)("span",{"aria-hidden":"true","data-readonly":!0,children:"–"})}),(0,yk.jsx)(Sa,{className:yj()("cds--date-picker-input__wrapper","-esm-openconceptlab__datepicker-module__endInput___xdYOl",O$),slot:"end",children:e=>(0,yk.jsx)(OG,{className:OA,segment:e})})]}),(0,yk.jsx)(wh,{className:yj()(OM,{[OF]:"sm"===f,[OL]:"md"===f||!f||0===f.length,[OB]:"lg"===f}),children:(0,yk.jsx)(Oz,{})})]}),(0,yk.jsx)(Sg,{className:OI,children:n}),(0,yk.jsx)(OU,{variant:"range",today_:v,minDate:D,maxDate:O})]})})})})})}),OJ=({diagnoses:e})=>{let{diagnosisTags:t}=mk({externalModuleName:"@openmrs/esm-styleguide"});return(0,yk.jsx)("div",{className:"-esm-openconceptlab__diagnosis-tags-module__container___1iigI",children:e.map(e=>{let{rank:r,uuid:n,display:o}=e,i=t[1===r?"primaryColor":"secondaryColor"];return(0,yk.jsx)(y$.vwO,{type:i,children:o},n)})})},OX={action:"-esm-openconceptlab__empty-card-module__action___oG778",content:"-esm-openconceptlab__empty-card-module__content___YUXvR",desktopHeading:"-esm-openconceptlab__empty-card-module__desktopHeading___EljiH",tabletHeading:"-esm-openconceptlab__empty-card-module__tabletHeading___8mc7w",tile:"-esm-openconceptlab__empty-card-module__tile___3-rRO"},OQ=({width:e="64",height:t="64"})=>(0,yk.jsx)("svg",{width:e,height:t,viewBox:"0 0 64 64",children:(0,yk.jsx)("use",{href:"#omrs-empty-data-illustration"})}),O0=e=>{let t="tablet"===m1(),r=e.launchForm;return(0,yk.jsx)(y$.Wdr,{className:OX.layer,children:(0,yk.jsxs)(y$.FAs,{className:OX.tile,children:[(0,yk.jsx)("div",{className:t?OX.tabletHeading:OX.desktopHeading,children:(0,yk.jsx)("h4",{children:e.headerTitle})}),(0,yk.jsx)(OQ,{}),(0,yk.jsx)("p",{className:OX.content,children:sf("emptyStateText","There are no {{displayText}} to display",{displayText:e.displayText})}),(0,yk.jsx)("p",{className:OX.action,children:r&&(0,yk.jsx)(y$.$nd,{onClick:()=>r(),kind:"ghost",size:t?"lg":"sm",children:sf("recordNewEntry","Record {{ displayText }}",{displayText:e.displayText})})})]})})},O1=({error:e,headerTitle:t})=>{let r="tablet"===m1();return(0,yk.jsx)(y$.Wdr,{children:(0,yk.jsxs)(y$.FAs,{className:"-esm-openconceptlab__error-state-module__tile___mzWLn",children:[(0,yk.jsx)("div",{className:r?"-esm-openconceptlab__error-state-module__tabletHeading___l7Cpn":"-esm-openconceptlab__error-state-module__desktopHeading___p57fl",children:(0,yk.jsx)("h4",{children:t})}),(0,yk.jsxs)("p",{className:"-esm-openconceptlab__error-state-module__errorMessage___0fU6v",children:[sf("error","Error")," ",`${e?.response?.status}: `,e?.response?.statusText]}),(0,yk.jsx)("p",{className:"-esm-openconceptlab__error-state-module__errorCopy___xkVog",children:sf("errorCopy")})]})})},O2=O1,O4=hj().forwardRef((e,t)=>{let{slotName:r,basePath:n,componentContext:o,state:i}=m3(),a=window.location??{pathname:""},s=hz(r??"");return e.isChildOfHeader&&r&&s.length>0?(0,yk.jsxs)(y$.f8J,{"aria-label":sf("leftNavigation","Left navigation"),className:"-esm-openconceptlab__left-nav-module__leftNav___czP9T",expanded:!0,isFixedNav:!0,ref:t,...e,children:[(0,yk.jsx)(hG,{name:"global-nav-menu-slot"}),r?(0,yk.jsx)(mb,{value:o,fallback:(0,yk.jsx)(hG,{name:r,state:{basePath:n,currentPath:a,...i}}),children:(0,yk.jsx)(hT.Provider,{value:o,children:(0,yk.jsx)(hG,{name:r,state:{basePath:n,currentPath:a,...i}})})}):null]}):null}),O3=({selectedLocationUuid:e,defaultLocationUuid:t,locationTag:r,locationsPerRequest:n=50,onChange:o})=>{let[i,a]=(0,hC.useState)(""),s=(0,hC.useId)(),{location:l}=function(e){let t=e?`/ws/fhir2/R4/Location?_id=${e}`:null,{data:r,error:n,isLoading:o}=mN()(t,af,{shouldRetryOnError:e=>!!e?.response?.status&&e.response.status>=500});return(0,hC.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:p,error:f,setPage:h}=function(e,t=0,r=""){let n=mT(r),{data:o,isLoading:i,isValidating:a,setSize:s,error:l}=mG()(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 i=`${ac}/Location?`,a=new URLSearchParams;return a.append("_summary","data"),t&&a.append("_count",""+t),r&&a.append("_getpagesoffset",""+r*t),e&&a.append("_tag",e),"string"==typeof n&&""!==n&&a.append("name:contains",n),i+a.toString()},af);return(0,hC.useMemo)(()=>({locations:o?.length?o?.flatMap(e=>e?.data?.entry??[]):[],isLoading:i,totalResults:o?.[0]?.data?.total,hasMore:!!o?.length&&o?.[o.length-1]?.data?.link?.some(e=>"next"===e.relation),loadingNewData:a,error:l||null,setPage:s}),[i,o,a,s,l])}(r,n,i),m=(0,hC.useMemo)(()=>l&&!i&&t?[l,...u.filter(({resource:e})=>e.id!==t)]:u??[],[l,u,t,i]),y=(0,hC.useCallback)(e=>{o(),a(e.trim())},[o]),g=m7((0,hC.useCallback)(()=>{!p&&d&&h(e=>e+1)},[p,d,h])),b=d?Math.max(0,Math.floor(m.length-n/2)):-1;return(0,yk.jsxs)(yk.Fragment,{children:[(0,yk.jsx)(y$.vji,{"aria-describedby":f?`${s}-error`:void 0,labelText:sf("searchForLocation"),id:s,placeholder:sf("searchForLocation"),onChange:e=>y(e.target.value),size:"lg"}),f&&(0,yk.jsx)("div",{className:"-esm-openconceptlab__location-picker-module__errorNotification___NfvTe",id:`${s}-error`,children:(0,yk.jsx)(y$.jeF,{kind:"error",subtitle:sf("errorLoadingLoginLocations","Unable to load login locations. Please try again or contact support if the problem persists."),title:sf("error","Error")})}),(0,yk.jsx)("div",{className:"-esm-openconceptlab__location-picker-module__searchResults___agplm",children:c?(0,yk.jsx)("div",{className:"-esm-openconceptlab__location-picker-module__loadingContainer___EHghS",children:Array.from({length:5}).map((e,t)=>(0,yk.jsx)(y$.Psq,{className:"-esm-openconceptlab__location-picker-module__radioButtonSkeleton___up5rH",role:"progressbar"},t))}):(0,yk.jsxs)(yk.Fragment,{children:[(0,yk.jsx)("div",{className:"-esm-openconceptlab__location-picker-module__locationResultsContainer___06YOS",children:m.length>0?(0,yk.jsx)(y$.zWQ,{name:"loginLocations",onChange:e=>{o(e?.toString())},orientation:"vertical",valueSelected:e,children:m.map((e,t)=>(0,yk.jsx)(y$.aaP,{className:"-esm-openconceptlab__location-picker-module__locationRadioButton___yKif7",id:e.resource.id,labelText:(0,yk.jsx)("span",{ref:t===b?g:null,children:e.resource.name}),name:e.resource.name,value:e.resource.id},e.resource.id))}):(0,yk.jsx)("div",{className:"-esm-openconceptlab__location-picker-module__emptyState___cPWp8",children:(0,yk.jsx)("p",{className:"-esm-openconceptlab__location-picker-module__locationNotFound___b14++",children:sf("noResultsToDisplay")})})}),p&&(0,yk.jsx)("div",{className:"-esm-openconceptlab__location-picker-module__loadingIcon___GVlrq",children:(0,yk.jsx)(y$.OuH,{description:sf("loading")})})]})})]})},O6=q("modalState",{modalContainer:null,modalStack:[]}),O5=0;async function O7(e,t,r={}){let n=ha(t),o=null;if(e){if(!n)throw Error(`No modal named '${t}' has been registered.`);let{load:i}=n,a=await i(),s=O5++;o=await hD({...a,name:`${t}-${s}`},{...r,domElement:e})}else $(`Failed to launch modal. Please notify your administrator. Modal name: ${t}`);return o}function O9(e){return"TO_BE_DELETED"===e.state||"DELETED"===e.state}function O8(e,t){t?.unmount&&(t.unmountPromise?.catch(()=>{}),t.unmount().catch(t=>{console.error(`The modal '${e}' failed to unmount`,t)}))}function Pe(e){return e.find(e=>!O9(e))}function Pt(e,t){e.container&&(e.container.style.visibility=t?"unset":"hidden")}let Pr=window.getComputedStyle(document.body).overflow;function Pn({modalStack:e,modalContainer:t}){if(t)if(e.length){t.style.visibility||(addEventListener("keydown",Pi),document.body.style.overflow="hidden",t.style.visibility="unset");let r=Pe(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",O7(r,e.modalName,e.props).then(n=>{O9(e)?O8(e.modalName,n):n?(e.parcel=n,t.prepend(r),Pt(e,Pe(O6.getState().modalStack)===e),n.mountPromise.then(()=>{O9(e)||(e.state="MOUNTED")},t=>{$(t),e.parcel=null,Po(e)})):Po(e)},t=>{$(t),Po(e)});break}case"MOUNTING":case"MOUNTED":Pt(e,e===r);break;case"TO_BE_DELETED":e.state="DELETED",e.onClose(),O8(e.modalName,e.parcel),e.container?.remove(),setTimeout(()=>{let t=O6.getState();O6.setState({...t,modalStack:t.modalStack.filter(t=>t!==e)})},0)}})}else t.style.removeProperty("visibility"),document.body.style.overflow=Pr,removeEventListener("keydown",Pi)}function Po(e){if(O9(e))return;e.state="TO_BE_DELETED";let t=O6.getState();O6.setState({...t,modalStack:[...t.modalStack]})}function Pi(e){"Escape"===e.key&&function(){let[e]=O6.getState().modalStack;e&&Po(e)}()}function Pa(e){O6.subscribe(Pn),O6.setState({...O6.getState(),modalContainer:e})}function Ps(e,t={},r=()=>{}){let n=()=>{let e=O6.getState().modalStack.find(e=>e.onClose===r);e&&Po(e)};if(ha(e)){var o;let i,a;o={state:"NEW",onClose:r,modalName:e,props:{close:n,...t}},a=[o,...(i=O6.getState()).modalStack],O6.setState({...i,modalStack:a})}else $(`Failed to launch modal. Please notify your administrator. Modal name: "${e}"`);return n}let Pl=({notification:e})=>{let{description:t,action:r,kind:n,critical:o,title:i,onAction:a}=e;return(0,yk.jsx)(y$.kZS,{actionButtonLabel:r,kind:n||"info",lowContrast:o,subtitle:t,title:i||"",inline:!0,onActionButtonClick:a})},Pu=({subject:e})=>{let[t,r]=(0,hC.useState)([]);return(0,hC.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,yk.jsx)(yk.Fragment,{children:t.map(e=>(0,yk.jsx)(Pl,{notification:e},e.id))})},Pc=({notification:e})=>{let{actionButtonLabel:t,onActionButtonClick:r=()=>{},subtitle:n,kind:o,title:i,critical:a,progressActionLabel:s,id:l,...u}=e,[c,d]=(0,hC.useState)(t);return(0,yk.jsx)(y$.kZS,{kind:o||"info",actionButtonLabel:c,ariaLabel:sf("closesActionableNotification","Closes actionable notification"),onActionButtonClick:()=>{r(),s&&d(s)},statusIconDescription:sf("actionableNotification","Actionable notification"),subtitle:n,title:i,lowContrast:a,inline:!0,...u})},Pd=({subject:e})=>{let[t,r]=(0,hC.useState)([]);return(0,hC.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,yk.jsx)(yk.Fragment,{children:t.map(e=>(0,yk.jsx)(Pc,{notification:e},e.id))})};var Pp=Object.prototype.hasOwnProperty;let Pf=function(e){if(null==e)return!0;if(tw(e)&&(tb(e)||"string"==typeof e||"function"==typeof e.splice||tS(e)||tR(e)||tg(e)))return!e.length;var t=rj(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(td(e))return!rc(e).length;for(var r in e)if(Pp.call(e,r))return!1;return!0},Ph=new ep.Subject,Pm=0,Py=new ep.Subject,Pg=0;function Pb(e){e&&(0,hq.createRoot)(e).render((0,yk.jsx)(Pu,{subject:Ph}))}function Pv(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&(t instanceof Error||!Pf(t)))?(e.description instanceof Error&&(e.description=e.description.toLocaleString()),setTimeout(()=>{Ph.next({...e,id:Pm++})},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function Pw(e){e&&(0,hq.createRoot)(e).render((0,yk.jsx)(Pd,{subject:Py}))}function P_(e){var t;e&&("string"==typeof(t=e.actionButtonLabel)?t.trim().length>0:"object"==typeof t&&!Pf(t))?setTimeout(()=>{Py.next({...e,id:Pg++})},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}let Px=["NORMAL","HIGH","CRITICALLY_HIGH","OFF_SCALE_HIGH","LOW","CRITICALLY_LOW","OFF_SCALE_LOW"],PE=["critically_low","critically_high","high","low","normal","off_scale_low","off_scale_high"],PS={container:"-esm-openconceptlab__numeric-observation-module__container___gS0Wg",card:"-esm-openconceptlab__numeric-observation-module__card___w0fF5","abnormal-value":"-esm-openconceptlab__numeric-observation-module__abnormal-value___xuX3W","critical-value":"-esm-openconceptlab__numeric-observation-module__critical-value___Jynsn",cell:"-esm-openconceptlab__numeric-observation-module__cell___tMhBJ","critically-high":"-esm-openconceptlab__numeric-observation-module__critically-high___3L2wx","critically-low":"-esm-openconceptlab__numeric-observation-module__critically-low___XP+HX",high:"-esm-openconceptlab__numeric-observation-module__high___JV9do",low:"-esm-openconceptlab__numeric-observation-module__low___-uDKD","label-container":"-esm-openconceptlab__numeric-observation-module__label-container___vTf2y","value-container":"-esm-openconceptlab__numeric-observation-module__value-container___xTUIC",label:"-esm-openconceptlab__numeric-observation-module__label___-pfmb",value:"-esm-openconceptlab__numeric-observation-module__value___1A4zt",units:"-esm-openconceptlab__numeric-observation-module__units___SzvX+","pad-right":"-esm-openconceptlab__numeric-observation-module__pad-right___ND9XL","off-scale-low":"-esm-openconceptlab__numeric-observation-module__off-scale-low___gFAv9","off-scale-high":"-esm-openconceptlab__numeric-observation-module__off-scale-high___aSEmX",arrow:"-esm-openconceptlab__numeric-observation-module__arrow___9bvsX"},PD=({value:e,unit:t,label:r,interpretation:n,referenceRange:o,conceptUuid:i,variant:a="card",patientUuid:s})=>{let l=(0,hC.useId)(),{referenceRange:u,isLoading:c}=function(e,t){let r=null;e&&(r=t?`${au}/conceptreferencerange/?patient=${t}&concept=${e}&v=full`:`${au}/conceptreferencerange/?concept=${e}&v=full`);let{data:n,error:o,isLoading:i}=mN()(r,af),a=n?.data?.results?.[0];return{referenceRange:a?{hiNormal:a.hiNormal??null,hiAbsolute:a.hiAbsolute??null,hiCritical:a.hiCritical??null,lowNormal:a.lowNormal??null,lowAbsolute:a.lowAbsolute??null,lowCritical:a.lowCritical??null}:void 0,error:o,isLoading:i}}(o||n?void 0:i,s),d=o??u,p=(0,hC.useMemo)(()=>{if(n)return n?"--"===n?"normal":Px.includes(n)?n.toLowerCase():PE.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",f="critically_low"===p||"critically_high"===p||"off_scale_low"===p||"off_scale_high"===p,h="normal"!==p,m=r?`omrs-numeric-obs-label-${r.replaceAll(/\s+/g,"-").toLowerCase()}-${l}`:void 0,y=`omrs-numeric-obs-value-${l}`,g=`omrs-numeric-obs-unit-${l}`,b=null!=e&&""!==e,v=b?e:sf("notAvailable","Not available"),w=yj()({[PS["critically-low"]]:"critically_low"===p||"off_scale_low"===p,[PS["critically-high"]]:"critically_high"===p||"off_scale_high"===p,[PS.low]:"low"===p,[PS.high]:"high"===p,[PS["off-scale-low"]]:"off_scale_low"===p,[PS["off-scale-high"]]:"off_scale_high"===p}),x=yj()({[PS.container]:!0,[PS.card]:!0,[PS["critical-value"]]:f,[PS["abnormal-value"]]:h&&!f}),E=yj()({[PS.cell]:!0,[w]:!0});return"cell"===a?(0,yk.jsxs)("div",{className:E,children:[v,b&&t?` ${t}`:""]}):(0,yk.jsxs)("section",{className:x,"data-testid":"numeric-observation-card",children:[r&&(0,yk.jsxs)("div",{className:PS["label-container"],children:[(0,yk.jsx)("span",{id:m,className:PS.label,children:r}),h&&(0,yk.jsx)("span",{className:PS[p.replace("_","-")],title:sf("abnormalValue","Abnormal value")})]}),(0,yk.jsxs)("div",{className:PS["value-container"],children:[(0,yk.jsx)("span",{id:y,"aria-labelledby":m&&g?`${m} ${g}`:m||g||void 0,className:PS.value,children:v}),b&&t&&(0,yk.jsx)("span",{id:g,className:PS.units,children:t})]})]})},PO="-esm-openconceptlab__page-header-module__pageHeader___6TOjO",PP=e=>{if("children"in e){let{children:t,className:r,...n}=e;return(0,yk.jsx)("div",{className:yj()(PO,r),...n,children:t})}{let{title:t,illustration:r,className:n,...o}=e;return(0,yk.jsx)("div",{className:yj()(PO,n),...o,children:(0,yk.jsx)(Pk,{title:t,illustration:r})})}},Pk=({title:e,illustration:t,className:r})=>{let[n,o]=(0,hC.useState)(null);return(0,hC.useEffect)(()=>{n9("@openmrs/esm-styleguide").then(e=>{o(e)})},[]),(0,yk.jsxs)("div",{className:yj()("-esm-openconceptlab__page-header-module__pageHeaderContent___mCImT",r),children:[t,(0,yk.jsxs)("div",{className:"-esm-openconceptlab__page-header-module__pageLabels___kqDS+",children:[n?.implementationName&&(0,yk.jsx)("p",{children:sf(n.implementationName)}),(0,yk.jsx)("p",{className:"-esm-openconceptlab__page-header-module__pageName___SbZBC",children:e})]})]})},PC=({totalItems:e,pageSize:t,onPageNumberChange:r,pageNumber:n,dashboardLinkUrl:o,currentItems:i,dashboardLinkLabel:a})=>{let{pageSizes:s,pageItemsCount:l}=ye(t,e,n,i),u="tablet"===m1(),c=sf("paginationItemsCount","{{pageItemsCount}} / {{totalItems}} items",{totalItems:e,pageItemsCount:l});return(0,yk.jsx)(yk.Fragment,{children:e>0&&(0,yk.jsxs)("div",{className:yj()({"-esm-openconceptlab__pagination-module__tablet___82gj1":u,"-esm-openconceptlab__pagination-module__desktop___6yI8e":!u}),children:[(0,yk.jsxs)("div",{children:[c,o&&(0,yk.jsx)(hR,{to:o,className:"-esm-openconceptlab__pagination-module__configurableLink___oIqma",children:a??sf("seeAll","See all")})]}),(0,yk.jsx)(y$.dKS,{className:"-esm-openconceptlab__pagination-module__pagination___A-Lcg",page:n,pageSize:t,pageSizes:s,totalItems:e,onChange:r,pageRangeText:(e,t)=>sf("paginationOfPages","of {{count}} pages",{count:t}),size:u?"lg":"sm"})]})})};function Pj(e){return PR(PA(e,"usual","official"))}function PT(e){return Pj(e)}function PR(e){var t;let r;return e?e.text??(r=(t=e).given??[],(t.family?r.concat(t.family):r).join(" ")):""}function PN(e){return PR(e)}function PA(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 P$(e,t=yl()()){let r=yl()(t),n=D5(e,r);if(null==n)return null;let o=r.diff(n,"hours"),i=r.diff(n,"days"),a=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(i<2)u.hours=o;else if(a<4)u.days=i;else if(l<1){let e=r.subtract(a,"weeks").diff(n,"days");u.weeks=a,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 PI(e,t=yl()()){let r=P$(e,t);if(null==r)return null;let n={style:"short",localeMatcher:"lookup"};return"minutes"in r&&0===r.minutes&&(n.minutesDisplay="always"),D6(r,n)}let PM={container:"-esm-openconceptlab__patient-banner-patient-info-module__container___iC32K",activePatientContainer:"-esm-openconceptlab__patient-banner-patient-info-module__activePatientContainer___OoDPd",patientBanner:"-esm-openconceptlab__patient-banner-patient-info-module__patientBanner___swajU",patientName:"-esm-openconceptlab__patient-banner-patient-info-module__patientName___+2+Xi",patientAvatar:"-esm-openconceptlab__patient-banner-patient-info-module__patientAvatar___Rdf75",patientAvatarButton:"-esm-openconceptlab__patient-banner-patient-info-module__patientAvatarButton___A1q8c",patientInfo:"-esm-openconceptlab__patient-banner-patient-info-module__patientInfo___L-cOQ",demographics:"-esm-openconceptlab__patient-banner-patient-info-module__demographics___IDhb0",row:"-esm-openconceptlab__patient-banner-patient-info-module__row___TP7gU",flexRow:"-esm-openconceptlab__patient-banner-patient-info-module__flexRow___vNMt2",tagsSlot:"-esm-openconceptlab__patient-banner-patient-info-module__tagsSlot___0Dvjn",identifiers:"-esm-openconceptlab__patient-banner-patient-info-module__identifiers___d3GTJ",identifier:"-esm-openconceptlab__patient-banner-patient-info-module__identifier___kc6eq",primaryIdentifier:"-esm-openconceptlab__patient-banner-patient-info-module__primaryIdentifier___ZxRUU",secondaryIdentifier:"-esm-openconceptlab__patient-banner-patient-info-module__secondaryIdentifier___eQh8x",value:"-esm-openconceptlab__patient-banner-patient-info-module__value___CoAOR",tag:"-esm-openconceptlab__patient-banner-patient-info-module__tag___InccN",gender:"-esm-openconceptlab__patient-banner-patient-info-module__gender___vfinx",separator:"-esm-openconceptlab__patient-banner-patient-info-module__separator___3OIBl",tooltipPadding:"-esm-openconceptlab__patient-banner-patient-info-module__tooltipPadding___hBqWG",tooltipSmallText:"-esm-openconceptlab__patient-banner-patient-info-module__tooltipSmallText___bPnkq",actionsButtonText:"-esm-openconceptlab__patient-banner-patient-info-module__actionsButtonText___VNvm7"};function PL({showIdentifierLabel:e,type:t,value:r}){return(0,yk.jsx)("span",{className:PM.primaryIdentifier,children:(0,yk.jsxs)(y$.vwO,{className:PM.tag,type:"gray",children:[e&&t?.text&&(0,yk.jsxs)("span",{className:PM.label,children:[t.text,": "]}),(0,yk.jsx)("span",{className:PM.value,children:r})]})})}function PF({showIdentifierLabel:e,type:t,value:r}){return(0,yk.jsxs)(y$.lRv,{className:PM.secondaryIdentifier,id:`patient-banner-identifier-${r}`,children:[e&&(0,yk.jsxs)("span",{className:PM.label,children:[t?.text,": "]}),(0,yk.jsx)("span",{className:PM.value,children:r})]})}function PB({identifiers:e,showIdentifierLabel:t}){let{excludePatientIdentifierCodeTypes:r}=mk(),{primaryIdentifierCode:n}=yn(),o=e?.filter(e=>{let t=e.type?.coding?.[0]?.code;return t&&!r?.uuids.includes(t)})??[];return(0,yk.jsx)(yk.Fragment,{children:o?.length?o.map(({value:e,type:r},i)=>(0,yk.jsxs)(hj().Fragment,{children:[(0,yk.jsx)("span",{className:PM.identifier,children:r?.coding?.[0]?.code===n?(0,yk.jsx)(PL,{showIdentifierLabel:t,type:r,value:e}):(0,yk.jsx)(PF,{showIdentifierLabel:t,type:r,value:e})}),i<o.length-1&&(0,yk.jsx)("span",{className:PM.separator,children:"\xb7"})]},e)):""})}let PV={Female:gy,Male:gg,Other:gb,Unknown:gv},PU=({gender:e})=>{let t=PV[e];return t?(0,yk.jsx)(t,{fill:"#525252"}):null},PW={male:"Male",female:"Female",other:"Other",unknown:"Unknown"};function Pz({patient:e,renderedFrom:t}){var r;let n,o,i=Pj(e),a=e?.gender&&(o=PW[n=(r=e.gender).toLowerCase()]??"Unknown",{displayText:sf(n,r),iconKey:o}),s=(0,hC.useMemo)(()=>({patientUuid:e.id,patient:e,renderedFrom:t}),[e.id,e,t]);return(0,yk.jsxs)("div",{className:PM.patientInfo,children:[(0,yk.jsx)("div",{className:yj()(PM.row,PM.patientNameRow),children:(0,yk.jsxs)("div",{className:PM.flexRow,children:[(0,yk.jsx)("span",{className:PM.patientName,children:i}),a&&(0,yk.jsxs)("div",{className:PM.gender,children:[(0,yk.jsx)(PU,{gender:a.iconKey}),(0,yk.jsx)("span",{children:a.displayText})]}),(0,yk.jsx)(hG,{className:PM.tagsSlot,name:"patient-banner-tags-slot",state:s})]})}),(0,yk.jsxs)("div",{className:PM.demographics,children:[e.birthDate&&(0,yk.jsxs)(yk.Fragment,{children:[(0,yk.jsx)("span",{children:PI(e.birthDate)}),(0,yk.jsx)("span",{className:PM.separator,children:"\xb7"}),(0,yk.jsx)("span",{children:DQ(e.birthDate,{time:!1})}),(0,yk.jsx)("span",{className:PM.separator,children:"\xb7"})]}),(0,yk.jsx)(PB,{identifiers:e.identifier,showIdentifierLabel:!0}),(0,yk.jsx)(hG,{className:PM.extensionSlot,name:"patient-banner-bottom-slot",state:s})]})]})}var PK=r(8282);function PH({patient:e,patientUuid:t,actionsSlotName:r,additionalActionsSlotState:n}){let[o,i]=(0,hC.useState)(!1),{extensions:a}=hK(r),s="tablet"===m1(),l=m5(()=>i(!1),o),u=(0,hC.useRef)(null),c=(0,hC.useRef)(null),d=(0,hC.useId)(),p=`patient-actions-menu-trigger-${d}`,f=`patient-actions-menu-${d}`,h=(0,hC.useCallback)(()=>i(e=>!e),[]),m=(0,hC.useCallback)(()=>{i(!1),u.current?.focus()},[]),y=(0,hC.useCallback)(e=>{if("Escape"===e.key&&o){e.stopPropagation(),m();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),i=o<0?t.length-1:o>=t.length?0:o;t[i]?.focus()}},[m,o]);(0,hC.useEffect)(()=>{if(o&&c.current){let e=c.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[o]);let g=(0,hC.useMemo)(()=>({patientUuid:t,patient:e,closeMenu:m,...n}),[t,e,m,n]);return 0===a.length?null:(0,yk.jsx)("div",{className:"-esm-openconceptlab__patient-banner-actions-menu-module__overflowMenuContainer___FbFcO",children:(0,yk.jsxs)("div",{"data-overflow-menu":!0,className:yj()("cds--overflow-menu",yL),ref:l,children:[(0,yk.jsxs)("button",{className:yj()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":o},yV),"aria-controls":f,"aria-expanded":o,"aria-haspopup":"true",id:p,onClick:h,onKeyDown:y,ref:u,children:[(0,yk.jsx)("span",{className:"-esm-openconceptlab__patient-banner-actions-menu-module__actionsButtonText___hk4xW",children:sf("actions","Actions")})," ",(0,yk.jsx)(PK.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}})]}),(0,yk.jsxs)("div",{className:yj()("cds--overflow-menu-options","cds--overflow-menu--flip",yF,{[yB]:o}),"aria-labelledby":p,"data-floating-menu-direction":"bottom",id:f,onKeyDown:y,ref:c,role:"menu",tabIndex:-1,children:[(0,yk.jsx)("ul",{className:yj()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":s}),children:(0,yk.jsx)(hG,{name:r,state:g},r)}),(0,yk.jsx)("span",{})]})]})})}var PG=r(5570),Pq=r.n(PG);function PZ(e){let{patientPhotoConceptUuid:t}=mk({externalModuleName:"@openmrs/esm-styleguide"}),r=t?`${au}/obs?patient=${e}&concept=${t}&v=full`:null,{data:n,error:o,isLoading:i}=me()(e?r:null,af),a=n?.data?.results[0];return{data:a?{dateTime:a?.obsDatetime,imageSrc:a?.value?.links?.uri}:null,error:o,isLoading:i}}let PY=({width:e=56,height:t=56,"aria-label":r})=>{let{t:n}=(0,h9.useTranslation)();return(0,yk.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,yk.jsx)("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),(0,yk.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"})]})},PJ="-esm-openconceptlab__patient-photo-module__avatar___thboZ";function PX({patientUuid:e,patientName:t,alt:r}){let{data:n,isLoading:o}=PZ(e),[i,a]=(0,hC.useState)(null),[s,l]=(0,hC.useState)(!1),u=(0,hC.useMemo)(()=>Pq().generate(e),[e]);(0,hC.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||(a(e),l(!1))},r.onerror=()=>{t||(a(null),l(!1))},r.src=e,()=>{t=!0}}a(null),l(!1)},[n?.imageSrc]);let c=(0,hC.useMemo)(()=>r||(i?sf("patientPhotoAlt","Profile photo of {{patientName}}",{patientName:t}):sf("patientAvatarAlt","Avatar for {{patientName}}",{patientName:t})),[r,i,t]);return o||s?(0,yk.jsx)(y$.ryE,{className:"-esm-openconceptlab__patient-photo-module__skeleton___WWtyX","data-testid":"skeleton-icon"}):n?.imageSrc&&!i?(0,yk.jsx)(PY,{"aria-label":sf("patientPhotoPlaceholder","Photo placeholder for {{patientName}}",{patientName:t})}):i?(0,yk.jsx)("div",{"aria-label":c,children:(0,yk.jsx)("img",{className:PJ,src:i,alt:c,title:t})}):(0,yk.jsx)("div",{"aria-label":c,children:(0,yk.jsx)("div",{className:PJ,title:t,style:{backgroundImage:u.toDataUrl(),backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:(0,yk.jsx)("span",{className:"-esm-openconceptlab__patient-photo-module__initials___xLeEF",children:function(e,t=3){return e.split(/\s+/).filter(Boolean).slice(0,t).map(e=>e[0]).join("")}(t)})})})}let PQ=["omrs-pict-appointments","omrs-pict-assessment-1","omrs-pict-assessment-2","omrs-pict-blood-bank","omrs-pict-cardiology","omrs-pict-ct-scan","omrs-pict-dentistry","omrs-pict-digital-trust","omrs-pict-emergency-department","omrs-pict-facility","omrs-pict-geriatrics","omrs-pict-gynaecology","omrs-pict-in-patient","omrs-pict-laboratory","omrs-pict-labs-2","omrs-pict-obstetrics","omrs-pict-patient-search","omrs-pict-patients","omrs-pict-payments-desk","omrs-pict-pharmacy","omrs-pict-pharmacy-2","omrs-pict-registration","omrs-pict-service-queues","omrs-pict-stock-management","omrs-pict-transfer","omrs-pict-triage","omrs-pict-x-ray"],P0=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(k_,{ref:t,pictogram:"omrs-pict-appointments",pictogramProps:e})})),P1=P0,P2=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(k_,{ref:t,pictogram:"omrs-pict-assessment-1",pictogramProps:e})})),P4=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(k_,{ref:t,pictogram:"omrs-pict-assessment-2",pictogramProps:e})})),P3=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(k_,{ref:t,pictogram:"omrs-pict-blood-bank",pictogramProps:e})})),P6=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(k_,{ref:t,pictogram:"omrs-pict-cardiology",pictogramProps:e})})),P5=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(k_,{ref:t,pictogram:"omrs-pict-ct-scan",pictogramProps:e})})),P7=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(k_,{ref:t,pictogram:"omrs-pict-dentistry",pictogramProps:e})})),P9=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(k_,{ref:t,pictogram:"omrs-pict-digital-trust",pictogramProps:e})})),P8=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(k_,{ref:t,pictogram:"omrs-pict-emergency-department",pictogramProps:e})})),ke=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(k_,{ref:t,pictogram:"omrs-pict-facility",pictogramProps:e})})),kt=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(k_,{ref:t,pictogram:"omrs-pict-geriatrics",pictogramProps:e})})),kr=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(k_,{ref:t,pictogram:"omrs-pict-gynaecology",pictogramProps:e})})),kn=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(k_,{ref:t,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),ko=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(k_,{ref:t,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),ki=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(k_,{ref:t,pictogram:"omrs-pict-labs-2",pictogramProps:e})})),ka=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(k_,{ref:t,pictogram:"omrs-pict-obstetrics",pictogramProps:e})})),ks=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(k_,{ref:t,pictogram:"omrs-pict-patient-search",pictogramProps:e})})),kl=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(k_,{ref:t,pictogram:"omrs-pict-patients",pictogramProps:e})})),ku=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(k_,{ref:t,pictogram:"omrs-pict-payments-desk",pictogramProps:e})})),kc=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(k_,{ref:t,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),kd=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(k_,{ref:t,pictogram:"omrs-pict-pharmacy-2",pictogramProps:e})})),kp=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(k_,{ref:t,pictogram:"omrs-pict-registration",pictogramProps:e})})),kf=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(k_,{ref:t,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),kh=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(k_,{ref:t,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),km=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(k_,{ref:t,pictogram:"omrs-pict-transfer",pictogramProps:e})})),ky=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(k_,{ref:t,pictogram:"omrs-pict-triage",pictogramProps:e})})),kg=(0,hC.memo)((0,hC.forwardRef)(function(e,t){return(0,yk.jsx)(k_,{ref:t,pictogram:"omrs-pict-x-ray",pictogramProps:e})})),kb=ke,kv=kl,kw=(0,hC.memo)((0,hC.forwardRef)(function({pictogram:e,fallback:t,...r},n){let o=(0,hC.useRef)(document.getElementById(e));return(0,hC.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,yk.jsx)(mb,{value:o.current,fallback:t,children:(0,yk.jsx)(k_,{ref:n,pictogram:e,pictogramProps:r})})})),k_=(0,hC.memo)((0,hC.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,yk.jsx)("svg",{ref:r,className:yj()("-esm-openconceptlab__pictograms-module__pictogram___ooPKM",n),height:o,width:o,children:(0,yk.jsx)("use",{href:`#${e}`})})})),kx=({children:e})=>"tablet"===m1()?(0,yk.jsx)(y$.Wdr,{children:e}):(0,yk.jsx)(yk.Fragment,{children:e}),kE=({snackbar:e,closeSnackbar:t})=>{let{actionButtonLabel:r="",kind:n="success",onActionButtonClick:o=()=>{},isLowContrast:i="error"!==n,progressActionLabel:a,subtitle:s="",timeoutInMs:l=5e3,autoClose:u="error"!==n,title:c,id:d,...p}=e,[f,h]=(0,hC.useState)(r),[m,y]=(0,hC.useState)(!0),[g,b]=(0,hC.useState)(!1),v=(0,hC.useCallback)(()=>{setTimeout(t,250)},[t]),w=(0,hC.useCallback)(()=>{b(!0),v()},[v]);return(0,hC.useEffect)(()=>{if(u){let e=setTimeout(w,l);return()=>clearTimeout(e)}},[l,u,w]),(0,hC.useEffect)(()=>{y(!1),window.setTimeout(()=>{y(!0)},0)},[]),(0,yk.jsx)(y$.kZS,{actionButtonLabel:f,"aria-label":sf("closeSnackbar","Close snackbar"),className:yj()("-esm-openconceptlab__snackbar-module__slideIn___senVE",{"-esm-openconceptlab__snackbar-module__animated___8eltL":m,"-esm-openconceptlab__snackbar-module__slideOut___BIIXm":g}),kind:n,lowContrast:i,onActionButtonClick:()=>{o(),w(),a&&h(a)},onClose:v,statusIconDescription:sf("snackbarNotification","Snackbar notification"),subtitle:s,title:c,...p})},kS=({subject:e})=>{let[t,r]=(0,hC.useState)([]),n=(0,hC.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]);return(0,hC.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,yk.jsx)(yk.Fragment,{children:t.map(e=>(0,yk.jsx)(kE,{snackbar:e,closeSnackbar:()=>n(e)},e.id))})},kD=new ep.Subject,kO=0;function kP(e){e&&(0,hq.createRoot)(e).render((0,yk.jsx)(kS,{subject:kD}))}function kk(e){var t;e&&"string"==typeof(t=e.title)&&t.trim().length>0?setTimeout(()=>{kD.next({...e,id:kO++})},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}let kC=({toast:e,closeToast:t})=>{let{description:r,kind:n,critical:o,title:i,actionButtonLabel:a,onActionButtonClick:s=()=>{}}=e,l=(0,hC.useCallback)(()=>{s(),t()},[t,s]);return(0,yk.jsx)("div",{children:(0,yk.jsx)(y$.kZS,{actionButtonLabel:a,kind:n||"info",lowContrast:o,subtitle:r,title:i||"",onActionButtonClick:l,onClose:t})})},kj=({subject:e})=>{let[t,r]=(0,hC.useState)([]),n=(0,hC.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]);return(0,hC.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,yk.jsx)(yk.Fragment,{children:t.map(e=>(0,yk.jsx)(kC,{toast:e,closeToast:()=>n(e)},e.id))})},kT=new ep.Subject,kR=0;function kN(e){e&&(0,hq.createRoot)(e).render((0,yk.jsx)(kj,{subject:kT}))}function kA(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!Pf(t))?setTimeout(()=>{kT.next({...e,id:kR++})},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}function k$(e,t=!1){if(t)return!0;let r=kB[e];return!r||!r()}function kI(e,t){let r=kq.getState()?.workspaceGroup,n=r?.name;n&&e===n&&kX(()=>{let n=k4(e);n&&(n.setState({},!0),n.subscribe(()=>{})()),"function"==typeof r?.cleanup&&r.cleanup(),kq.setState(e=>({...e,workspaceGroup:void 0})),"function"==typeof t&&t()},n?e=>e.currentWorkspaceGroup===n:()=>!0)}function kM(e,t){let{name:r,additionalProps:n}=t;hp(r);let o=()=>{kK(e.name,{ignoreChanges:!0,onWorkspaceClose:()=>kL(r,n),closeWorkspaceGroup:!1})};k$(e.name)?o():k0("closing-workspace-launching-new-workspace",o,e.title??e.name)}function kL(e,t){let r=hp(e),n=kq.getState().workspaceGroup;if(n&&!n.members?.includes(e))return void kI(n.name,()=>{kL(e,t)});let o=kq.getState().workspaceGroup?.name,i={...r,title:k1(r,t),closeWorkspace:(t={})=>kK(e,t),closeWorkspaceWithSavedChanges:t=>kK(e,{ignoreChanges:!0,...t}),promptBeforeClosing:t=>{var r,n;return r=e,n=t,void(kB[r]=n)},setTitle:(t,r)=>{i.title=t,i.titleNode=r,kq.setState(t=>{let r=t.openWorkspaces.map(t=>t.name===e?i:t);return{...t,openWorkspaces:r}})},currentWorkspaceGroup:o,additionalProps:t??{}};function a(e,t){kq.setState(r=>{let n=[e,...t??r.openWorkspaces],o=kJ(e);return{...r,openWorkspaces:n,workspaceWindowState:o}})}o&&k4(o,t);let s=kq.getState().openWorkspaces,l=s.findIndex(t=>t.name===e),u=s.find(e=>e.type==i.type);if(0===s.length)a(i);else if(s[0].canHide||0===l)if(l>=0){let t=s[l];a({...t,additionalProps:i.additionalProps,...t.title===k1(t,t.additionalProps)&&{title:k1(i,i.additionalProps)}},s.filter(t=>t.name!=e))}else u?(a(u,kq.getState().openWorkspaces.filter(e=>e.type!=i.type)),kM(u,{name:e,additionalProps:t})):a(i);else kM(s[0],{name:e,additionalProps:t})}function kF({targetUrl:e,contextKey:t,workspaceName:r,additionalProps:n}){kH(t),kL(r,n),i8({to:e})}let kB={};function kV(e,t){kB[e]=t}function kU(e){return kB[e]}function kW(){let e=kq.getState();kq.setState({...e,prompt:null})}let kz={ignoreChanges:!1,onWorkspaceClose:()=>{},closeWorkspaceGroup:!0};function kK(e,t={}){t={...kz,...t};let r=()=>{let r=kq.getState();r.openWorkspaces.find(t=>t.name===e);let n=r.openWorkspaces.filter(t=>t.name!=e),o=kq.getState().workspaceGroup?.name;o&&t.closeWorkspaceGroup&&kI(o),kB[e]=()=>!1,kq.setState(e=>({...e,prompt:null,openWorkspaces:n,workspaceWindowState:kJ(n?.[0])})),t?.onWorkspaceClose?.()};return k$(e,t?.ignoreChanges)?(r(),!0):(k0("closing-workspace",r,hp(e).title??e),!1)}function kH(e){kq.getState().context!=e&&kq.setState({context:e,openWorkspaces:[],prompt:null})}let kG={context:"",openWorkspaces:[],prompt:null,workspaceWindowState:"normal",workspaceGroup:void 0},kq=q("workspace",kG);function kZ(){return kq}function kY(e){let t=kq.getState();kq.setState({...t,workspaceWindowState:e})}function kJ(e){return e?.preferredWindowSize??"normal"}function kX(e=()=>{},t=()=>!0){let r=kq.getState().openWorkspaces.filter(t).every(({name:e})=>k$(e)),n=()=>{k2(),e?.()};r?n():k0("closing-all-workspaces",n)}function kQ(){let{workspaceWindowState:e,openWorkspaces:t,prompt:r,workspaceGroup:n}=hM(kq);return(0,hC.useMemo)(()=>({active:t.length>0,prompt:r,workspaceWindowState:e,workspaces:t,workspaceGroup:n}),[t,e,r,n])}function k0(e,t=()=>{},r=""){let n;switch(e){case"closing-workspace":n={title:sf("unsavedChangesTitleText","Unsaved changes"),body:sf("unsavedChangesInOpenedWorkspace","You may have unsaved changes in the opened workspace. Do you want to discard these changes?"),onConfirm:()=>{t?.()},confirmText:sf("discard","Discard")};break;case"closing-all-workspaces":{let e=kq.getState().openWorkspaces.filter(({name:e})=>!k$(e)).map(({title:e},t)=>`${t+1}. ${e}`);n={title:sf("closingAllWorkspacesPromptTitle","You have unsaved changes"),body:sf("closingAllWorkspacesPromptBody","There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",{workspaceNames:e.join(",")}),onConfirm:()=>{t?.()},confirmText:sf("closeAllOpenedWorkspaces","Discard changes in {{count}} workspaces",{count:e.length})};break}case"closing-workspace-launching-new-workspace":n={title:sf("unsavedChangesTitleText","Unsaved changes"),body:sf("unsavedChangesInWorkspace",'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',{workspaceName:r}),onConfirm:()=>{kq.setState(e=>({...e,prompt:null})),t?.()},confirmText:sf("openAnyway","Open anyway")};break;default:console.error(`Workspace system trying to open unknown prompt type "${e}" in function "showWorkspacePrompts"`),t?.();return}kq.setState(e=>({...e,prompt:n}))}function k1(e,t){return t?.workspaceTitle??e.title}function k2(){kq.setState(kG)}function k4(e,t={}){if(!e||"default"===e)return;let r=Y(e,{});return t&&r.setState(e=>({...e,...t})),r}let k3="-esm-openconceptlab__action-menu-button-module__container___F68g0",k6="-esm-openconceptlab__action-menu-button-module__elementContainer___D1ACn",k5="-esm-openconceptlab__action-menu-button-module__active___HAE75";function k7({getIcon:e,formOpenInTheBackground:t,tagContent:r}){return(0,yk.jsxs)(yk.Fragment,{children:[e({size:16}),t?(0,yk.jsx)("span",{className:"-esm-openconceptlab__action-menu-button-module__interruptedTag___CQ2Xs",children:"!"}):(0,yk.jsx)("span",{className:"-esm-openconceptlab__action-menu-button-module__countTag___3mn9k",children:r})]})}let k9=({getIcon:e,label:t,iconDescription:r,handler:n,type:o,tagContent:i})=>{let a=m1(),{workspaces:s,workspaceWindowState:l}=kQ(),u=s?.findIndex(({type:e})=>e===o)??-1,c="hidden"!==l&&0===u,d=u>0||0===u&&"hidden"===l;return"tablet"===a||"phone"===a?(0,yk.jsxs)(y$.$nd,{className:yj()(k3,{[k5]:c}),iconDescription:r,kind:"ghost",onClick:n,role:"button",tabIndex:0,size:"md",children:[(0,yk.jsx)("span",{className:k6,children:(0,yk.jsx)(k7,{formOpenInTheBackground:d,getIcon:e,tagContent:i})}),(0,yk.jsx)("span",{children:t})]}):(0,yk.jsx)(y$.K0,{align:"left","aria-label":r,className:yj()(k3,{[k5]:c}),enterDelayMs:300,kind:"ghost",label:t,onClick:n,size:"md",children:(0,yk.jsx)("div",{className:k6,children:(0,yk.jsx)(k7,{formOpenInTheBackground:d,getIcon:e,tagContent:i})})})};var k8=r(4240),Ce=r(8622),Ct=/[\\^$.*+?()[\]{}|]/g,Cr=RegExp(Ct.source);let Cn=function(e){return(e=na(e))&&Cr.test(e)?e.replace(Ct,"\\$&"):e};function Co({contextKey:e}){let{prompt:t}=kQ();return(0,hC.useEffect)(()=>{RegExp(`/${Cn(e)}(/|$)`).test(window.location.pathname)||console.warn(`WorkspaceContainer has provided an invalid context key: "${e}". The context key must be part of the URL path, with no initial or trailing slash.`)},[]),(0,hC.useEffect)(()=>(kH(e),()=>{kH(null)}),[e]),(0,hC.useEffect)(()=>{let t=t=>{let{detail:{cancelNavigation:r,newUrl:n}}=t,o=RegExp(`/${Cn(e)}(/|$)`),i=new URL(n),a=o.test(i.pathname),s=kq.getState().openWorkspaces.every(({name:e})=>k$(e));a||(s?k2():(r?.(),kX(()=>{i8({to:n})})))};return window.addEventListener("single-spa:before-routing-event",t),()=>{window.removeEventListener("single-spa:before-routing-event",t)}},[]),null!=t?(0,yk.jsxs)(y$.KXP,{open:!0,onClose:kW,children:[(0,yk.jsx)(y$.rQ0,{title:t.title}),(0,yk.jsx)(y$.cwr,{children:(0,yk.jsx)("p",{className:"-esm-openconceptlab__workspace-notification-module__messageBody___dkytJ",children:t.body})}),(0,yk.jsxs)(y$.jlY,{children:[(0,yk.jsx)(y$.$nd,{kind:"secondary",onClick:kW,children:t.cancelText??sf("cancel")}),(0,yk.jsx)(y$.$nd,{kind:"danger",onClick:t.onConfirm,children:t.confirmText??sf("confirm")})]})]}):null}function Ci(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 Ca(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ci(Object(r),!0).forEach(function(t){Cl(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ci(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Cs(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 Cl(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cu(e){return(Cu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Cc(e,t){return(Cc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Cd(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Cp=function(e){var t=hC.Component;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");a.prototype=Object.create(t&&t.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),t&&Cc(a,t);var r,n,o,i=(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=Cu(a);e=r?Reflect.construct(t,arguments,Cu(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 Cd(this)});function a(e){var t;if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,a),Cl(Cd(t=i.call(this,e)),"handleRef",function(e){t.el=e}),Cl(Cd(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}))}),Cl(Cd(t),"getParcelProps",function(){var e=Ca(Ca({},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,Ca({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 h0&&h0.Consumer?hC.createElement(h0.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):null;var t=h0&&h0.Consumer?hC.createElement(h0.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):void 0;return hC.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},t)}}],Cs(a.prototype,n),o&&Cs(a,o),a}();Cl(Cp,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});function Cf({workspace:e,additionalPropsFromPage:t}){let[r,n]=(0,hC.useState)(),o=function(e){let[t,r]=(0,hC.useState)({}),[n,o]=(0,hC.useState)(e);return(0,hC.useEffect)(()=>{n!==e&&o(e)},[e]),(0,hC.useEffect)(()=>{let e,t=k4(n);return t&&(r(t.getState()),e=t.subscribe(r)),()=>{t&&e?.()}},[n]),t}(e.currentWorkspaceGroup);(0,hC.useEffect)(()=>{let t=!0;return e.load().then(e=>{t&&n(e)}),()=>{t=!1}},[e]);let i=(0,hC.useMemo)(()=>e&&{closeWorkspace:e.closeWorkspace,closeWorkspaceWithSavedChanges:e.closeWorkspaceWithSavedChanges,promptBeforeClosing:e.promptBeforeClosing,setTitle:e.setTitle,...t,...o,...e.additionalProps},[e,t,o]);return r?(0,yk.jsx)(Cp,{config:r,mountParcel:hP,...i},e.name):(0,yk.jsx)(y$.OuH,{className:"-esm-openconceptlab__workspace-module__loader___jEP+q",description:`${sf("loading","Loading")} ...`})}function Ch({isWithinWorkspace:e,name:t,actionMenuProps:r={}}){let[n,o]=(0,hC.useState)(!1),i=(0,hC.useRef)(window.innerHeight),{featureName:a}=(0,hC.useContext)(hT),s=m1();(0,hC.useEffect)(()=>{let e=()=>{o(!m2(s)&&i.current>window.innerHeight),i.current!=window.innerHeight&&(i.current=window.innerHeight)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[i]);let l=`action-menu-${t&&"default"!=t?t:a}-items-slot`;return(0,yk.jsx)("aside",{className:yj()("-esm-openconceptlab__action-menu-module__sideRail___iVmKs",{"-esm-openconceptlab__action-menu-module__withinWorkspace___YZfet":e,"-esm-openconceptlab__action-menu-module__sideRailHidden___bCdyQ":n,"-esm-openconceptlab__action-menu-module__sideRailVisible___+oJCY":!n}),children:(0,yk.jsx)("div",{className:"-esm-openconceptlab__action-menu-module__container___sf6Et",children:(0,yk.jsx)(hG,{className:"-esm-openconceptlab__action-menu-module__chartExtensions___l+r+Y",name:l,state:r})})})}function Cm({contextKey:e,overlay:t,showSiderailAndBottomNav:r,additionalWorkspaceProps:n,actionMenuProps:o}){let i=m1(),{workspaces:a,workspaceWindowState:s,workspaceGroup:l}=kQ(),u=l?.name,c=a[0],d="hidden"===s||null==c,p=c?.width??(t?"wider":"narrow"),f=(0,hC.useMemo)(()=>r||u&&!d,[u,d,r]);return mD(!d&&!m2(i)),(0,yk.jsxs)(yk.Fragment,{children:[(0,yk.jsxs)("div",{className:r?"-esm-openconceptlab__workspace-module__workspaceContainerWithActionMenu___kZRyN":"-esm-openconceptlab__workspace-module__workspaceContainerWithoutActionMenu___1OJIb",children:[(0,yk.jsx)("aside",{className:yj()(t?"-esm-openconceptlab__workspace-module__workspaceOverlayOuterContainer___8RiIj":"-esm-openconceptlab__workspace-module__workspaceWindowSpacer___F1W-O",{"-esm-openconceptlab__workspace-module__hiddenRelative___7oRNR":d,"-esm-openconceptlab__workspace-module__narrowWorkspace___R3CN9":"narrow"===p,"-esm-openconceptlab__workspace-module__widerWorkspace___L-pDK":"wider"===p,"-esm-openconceptlab__workspace-module__extraWideWorkspace___D50Zj":"extra-wide"===p}),children:(0,yk.jsx)("div",{className:yj()("-esm-openconceptlab__workspace-module__workspaceFixedContainer___9E2Or",{"-esm-openconceptlab__workspace-module__maximizedWindow___d+PZ5":"maximized"===s,"-esm-openconceptlab__workspace-module__hiddenFixed___kBFgl":d}),children:a.map((e,t)=>(0,yk.jsx)("div",{className:yj()("-esm-openconceptlab__workspace-module__workspaceInnerContainer___VEPNB",{"-esm-openconceptlab__workspace-module__hiddenExtraWorkspace___E7d4h":0!==t}),children:(0,yk.jsx)(hC.Suspense,{fallback:null,children:(0,yk.jsx)(h9.I18nextProvider,{i18n:window.i18next,defaultNS:e.moduleName,children:(0,yk.jsx)(Cy,{workspaceInstance:e,additionalWorkspaceProps:n})})})},`workspace-container-${e?e.name:`empty-${t}`}`))})}),(0,yk.jsx)(Co,{contextKey:e})]}),f&&(0,yk.jsx)(Ch,{name:u,isWithinWorkspace:!r,actionMenuProps:o})]})}function Cy({workspaceInstance:e,additionalWorkspaceProps:t}){let{t:r}=(0,h9.useTranslation)(),n=m1(),{workspaceWindowState:o,workspaceGroup:i}=kQ(),a=i?.name,s="maximized"===o;(0,hC.useEffect)(()=>{let t=r(e.title);t!==e.title&&e.setTitle(t)},[e.title,r,e.setTitle]);let{featureName:l}=(0,hC.useContext)(hT),u=(0,hC.useCallback)(()=>{kY(s?"normal":"maximized")},[s]),{canHide:c=!1,canMaximize:d=!1,currentWorkspaceGroup:p="",closeWorkspace:f}=(0,hC.useMemo)(()=>e??{},[e]),h=(0,hC.useMemo)(()=>({...t,...e?.additionalProps}),[t,e]);return e&&(0,yk.jsxs)(yk.Fragment,{children:[(0,yk.jsxs)(y$.Y9Y,{"aria-label":sf("workspaceHeader","Workspace Header"),className:"-esm-openconceptlab__workspace-module__header___nMH1R",children:[!m2(n)&&!c&&(0,yk.jsx)(y$.dJ2,{"aria-label":sf("close","Close"),renderMenuIcon:(0,yk.jsx)(yJ,{}),onClick:()=>f()}),(0,yk.jsx)(y$.bCw,{prefix:"",children:e.titleNode??r(e.title)}),(0,yk.jsx)("div",{className:"-esm-openconceptlab__workspace-module__overlayHeaderSpacer___vxoMd"}),(0,yk.jsxs)(y$.wdv,{className:"-esm-openconceptlab__workspace-module__headerButtons___lek95",children:[(0,yk.jsx)(hG,{name:`workspace-header-group-${e.currentWorkspaceGroup}-slot`,state:h}),(0,yk.jsx)(hG,{name:`workspace-header-type-${e.type}-slot`,state:h}),(0,yk.jsx)(hG,{name:`workspace-header-${l}-slot`,state:h}),m2(n)&&(0,yk.jsxs)(yk.Fragment,{children:[(d||s)&&(0,yk.jsx)(y$.V8d,{"aria-label":s?sf("minimize","Minimize"):sf("maximize","Maximize"),onClick:u,children:s?(0,yk.jsx)(k8.Xj,{}):(0,yk.jsx)(k8.hz,{})}),c&&!a?(0,yk.jsx)(y$.V8d,{"aria-label":sf("hide","Hide"),onClick:()=>kY("hidden"),children:(0,yk.jsx)(yX,{})}):(0,yk.jsx)(y$.V8d,{"aria-label":sf("close","Close"),onClick:()=>f?.(),children:(0,yk.jsx)(ga,{})})]}),"tablet"===n&&c&&(0,yk.jsx)(y$.V8d,{"aria-label":sf("close","Close"),onClick:()=>f?.(),children:(0,yk.jsx)(Ce.d3,{})})]})]}),(0,yk.jsx)("div",{className:yj()("-esm-openconceptlab__workspace-module__workspaceContent___FFe+u",{"-esm-openconceptlab__workspace-module__marginWorkspaceContent___SEV31":!!p}),children:(0,yk.jsx)(Cf,{workspace:e,additionalPropsFromPage:t},e.name)})]})}async function Cg(e,t){let{openedGroup:r}=hh.getState();if(r){if(r.groupName===e&&Cw(r.props,t))return!0;else if(!await C_({reason:"CLOSE_WORKSPACE_GROUP",explicit:!1}))return!1}return hh.setState(r=>({...r,openedGroup:{groupName:e,props:t},openedWindows:[]})),!0}async function Cb(e){let{openedGroup:t,openedWindows:r}=hh.getState();if(t){if(r.length>0&&!(e||await C_({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})))return!1;hh.setState(e=>({...e,openedGroup:null,openedWindows:[]}))}return!0}async function Cv(e,t=null,r=null,n=null){let o=hh.getState();if(!o.registeredWorkspacesByName[e])throw Error(`Unable to launch workspace ${e}. Workspace is not registered`);let i=hm(e);if(!i)throw Error(`Unable to launch workspace ${e}. Workspace is not registered to a workspace window`);let{openedGroup:a}=o,{name:s}=i,l=hy(s);if(!l)throw Error(`Unable to launch workspace ${e}. Workspace window ${i.name} is not registered to a workspace group`);let u=hg(e);if(a&&(a.groupName!==l.name||!Cw(a.props,n)))return!!await C_({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})&&(hh.setState({...o,openedGroup:{groupName:l.name,props:n},openedWindows:[{windowName:s,openedWorkspaces:[CO(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0);if(u>=0){let n=o.openedWindows[u],i=o.openedGroup?.props??{},a=o.isMostRecentlyOpenedWindowHidden,{openedWorkspaces:c}=n;if(Cw(n.props,r)){let d=c.find(t=>t.workspaceName===e);return d&&Cw(d.props,t)?((a||u!==o.openedWindows.length-1)&&hh.setState(Cx.restoreWindow(o,s)),!0):!!await C_({reason:"CLOSE_WORKSPACE",explicit:!1,windowName:s,workspaceName:e})&&(hh.setState({...o,openedGroup:{groupName:l.name,props:o?.openedGroup?.props??i},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[CO(e,t)],props:n?.props??r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return!!await C_({reason:"CLOSE_WINDOW",explicit:!1,windowName:s})&&(hh.setState({...o,openedGroup:{groupName:l.name,props:i??o?.openedGroup?.props},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[CO(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return"closable"!=l.persistence?(hh.setState({...o,openedGroup:{groupName:l.name,props:n??o?.openedGroup?.props??null},openedWindows:[...o.openedWindows,{windowName:s,openedWorkspaces:[CO(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0):!!await C_({reason:"CLOSE_OTHER_WINDOWS",explicit:!1,windowNameToSpare:i.name})&&(hh.setState({...o,openedGroup:{groupName:l.name,props:n??o?.openedGroup?.props??null},openedWindows:[{windowName:s,openedWorkspaces:[CO(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}function Cw(e,t){return null==e||null==t||L(e,t)}function C_(e){function t(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}let{openedWindows:r,workspaceTitleByWorkspaceName:n}=hh.getState(),o=[];switch(e.reason){case"CLOSE_WORKSPACE_GROUP":o=r.flatMap(e=>t(e));break;case"CLOSE_WINDOW":{let n=r.find(t=>t.windowName===e.windowName);if(!n)throw Error(`Window ${e.windowName} not found in opened windows.`);o=t(n);break}case"CLOSE_WORKSPACE":{let n=r.find(t=>t.windowName===e.windowName);if(!n)throw Error(`Window ${e.windowName} not found in opened windows.`);o=t(n,e.workspaceName);break}case"CLOSE_OTHER_WINDOWS":o=r.filter(t=>t.windowName!==e.windowNameToSpare).flatMap(e=>t(e))}return 0===o.length?Promise.resolve(!0):new Promise(e=>{let t=Ps("workspace2-close-prompt",{size:"sm",onConfirm:()=>{t(),e(!0)},onCancel:()=>{t(),e(!1)},affectedWorkspaceTitles:o.map(e=>n[e.workspaceName])})})}let Cx={setWindowMaximized(e,t,r){let n=e.openedWindows.findIndex(e=>e.windowName===t),o=[...e.openedWindows],i={...o[n],maximized:r};return o[n]=i,{...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=hg(t);if(r<0)return e;let n={...e.openedWindows[r]},o=n.openedWorkspaces.findIndex(e=>e.workspaceName===t),i=[...e.openedWindows];n.openedWorkspaces=n.openedWorkspaces.slice(0,o);let a=e.isMostRecentlyOpenedWindowHidden;if(0===n.openedWorkspaces.length){let t=r===e.openedWindows.length-1;i.splice(r,1),t&&i.length>0&&(a=!1)}else i[r]=n;return{...e,openedWindows:i,isMostRecentlyOpenedWindowHidden:a}},openChildWorkspace(e,t,r,n){let o=e.registeredWorkspacesByName[r];if(!o)throw Error(`No workspace named "${r}" registered`);let i=e.registeredWorkspacesByName[t];if(!i)throw Error(`No workspace named "${t}" registered`);if(i.window!==o.window)throw Error(`Child workspace ${r} does not belong to the same workspace window as parent workspace ${t}`);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{openedWorkspaces:s}=e.openedWindows[a],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{openedWindows:e.openedWindows.map((e,t)=>t==a?{...e,openedWorkspaces:[...u,CO(r,n)]}:e)}},setHasUnsavedChanges(e,t,r){let n=hg(t);if(n<0)return e;let o={...e.openedWindows[n]},i=o.openedWorkspaces.findIndex(e=>e.workspaceName===t);if(i<0)return e;o.openedWorkspaces[i]={...o.openedWorkspaces[i],hasUnsavedChanges:r};let a=[...e.openedWindows];return a[n]=o,{...e,openedWindows:a}},setWorkspaceTitle(e,t,r){let n={...e.workspaceTitleByWorkspaceName};return null===r?delete n[t]:n[t]=r,{...e,workspaceTitleByWorkspaceName:n}}};function CE(){return hL(hh,Cx)}let CS=()=>(0,hC.useContext)(h0),CD=()=>Object.keys(hh.getState().registeredWorkspacesByName);function CO(e,t){return{workspaceName:e,props:t??{},hasUnsavedChanges:!1,uuid:d8()}}let CP={workspaceOuterContainer:"-esm-openconceptlab__workspace2-module__workspaceOuterContainer___jaqGm",narrowWorkspace:"-esm-openconceptlab__workspace2-module__narrowWorkspace___o1wsL",widerWorkspace:"-esm-openconceptlab__workspace2-module__widerWorkspace___gdEOi",extraWideWorkspace:"-esm-openconceptlab__workspace2-module__extraWideWorkspace___U9xlJ",workspaceMiddleContainer:"-esm-openconceptlab__workspace2-module__workspaceMiddleContainer___0AdtX",maximized:"-esm-openconceptlab__workspace2-module__maximized___aKCbE",hidden:"-esm-openconceptlab__workspace2-module__hidden___n1US5",workspaceInnerContainer:"-esm-openconceptlab__workspace2-module__workspaceInnerContainer___1g+qk",workspaceSpacer:"-esm-openconceptlab__workspace2-module__workspaceSpacer___P2T9y",loader:"-esm-openconceptlab__workspace2-module__loader___fCfzZ",hiddenExtraWorkspace:"-esm-openconceptlab__workspace2-module__hiddenExtraWorkspace___hvPSi",header:"-esm-openconceptlab__workspace2-module__header___MXXx9",headerButtons:"-esm-openconceptlab__workspace2-module__headerButtons___sJdnC",workspaceContent:"-esm-openconceptlab__workspace2-module__workspaceContent___6NuXT",overlayHeaderSpacer:"-esm-openconceptlab__workspace2-module__overlayHeaderSpacer___PLO6T",isActionMenuOpened:"-esm-openconceptlab__workspace2-module__isActionMenuOpened___X3Vj6",showActionMenu:"-esm-openconceptlab__workspace2-module__showActionMenu___HSun1",marginWorkspaceContent:"-esm-openconceptlab__workspace2-module__marginWorkspaceContent___DCfWz",workspaceContainerWithActionMenu:"-esm-openconceptlab__workspace2-module__workspaceContainerWithActionMenu___G9MdI",workspaceFixedContainer:"-esm-openconceptlab__workspace2-module__workspaceFixedContainer___uIldI",workspaceContainerWithoutActionMenu:"-esm-openconceptlab__workspace2-module__workspaceContainerWithoutActionMenu___lBudZ"},Ck=({title:e,children:t,hasUnsavedChanges:r=!1})=>{let n=m1(),{setWindowMaximized:o,hideWindow:i,setHasUnsavedChanges:a,openedWindows:s,openedGroup:l,registeredGroupsByName:u,registeredWindowsByName:c,registeredWorkspacesByName:d,workspaceTitleByWorkspaceName:p,setWorkspaceTitle:f,isMostRecentlyOpenedWindowHidden:h}=CE(),{workspaceName:m,isRootWorkspace:y,closeWorkspace:g,showActionMenu:b}=CS(),v=hg(m),w=s[v],x=w?.openedWorkspaces.find(e=>e.workspaceName===m);if((0,hC.useEffect)(()=>{x?.hasUnsavedChanges!=r&&a(m,r??!1)},[x?.hasUnsavedChanges,r,m,a]),(0,hC.useEffect)(()=>{p[m]!==e&&f(m,e)},[p,m,e,f]),v<0||null==l||null==x)return null;let E=u[l.groupName];if(!E)throw Error(`Cannot find registered workspace group ${l.groupName}`);let S=d[m].window,D=c[S];if(!D)throw Error(`Cannot find registered workspace window ${S}`);let{icon:O,canMaximize:P}=D,k="closable"===E.persistence,C=!!O&&!k,{maximized:j}=w,T=D?.width??"narrow",R=Object.values(c).some(e=>e.group===l.groupName&&void 0!==e.icon),N=v<s.length-1||h;return(0,yk.jsxs)("div",{className:yj()(CP.workspaceOuterContainer,{[CP.narrowWorkspace]:"narrow"===T,[CP.widerWorkspace]:"wider"===T,[CP.extraWideWorkspace]:"extra-wide"===T,[CP.isActionMenuOpened]:R}),children:[(0,yk.jsx)("div",{className:yj()(CP.workspaceSpacer,{[CP.hidden]:N})}),(0,yk.jsx)("div",{className:yj()(CP.workspaceMiddleContainer,{[CP.maximized]:j,[CP.hidden]:N,[CP.isRootWorkspace]:y,[CP.showActionMenu]:b}),children:(0,yk.jsxs)("div",{className:yj()(CP.workspaceInnerContainer,{[CP.maximized]:j,[CP.hidden]:N,[CP.isRootWorkspace]:y}),children:[(0,yk.jsxs)(y$.Y9Y,{"aria-label":sf("workspaceHeader"),className:CP.header,children:[(0,yk.jsx)(y$.bCw,{prefix:"",children:e}),(0,yk.jsx)("div",{className:CP.overlayHeaderSpacer}),(0,yk.jsx)(y$.wdv,{className:CP.headerButtons,children:m2(n)?(0,yk.jsxs)(yk.Fragment,{children:[(P||j)&&(0,yk.jsx)(y$.V8d,{"aria-label":j?sf("minimize"):sf("maximize"),onClick:()=>o(S,!j),children:j?(0,yk.jsx)(k8.Xj,{}):(0,yk.jsx)(k8.hz,{})}),C&&(0,yk.jsx)(y$.V8d,{"aria-label":sf("hide"),onClick:()=>i(),children:(0,yk.jsx)(yX,{})}),!k&&(0,yk.jsx)(y$.V8d,{"aria-label":sf("close"),onClick:()=>g({closeWindow:!0}),children:(0,yk.jsx)(ga,{})})]}):(0,yk.jsxs)(yk.Fragment,{children:[C&&(0,yk.jsx)(y$.V8d,{"aria-label":sf("hide"),onClick:()=>i(),children:(0,yk.jsx)(Ce.d3,{})}),(0,yk.jsx)(y$.V8d,{"aria-label":sf("close"),onClick:()=>{k?Cb():g({closeWindow:!0})},children:(0,yk.jsx)(ga,{})})]})})]}),(0,yk.jsx)("div",{className:yj()(CP.workspaceContent),children:t})]})})]})},CC="-esm-openconceptlab__action-menu-button2-module__container___pahg-",Cj="-esm-openconceptlab__action-menu-button2-module__elementContainer___PzOdc",CT="-esm-openconceptlab__action-menu-button2-module__active___4O4Bs",CR="-esm-openconceptlab__action-menu-button2-module__focused___+k5kD";function CN({getIcon:e,hasUnsavedChanges:t,tagContent:r}){return(0,yk.jsxs)(yk.Fragment,{children:[e({size:16}),t?(0,yk.jsx)("span",{className:"-esm-openconceptlab__action-menu-button2-module__interruptedTag___mS2yr",children:"!"}):(0,yk.jsx)("span",{className:"-esm-openconceptlab__action-menu-button2-module__countTag___rb5CW",children:r})]})}let CA=({icon:e,label:t,tagContent:r,workspaceToLaunch:n,onBeforeWorkspaceLaunch:o})=>{let i=m1(),{openedWindows:a,restoreWindow:s,hideWindow:l,isMostRecentlyOpenedWindowHidden:u}=CE(),{extension:c}=(0,hC.useContext)(hT),d=a.findIndex(e=>e.windowName===c?.extensionId),p=a[d],f=null!=p,h=f&&(d<a.length-1||u),m=f&&!h,y=p?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,g=async()=>{if(f)h?s(p.windowName):l();else if(await (o?.()??!0)){let{workspaceName:e,workspaceProps:t,windowProps:r}=n;Cv(e,t,r)}};return"tablet"===i||"phone"===i?(0,yk.jsxs)(y$.$nd,{className:yj()(CC,{[CT]:f&&!m,[CR]:m}),iconDescription:t,kind:"ghost",onClick:g,role:"button",tabIndex:0,size:"md",children:[(0,yk.jsx)("span",{className:Cj,children:(0,yk.jsx)(CN,{hasUnsavedChanges:y,getIcon:e,tagContent:r})}),(0,yk.jsx)("span",{children:t})]}):(0,yk.jsx)(y$.K0,{align:"left","aria-label":t,className:yj()(CC,{[CT]:f&&!m,[CR]:m}),enterDelayMs:300,kind:"ghost",label:t,onClick:g,size:"md",children:(0,yk.jsx)("div",{className:Cj,children:(0,yk.jsx)(CN,{hasUnsavedChanges:y,getIcon:e,tagContent:r})})})};function C$({showContactDetails:e,toggleContactDetails:t,className:r}){return(0,yk.jsx)(y$.$nd,{className:r,iconDescription:"Toggle contact details",kind:"ghost",onClick:t,renderIcon:e?gi:gr,children:e?sf("showLess","Show less"):sf("showMore","Show more")})}let CI={contactDetails:"-esm-openconceptlab__patient-banner-contact-details-module__contactDetails___rhdjA",deceased:"-esm-openconceptlab__patient-banner-contact-details-module__deceased___K4NPg",heading:"-esm-openconceptlab__patient-banner-contact-details-module__heading___zj6Zt",row:"-esm-openconceptlab__patient-banner-contact-details-module__row___+Bx+P",col:"-esm-openconceptlab__patient-banner-contact-details-module__col___0H31P",relationship:"-esm-openconceptlab__patient-banner-contact-details-module__relationship___CZmay"},CM=({patientUuid:e})=>{let{cohorts:t=[],isLoading:r}=function(e){let t=e?`${au}/cohortm/cohortmember?patient=${e}&v=custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))`:null,{data:r,isLoading:n}=me()(t,af),o=r?.data?.results.map(e=>({uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}));return(0,hC.useMemo)(()=>({cohorts:o,isLoading:n}),[n,o])}(e);return(0,yk.jsxs)(yk.Fragment,{children:[(0,yk.jsxs)("p",{className:CI.heading,children:[sf("patientLists","Patient Lists")," (",t?.length??0,")"]}),r?(0,yk.jsx)(y$.OuH,{description:`${sf("loading","Loading")} ...`,role:"progressbar"}):(0,yk.jsxs)("ul",{children:[(()=>{if(t?.length>0){let e=t.sort((e,t)=>DG(e?.startDate).getTime()-DG(t?.startDate).getTime()).slice(0,3);return e?.map(e=>(0,yk.jsx)("li",{children:(0,yk.jsx)(hR,{to:`${window.spaBase}/home/patient-lists/${e.uuid}`,children:e.name},e.uuid)},e.uuid))}return(0,yk.jsx)("li",{children:"--"})})(),t.length>3&&(0,yk.jsx)("li",{className:CI.link,children:(0,yk.jsx)(hR,{to:`${window.spaBase}/home/patient-lists`,children:sf("seeMoreLists","See {{count}} more lists",{count:t?.length-3})})})]})]})},CL=({patientId:e})=>{let{patient:t,isLoading:r}=yr(e),n=t?.address?.find(e=>"home"===e.use),o=e=>e.split("#")[1];return r?(0,yk.jsx)(y$.OuH,{description:`${sf("loading","Loading")} ...`,role:"progressbar"}):(0,yk.jsxs)(yk.Fragment,{children:[(0,yk.jsx)("p",{className:CI.heading,children:sf("address","Address")}),(0,yk.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,yk.jsxs)("li",{children:[sf(o(t.url),o(t.url)),": ",t.valueString]},`address-${e}-${r}`)):(0,yk.jsxs)("li",{children:[sf(e,e),": ",t]},`address-${e}`)):(0,yk.jsx)("li",{children:"--"})})]})},CF=({patientUuid:e})=>{let{isLoading:t,contactAttributes:r}=(e=>{let{contactAttributeTypes:t=[]}=mk({externalModuleName:"@openmrs/esm-patient-banner-app"}),{attributes:r,error:n,isLoading:o}=(e=>{let{data:t,error:r,isLoading:n}=mN()(`${au}/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)))`,af);return{isLoading:n,attributes:t?.data.person.attributes??[],error:r}})(e);return{contactAttributes:(0,hC.useMemo)(()=>r.filter(({attributeType:e})=>t?.some(t=>e.uuid===t)),[r,t]),isLoading:o,error:n}})(e),n=(0,hC.useMemo)(()=>r?[...r?.map(e=>[e.attributeType.display?sf(e.attributeType.display,e.attributeType.display):"",e.value])]:[],[r]);return(0,yk.jsxs)(yk.Fragment,{children:[(0,yk.jsx)("p",{className:CI.heading,children:sf("contactDetails","Contact Details")}),t?(0,yk.jsx)(y$.OuH,{description:`${sf("loading","Loading")} ...`,role:"progressbar"}):(0,yk.jsx)("ul",{children:n.length?n.map(([e,t],r)=>(0,yk.jsxs)("li",{children:[e,": ",t]},`${e}-${t}-${r}`)):(0,yk.jsx)("li",{children:"--"})})]})},CB=({patientId:e})=>{let{data:t,isLoading:r}=function(e){let t=`${au}/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:i}=me()(e?t:null,af),a=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?a:null,error:n,isLoading:o,isValidating:i}}(e);return(0,yk.jsxs)(yk.Fragment,{children:[(0,yk.jsx)("p",{className:CI.heading,children:sf("relationships","Relationships")}),r?(0,yk.jsx)(y$.OuH,{description:`${sf("loading","Loading")} ...`,role:"progressbar"}):(0,yk.jsx)("ul",{children:t&&t.length>0?(0,yk.jsx)(yk.Fragment,{children:t.map(e=>(0,yk.jsxs)("li",{className:CI.relationship,children:[(0,yk.jsx)("div",{children:(0,yk.jsx)(hR,{to:`${window.spaBase}/patient/${e.relativeUuid}/chart`,children:e.display})}),(0,yk.jsx)("div",{children:e.relationshipType}),(0,yk.jsx)("div",{children:`${e.relativeAge?e.relativeAge:"--"} ${e.relativeAge?1===e.relativeAge?sf("yearAbbreviation","yr"):sf("yearsAbbreviation","yrs"):""}`})]},e.uuid))}):(0,yk.jsx)("li",{children:"--"})})]})};function CV({patientId:e,deceased:t}){return(0,yk.jsxs)("div",{className:yj()(CI.contactDetails,{[CI.deceased]:t}),children:[(0,yk.jsxs)("div",{className:CI.row,children:[(0,yk.jsx)("div",{className:CI.col,children:(0,yk.jsx)(CL,{patientId:e})}),(0,yk.jsx)("div",{className:CI.col,children:(0,yk.jsx)(CF,{patientUuid:e})})]}),(0,yk.jsxs)("div",{className:CI.row,children:[(0,yk.jsx)("div",{className:CI.col,children:(0,yk.jsx)(CB,{patientId:e})}),(0,yk.jsx)("div",{className:CI.col,children:(0,yk.jsx)(CM,{patientUuid:e})})]})]})}function CU(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 CW="-esm-openconceptlab__action-menu2-module__container___5s3CM";function Cz({workspaceGroup:e,groupProps:t}){let r=m1(),{persistence:n}=e;return(0,yk.jsx)("aside",{className:"-esm-openconceptlab__action-menu2-module__sideRail___qwAz4",children:(0,yk.jsxs)("div",{className:CW,children:["closable"==n&&m2(r)&&(0,yk.jsx)(y$.K0,{align:"left",onClick:()=>Cb(),label:sf("close"),kind:"ghost",children:(0,yk.jsx)(ga,{})}),(0,yk.jsx)(hT.Provider,{value:{moduleName:e.moduleName,featureName:e.name},children:(0,yk.jsx)(hG,{className:CW,name:e.name,state:{groupProps:t}})})]})})}function CK(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}}let CH=({lifeCycle:e,openedWorkspace:t,openedWindow:r,isRootWorkspace:n,isLeafWorkspace:o,showActionMenu:i})=>{let{openedGroup:a,closeWorkspace:s,openChildWorkspace:l}=CE(),u=(0,hC.useMemo)(()=>t&&{closeWorkspace:async(e={})=>{let{closeWindow:n=!1,discardUnsavedChanges:o=!1}=e;return n?!!(o||await C_({reason:"CLOSE_WINDOW",explicit:!0,windowName:r.windowName}))&&(s(r.openedWorkspaces[0].workspaceName),!0):!!(o||await C_({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:r.windowName,workspaceName:t.workspaceName}))&&(s(t.workspaceName),!0)},launchChildWorkspace:async(e,n)=>{let o=t.workspaceName,{openedWorkspaces:i}=r,a=i.findIndex(e=>e.workspaceName===o);-1===a||a!==i.length-1&&i.slice(a+1).some(e=>e.hasUnsavedChanges)&&!await C_({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:r.windowName,workspaceName:i[a+1].workspaceName})||l(o,e,n||{})},workspaceName:t.workspaceName,workspaceProps:t.props,windowProps:r.props,groupProps:a&&a.props?a.props:null,isRootWorkspace:n,isLeafWorkspace:o,windowName:r.windowName,showActionMenu:i},[t,s,a,r]);if(!e){let{registeredWorkspacesByName:e}=hh.getState(),r=e[t.workspaceName],o=r&&r.window?r.window:void 0,{registeredWindowsByName:s}=hh.getState(),l=o?s[o]:void 0,u=l&&l.width?l.width:"narrow",c=Object.values(s).some(e=>e.group===a?.groupName&&void 0!==e.icon);return(0,yk.jsxs)("div",{className:yj()(CP.workspaceOuterContainer,{[CP.narrowWorkspace]:"narrow"===u,[CP.widerWorkspace]:"wider"===u,[CP.extraWideWorkspace]:"extra-wide"===u,[CP.isActionMenuOpened]:c}),children:[(0,yk.jsx)("div",{className:CP.workspaceSpacer}),(0,yk.jsx)("div",{className:yj()(CP.workspaceMiddleContainer,{[CP.isRootWorkspace]:n,[CP.showActionMenu]:i}),children:(0,yk.jsx)("div",{className:yj()(CP.workspaceInnerContainer,{[CP.isRootWorkspace]:n}),children:(0,yk.jsx)(y$.OuH,{className:CP.loader,description:`${sf("loading")} ...`})})})]})}return(0,yk.jsx)(Cp,{config:e,mountParcel:hP,...u},t.workspaceName)},CG=({openedWindow:e,showActionMenu:t})=>{let{openedWorkspaces:r}=e,[n,o]=(0,hC.useState)({}),{registeredWorkspacesByName:i}=hh.getState();return(0,hC.useEffect)(()=>{let e=!1;return Promise.all(r.map(async e=>{let{moduleName:t,component:r}=i[e.workspaceName];return[e.uuid,await yg(t,r)]})).then(t=>{e||o(Object.fromEntries(t))}),()=>{e=!0}},[r]),(0,yk.jsx)(yk.Fragment,{children:r.map((o,i)=>(0,yk.jsx)(CH,{openedWorkspace:o,openedWindow:e,lifeCycle:n[o.uuid],isRootWorkspace:0===i,isLeafWorkspace:i===r.length-1,showActionMenu:t},o.uuid))})};function Cq(e){e&&(0,hq.createRoot)(e).render((0,yk.jsx)(CZ,{}))}function CZ(){let{openedGroup:e,openedWindows:t,registeredGroupsByName:r,registeredWindowsByName:n}=CE();if((0,hC.useEffect)(()=>pE("before-page-changed",t=>{let{newPage:n,cancelNavigation:o,oldUrl:i,newUrl:a}=t;if(!e)return;if(n)return void o(Cb().then(e=>!e));let s=r[e.groupName],l=s?.scopePattern;l&&function(e,t,r){try{let n=new RegExp(e),o=CK(t),i=CK(r);if(null===o.spaRelative||null===i.spaRelative)return!0;let a=n.exec(o.spaRelative),s=n.exec(i.spaRelative);if(a&&s||(a=n.exec(o.full),s=n.exec(i.full)),!a||!s)return!0;if(a.length>1)return!a.slice(1).every((e,t)=>e===s[t+1]);return!1}catch{return!0}}(l,i,a)&&o(Cb().then(e=>!e))}),[e,r]),!e)return null;let o=r[e.groupName],i=t.some(e=>e.maximized),{name:a}=o,s=Object.values(n).filter(e=>e.group===a&&void 0!==e.icon).sort((e,t)=>(e.order??Number.MAX_VALUE)-(t.order??Number.MAX_VALUE)).length>0;return(0,yk.jsxs)("div",{className:yj()("-esm-openconceptlab__workspace-windows-and-menu-module__workspaceWindowsAndMenuContainer___gN2f4",{"-esm-openconceptlab__workspace-windows-and-menu-module__overlay___fqI+X":o.overlay,"-esm-openconceptlab__workspace-windows-and-menu-module__hasMaximizedWindow___J7wBw":i}),children:[(0,yk.jsx)("div",{className:"-esm-openconceptlab__workspace-windows-and-menu-module__workspaceWindowsContainer___zpk7G",children:t.map(e=>(0,yk.jsx)(CG,{openedWindow:e,showActionMenu:s},e.windowName))}),s&&(0,yk.jsx)(Cz,{workspaceGroup:o,groupProps:e.props})]})}function CY(e,t,r){if(null==e)return r;let n=Dl(e);if(!n)return console.warn(`matchLocale: invalid requested locale tag: ${JSON.stringify(e)}`),r;let o=[];for(let e of t){let t=Dl(e);if(!t){console.warn(`matchLocale: skipping invalid available locale tag: ${JSON.stringify(e)}`);continue}o.push({canonical:t,original:e})}let i=n;for(;i;){let e=o.find(e=>e.canonical===i);if(e)return e.original;let t=i+"-",r=o.find(e=>e.canonical.startsWith(t));if(r)return r.original;if("ht"===i){i="fr-HT";continue}let n=i.lastIndexOf("-");if(-1===n)break;let a=(i=i.slice(0,n)).lastIndexOf("-");-1!==a&&i.length-a==2&&(i=i.slice(0,a))}return r}function CJ(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}function CX(e){return!!e&&e.constructor===Object}var CQ=r(2722);function C0(e){let[t,r,n]=e.split(".");return`${t}.${r}.${n}`}function C1(e,t){let r=function(e){let t=e.indexOf("-");if(t>=0){let r=C0(e.slice(0,t)),n=e.slice(t+1);return`${r}-${n}`}return C0(e)}(t);return CQ.satisfies(r,e,{includePrerelease:!0})}async function C2(e,t={}){let r,{shouldRetry:n,getDelay:o,onError:i}=t;n=n??(e=>e<=5),o=o??(e=>(function(e,t=!1){return 1e3*Math.pow(2,t?e+1:e)})(e));let a=0;do try{return await C4(o(a)),await e()}catch(e){i?.(e,a),r=e}while(n(a++));throw r}async function C4(e){if(!(e<=0))return new Promise(t=>setTimeout(t,e))}},254(e,t,r){"use strict";r.d(t,{A:()=>n});let n=function(e){return null==e}}}]);
|