@openmrs/esm-cohort-builder-app 4.0.7-pre.1505 → 4.0.7-pre.1507
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/719.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(globalThis.webpackChunk_openmrs_esm_cohort_builder_app=globalThis.webpackChunk_openmrs_esm_cohort_builder_app||[]).push([["719"],{7581(e){e.exports=function(e,t,r){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=r();return this.format(e)===t.format(e)}}},5238(e){e.exports=function(e,t,r){var n=t.prototype,o=function(e){var t=e.date,o=e.utc,a={};if(!(null===t||t instanceof Date||t instanceof Array||n.$utils().u(t)||"Object"!==t.constructor.name)){if(!Object.keys(t).length)return new Date;var i=o?r.utc():r();Object.keys(t).forEach(function(e){var r;a["date"===(r=n.$utils().p(e))?"day":r]=t[e]});var s=a.day||(a.year||a.month>=0?1:i.date()),l=a.year||i.year(),u=a.month>=0?a.month:a.year||a.day?0:i.month(),c=a.hour||0,d=a.minute||0,f=a.second||0,p=a.millisecond||0;return o?new Date(Date.UTC(l,u,s,c,d,f,p)):new Date(l,u,s,c,d,f,p)}return t},a=n.parse;n.parse=function(e){e.date=o.bind(this)(e),a.bind(this)(e)};var i=n.set,s=n.add,l=n.subtract,u=function(e,t,r,n){void 0===n&&(n=1);var o=Object.keys(t),a=this;return o.forEach(function(r){a=e.bind(a)(t[r]*n,r)}),a};n.set=function(e,t){return t=void 0===t?e:t,"Object"===e.constructor.name?u.bind(this)(function(e,t){return i.bind(this)(t,e)},t,e):i.bind(this)(e,t)},n.add=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t):s.bind(this)(e,t)},n.subtract=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t,-1):l.bind(this)(e,t)}}},3826(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,o,a){var i=o.prototype;a.utc=function(e){var t={date:e,utc:!0,args:arguments};return new o(t)},i.utc=function(t){var r=a(this.toDate(),{locale:this.$L,utc:!0});return t?r.add(this.utcOffset(),e):r},i.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var s=i.parse;i.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var l=i.init;i.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else l.call(this)};var u=i.utcOffset;i.utcOffset=function(n,o){var a=this.$utils().u;if(a(n))return this.$u?0:a(this.$offset)?u.call(this):this.$offset;if("string"==typeof n&&null===(n=function(e){void 0===e&&(e="");var n=e.match(t);if(!n)return null;var o=(""+n[0]).match(r)||["-",0,0],a=o[0],i=60*o[1]+ +o[2];return 0===i?0:"+"===a?i:-i}(n)))return this;var i=16>=Math.abs(n)?60*n:n,s=this;if(o)return s.$offset=i,s.$u=0===n,s;if(0!==n){var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(i+l,e)).$offset=i,s.$x.$localOffset=l}else s=this.utc();return s};var c=i.format;i.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,t)},i.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var d=i.toDate;i.toDate=function(e){return"s"===e&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var f=i.diff;i.diff=function(e,t,r){if(e&&this.$u===e.$u)return f.call(this,e,t,r);var n=this.local(),o=a(e).local();return f.call(n,o,t,r)}}}()},2849(e){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function n(e){if(!e||"[object Object]"!==r.call(e)||e.nodeType||e.setInterval)return!1;var n,o=t.call(e,"constructor"),a=t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!a)return!1;for(n in e);return void 0===n||t.call(e,n)}e.exports=function e(){var t,r,o,a,i,s,l=arguments[0]||{},u=1,c=arguments.length,d=!1;for("boolean"==typeof l&&(d=l,l=arguments[1]||{},u=2),"object"!=typeof l&&"function"!=typeof l&&(l={});u<c;u++)if(null!=(t=arguments[u]))for(r in t)o=l[r],l!==(a=t[r])&&(d&&a&&(n(a)||(i=Array.isArray(a)))?(i?(i=!1,s=o&&Array.isArray(o)?o:[]):s=o&&n(o)?o:{},l[r]=e(d,s,a)):void 0!==a&&(l[r]=a));return l}},6767(e,t,r){!function(t){"use strict";var n=r(6974);function o(e){return function(t,r){return"object"==typeof t&&(r=t,t=null),null==t&&(t=new Date().toString()),r||(r={}),e.call(this,t,r)}}var a=e.exports={generate:o(function(e,t){return new n(e,t)})};t&&(t.fn.geopattern=o(function(e,r){return this.each(function(){var n=t(this).attr("data-title-sha");n&&(r=t.extend({hash:n},r));var o=a.generate(e,r);t(this).css("background-image",o.toDataUrl())})}))}("u">typeof jQuery?jQuery:null)},2467(e){"use strict";e.exports={hex2rgb:function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,t,r,n){return t+t+r+r+n+n});var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},rgb2hex:function(e){return"#"+["r","g","b"].map(function(t){return("0"+e[t].toString(16)).slice(-2)}).join("")},rgb2hsl:function(e){var t,r,n=e.r,o=e.g,a=e.b,i=Math.max(n/=255,o/=255,a/=255),s=Math.min(n,o,a),l=(i+s)/2;if(i===s)t=r=0;else{var u=i-s;switch(r=l>.5?u/(2-i-s):u/(i+s),i){case n:t=(o-a)/u+6*(o<a);break;case o:t=(a-n)/u+2;break;case a:t=(n-o)/u+4}t/=6}return{h:t,s:r,l:l}},hsl2rgb:function(e){function t(e,t,r){return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?e+(t-e)*6*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}var r,n,o,a=e.h,i=e.s,s=e.l;if(0===i)r=n=o=s;else{var l=s<.5?s*(1+i):s+i-s*i,u=2*s-l;r=t(u,l,a+1/3),n=t(u,l,a),o=t(u,l,a-1/3)}return{r:Math.round(255*r),g:Math.round(255*n),b:Math.round(255*o)}},rgb2rgbString:function(e){return"rgb("+[e.r,e.g,e.b].join(",")+")"}}},6974(e,t,r){"use strict";var n=r(2849),o=r(2467),a=r(6743),i=r(8502),s={baseColor:"#933c3c"},l=["octogons","overlappingCircles","plusSigns","xes","sineWaves","hexagons","overlappingRings","plaid","triangles","squares","concentricCircles","diamonds","tessellation","nestedSquares","mosaicSquares","chevrons"],u="#000";function c(e,t,r){return parseInt(e.substr(t,r||1),16)}function d(e,t,r,n,o){return(parseFloat(e)-t)*(o-n)/(r-t)+n}function f(e){return e%2==0?"#ddd":"#222"}function p(e){return d(e,0,15,.02,.15)}var m=e.exports=function(e,t){return this.opts=n({},s,t),this.hash=t.hash||a(e),this.svg=new i,this.generateBackground(),this.generatePattern(),this};function h(e){return[[e,0,e,3*e],[0,e,3*e,e]]}function g(e){return[0,0,e,e,0,e,0,0].join(",")}function y(e,t,r,n,o){var a=g(n),i=p(o[0]),s=f(o[0]),l={stroke:u,"stroke-opacity":.02,"fill-opacity":i,fill:s};e.polyline(a,l).transform({translate:[t+n,r],scale:[-1,1]}),e.polyline(a,l).transform({translate:[t+n,r+2*n],scale:[1,-1]}),l={stroke:u,"stroke-opacity":.02,"fill-opacity":i=p(o[1]),fill:s=f(o[1])},e.polyline(a,l).transform({translate:[t+n,r+2*n],scale:[-1,-1]}),e.polyline(a,l).transform({translate:[t+n,r],scale:[1,1]})}function v(e,t,r,n,o){var a=p(o),i=f(o),s=g(n),l={stroke:u,"stroke-opacity":.02,"fill-opacity":a,fill:i};e.polyline(s,l).transform({translate:[t,r+n],scale:[1,-1]}),e.polyline(s,l).transform({translate:[t+2*n,r+n],scale:[-1,-1]}),e.polyline(s,l).transform({translate:[t,r+n],scale:[1,1]}),e.polyline(s,l).transform({translate:[t+2*n,r+n],scale:[-1,1]})}m.prototype.toSvg=function(){return this.svg.toString()},m.prototype.toString=function(){return this.toSvg()},m.prototype.toBase64=function(){var e=this.toSvg();return"u">typeof window&&"function"==typeof window.btoa?window.btoa(e):new Buffer(e).toString("base64")},m.prototype.toDataUri=function(){return"data:image/svg+xml;base64,"+this.toBase64()},m.prototype.toDataUrl=function(){return'url("'+this.toDataUri()+'")'},m.prototype.generateBackground=function(){var e,t,r,n;this.opts.color?r=o.hex2rgb(this.opts.color):(t=d(c(this.hash,14,3),0,4095,0,359),n=c(this.hash,17),(e=o.rgb2hsl(o.hex2rgb(this.opts.baseColor))).h=(360*e.h-t+360)%360/360,n%2==0?e.s=Math.min(1,(100*e.s+n)/100):e.s=Math.max(0,(100*e.s-n)/100),r=o.hsl2rgb(e)),this.color=o.rgb2hex(r),this.svg.rect(0,0,"100%","100%",{fill:o.rgb2rgbString(r)})},m.prototype.generatePattern=function(){var e=this.opts.generator;if(e){if(0>l.indexOf(e))throw Error("The generator "+e+" does not exist.")}else e=l[c(this.hash,20)];return this["geo"+e.slice(0,1).toUpperCase()+e.slice(1)]()},m.prototype.geoHexagons=function(){var e,t,r,n,o,a,i,s,l,m=d(c(this.hash,0),0,15,8,60),h=m*Math.sqrt(3),g=2*m,y=(s=m/2,[0,l=Math.sin(60*Math.PI/180)*m,s,0,s+m,0,2*m,l,s+m,2*l,s,2*l,0,l].join(","));for(this.svg.setWidth(3*g+3*m),this.svg.setHeight(6*h),t=0,i=0;i<6;i++)for(a=0;a<6;a++)o=c(this.hash,t),e=a%2==0?i*h:i*h+h/2,r=p(o),n={fill:f(o),"fill-opacity":r,stroke:u,"stroke-opacity":.02},this.svg.polyline(y,n).transform({translate:[a*m*1.5-g/2,e-h/2]}),0===a&&this.svg.polyline(y,n).transform({translate:[6*m*1.5-g/2,e-h/2]}),0===i&&(e=a%2==0?6*h:6*h+h/2,this.svg.polyline(y,n).transform({translate:[a*m*1.5-g/2,e-h/2]})),0===a&&0===i&&this.svg.polyline(y,n).transform({translate:[6*m*1.5-g/2,5*h+h/2]}),t++},m.prototype.geoSineWaves=function(){var e,t,r,n,o,a,i,s=Math.floor(d(c(this.hash,0),0,15,100,400)),l=Math.floor(d(c(this.hash,1),0,15,30,100)),u=Math.floor(d(c(this.hash,2),0,15,3,30));for(this.svg.setWidth(s),this.svg.setHeight(36*u),t=0;t<36;t++)r=p(a=c(this.hash,t)),e=f(a),i=s/4*.7,o={fill:"none",stroke:e,opacity:r,"stroke-width":""+u+"px"},n="M0 "+l+" C "+i+" 0, "+(s/2-i)+" 0, "+s/2+" "+l+" S "+(s-i)+" "+2*l+", "+s+" "+l+" S "+(1.5*s-i)+" 0, "+1.5*s+", "+l,this.svg.path(n,o).transform({translate:[-s/4,u*t-1.5*l]}),this.svg.path(n,o).transform({translate:[-s/4,u*t-1.5*l+36*u]})},m.prototype.geoChevrons=function(){var e,t,r,n,o,a,i,s=d(c(this.hash,0),0,15,30,80),l=d(c(this.hash,0),0,15,30,80),m=(e=.66*l,[[0,0,s/2,l-e,s/2,l,0,e,0,0],[s/2,l-e,s,0,s,e,s/2,l,s/2,l-e]].map(function(e){return e.join(",")}));for(this.svg.setWidth(6*s),this.svg.setHeight(6*l*.66),t=0,i=0;i<6;i++)for(a=0;a<6;a++)r=p(o=c(this.hash,t)),n={stroke:u,"stroke-opacity":.02,fill:f(o),"fill-opacity":r,"stroke-width":1},this.svg.group(n).transform({translate:[a*s,i*l*.66-l/2]}).polyline(m).end(),0===i&&this.svg.group(n).transform({translate:[a*s,6*l*.66-l/2]}).polyline(m).end(),t+=1},m.prototype.geoPlusSigns=function(){var e,t,r,n,o,a,i,s,l=d(c(this.hash,0),0,15,10,25),m=3*l,g=h(l);for(this.svg.setWidth(12*l),this.svg.setHeight(12*l),r=0,s=0;s<6;s++)for(i=0;i<6;i++)n=p(a=c(this.hash,r)),t=f(a),e=+(s%2!=0),o={fill:t,stroke:u,"stroke-opacity":.02,"fill-opacity":n},this.svg.group(o).transform({translate:[i*m-i*l+e*l-l,s*m-s*l-m/2]}).rect(g).end(),0===i&&this.svg.group(o).transform({translate:[4*m-i*l+e*l-l,s*m-s*l-m/2]}).rect(g).end(),0===s&&this.svg.group(o).transform({translate:[i*m-i*l+e*l-l,4*m-s*l-m/2]}).rect(g).end(),0===i&&0===s&&this.svg.group(o).transform({translate:[4*m-i*l+e*l-l,4*m-s*l-m/2]}).rect(g).end(),r++},m.prototype.geoXes=function(){var e,t,r,n,o,a,i,s=d(c(this.hash,0),0,15,10,25),l=h(s),u=3*s*.943;for(this.svg.setWidth(3*u),this.svg.setHeight(3*u),t=0,i=0;i<6;i++)for(a=0;a<6;a++)r=p(o=c(this.hash,t)),e=a%2==0?i*u-.5*u:i*u-.5*u+u/4,n={fill:f(o),opacity:r},this.svg.group(n).transform({translate:[a*u/2-u/2,e-i*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===a&&this.svg.group(n).transform({translate:[6*u/2-u/2,e-i*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===i&&(e=a%2==0?6*u-u/2:6*u-u/2+u/4,this.svg.group(n).transform({translate:[a*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end()),5===i&&this.svg.group(n).transform({translate:[a*u/2-u/2,e-11*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===a&&0===i&&this.svg.group(n).transform({translate:[6*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),t++},m.prototype.geoOverlappingCircles=function(){var e,t,r,n,o,a,i=d(c(this.hash,0),0,15,25,200)/2;for(this.svg.setWidth(6*i),this.svg.setHeight(6*i),e=0,a=0;a<6;a++)for(o=0;o<6;o++)t=p(n=c(this.hash,e)),r={fill:f(n),opacity:t},this.svg.circle(o*i,a*i,i,r),0===o&&this.svg.circle(6*i,a*i,i,r),0===a&&this.svg.circle(o*i,6*i,i,r),0===o&&0===a&&this.svg.circle(6*i,6*i,i,r),e++},m.prototype.geoOctogons=function(){var e,t,r,n,o,a,i,s=d(c(this.hash,0),0,15,10,60),l=[e=.33*s,0,s-e,0,s,e,s,s-e,s-e,s,e,s,0,s-e,0,e,e,0].join(",");for(this.svg.setWidth(6*s),this.svg.setHeight(6*s),r=0,i=0;i<6;i++)for(a=0;a<6;a++)n=p(o=c(this.hash,r)),t=f(o),this.svg.polyline(l,{fill:t,"fill-opacity":n,stroke:u,"stroke-opacity":.02}).transform({translate:[a*s,i*s]}),r+=1},m.prototype.geoSquares=function(){var e,t,r,n,o,a,i=d(c(this.hash,0),0,15,10,60);for(this.svg.setWidth(6*i),this.svg.setHeight(6*i),t=0,a=0;a<6;a++)for(o=0;o<6;o++)r=p(n=c(this.hash,t)),e=f(n),this.svg.rect(o*i,a*i,i,i,{fill:e,"fill-opacity":r,stroke:u,"stroke-opacity":.02}),t+=1},m.prototype.geoConcentricCircles=function(){var e,t,r,n,o,a,i=d(c(this.hash,0),0,15,10,60),s=i/5;for(this.svg.setWidth((i+s)*6),this.svg.setHeight((i+s)*6),t=0,a=0;a<6;a++)for(o=0;o<6;o++)r=p(n=c(this.hash,t)),e=f(n),this.svg.circle(o*i+o*s+(i+s)/2,a*i+a*s+(i+s)/2,i/2,{fill:"none",stroke:e,opacity:r,"stroke-width":s+"px"}),r=p(n=c(this.hash,39-t)),e=f(n),this.svg.circle(o*i+o*s+(i+s)/2,a*i+a*s+(i+s)/2,i/4,{fill:e,"fill-opacity":r}),t+=1},m.prototype.geoOverlappingRings=function(){var e,t,r,n,o,a,i=d(c(this.hash,0),0,15,10,60),s=i/4;for(this.svg.setWidth(6*i),this.svg.setHeight(6*i),e=0,a=0;a<6;a++)for(o=0;o<6;o++)t=p(n=c(this.hash,e)),r={fill:"none",stroke:f(n),opacity:t,"stroke-width":s+"px"},this.svg.circle(o*i,a*i,i-s/2,r),0===o&&this.svg.circle(6*i,a*i,i-s/2,r),0===a&&this.svg.circle(o*i,6*i,i-s/2,r),0===o&&0===a&&this.svg.circle(6*i,6*i,i-s/2,r),e+=1},m.prototype.geoTriangles=function(){var e,t,r,n,o,a,i,s,l=d(c(this.hash,0),0,15,15,80),m=l/2*Math.sqrt(3),h=[s=l/2,0,l,m,0,m,s,0].join(",");for(this.svg.setWidth(3*l),this.svg.setHeight(6*m),e=0,i=0;i<6;i++)for(a=0;a<6;a++)t=p(o=c(this.hash,e)),n={fill:f(o),"fill-opacity":t,stroke:u,"stroke-opacity":.02},r=i%2==0?180*(a%2==0):180*(a%2!=0),this.svg.polyline(h,n).transform({translate:[a*l*.5-l/2,m*i],rotate:[r,l/2,m/2]}),0===a&&this.svg.polyline(h,n).transform({translate:[6*l*.5-l/2,m*i],rotate:[r,l/2,m/2]}),e+=1},m.prototype.geoDiamonds=function(){var e,t,r,n,o,a,i,s=d(c(this.hash,0),0,15,10,50),l=d(c(this.hash,1),0,15,10,50),m=[s/2,0,s,l/2,s/2,l,0,l/2].join(",");for(this.svg.setWidth(6*s),this.svg.setHeight(3*l),t=0,i=0;i<6;i++)for(a=0;a<6;a++)r=p(o=c(this.hash,t)),n={fill:f(o),"fill-opacity":r,stroke:u,"stroke-opacity":.02},e=i%2==0?0:s/2,this.svg.polyline(m,n).transform({translate:[a*s-s/2+e,l/2*i-l/2]}),0===a&&this.svg.polyline(m,n).transform({translate:[6*s-s/2+e,l/2*i-l/2]}),0===i&&this.svg.polyline(m,n).transform({translate:[a*s-s/2+e,l/2*6-l/2]}),0===a&&0===i&&this.svg.polyline(m,n).transform({translate:[6*s-s/2+e,l/2*6-l/2]}),t+=1},m.prototype.geoNestedSquares=function(){var e,t,r,n,o,a,i=d(c(this.hash,0),0,15,4,12),s=7*i;for(this.svg.setWidth((s+i)*6+6*i),this.svg.setHeight((s+i)*6+6*i),e=0,a=0;a<6;a++)for(o=0;o<6;o++)t=p(n=c(this.hash,e)),r={fill:"none",stroke:f(n),opacity:t,"stroke-width":i+"px"},this.svg.rect(o*s+o*i*2+i/2,a*s+a*i*2+i/2,s,s,r),t=p(n=c(this.hash,39-e)),r={fill:"none",stroke:f(n),opacity:t,"stroke-width":i+"px"},this.svg.rect(o*s+o*i*2+i/2+2*i,a*s+a*i*2+i/2+2*i,3*i,3*i,r),e+=1},m.prototype.geoMosaicSquares=function(){var e,t,r,n=d(c(this.hash,0),0,15,15,50);for(this.svg.setWidth(8*n),this.svg.setHeight(8*n),e=0,r=0;r<4;r++)for(t=0;t<4;t++)t%2==0?r%2==0?v(this.svg,t*n*2,r*n*2,n,c(this.hash,e)):y(this.svg,t*n*2,r*n*2,n,[c(this.hash,e),c(this.hash,e+1)]):r%2==0?y(this.svg,t*n*2,r*n*2,n,[c(this.hash,e),c(this.hash,e+1)]):v(this.svg,t*n*2,r*n*2,n,c(this.hash,e)),e+=1},m.prototype.geoPlaid=function(){var e,t,r,n,o,a,i=0,s=0;for(t=0;t<36;)i+=c(this.hash,t)+5,r=p(a=c(this.hash,t+1)),e=f(a),n=a+5,this.svg.rect(0,i,"100%",n,{opacity:r,fill:e}),i+=n,t+=2;for(t=0;t<36;)s+=c(this.hash,t)+5,r=p(a=c(this.hash,t+1)),e=f(a),o=a+5,this.svg.rect(s,0,o,"100%",{opacity:r,fill:e}),s+=o,t+=2;this.svg.setWidth(s),this.svg.setHeight(i)},m.prototype.geoTessellation=function(){var e,t,r,n,o=d(c(this.hash,0),0,15,5,40),a=o*Math.sqrt(3),i=2*o,s=o/2*Math.sqrt(3),l=[0,0,s,o/2,0,o,0,0].join(","),m=3*o+2*s,h=2*a+2*o;for(this.svg.setWidth(m),this.svg.setHeight(h),e=0;e<20;e++)switch(t=p(n=c(this.hash,e)),r={stroke:u,"stroke-opacity":.02,fill:f(n),"fill-opacity":t,"stroke-width":1},e){case 0:this.svg.rect(-o/2,-o/2,o,o,r),this.svg.rect(m-o/2,-o/2,o,o,r),this.svg.rect(-o/2,h-o/2,o,o,r),this.svg.rect(m-o/2,h-o/2,o,o,r);break;case 1:this.svg.rect(i/2+s,a/2,o,o,r);break;case 2:this.svg.rect(-o/2,h/2-o/2,o,o,r),this.svg.rect(m-o/2,h/2-o/2,o,o,r);break;case 3:this.svg.rect(i/2+s,1.5*a+o,o,o,r);break;case 4:this.svg.polyline(l,r).transform({translate:[o/2,-o/2],rotate:[0,o/2,s/2]}),this.svg.polyline(l,r).transform({translate:[o/2,h- -o/2],rotate:[0,o/2,s/2],scale:[1,-1]});break;case 5:this.svg.polyline(l,r).transform({translate:[m-o/2,-o/2],rotate:[0,o/2,s/2],scale:[-1,1]}),this.svg.polyline(l,r).transform({translate:[m-o/2,h+o/2],rotate:[0,o/2,s/2],scale:[-1,-1]});break;case 6:this.svg.polyline(l,r).transform({translate:[m/2+o/2,a/2]});break;case 7:this.svg.polyline(l,r).transform({translate:[m-m/2-o/2,a/2],scale:[-1,1]});break;case 8:this.svg.polyline(l,r).transform({translate:[m/2+o/2,h-a/2],scale:[1,-1]});break;case 9:this.svg.polyline(l,r).transform({translate:[m-m/2-o/2,h-a/2],scale:[-1,-1]});break;case 10:this.svg.polyline(l,r).transform({translate:[o/2,h/2-o/2]});break;case 11:this.svg.polyline(l,r).transform({translate:[m-o/2,h/2-o/2],scale:[-1,1]});break;case 12:this.svg.rect(0,0,o,o,r).transform({translate:[o/2,o/2],rotate:[-30,0,0]});break;case 13:this.svg.rect(0,0,o,o,r).transform({scale:[-1,1],translate:[-m+o/2,o/2],rotate:[-30,0,0]});break;case 14:this.svg.rect(0,0,o,o,r).transform({translate:[o/2,h/2-o/2-o],rotate:[30,0,o]});break;case 15:this.svg.rect(0,0,o,o,r).transform({scale:[-1,1],translate:[-m+o/2,h/2-o/2-o],rotate:[30,0,o]});break;case 16:this.svg.rect(0,0,o,o,r).transform({scale:[1,-1],translate:[o/2,-h+h/2-o/2-o],rotate:[30,0,o]});break;case 17:this.svg.rect(0,0,o,o,r).transform({scale:[-1,-1],translate:[-m+o/2,-h+h/2-o/2-o],rotate:[30,0,o]});break;case 18:this.svg.rect(0,0,o,o,r).transform({scale:[1,-1],translate:[o/2,-h+o/2],rotate:[-30,0,0]});break;case 19:this.svg.rect(0,0,o,o,r).transform({scale:[-1,-1],translate:[-m+o/2,-h+o/2],rotate:[-30,0,0]})}}},6743(e){"use strict";function t(){var e=0x67452301,t=0xefcdab89,r=0x98badcfe,n=0x10325476,o=0xc3d2e1f0,a=new Uint32Array(80),i=0,s=24,l=0;function u(){for(var s,l,u=16;u<80;u++){var c=a[u-3]^a[u-8]^a[u-14]^a[u-16];a[u]=c<<1|c>>>31}var d=e,f=t,p=r,m=n,h=o;for(u=0;u<80;u++){u<20?(s=m^f&(p^m),l=0x5a827999):u<40?(s=f^p^m,l=0x6ed9eba1):u<60?(s=f&p|m&(f|p),l=0x8f1bbcdc):(s=f^p^m,l=0xca62c1d6);var g=(d<<5|d>>>27)+s+h+l+(0|a[u]);h=m,m=p,p=f<<30|f>>>2,f=d,d=g}for(u=0,e=e+d|0,t=t+f|0,r=r+p|0,n=n+m|0,o=o+h|0,i=0;u<16;u++)a[u]=0}function c(e){a[i]|=(255&e)<<s,s?s-=8:(i++,s=24),16===i&&u()}function d(e){for(var t="",r=28;r>=0;r-=4)t+=(e>>r&15).toString(16);return t}return{update:function(e){if("string"==typeof e){var t=e.length;l+=8*t;for(var r=0;r<t;r++)c(e.charCodeAt(r));return}var n=e.length;l+=8*n;for(var o=0;o<n;o++)c(e[o])},digest:function(){c(128),(i>14||14===i&&s<24)&&u(),i=14,s=24,c(0),c(0),c(l>0xffffffffff?l/0x10000000000:0),c(l>0xffffffff?l/0x100000000:0);for(var a=24;a>=0;a-=8)c(l>>a);return d(e)+d(t)+d(r)+d(n)+d(o)}}}e.exports=function(e){if(void 0===e)return t();var r=t();return r.update(e),r.digest()}},8502(e,t,r){"use strict";var n=r(2849),o=r(6541);function a(){return this.width=100,this.height=100,this.svg=o("svg"),this.context=[],this.setAttributes(this.svg,{xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height}),this}e.exports=a,a.prototype.currentContext=function(){return this.context[this.context.length-1]||this.svg},a.prototype.end=function(){return this.context.pop(),this},a.prototype.currentNode=function(){var e=this.currentContext();return e.lastChild||e},a.prototype.transform=function(e){return this.currentNode().setAttribute("transform",Object.keys(e).map(function(t){return t+"("+e[t].join(",")+")"}).join(" ")),this},a.prototype.setAttributes=function(e,t){Object.keys(t).forEach(function(r){e.setAttribute(r,t[r])})},a.prototype.setWidth=function(e){this.svg.setAttribute("width",Math.floor(e))},a.prototype.setHeight=function(e){this.svg.setAttribute("height",Math.floor(e))},a.prototype.toString=function(){return this.svg.toString()},a.prototype.rect=function(e,t,r,a,i){var s=this;if(Array.isArray(e))return e.forEach(function(e){s.rect.apply(s,e.concat(i))}),this;var l=o("rect");return this.currentContext().appendChild(l),this.setAttributes(l,n({x:e,y:t,width:r,height:a},i)),this},a.prototype.circle=function(e,t,r,a){var i=o("circle");return this.currentContext().appendChild(i),this.setAttributes(i,n({cx:e,cy:t,r:r},a)),this},a.prototype.path=function(e,t){var r=o("path");return this.currentContext().appendChild(r),this.setAttributes(r,n({d:e},t)),this},a.prototype.polyline=function(e,t){var r=this;if(Array.isArray(e))return e.forEach(function(e){r.polyline(e,t)}),this;var a=o("polyline");return this.currentContext().appendChild(a),this.setAttributes(a,n({points:e},t)),this},a.prototype.group=function(e){var t=o("g");return this.currentContext().appendChild(t),this.context.push(t),this.setAttributes(t,n({},e)),this}},6541(e){"use strict";var t=e.exports=function(e){return this instanceof t?(this.tagName=e,this.attributes=Object.create(null),this.children=[],this.lastChild=null,this):new t(e)};t.prototype.appendChild=function(e){return this.children.push(e),this.lastChild=e,this},t.prototype.setAttribute=function(e,t){return this.attributes[e]=t,this},t.prototype.toString=function(){var e=this;return["<",e.tagName,Object.keys(e.attributes).map(function(t){return[" ",t,'="',e.attributes[t],'"'].join("")}).join(""),">",e.children.map(function(e){return e.toString()}).join(""),"</",e.tagName,">"].join("")}},8067(e,t){"use strict";t.pathToRegexp=function(e,t={}){let{delimiter:u="/",end:c=!0,sensitive:d=!1,trailing:f=!0}=t,p=[],m=[];for(let c of function e(t,r){if(Array.isArray(t))for(let n of t)e(n,r);else r.push(t);return r}(e,[])){let e="object"==typeof c?c:function(e,t={}){let{encodePath:i=r}=t,u=[...e],c=[],d=0,f=0;function p(){let t="";if(n.test(u[d]))do t+=u[d++];while(o.test(u[d]));else if('"'===u[d]){let r=d;for(;d++<u.length;){if('"'===u[d]){d++,r=0;break}"\\"===u[d]&&d++,t+=u[d]}if(r)throw new l(`Unterminated quote at index ${r}`,e)}if(!t)throw new l(`Missing parameter name at index ${d}`,e);return t}for(;d<u.length;){let e=u[d],t=a[e];t?c.push({type:t,index:d++,value:e}):"\\"===e?c.push({type:"escape",index:d++,value:u[d++]}):":"===e?c.push({type:"param",index:d++,value:p()}):"*"===e?c.push({type:"wildcard",index:d++,value:p()}):c.push({type:"char",index:d++,value:e})}return c.push({type:"end",index:d,value:""}),new s(function t(r){let n=[];for(;;){let o=c[f++];if(o.type===r)break;if("char"===o.type||"escape"===o.type){let e=o.value,t=c[f];for(;"char"===t.type||"escape"===t.type;)e+=t.value,t=c[++f];n.push({type:"text",value:i(e)});continue}if("param"===o.type||"wildcard"===o.type){n.push({type:o.type,name:o.value});continue}if("{"===o.type){n.push({type:"group",tokens:t("}")});continue}throw new l(`Unexpected ${o.type} at index ${o.index}, expected ${r}`,e)}return n}("end"),e)}(c,t);for(let t of function* e(t,r,n){if(r===t.length)return yield n;let o=t[r];if("group"===o.type)for(let a of e(o.tokens,0,n.slice()))yield*e(t,r+1,a);else n.push(o);yield*e(t,r+1,n)}(e.tokens,0,[]))m.push(function(e,t,r,n){let o="",a="",s=!0;for(let d of e){if("text"===d.type){o+=i(d.value),a+=d.value,s||(s=d.value.includes(t));continue}if("param"===d.type||"wildcard"===d.type){var u,c;if(!s&&!a)throw new l(`Missing text before "${d.name}" ${d.type}`,n);"param"===d.type?o+=`(${u=t,(c=s?"":a).length<2?u.length<2?`[^${i(u+c)}]`:`(?:(?!${i(u)})[^${i(c)}])`:u.length<2?`(?:(?!${i(c)})[^${i(u)}])`:`(?:(?!${i(c)}|${i(u)})[\\s\\S])`}+)`:o+="([\\s\\S]+)",r.push(d),a="",s=!1;continue}}return o}(t,u,p,e.originalPath))}let h=`^(?:${m.join("|")})`;return f&&(h+=`(?:${i(u)}$)?`),{regexp:new RegExp(h+=c?"$":`(?=${i(u)}|$)`,d?"":"i"),keys:p}};let r=e=>e,n=/^[$_\p{ID_Start}]$/u,o=/^[$\u200c\u200d\p{ID_Continue}]$/u,a={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function i(e){return e.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}class s{constructor(e,t){this.tokens=e,this.originalPath=t}}class l extends TypeError{constructor(e,t){let r=e;t&&(r+=`: ${t}`),super(r+="; visit https://git.new/pathToRegexpError for info"),this.originalPath=t}}},5338(e,t,r){"use strict";var n=r(1779);t.createRoot=n.createRoot,t.hydrateRoot=n.hydrateRoot},3904(e,t,r){"use strict";let n=Symbol("SemVer ANY");class o{static get ANY(){return n}constructor(e,t){if(t=a(t),e instanceof o)if(!!t.loose===e.loose)return e;else e=e.value;u("comparator",e=e.trim().split(/\s+/).join(" "),t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){let t=this.options.loose?i[s.COMPARATORLOOSE]:i[s.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))throw TypeError("a Comparator is required");return""===this.operator?""===this.value||new d(e.value,t).test(this.value):""===e.operator?""===e.value||new d(this.value,t).test(e.semver):!((t=a(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||l(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||l(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">"))}}e.exports=o;let a=r(968),{safeRe:i,t:s}=r(9718),l=r(2111),u=r(7272),c=r(3908),d=r(8311)},8311(e,t,r){"use strict";let n=/\s+/g;class o{constructor(e,t){if(t=i(t),e instanceof o)if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;else return new o(e.raw,t);if(e instanceof s)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(n," "),this.set=this.raw.split("||").map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter(e=>!y(e[0])),0===this.set.length)this.set=[e];else if(this.set.length>1){for(const e of this.set)if(1===e.length&&v(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&h)|(this.options.loose&&g))+":"+e,r=a.get(t);if(r)return r;let n=this.options.loose,o=n?c[d.HYPHENRANGELOOSE]:c[d.HYPHENRANGE];l("hyphen replace",e=e.replace(o,R(this.options.includePrerelease))),l("comparator trim",e=e.replace(c[d.COMPARATORTRIM],f)),l("tilde trim",e=e.replace(c[d.TILDETRIM],p)),l("caret trim",e=e.replace(c[d.CARETTRIM],m));let i=e.split(" ").map(e=>w(e,this.options)).join(" ").split(/\s+/).map(e=>O(e,this.options));n&&(i=i.filter(e=>(l("loose invalid filter",e,this.options),!!e.match(c[d.COMPARATORLOOSE])))),l("range list",i);let u=new Map;for(let e of i.map(e=>new s(e,this.options))){if(y(e))return[e];u.set(e.value,e)}u.size>1&&u.has("")&&u.delete("");let v=[...u.values()];return a.set(t,v),v}intersects(e,t){if(!(e instanceof o))throw TypeError("a Range is required");return this.set.some(r=>b(r,t)&&e.set.some(e=>b(e,t)&&r.every(r=>e.every(e=>r.intersects(e,t)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(T(this.set[t],e,this.options))return!0;return!1}}e.exports=o;let a=new(r(8794)),i=r(968),s=r(3904),l=r(7272),u=r(3908),{safeRe:c,t:d,comparatorTrimReplace:f,tildeTrimReplace:p,caretTrimReplace:m}=r(9718),{FLAG_INCLUDE_PRERELEASE:h,FLAG_LOOSE:g}=r(6874),y=e=>"<0.0.0-0"===e.value,v=e=>""===e.value,b=(e,t)=>{let r=!0,n=e.slice(),o=n.pop();for(;r&&n.length;)r=n.every(e=>o.intersects(e,t)),o=n.pop();return r},w=(e,t)=>(l("comp",e=e.replace(c[d.BUILD],""),t),l("caret",e=_(e,t)),l("tildes",e=x(e,t)),l("xrange",e=C(e,t)),l("stars",e=P(e,t)),e),E=e=>!e||"x"===e.toLowerCase()||"*"===e,x=(e,t)=>e.trim().split(/\s+/).map(e=>D(e,t)).join(" "),D=(e,t)=>{let r=t.loose?c[d.TILDELOOSE]:c[d.TILDE];return e.replace(r,(t,r,n,o,a)=>{let i;return l("tilde",e,t,r,n,o,a),E(r)?i="":E(n)?i=`>=${r}.0.0 <${+r+1}.0.0-0`:E(o)?i=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:a?(l("replaceTilde pr",a),i=`>=${r}.${n}.${o}-${a} <${r}.${+n+1}.0-0`):i=`>=${r}.${n}.${o} <${r}.${+n+1}.0-0`,l("tilde return",i),i})},_=(e,t)=>e.trim().split(/\s+/).map(e=>S(e,t)).join(" "),S=(e,t)=>{l("caret",e,t);let r=t.loose?c[d.CARETLOOSE]:c[d.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(t,r,o,a,i)=>{let s;return l("caret",e,t,r,o,a,i),E(r)?s="":E(o)?s=`>=${r}.0.0${n} <${+r+1}.0.0-0`:E(a)?s="0"===r?`>=${r}.${o}.0${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.0${n} <${+r+1}.0.0-0`:i?(l("replaceCaret pr",i),s="0"===r?"0"===o?`>=${r}.${o}.${a}-${i} <${r}.${o}.${+a+1}-0`:`>=${r}.${o}.${a}-${i} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${a}-${i} <${+r+1}.0.0-0`):(l("no pr"),s="0"===r?"0"===o?`>=${r}.${o}.${a}${n} <${r}.${o}.${+a+1}-0`:`>=${r}.${o}.${a}${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${a} <${+r+1}.0.0-0`),l("caret return",s),s})},C=(e,t)=>(l("replaceXRanges",e,t),e.split(/\s+/).map(e=>k(e,t)).join(" ")),k=(e,t)=>{e=e.trim();let r=t.loose?c[d.XRANGELOOSE]:c[d.XRANGE];return e.replace(r,(r,n,o,a,i,s)=>{l("xRange",e,r,n,o,a,i,s);let u=E(o),c=u||E(a),d=c||E(i);return"="===n&&d&&(n=""),s=t.includePrerelease?"-0":"",u?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&d?(c&&(a=0),i=0,">"===n?(n=">=",c?(o=+o+1,a=0):a=+a+1,i=0):"<="===n&&(n="<",c?o=+o+1:a=+a+1),"<"===n&&(s="-0"),r=`${n+o}.${a}.${i}${s}`):c?r=`>=${o}.0.0${s} <${+o+1}.0.0-0`:d&&(r=`>=${o}.${a}.0${s} <${o}.${+a+1}.0-0`),l("xRange return",r),r})},P=(e,t)=>(l("replaceStars",e,t),e.trim().replace(c[d.STAR],"")),O=(e,t)=>(l("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?d.GTE0PRE:d.GTE0],"")),R=e=>(t,r,n,o,a,i,s,l,u,c,d,f)=>(r=E(n)?"":E(o)?`>=${n}.0.0${e?"-0":""}`:E(a)?`>=${n}.${o}.0${e?"-0":""}`:i?`>=${r}`:`>=${r}${e?"-0":""}`,l=E(u)?"":E(c)?`<${+u+1}.0.0-0`:E(d)?`<${u}.${+c+1}.0-0`:f?`<=${u}.${c}.${d}-${f}`:e?`<${u}.${c}.${+d+1}-0`:`<=${l}`,`${r} ${l}`.trim()),T=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(l(e[r].semver),e[r].semver!==s.ANY&&e[r].semver.prerelease.length>0){let n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},3908(e,t,r){"use strict";let n=r(7272),{MAX_LENGTH:o,MAX_SAFE_INTEGER:a}=r(6874),{safeRe:i,t:s}=r(9718),l=r(968),{compareIdentifiers:u}=r(1123);class c{constructor(e,t){if(t=l(t),e instanceof c)if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;else e=e.version;else if("string"!=typeof e)throw TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>o)throw TypeError(`version is longer than ${o} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?i[s.LOOSE]:i[s.FULL]);if(!r)throw TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>a||this.major<0)throw TypeError("Invalid major version");if(this.minor>a||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>a||this.patch<0)throw TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<a)return t}return e}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(n("SemVer.compare",this.version,this.options,e),!(e instanceof c)){if("string"==typeof e&&e===this.version)return 0;e=new c(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return(e instanceof c||(e=new c(e,this.options)),this.major<e.major)?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:+(this.patch>e.patch)}comparePre(e){if(e instanceof c||(e=new c(e,this.options)),this.prerelease.length&&!e.prerelease.length)return -1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],o=e.prerelease[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return -1;else if(r===o)continue;else return u(r,o)}while(++t)}compareBuild(e){e instanceof c||(e=new c(e,this.options));let t=0;do{let r=this.build[t],o=e.build[t];if(n("build compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return -1;else if(r===o)continue;else return u(r,o)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&!1===r)throw Error("invalid increment argument: identifier is empty");if(t){let e=`-${t}`.match(this.options.loose?i[s.PRERELEASELOOSE]:i[s.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"release":if(0===this.prerelease.length)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(0!==this.minor||0!==this.patch||0===this.prerelease.length)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(0!==this.patch||0===this.prerelease.length)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{let e=+!!Number(r);if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===u(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=c},2111(e,t,r){"use strict";let n=r(4641),o=r(3999),a=r(5580),i=r(4089),s=r(7059),l=r(5200);e.exports=(e,t,r,u)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,u);case"!=":return o(e,r,u);case">":return a(e,r,u);case">=":return i(e,r,u);case"<":return s(e,r,u);case"<=":return l(e,r,u);default:throw TypeError(`Invalid operator: ${t}`)}}},560(e,t,r){"use strict";let n=r(3908);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},4641(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>0===n(e,t,r)},5580(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>n(e,t,r)>0},4089(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>n(e,t,r)>=0},7059(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>0>n(e,t,r)},5200(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>0>=n(e,t,r)},3999(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>0!==n(e,t,r)},7638(e,t,r){"use strict";let n=r(8311);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},6874(e){"use strict";e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||0x1fffffffffffff,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},7272(e){"use strict";e.exports="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{}},1123(e){"use strict";let t=/^[0-9]+$/,r=(e,r)=>{if("number"==typeof e&&"number"==typeof r)return e===r?0:e<r?-1:1;let n=t.test(e),o=t.test(r);return n&&o&&(e*=1,r*=1),e===r?0:n&&!o?-1:o&&!n?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},8794(e){"use strict";e.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(void 0!==t)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}},968(e){"use strict";let t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},9718(e,t,r){"use strict";let{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:a}=r(6874),i=r(7272),s=(t=e.exports={}).re=[],l=t.safeRe=[],u=t.src=[],c=t.safeSrc=[],d=t.t={},f=0,p="[a-zA-Z0-9-]",m=[["\\s",1],["\\d",a],[p,o]],h=(e,t,r)=>{let n=(e=>{for(let[t,r]of m)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),o=f++;i(e,o,t),d[e]=o,u[o]=t,c[o]=n,s[o]=new RegExp(t,r?"g":void 0),l[o]=new RegExp(n,r?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),h("MAINVERSION",`(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASE",`(?:-(${u[d.PRERELEASEIDENTIFIER]}(?:\\.${u[d.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${u[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[d.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${p}+`),h("BUILD",`(?:\\+(${u[d.BUILDIDENTIFIER]}(?:\\.${u[d.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${u[d.MAINVERSION]}${u[d.PRERELEASE]}?${u[d.BUILD]}?`),h("FULL",`^${u[d.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${u[d.MAINVERSIONLOOSE]}${u[d.PRERELEASELOOSE]}?${u[d.BUILD]}?`),h("LOOSE",`^${u[d.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${u[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${u[d.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:${u[d.PRERELEASE]})?${u[d.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:${u[d.PRERELEASELOOSE]})?${u[d.BUILD]}?)?)?`),h("XRANGE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h("COERCE",`${u[d.COERCEPLAIN]}(?:$|[^\\d])`),h("COERCEFULL",u[d.COERCEPLAIN]+`(?:${u[d.PRERELEASE]})?`+`(?:${u[d.BUILD]})?`+"(?:$|[^\\d])"),h("COERCERTL",u[d.COERCE],!0),h("COERCERTLFULL",u[d.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${u[d.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",h("TILDE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${u[d.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",h("CARET",`^${u[d.LONECARET]}${u[d.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${u[d.LONECARET]}${u[d.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${u[d.GTLT]}\\s*(${u[d.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]}|${u[d.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${u[d.XRANGEPLAIN]})\\s+-\\s+(${u[d.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${u[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[d.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},6369(e,t,r){"use strict";function n(e){if(Array.isArray(e))return e}r.d(t,{A:()=>n})},3029(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}r.d(t,{A:()=>n})},2901(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(6192);function o(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(0,n.A)(o.key),o)}}function a(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}},4467(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(6192);function o(e,t,r){return(t=(0,n.A)(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},6562(e,t,r){"use strict";function n(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}r.d(t,{A:()=>n})},6192(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(2284);function o(e){var t=function(e,t){if("object"!=(0,n.A)(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=(0,n.A)(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==(0,n.A)(t)?t:t+""}},2284(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}r.d(t,{A:()=>n})},3612(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function o(e,t){if(e){if("string"==typeof e)return n(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}r.d(t,{A:()=>o})},4106(e,t,r){"use strict";let n,o,a,i,s,l,u,c,d,f,p;r.r(t),r.d(t,{GenderUnknownIcon:()=>pp,evaluateAsNumber:()=>lB,getImportMapOverrideMap:()=>sM,StockManagementPictogram:()=>D9,ChemistryIcon:()=>f6,BabyIcon:()=>fZ,DashboardExtension:()=>mp,openmrsComponentDecorator:()=>cY,tryRegisterExtension:()=>fn,pictogramIds:()=>DA,ActivityIcon:()=>fV,compile:()=>lH,removeRouteMapOverride:()=>ln,TableBatchActions:()=>fw,getAsyncLifecycle:()=>cJ,subscribeOpenmrsEvent:()=>lh,PasswordIcon:()=>pM,Assessment2Pictogram:()=>DL,CloseIcon:()=>pe,setupRouteMapOverrides:()=>li,useFeatureFlag:()=>dw,reset:()=>uJ,LabOrderIcon:()=>pD,VisitMode:()=>lE,useLocations:()=>dU,getLifecycle:()=>cq,formatDatetime:()=>EJ,getVisitsForPatient:()=>lO,formatPartialDate:()=>EG,CustomOverflowMenu:()=>fk,LocationIcon:()=>pS,GroupIcon:()=>ph,createUseStore:()=>cb,VisitStatus:()=>lx,getSessionLocation:()=>sf,getCurrentImportMap:()=>sY,usePatient:()=>dZ,useRenderableExtensions:()=>dq,getOpenedWindowIndexByWorkspace:()=>u9,setLeftNav:()=>uQ,clearHistory:()=>i1,clearConfigErrors:()=>oo,formatTime:()=>Eq,isDevEnabled:()=>sE,closeWorkspaceGroup2:()=>_S,getCurrentRouteMap:()=>s8,ConfigurableLink:()=>cf,sessionStore:()=>st,setSessionLocale:()=>sm,subscribeSnackbarShown:()=>S,getLoggedInUser:()=>sd,GenderMaleIcon:()=>pd,getExtensionSlotConfigFromStore:()=>ny,evaluateAsNumberAsync:()=>lU,getImportMapDefaultMap:()=>s$,unregisterExtensionRendering:()=>uy,implementerToolsConfigStore:()=>nT,Type:()=>nn,InPatientPictogram:()=>DZ,cleanupObsoleteFeatureFlags:()=>ur,getAttachmentsUrl:()=>lc,showSnackbar:()=>_d,PatientBannerActionsMenu:()=>Dk,PatientSearchPictogram:()=>D0,DocumentAttachmentIcon:()=>po,Snackbar:()=>_i,CardiologyPictogram:()=>DB,ImageMedicalIcon:()=>pv,ActionableNotificationComponent:()=>x2,DiagnosisTags:()=>xT,iconIds:()=>fU,PatientsPictogram:()=>D1,interpolateUrl:()=>iG,setupHistory:()=>iX,subscribeToastShown:()=>_,detachAll:()=>uK,convertToLocaleCalendar:()=>EX,DocumentIcon:()=>pn,configInternalStore:()=>nd,ActionMenuButton2:()=>_U,setupDynamicOfflineDataHandler:()=>Sc,makeUrl:()=>i8,oneOf:()=>od,selectPreferredName:()=>Dh,MobileCheckIcon:()=>pT,createErrorHandler:()=>P,parseDate:()=>EU,getAttachmentByUuid:()=>ll,LeftNavMenu:()=>xM,getExtensionRegistration:()=>uV,ShoppingCartAddItemIcon:()=>mc,ReferralOrderIcon:()=>pW,ReportIcon:()=>pz,dispatchToastShown:()=>E,getImportMapNextPageMap:()=>sI,registerExtension:()=>uW,setupOfflineSync:()=>Su,DownloadIcon:()=>pa,useConnectivity:()=>Sh,provide:()=>nG,ShoppingCartArrowDownIcon:()=>pX,featureFlagsStore:()=>ue,jsep:()=>lT,GeriatricsPictogram:()=>DK,SearchIcon:()=>pZ,reportError:()=>k,slugify:()=>sK,isOmrsDateToday:()=>EL,getExtensionStore:()=>uv,BloodBankPictogram:()=>DF,TriagePictogram:()=>D7,Workspace2:()=>_$,refetchCurrentUser:()=>sl,CheckmarkOutlineIcon:()=>f3,registerExtensionSlot:()=>uq,AllergiesIcon:()=>mi,ArrowDownIcon:()=>fH,useOpenmrsInfinite:()=>dO,getExtensionConfigFromExtensionSlotStore:()=>nE,OpenmrsDatePicker:()=>xO,getExtensionConfigFromStore:()=>nw,getDynamicOfflineDataEntries:()=>Sd,getLocaleDisplayName:()=>En,messageOmrsServiceWorker:()=>Sp,navigate:()=>iY,launchWorkspace2:()=>_C,getGroupByWindowName:()=>u5,CustomOverflowMenuItem:()=>fP,isUrl:()=>oc,CaretDownIcon:()=>fJ,ArrowLeftIcon:()=>fz,FacilityPictogram:()=>Dz,ViewOffIcon:()=>mn,updateInternalExtensionStore:()=>ud,dispatchActionableNotificationShown:()=>b,resetRouteMapOverrides:()=>lo,formatDurationBetween:()=>E5,defaultVisitCustomRepresentation:()=>lD,getBreadcrumbsFor:()=>ow,useOpenmrsPagination:()=>dx,Pagination:()=>Dc,CheckmarkFilledIcon:()=>f4,clearCurrentUser:()=>su,showModal:()=>xJ,ChevronUpIcon:()=>f7,saveVisit:()=>lk,useAttachments:()=>da,Pictogram:()=>_o,useExtensionSlot:()=>cS,ChevronDownIcon:()=>f5,OpenmrsDateRangePicker:()=>xR,deleteAttachmentPermanently:()=>lf,getVisitTypes:()=>lw,OverflowMenuHorizontalIcon:()=>p$,EventScheduleIcon:()=>pl,getSessionStore:()=>si,ProcedureOrderIcon:()=>pU,preloadImport:()=>sZ,registerWorkspaceWindows2:()=>u7,useOnVisible:()=>dW,setSessionLocation:()=>sp,userHasAccess:()=>sc,ChartAverageIcon:()=>f1,getFeatureFlag:()=>un,UserAvatarIcon:()=>p7,renderExtension:()=>cl,useFhirInfinite:()=>dA,toVisitTypeObject:()=>lv,useSession:()=>dJ,EmergencyDepartmentPictogram:()=>DH,Notification:()=>x0,dispatchSnackbarShown:()=>w,formatDate:()=>EZ,workspace2StoreActions:()=>_O,SwitcherIcon:()=>pq,esmStyleGuideSchema:()=>fy,getImportMapDisabledOverrides:()=>sL,useAssignedExtensionIds:()=>dr,CaretRightIcon:()=>fQ,evaluateAsType:()=>lV,PageHeader:()=>Dl,TranslateIcon:()=>p6,setUserProperties:()=>sh,MovementIcon:()=>pA,renderInlineNotifications:()=>x7,subscribePrecacheStaticDependencies:()=>Sm,PaymentsDeskPictogram:()=>D2,usePrimaryIdentifierCode:()=>dY,useLayoutType:()=>dI,getCurrentUser:()=>sa,XrayPictogram:()=>_e,CaretUpIcon:()=>f0,renderActionableNotifications:()=>Dt,OpenmrsAppContext:()=>c9,setupModals:()=>xq,getDefaultsFromConfigSchema:()=>function e(t){let r={};for(let n of Object.keys(t))if(Sn(t[n])&&t[n].hasOwnProperty("_default"))r[n]=t[n]._default;else{if(n.startsWith("_"))continue;Sn(t[n])?r[n]=e(t[n]):r[n]=t[n]}return r},subscribeTo:()=>W,recordConfigDerivationError:()=>nO,useAbortController:()=>c7,Extension:()=>cp,getFhirServerPaginationHandlers:()=>dC,useConnectedExtensions:()=>dc,registerApp:()=>fa,HospitalBedIcon:()=>py,useExtensionInternalStore:()=>dy,configExtensionStore:()=>np,getSynchronizationItems:()=>Sf,getExtensionSlotsConfigStore:()=>nh,registerExtensionRendering:()=>ug,RenderIfValueIsTruthy:()=>c8,registerFeatureFlag:()=>ut,useFhirFetchAll:()=>dj,restBaseUrl:()=>i6,CalendarHeatMapIcon:()=>fY,isImportMapOverrideDisabled:()=>sF,resetConfigSystem:()=>oa,getExtensionInternalStore:()=>uu,registerGlobalStore:()=>U,evaluateAsBoolean:()=>lL,PatientBannerPatientInfo:()=>DS,addRouteMapOverride:()=>lr,getDefaultCalendar:()=>Ez,SettingsIcon:()=>pY,DrugOrderIcon:()=>pi,ProgramsIcon:()=>pV,useAssignedExtensions:()=>c_,CloseFilledIcon:()=>pt,canAccessStorage:()=>Sr,registerDefaultCalendar:()=>EH,TreeViewAltIcon:()=>p9,OverflowMenuVerticalIcon:()=>pI,clearConfigDerivationError:()=>nR,getConfigStore:()=>nm,InformationSquareIcon:()=>pE,EmptyCard:()=>xA,ChevronLeftIcon:()=>f9,RadiologyIcon:()=>mu,useCandidateExtensions:()=>dn,renderToasts:()=>_g,isDesktop:()=>dM,integrateBreakpoints:()=>fc,RegistrationPictogram:()=>D6,CardHeader:()=>fm,getExtensionRegistrationFrom:()=>uU,InformationIcon:()=>pb,TrashCanIcon:()=>p5,useShallowStableValue:()=>cm,PatientDocumentsPictogram:()=>DQ,useOpenmrsSWR:()=>dH,Assessment1Pictogram:()=>DM,finishRegisteringAllApps:()=>fi,importDynamic:()=>sG,useFhirPagination:()=>dS,useVisitContextStore:()=>d6,ArrowUpIcon:()=>fG,showActionableNotification:()=>Dr,useForceUpdate:()=>dE,useVisit:()=>d5,PatientBannerPatientIdentifiers:()=>DE,TransferPictogram:()=>D8,usePagination:()=>dz,Breakpoint:()=>fs,PatientBannerToggleContactDetailsButton:()=>_V,CloseOutlineIcon:()=>pr,ObstetricsPictogram:()=>DX,parseDateInput:()=>E0,getConfig:()=>nY,attach:()=>uH,getLocale:()=>Eo,isUrlWithTemplateParameters:()=>ou,useEmrConfiguration:()=>dh,useLeftNav:()=>dL,ToolsIcon:()=>p3,ErrorState:()=>x$,detach:()=>uz,setCurrentVisit:()=>lC,ConditionsIcon:()=>ml,SaveIcon:()=>pG,useConfig:()=>du,validator:()=>no,CalendarIcon:()=>fq,getHistory:()=>iQ,StickyNoteAddIcon:()=>pQ,useWorkspace2Store:()=>_R,getPatientName:()=>Dd,getVisitStore:()=>lS,getCoreTranslation:()=>iK,registerModuleWithConfigSystem:()=>nW,registerModuleLoad:()=>nH,getBreadcrumbs:()=>oy,extractVariableNames:()=>l9,translateFrom:()=>iz,useStoreWithActions:()=>cv,EditIcon:()=>ps,getCandidateExtensions:()=>uY,shallowEqual:()=>R,subscribeNotificationShown:()=>x,MaximizeIcon:()=>pk,promptForClosingWorkspaces:()=>_P,WarningIcon:()=>ma,fhirBaseUrl:()=>i5,matchLocale:()=>St,usePatientPhoto:()=>DR,registerBreadcrumb:()=>oh,EventsIcon:()=>pu,createGlobalStore:()=>B,subscribeToFeatureFlag:()=>uo,useExtensionStore:()=>db,createAttachment:()=>ld,useLeftNavStore:()=>dF,TableIcon:()=>p2,Icon:()=>mf,InformationFilledIcon:()=>pw,getCurrentPageMap:()=>sA,LaboratoryPictogram:()=>DY,temporaryConfigStore:()=>nf,toDateObjectStrict:()=>EF,defineConfigSchema:()=>nV,filterBreadcrumbs:()=>ob,invalidateImplementerToolsConfig:()=>nk,PatientBannerContactDetails:()=>_Z,getAssignedExtensions:()=>uZ,PatientPhoto:()=>Dj,MaterialOrderIcon:()=>pC,MicroscopeIcon:()=>pR,visitTypesUrl:()=>lb,scheduleRecomputation:()=>uD,PharmacyPictogram:()=>D4,AttachmentIcon:()=>ms,MoneyIcon:()=>pN,getAttachments:()=>lu,PageHeaderContent:()=>Du,MedicationIcon:()=>pP,PrinterIcon:()=>pB,PatientListsPictogram:()=>_r,useAppContext:()=>de,isOpenmrsRoutes:()=>sX,AppointmentsAltPictogram:()=>DI,GenericOrderTypeIcon:()=>pm,batchExtensionUpdates:()=>uE,useExtensionSlotStore:()=>cx,ViewIcon:()=>mo,formattedName:()=>Dm,sessionEndpoint:()=>i9,duration:()=>E3,resetImportMapOverrides:()=>sV,TableOfContentsIcon:()=>p1,CaretLeftIcon:()=>fX,getTranslationOverrides:()=>nq,isVersionSatisfied:()=>Si,EmptyCardIllustration:()=>xj,PenIcon:()=>pF,verifyTotpCode:()=>sg,validators:()=>of,setupImportMapOverrides:()=>sz,showToast:()=>_y,useDefineAppContext:()=>c5,getGlobalStore:()=>V,useOnClickOutside:()=>dV,getWindowByWorkspaceName:()=>u6,ArrowRightIcon:()=>fK,loadLifeCycles:()=>fe,registerBreadcrumbs:()=>og,MotherIcon:()=>pj,fetchCurrentPatient:()=>lp,Toast:()=>_f,MessageQueueIcon:()=>pO,TwoFactorAuthenticationIcon:()=>p8,Pharmacy2Pictogram:()=>D3,goBackInHistory:()=>i0,GroupAccessIcon:()=>pg,getExtensionRenderingsStore:()=>uc,setImplementerToolsConfigRecomputer:()=>nC,getAsyncExtensionLifecycle:()=>cQ,setupApiModule:()=>sD,renderLoadingSpinner:()=>_Y,showNotification:()=>De,getModalRegistration:()=>u4,ListCheckedIcon:()=>p_,ResponsiveWrapper:()=>_a,GynaecologyPictogram:()=>DG,ShoppingCartIcon:()=>pJ,getRouteMapNextPageMap:()=>le,MetadataExportPictogram:()=>DJ,updateVisit:()=>lP,backendDependencies:()=>sx,MaybePictogram:()=>_n,createParcelMounter:()=>ci,openmrsFetch:()=>i7,useStore:()=>cy,isOpenmrsAppRoutes:()=>sJ,HomePictogram:()=>_t,DentistryPictogram:()=>DV,ServiceQueuesPictogram:()=>D5,toLanguageTag:()=>Er,setFeatureFlag:()=>ua,DigitalTrustPictogram:()=>DW,NumericObservation:()=>Di,attachmentUrl:()=>ls,interpolateString:()=>iZ,inRange:()=>ol,useExtensionSlotMeta:()=>dv,AppointmentsPictogram:()=>D$,renderSnackbars:()=>_c,getRegisteredWorkspace2Names:()=>_N,logout:()=>sy,toLocationObject:()=>lg,ChartLineIcon:()=>f2,UserHasAccess:()=>dX,evaluateAsBooleanAsync:()=>lF,createDashboard:()=>mm,getLocations:()=>ly,useExtensionContext:()=>dg,getExtensionsConfigStore:()=>nv,getRouteMapDefaultMap:()=>s7,age:()=>Dy,isOmrsDateStrict:()=>EM,registerWorkspaceGroups2:()=>u8,usePaginationInfo:()=>dK,evaluateAsync:()=>lM,useOpenmrsFetchAll:()=>dT,removeImportMapOverride:()=>sU,useVisitTypes:()=>d8,ageAsDuration:()=>Dg,getExtensionNameFromId:()=>uB,renderParcel:()=>ca,useWorkspace2Context:()=>_T,ResetIcon:()=>pK,RenewIcon:()=>pH,subscribeActionableNotificationShown:()=>D,ErrorCard:()=>xI,GenderFemaleIcon:()=>pc,enableImportMapOverride:()=>sW,retry:()=>Ss,ComponentContext:()=>cd,ExtensionSlot:()=>ck,unsetLeftNav:()=>u0,addImportMapOverride:()=>sB,MaybeIcon:()=>md,useCustomOverflowMenu:()=>fC,PedestrianFamilyIcon:()=>pL,CtScanPictogram:()=>DU,dispatchNotificationShown:()=>v,leftNavStore:()=>uX,OpenmrsFetchError:()=>se,UserFollowIcon:()=>me,launchWorkspaceGroup2:()=>__,ChevronRightIcon:()=>f8,UserXrayIcon:()=>mt,GenderOtherIcon:()=>pf,formatDuration:()=>EQ,toOmrsIsoString:()=>EB,Labs2Pictogram:()=>Dq,workspace2Store:()=>u3,setUserLanguage:()=>ss,useBodyScrollLock:()=>di,getExtensionConfig:()=>nb,SyringeIcon:()=>p0,LocationPicker:()=>xL,useDebounce:()=>dd,TimeIcon:()=>p4,getExtensionSlotConfig:()=>ng,AddIcon:()=>fW,getRouteMapOverrideMap:()=>lt,processConfig:()=>nJ,InventoryManagementIcon:()=>px,registerWorkspaces2:()=>ce,UserIcon:()=>mr,formatPatientName:()=>Dp,fireOpenmrsEvent:()=>lm,registerModal:()=>u2,registerTranslationNamespace:()=>nz,displayName:()=>Df,evaluate:()=>lI,defineExtensionConfigSchema:()=>nK,renderWorkspaceWindowsAndMenu:()=>_7,getSyncLifecycle:()=>cX,evaluateAsTypeAsync:()=>lW});let m="openmrs:notification-shown",h="openmrs:actionable-notification-shown",g="openmrs:toast-shown",y="openmrs:snack-bar-shown";function v(e){window.dispatchEvent(new CustomEvent(m,{detail:e}))}function b(e){window.dispatchEvent(new CustomEvent(h,{detail:e}))}function w(e){window.dispatchEvent(new CustomEvent(y,{detail:e}))}function E(e){window.dispatchEvent(new CustomEvent(g,{detail:e}))}function x(e){let t=t=>e(t.detail);return window.addEventListener(m,t),()=>window.removeEventListener(m,t)}function D(e){let t=t=>e(t.detail);return window.addEventListener(h,t),()=>window.removeEventListener(h,t)}function _(e){let t=t=>e(t.detail);return window.addEventListener(g,t),()=>window.removeEventListener(g,t)}function S(e){let t=t=>e(t.detail);return window.addEventListener(y,t),()=>window.removeEventListener(y,t)}function C(e,t){return e instanceof Error?e.message||t:"string"==typeof e&&e.trim().length>0?e:t}function k(e){let t=O(e);setTimeout(()=>{throw t})}function P(){let e=Error();return t=>{let r=O(t);r.stack+=`
|
|
1
|
+
(globalThis.webpackChunk_openmrs_esm_cohort_builder_app=globalThis.webpackChunk_openmrs_esm_cohort_builder_app||[]).push([["719"],{7581(e){e.exports=function(e,t,r){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=r();return this.format(e)===t.format(e)}}},5238(e){e.exports=function(e,t,r){var n=t.prototype,o=function(e){var t=e.date,o=e.utc,a={};if(!(null===t||t instanceof Date||t instanceof Array||n.$utils().u(t)||"Object"!==t.constructor.name)){if(!Object.keys(t).length)return new Date;var i=o?r.utc():r();Object.keys(t).forEach(function(e){var r;a["date"===(r=n.$utils().p(e))?"day":r]=t[e]});var s=a.day||(a.year||a.month>=0?1:i.date()),l=a.year||i.year(),u=a.month>=0?a.month:a.year||a.day?0:i.month(),c=a.hour||0,d=a.minute||0,f=a.second||0,p=a.millisecond||0;return o?new Date(Date.UTC(l,u,s,c,d,f,p)):new Date(l,u,s,c,d,f,p)}return t},a=n.parse;n.parse=function(e){e.date=o.bind(this)(e),a.bind(this)(e)};var i=n.set,s=n.add,l=n.subtract,u=function(e,t,r,n){void 0===n&&(n=1);var o=Object.keys(t),a=this;return o.forEach(function(r){a=e.bind(a)(t[r]*n,r)}),a};n.set=function(e,t){return t=void 0===t?e:t,"Object"===e.constructor.name?u.bind(this)(function(e,t){return i.bind(this)(t,e)},t,e):i.bind(this)(e,t)},n.add=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t):s.bind(this)(e,t)},n.subtract=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t,-1):l.bind(this)(e,t)}}},3826(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,o,a){var i=o.prototype;a.utc=function(e){var t={date:e,utc:!0,args:arguments};return new o(t)},i.utc=function(t){var r=a(this.toDate(),{locale:this.$L,utc:!0});return t?r.add(this.utcOffset(),e):r},i.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var s=i.parse;i.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var l=i.init;i.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else l.call(this)};var u=i.utcOffset;i.utcOffset=function(n,o){var a=this.$utils().u;if(a(n))return this.$u?0:a(this.$offset)?u.call(this):this.$offset;if("string"==typeof n&&null===(n=function(e){void 0===e&&(e="");var n=e.match(t);if(!n)return null;var o=(""+n[0]).match(r)||["-",0,0],a=o[0],i=60*o[1]+ +o[2];return 0===i?0:"+"===a?i:-i}(n)))return this;var i=16>=Math.abs(n)?60*n:n,s=this;if(o)return s.$offset=i,s.$u=0===n,s;if(0!==n){var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(i+l,e)).$offset=i,s.$x.$localOffset=l}else s=this.utc();return s};var c=i.format;i.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,t)},i.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var d=i.toDate;i.toDate=function(e){return"s"===e&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var f=i.diff;i.diff=function(e,t,r){if(e&&this.$u===e.$u)return f.call(this,e,t,r);var n=this.local(),o=a(e).local();return f.call(n,o,t,r)}}}()},2849(e){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function n(e){if(!e||"[object Object]"!==r.call(e)||e.nodeType||e.setInterval)return!1;var n,o=t.call(e,"constructor"),a=t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!a)return!1;for(n in e);return void 0===n||t.call(e,n)}e.exports=function e(){var t,r,o,a,i,s,l=arguments[0]||{},u=1,c=arguments.length,d=!1;for("boolean"==typeof l&&(d=l,l=arguments[1]||{},u=2),"object"!=typeof l&&"function"!=typeof l&&(l={});u<c;u++)if(null!=(t=arguments[u]))for(r in t)o=l[r],l!==(a=t[r])&&(d&&a&&(n(a)||(i=Array.isArray(a)))?(i?(i=!1,s=o&&Array.isArray(o)?o:[]):s=o&&n(o)?o:{},l[r]=e(d,s,a)):void 0!==a&&(l[r]=a));return l}},6767(e,t,r){!function(t){"use strict";var n=r(6974);function o(e){return function(t,r){return"object"==typeof t&&(r=t,t=null),null==t&&(t=new Date().toString()),r||(r={}),e.call(this,t,r)}}var a=e.exports={generate:o(function(e,t){return new n(e,t)})};t&&(t.fn.geopattern=o(function(e,r){return this.each(function(){var n=t(this).attr("data-title-sha");n&&(r=t.extend({hash:n},r));var o=a.generate(e,r);t(this).css("background-image",o.toDataUrl())})}))}("u">typeof jQuery?jQuery:null)},2467(e){"use strict";e.exports={hex2rgb:function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,t,r,n){return t+t+r+r+n+n});var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},rgb2hex:function(e){return"#"+["r","g","b"].map(function(t){return("0"+e[t].toString(16)).slice(-2)}).join("")},rgb2hsl:function(e){var t,r,n=e.r,o=e.g,a=e.b,i=Math.max(n/=255,o/=255,a/=255),s=Math.min(n,o,a),l=(i+s)/2;if(i===s)t=r=0;else{var u=i-s;switch(r=l>.5?u/(2-i-s):u/(i+s),i){case n:t=(o-a)/u+6*(o<a);break;case o:t=(a-n)/u+2;break;case a:t=(n-o)/u+4}t/=6}return{h:t,s:r,l:l}},hsl2rgb:function(e){function t(e,t,r){return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?e+(t-e)*6*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}var r,n,o,a=e.h,i=e.s,s=e.l;if(0===i)r=n=o=s;else{var l=s<.5?s*(1+i):s+i-s*i,u=2*s-l;r=t(u,l,a+1/3),n=t(u,l,a),o=t(u,l,a-1/3)}return{r:Math.round(255*r),g:Math.round(255*n),b:Math.round(255*o)}},rgb2rgbString:function(e){return"rgb("+[e.r,e.g,e.b].join(",")+")"}}},6974(e,t,r){"use strict";var n=r(2849),o=r(2467),a=r(6743),i=r(8502),s={baseColor:"#933c3c"},l=["octogons","overlappingCircles","plusSigns","xes","sineWaves","hexagons","overlappingRings","plaid","triangles","squares","concentricCircles","diamonds","tessellation","nestedSquares","mosaicSquares","chevrons"],u="#000";function c(e,t,r){return parseInt(e.substr(t,r||1),16)}function d(e,t,r,n,o){return(parseFloat(e)-t)*(o-n)/(r-t)+n}function f(e){return e%2==0?"#ddd":"#222"}function p(e){return d(e,0,15,.02,.15)}var m=e.exports=function(e,t){return this.opts=n({},s,t),this.hash=t.hash||a(e),this.svg=new i,this.generateBackground(),this.generatePattern(),this};function h(e){return[[e,0,e,3*e],[0,e,3*e,e]]}function g(e){return[0,0,e,e,0,e,0,0].join(",")}function y(e,t,r,n,o){var a=g(n),i=p(o[0]),s=f(o[0]),l={stroke:u,"stroke-opacity":.02,"fill-opacity":i,fill:s};e.polyline(a,l).transform({translate:[t+n,r],scale:[-1,1]}),e.polyline(a,l).transform({translate:[t+n,r+2*n],scale:[1,-1]}),l={stroke:u,"stroke-opacity":.02,"fill-opacity":i=p(o[1]),fill:s=f(o[1])},e.polyline(a,l).transform({translate:[t+n,r+2*n],scale:[-1,-1]}),e.polyline(a,l).transform({translate:[t+n,r],scale:[1,1]})}function v(e,t,r,n,o){var a=p(o),i=f(o),s=g(n),l={stroke:u,"stroke-opacity":.02,"fill-opacity":a,fill:i};e.polyline(s,l).transform({translate:[t,r+n],scale:[1,-1]}),e.polyline(s,l).transform({translate:[t+2*n,r+n],scale:[-1,-1]}),e.polyline(s,l).transform({translate:[t,r+n],scale:[1,1]}),e.polyline(s,l).transform({translate:[t+2*n,r+n],scale:[-1,1]})}m.prototype.toSvg=function(){return this.svg.toString()},m.prototype.toString=function(){return this.toSvg()},m.prototype.toBase64=function(){var e=this.toSvg();return"u">typeof window&&"function"==typeof window.btoa?window.btoa(e):new Buffer(e).toString("base64")},m.prototype.toDataUri=function(){return"data:image/svg+xml;base64,"+this.toBase64()},m.prototype.toDataUrl=function(){return'url("'+this.toDataUri()+'")'},m.prototype.generateBackground=function(){var e,t,r,n;this.opts.color?r=o.hex2rgb(this.opts.color):(t=d(c(this.hash,14,3),0,4095,0,359),n=c(this.hash,17),(e=o.rgb2hsl(o.hex2rgb(this.opts.baseColor))).h=(360*e.h-t+360)%360/360,n%2==0?e.s=Math.min(1,(100*e.s+n)/100):e.s=Math.max(0,(100*e.s-n)/100),r=o.hsl2rgb(e)),this.color=o.rgb2hex(r),this.svg.rect(0,0,"100%","100%",{fill:o.rgb2rgbString(r)})},m.prototype.generatePattern=function(){var e=this.opts.generator;if(e){if(0>l.indexOf(e))throw Error("The generator "+e+" does not exist.")}else e=l[c(this.hash,20)];return this["geo"+e.slice(0,1).toUpperCase()+e.slice(1)]()},m.prototype.geoHexagons=function(){var e,t,r,n,o,a,i,s,l,m=d(c(this.hash,0),0,15,8,60),h=m*Math.sqrt(3),g=2*m,y=(s=m/2,[0,l=Math.sin(60*Math.PI/180)*m,s,0,s+m,0,2*m,l,s+m,2*l,s,2*l,0,l].join(","));for(this.svg.setWidth(3*g+3*m),this.svg.setHeight(6*h),t=0,i=0;i<6;i++)for(a=0;a<6;a++)o=c(this.hash,t),e=a%2==0?i*h:i*h+h/2,r=p(o),n={fill:f(o),"fill-opacity":r,stroke:u,"stroke-opacity":.02},this.svg.polyline(y,n).transform({translate:[a*m*1.5-g/2,e-h/2]}),0===a&&this.svg.polyline(y,n).transform({translate:[6*m*1.5-g/2,e-h/2]}),0===i&&(e=a%2==0?6*h:6*h+h/2,this.svg.polyline(y,n).transform({translate:[a*m*1.5-g/2,e-h/2]})),0===a&&0===i&&this.svg.polyline(y,n).transform({translate:[6*m*1.5-g/2,5*h+h/2]}),t++},m.prototype.geoSineWaves=function(){var e,t,r,n,o,a,i,s=Math.floor(d(c(this.hash,0),0,15,100,400)),l=Math.floor(d(c(this.hash,1),0,15,30,100)),u=Math.floor(d(c(this.hash,2),0,15,3,30));for(this.svg.setWidth(s),this.svg.setHeight(36*u),t=0;t<36;t++)r=p(a=c(this.hash,t)),e=f(a),i=s/4*.7,o={fill:"none",stroke:e,opacity:r,"stroke-width":""+u+"px"},n="M0 "+l+" C "+i+" 0, "+(s/2-i)+" 0, "+s/2+" "+l+" S "+(s-i)+" "+2*l+", "+s+" "+l+" S "+(1.5*s-i)+" 0, "+1.5*s+", "+l,this.svg.path(n,o).transform({translate:[-s/4,u*t-1.5*l]}),this.svg.path(n,o).transform({translate:[-s/4,u*t-1.5*l+36*u]})},m.prototype.geoChevrons=function(){var e,t,r,n,o,a,i,s=d(c(this.hash,0),0,15,30,80),l=d(c(this.hash,0),0,15,30,80),m=(e=.66*l,[[0,0,s/2,l-e,s/2,l,0,e,0,0],[s/2,l-e,s,0,s,e,s/2,l,s/2,l-e]].map(function(e){return e.join(",")}));for(this.svg.setWidth(6*s),this.svg.setHeight(6*l*.66),t=0,i=0;i<6;i++)for(a=0;a<6;a++)r=p(o=c(this.hash,t)),n={stroke:u,"stroke-opacity":.02,fill:f(o),"fill-opacity":r,"stroke-width":1},this.svg.group(n).transform({translate:[a*s,i*l*.66-l/2]}).polyline(m).end(),0===i&&this.svg.group(n).transform({translate:[a*s,6*l*.66-l/2]}).polyline(m).end(),t+=1},m.prototype.geoPlusSigns=function(){var e,t,r,n,o,a,i,s,l=d(c(this.hash,0),0,15,10,25),m=3*l,g=h(l);for(this.svg.setWidth(12*l),this.svg.setHeight(12*l),r=0,s=0;s<6;s++)for(i=0;i<6;i++)n=p(a=c(this.hash,r)),t=f(a),e=+(s%2!=0),o={fill:t,stroke:u,"stroke-opacity":.02,"fill-opacity":n},this.svg.group(o).transform({translate:[i*m-i*l+e*l-l,s*m-s*l-m/2]}).rect(g).end(),0===i&&this.svg.group(o).transform({translate:[4*m-i*l+e*l-l,s*m-s*l-m/2]}).rect(g).end(),0===s&&this.svg.group(o).transform({translate:[i*m-i*l+e*l-l,4*m-s*l-m/2]}).rect(g).end(),0===i&&0===s&&this.svg.group(o).transform({translate:[4*m-i*l+e*l-l,4*m-s*l-m/2]}).rect(g).end(),r++},m.prototype.geoXes=function(){var e,t,r,n,o,a,i,s=d(c(this.hash,0),0,15,10,25),l=h(s),u=3*s*.943;for(this.svg.setWidth(3*u),this.svg.setHeight(3*u),t=0,i=0;i<6;i++)for(a=0;a<6;a++)r=p(o=c(this.hash,t)),e=a%2==0?i*u-.5*u:i*u-.5*u+u/4,n={fill:f(o),opacity:r},this.svg.group(n).transform({translate:[a*u/2-u/2,e-i*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===a&&this.svg.group(n).transform({translate:[6*u/2-u/2,e-i*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===i&&(e=a%2==0?6*u-u/2:6*u-u/2+u/4,this.svg.group(n).transform({translate:[a*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end()),5===i&&this.svg.group(n).transform({translate:[a*u/2-u/2,e-11*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===a&&0===i&&this.svg.group(n).transform({translate:[6*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),t++},m.prototype.geoOverlappingCircles=function(){var e,t,r,n,o,a,i=d(c(this.hash,0),0,15,25,200)/2;for(this.svg.setWidth(6*i),this.svg.setHeight(6*i),e=0,a=0;a<6;a++)for(o=0;o<6;o++)t=p(n=c(this.hash,e)),r={fill:f(n),opacity:t},this.svg.circle(o*i,a*i,i,r),0===o&&this.svg.circle(6*i,a*i,i,r),0===a&&this.svg.circle(o*i,6*i,i,r),0===o&&0===a&&this.svg.circle(6*i,6*i,i,r),e++},m.prototype.geoOctogons=function(){var e,t,r,n,o,a,i,s=d(c(this.hash,0),0,15,10,60),l=[e=.33*s,0,s-e,0,s,e,s,s-e,s-e,s,e,s,0,s-e,0,e,e,0].join(",");for(this.svg.setWidth(6*s),this.svg.setHeight(6*s),r=0,i=0;i<6;i++)for(a=0;a<6;a++)n=p(o=c(this.hash,r)),t=f(o),this.svg.polyline(l,{fill:t,"fill-opacity":n,stroke:u,"stroke-opacity":.02}).transform({translate:[a*s,i*s]}),r+=1},m.prototype.geoSquares=function(){var e,t,r,n,o,a,i=d(c(this.hash,0),0,15,10,60);for(this.svg.setWidth(6*i),this.svg.setHeight(6*i),t=0,a=0;a<6;a++)for(o=0;o<6;o++)r=p(n=c(this.hash,t)),e=f(n),this.svg.rect(o*i,a*i,i,i,{fill:e,"fill-opacity":r,stroke:u,"stroke-opacity":.02}),t+=1},m.prototype.geoConcentricCircles=function(){var e,t,r,n,o,a,i=d(c(this.hash,0),0,15,10,60),s=i/5;for(this.svg.setWidth((i+s)*6),this.svg.setHeight((i+s)*6),t=0,a=0;a<6;a++)for(o=0;o<6;o++)r=p(n=c(this.hash,t)),e=f(n),this.svg.circle(o*i+o*s+(i+s)/2,a*i+a*s+(i+s)/2,i/2,{fill:"none",stroke:e,opacity:r,"stroke-width":s+"px"}),r=p(n=c(this.hash,39-t)),e=f(n),this.svg.circle(o*i+o*s+(i+s)/2,a*i+a*s+(i+s)/2,i/4,{fill:e,"fill-opacity":r}),t+=1},m.prototype.geoOverlappingRings=function(){var e,t,r,n,o,a,i=d(c(this.hash,0),0,15,10,60),s=i/4;for(this.svg.setWidth(6*i),this.svg.setHeight(6*i),e=0,a=0;a<6;a++)for(o=0;o<6;o++)t=p(n=c(this.hash,e)),r={fill:"none",stroke:f(n),opacity:t,"stroke-width":s+"px"},this.svg.circle(o*i,a*i,i-s/2,r),0===o&&this.svg.circle(6*i,a*i,i-s/2,r),0===a&&this.svg.circle(o*i,6*i,i-s/2,r),0===o&&0===a&&this.svg.circle(6*i,6*i,i-s/2,r),e+=1},m.prototype.geoTriangles=function(){var e,t,r,n,o,a,i,s,l=d(c(this.hash,0),0,15,15,80),m=l/2*Math.sqrt(3),h=[s=l/2,0,l,m,0,m,s,0].join(",");for(this.svg.setWidth(3*l),this.svg.setHeight(6*m),e=0,i=0;i<6;i++)for(a=0;a<6;a++)t=p(o=c(this.hash,e)),n={fill:f(o),"fill-opacity":t,stroke:u,"stroke-opacity":.02},r=i%2==0?180*(a%2==0):180*(a%2!=0),this.svg.polyline(h,n).transform({translate:[a*l*.5-l/2,m*i],rotate:[r,l/2,m/2]}),0===a&&this.svg.polyline(h,n).transform({translate:[6*l*.5-l/2,m*i],rotate:[r,l/2,m/2]}),e+=1},m.prototype.geoDiamonds=function(){var e,t,r,n,o,a,i,s=d(c(this.hash,0),0,15,10,50),l=d(c(this.hash,1),0,15,10,50),m=[s/2,0,s,l/2,s/2,l,0,l/2].join(",");for(this.svg.setWidth(6*s),this.svg.setHeight(3*l),t=0,i=0;i<6;i++)for(a=0;a<6;a++)r=p(o=c(this.hash,t)),n={fill:f(o),"fill-opacity":r,stroke:u,"stroke-opacity":.02},e=i%2==0?0:s/2,this.svg.polyline(m,n).transform({translate:[a*s-s/2+e,l/2*i-l/2]}),0===a&&this.svg.polyline(m,n).transform({translate:[6*s-s/2+e,l/2*i-l/2]}),0===i&&this.svg.polyline(m,n).transform({translate:[a*s-s/2+e,l/2*6-l/2]}),0===a&&0===i&&this.svg.polyline(m,n).transform({translate:[6*s-s/2+e,l/2*6-l/2]}),t+=1},m.prototype.geoNestedSquares=function(){var e,t,r,n,o,a,i=d(c(this.hash,0),0,15,4,12),s=7*i;for(this.svg.setWidth((s+i)*6+6*i),this.svg.setHeight((s+i)*6+6*i),e=0,a=0;a<6;a++)for(o=0;o<6;o++)t=p(n=c(this.hash,e)),r={fill:"none",stroke:f(n),opacity:t,"stroke-width":i+"px"},this.svg.rect(o*s+o*i*2+i/2,a*s+a*i*2+i/2,s,s,r),t=p(n=c(this.hash,39-e)),r={fill:"none",stroke:f(n),opacity:t,"stroke-width":i+"px"},this.svg.rect(o*s+o*i*2+i/2+2*i,a*s+a*i*2+i/2+2*i,3*i,3*i,r),e+=1},m.prototype.geoMosaicSquares=function(){var e,t,r,n=d(c(this.hash,0),0,15,15,50);for(this.svg.setWidth(8*n),this.svg.setHeight(8*n),e=0,r=0;r<4;r++)for(t=0;t<4;t++)t%2==0?r%2==0?v(this.svg,t*n*2,r*n*2,n,c(this.hash,e)):y(this.svg,t*n*2,r*n*2,n,[c(this.hash,e),c(this.hash,e+1)]):r%2==0?y(this.svg,t*n*2,r*n*2,n,[c(this.hash,e),c(this.hash,e+1)]):v(this.svg,t*n*2,r*n*2,n,c(this.hash,e)),e+=1},m.prototype.geoPlaid=function(){var e,t,r,n,o,a,i=0,s=0;for(t=0;t<36;)i+=c(this.hash,t)+5,r=p(a=c(this.hash,t+1)),e=f(a),n=a+5,this.svg.rect(0,i,"100%",n,{opacity:r,fill:e}),i+=n,t+=2;for(t=0;t<36;)s+=c(this.hash,t)+5,r=p(a=c(this.hash,t+1)),e=f(a),o=a+5,this.svg.rect(s,0,o,"100%",{opacity:r,fill:e}),s+=o,t+=2;this.svg.setWidth(s),this.svg.setHeight(i)},m.prototype.geoTessellation=function(){var e,t,r,n,o=d(c(this.hash,0),0,15,5,40),a=o*Math.sqrt(3),i=2*o,s=o/2*Math.sqrt(3),l=[0,0,s,o/2,0,o,0,0].join(","),m=3*o+2*s,h=2*a+2*o;for(this.svg.setWidth(m),this.svg.setHeight(h),e=0;e<20;e++)switch(t=p(n=c(this.hash,e)),r={stroke:u,"stroke-opacity":.02,fill:f(n),"fill-opacity":t,"stroke-width":1},e){case 0:this.svg.rect(-o/2,-o/2,o,o,r),this.svg.rect(m-o/2,-o/2,o,o,r),this.svg.rect(-o/2,h-o/2,o,o,r),this.svg.rect(m-o/2,h-o/2,o,o,r);break;case 1:this.svg.rect(i/2+s,a/2,o,o,r);break;case 2:this.svg.rect(-o/2,h/2-o/2,o,o,r),this.svg.rect(m-o/2,h/2-o/2,o,o,r);break;case 3:this.svg.rect(i/2+s,1.5*a+o,o,o,r);break;case 4:this.svg.polyline(l,r).transform({translate:[o/2,-o/2],rotate:[0,o/2,s/2]}),this.svg.polyline(l,r).transform({translate:[o/2,h- -o/2],rotate:[0,o/2,s/2],scale:[1,-1]});break;case 5:this.svg.polyline(l,r).transform({translate:[m-o/2,-o/2],rotate:[0,o/2,s/2],scale:[-1,1]}),this.svg.polyline(l,r).transform({translate:[m-o/2,h+o/2],rotate:[0,o/2,s/2],scale:[-1,-1]});break;case 6:this.svg.polyline(l,r).transform({translate:[m/2+o/2,a/2]});break;case 7:this.svg.polyline(l,r).transform({translate:[m-m/2-o/2,a/2],scale:[-1,1]});break;case 8:this.svg.polyline(l,r).transform({translate:[m/2+o/2,h-a/2],scale:[1,-1]});break;case 9:this.svg.polyline(l,r).transform({translate:[m-m/2-o/2,h-a/2],scale:[-1,-1]});break;case 10:this.svg.polyline(l,r).transform({translate:[o/2,h/2-o/2]});break;case 11:this.svg.polyline(l,r).transform({translate:[m-o/2,h/2-o/2],scale:[-1,1]});break;case 12:this.svg.rect(0,0,o,o,r).transform({translate:[o/2,o/2],rotate:[-30,0,0]});break;case 13:this.svg.rect(0,0,o,o,r).transform({scale:[-1,1],translate:[-m+o/2,o/2],rotate:[-30,0,0]});break;case 14:this.svg.rect(0,0,o,o,r).transform({translate:[o/2,h/2-o/2-o],rotate:[30,0,o]});break;case 15:this.svg.rect(0,0,o,o,r).transform({scale:[-1,1],translate:[-m+o/2,h/2-o/2-o],rotate:[30,0,o]});break;case 16:this.svg.rect(0,0,o,o,r).transform({scale:[1,-1],translate:[o/2,-h+h/2-o/2-o],rotate:[30,0,o]});break;case 17:this.svg.rect(0,0,o,o,r).transform({scale:[-1,-1],translate:[-m+o/2,-h+h/2-o/2-o],rotate:[30,0,o]});break;case 18:this.svg.rect(0,0,o,o,r).transform({scale:[1,-1],translate:[o/2,-h+o/2],rotate:[-30,0,0]});break;case 19:this.svg.rect(0,0,o,o,r).transform({scale:[-1,-1],translate:[-m+o/2,-h+o/2],rotate:[-30,0,0]})}}},6743(e){"use strict";function t(){var e=0x67452301,t=0xefcdab89,r=0x98badcfe,n=0x10325476,o=0xc3d2e1f0,a=new Uint32Array(80),i=0,s=24,l=0;function u(){for(var s,l,u=16;u<80;u++){var c=a[u-3]^a[u-8]^a[u-14]^a[u-16];a[u]=c<<1|c>>>31}var d=e,f=t,p=r,m=n,h=o;for(u=0;u<80;u++){u<20?(s=m^f&(p^m),l=0x5a827999):u<40?(s=f^p^m,l=0x6ed9eba1):u<60?(s=f&p|m&(f|p),l=0x8f1bbcdc):(s=f^p^m,l=0xca62c1d6);var g=(d<<5|d>>>27)+s+h+l+(0|a[u]);h=m,m=p,p=f<<30|f>>>2,f=d,d=g}for(u=0,e=e+d|0,t=t+f|0,r=r+p|0,n=n+m|0,o=o+h|0,i=0;u<16;u++)a[u]=0}function c(e){a[i]|=(255&e)<<s,s?s-=8:(i++,s=24),16===i&&u()}function d(e){for(var t="",r=28;r>=0;r-=4)t+=(e>>r&15).toString(16);return t}return{update:function(e){if("string"==typeof e){var t=e.length;l+=8*t;for(var r=0;r<t;r++)c(e.charCodeAt(r));return}var n=e.length;l+=8*n;for(var o=0;o<n;o++)c(e[o])},digest:function(){c(128),(i>14||14===i&&s<24)&&u(),i=14,s=24,c(0),c(0),c(l>0xffffffffff?l/0x10000000000:0),c(l>0xffffffff?l/0x100000000:0);for(var a=24;a>=0;a-=8)c(l>>a);return d(e)+d(t)+d(r)+d(n)+d(o)}}}e.exports=function(e){if(void 0===e)return t();var r=t();return r.update(e),r.digest()}},8502(e,t,r){"use strict";var n=r(2849),o=r(6541);function a(){return this.width=100,this.height=100,this.svg=o("svg"),this.context=[],this.setAttributes(this.svg,{xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height}),this}e.exports=a,a.prototype.currentContext=function(){return this.context[this.context.length-1]||this.svg},a.prototype.end=function(){return this.context.pop(),this},a.prototype.currentNode=function(){var e=this.currentContext();return e.lastChild||e},a.prototype.transform=function(e){return this.currentNode().setAttribute("transform",Object.keys(e).map(function(t){return t+"("+e[t].join(",")+")"}).join(" ")),this},a.prototype.setAttributes=function(e,t){Object.keys(t).forEach(function(r){e.setAttribute(r,t[r])})},a.prototype.setWidth=function(e){this.svg.setAttribute("width",Math.floor(e))},a.prototype.setHeight=function(e){this.svg.setAttribute("height",Math.floor(e))},a.prototype.toString=function(){return this.svg.toString()},a.prototype.rect=function(e,t,r,a,i){var s=this;if(Array.isArray(e))return e.forEach(function(e){s.rect.apply(s,e.concat(i))}),this;var l=o("rect");return this.currentContext().appendChild(l),this.setAttributes(l,n({x:e,y:t,width:r,height:a},i)),this},a.prototype.circle=function(e,t,r,a){var i=o("circle");return this.currentContext().appendChild(i),this.setAttributes(i,n({cx:e,cy:t,r:r},a)),this},a.prototype.path=function(e,t){var r=o("path");return this.currentContext().appendChild(r),this.setAttributes(r,n({d:e},t)),this},a.prototype.polyline=function(e,t){var r=this;if(Array.isArray(e))return e.forEach(function(e){r.polyline(e,t)}),this;var a=o("polyline");return this.currentContext().appendChild(a),this.setAttributes(a,n({points:e},t)),this},a.prototype.group=function(e){var t=o("g");return this.currentContext().appendChild(t),this.context.push(t),this.setAttributes(t,n({},e)),this}},6541(e){"use strict";var t=e.exports=function(e){return this instanceof t?(this.tagName=e,this.attributes=Object.create(null),this.children=[],this.lastChild=null,this):new t(e)};t.prototype.appendChild=function(e){return this.children.push(e),this.lastChild=e,this},t.prototype.setAttribute=function(e,t){return this.attributes[e]=t,this},t.prototype.toString=function(){var e=this;return["<",e.tagName,Object.keys(e.attributes).map(function(t){return[" ",t,'="',e.attributes[t],'"'].join("")}).join(""),">",e.children.map(function(e){return e.toString()}).join(""),"</",e.tagName,">"].join("")}},8067(e,t){"use strict";t.pathToRegexp=function(e,t={}){let{delimiter:u="/",end:c=!0,sensitive:d=!1,trailing:f=!0}=t,p=[],m=[];for(let c of function e(t,r){if(Array.isArray(t))for(let n of t)e(n,r);else r.push(t);return r}(e,[])){let e="object"==typeof c?c:function(e,t={}){let{encodePath:i=r}=t,u=[...e],c=[],d=0,f=0;function p(){let t="";if(n.test(u[d]))do t+=u[d++];while(o.test(u[d]));else if('"'===u[d]){let r=d;for(;d++<u.length;){if('"'===u[d]){d++,r=0;break}"\\"===u[d]&&d++,t+=u[d]}if(r)throw new l(`Unterminated quote at index ${r}`,e)}if(!t)throw new l(`Missing parameter name at index ${d}`,e);return t}for(;d<u.length;){let e=u[d],t=a[e];t?c.push({type:t,index:d++,value:e}):"\\"===e?c.push({type:"escape",index:d++,value:u[d++]}):":"===e?c.push({type:"param",index:d++,value:p()}):"*"===e?c.push({type:"wildcard",index:d++,value:p()}):c.push({type:"char",index:d++,value:e})}return c.push({type:"end",index:d,value:""}),new s(function t(r){let n=[];for(;;){let o=c[f++];if(o.type===r)break;if("char"===o.type||"escape"===o.type){let e=o.value,t=c[f];for(;"char"===t.type||"escape"===t.type;)e+=t.value,t=c[++f];n.push({type:"text",value:i(e)});continue}if("param"===o.type||"wildcard"===o.type){n.push({type:o.type,name:o.value});continue}if("{"===o.type){n.push({type:"group",tokens:t("}")});continue}throw new l(`Unexpected ${o.type} at index ${o.index}, expected ${r}`,e)}return n}("end"),e)}(c,t);for(let t of function* e(t,r,n){if(r===t.length)return yield n;let o=t[r];if("group"===o.type)for(let a of e(o.tokens,0,n.slice()))yield*e(t,r+1,a);else n.push(o);yield*e(t,r+1,n)}(e.tokens,0,[]))m.push(function(e,t,r,n){let o="",a="",s=!0;for(let d of e){if("text"===d.type){o+=i(d.value),a+=d.value,s||(s=d.value.includes(t));continue}if("param"===d.type||"wildcard"===d.type){var u,c;if(!s&&!a)throw new l(`Missing text before "${d.name}" ${d.type}`,n);"param"===d.type?o+=`(${u=t,(c=s?"":a).length<2?u.length<2?`[^${i(u+c)}]`:`(?:(?!${i(u)})[^${i(c)}])`:u.length<2?`(?:(?!${i(c)})[^${i(u)}])`:`(?:(?!${i(c)}|${i(u)})[\\s\\S])`}+)`:o+="([\\s\\S]+)",r.push(d),a="",s=!1;continue}}return o}(t,u,p,e.originalPath))}let h=`^(?:${m.join("|")})`;return f&&(h+=`(?:${i(u)}$)?`),{regexp:new RegExp(h+=c?"$":`(?=${i(u)}|$)`,d?"":"i"),keys:p}};let r=e=>e,n=/^[$_\p{ID_Start}]$/u,o=/^[$\u200c\u200d\p{ID_Continue}]$/u,a={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function i(e){return e.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}class s{constructor(e,t){this.tokens=e,this.originalPath=t}}class l extends TypeError{constructor(e,t){let r=e;t&&(r+=`: ${t}`),super(r+="; visit https://git.new/pathToRegexpError for info"),this.originalPath=t}}},5338(e,t,r){"use strict";var n=r(1779);t.createRoot=n.createRoot,t.hydrateRoot=n.hydrateRoot},3904(e,t,r){"use strict";let n=Symbol("SemVer ANY");class o{static get ANY(){return n}constructor(e,t){if(t=a(t),e instanceof o)if(!!t.loose===e.loose)return e;else e=e.value;u("comparator",e=e.trim().split(/\s+/).join(" "),t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){let t=this.options.loose?i[s.COMPARATORLOOSE]:i[s.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))throw TypeError("a Comparator is required");return""===this.operator?""===this.value||new d(e.value,t).test(this.value):""===e.operator?""===e.value||new d(this.value,t).test(e.semver):!((t=a(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||l(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||l(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">"))}}e.exports=o;let a=r(968),{safeRe:i,t:s}=r(9718),l=r(2111),u=r(7272),c=r(3908),d=r(8311)},8311(e,t,r){"use strict";let n=/\s+/g;class o{constructor(e,t){if(t=i(t),e instanceof o)if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;else return new o(e.raw,t);if(e instanceof s)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(n," "),this.set=this.raw.split("||").map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter(e=>!y(e[0])),0===this.set.length)this.set=[e];else if(this.set.length>1){for(const e of this.set)if(1===e.length&&v(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&h)|(this.options.loose&&g))+":"+e,r=a.get(t);if(r)return r;let n=this.options.loose,o=n?c[d.HYPHENRANGELOOSE]:c[d.HYPHENRANGE];l("hyphen replace",e=e.replace(o,R(this.options.includePrerelease))),l("comparator trim",e=e.replace(c[d.COMPARATORTRIM],f)),l("tilde trim",e=e.replace(c[d.TILDETRIM],p)),l("caret trim",e=e.replace(c[d.CARETTRIM],m));let i=e.split(" ").map(e=>w(e,this.options)).join(" ").split(/\s+/).map(e=>O(e,this.options));n&&(i=i.filter(e=>(l("loose invalid filter",e,this.options),!!e.match(c[d.COMPARATORLOOSE])))),l("range list",i);let u=new Map;for(let e of i.map(e=>new s(e,this.options))){if(y(e))return[e];u.set(e.value,e)}u.size>1&&u.has("")&&u.delete("");let v=[...u.values()];return a.set(t,v),v}intersects(e,t){if(!(e instanceof o))throw TypeError("a Range is required");return this.set.some(r=>b(r,t)&&e.set.some(e=>b(e,t)&&r.every(r=>e.every(e=>r.intersects(e,t)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(T(this.set[t],e,this.options))return!0;return!1}}e.exports=o;let a=new(r(8794)),i=r(968),s=r(3904),l=r(7272),u=r(3908),{safeRe:c,t:d,comparatorTrimReplace:f,tildeTrimReplace:p,caretTrimReplace:m}=r(9718),{FLAG_INCLUDE_PRERELEASE:h,FLAG_LOOSE:g}=r(6874),y=e=>"<0.0.0-0"===e.value,v=e=>""===e.value,b=(e,t)=>{let r=!0,n=e.slice(),o=n.pop();for(;r&&n.length;)r=n.every(e=>o.intersects(e,t)),o=n.pop();return r},w=(e,t)=>(l("comp",e=e.replace(c[d.BUILD],""),t),l("caret",e=_(e,t)),l("tildes",e=x(e,t)),l("xrange",e=C(e,t)),l("stars",e=P(e,t)),e),E=e=>!e||"x"===e.toLowerCase()||"*"===e,x=(e,t)=>e.trim().split(/\s+/).map(e=>D(e,t)).join(" "),D=(e,t)=>{let r=t.loose?c[d.TILDELOOSE]:c[d.TILDE];return e.replace(r,(t,r,n,o,a)=>{let i;return l("tilde",e,t,r,n,o,a),E(r)?i="":E(n)?i=`>=${r}.0.0 <${+r+1}.0.0-0`:E(o)?i=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:a?(l("replaceTilde pr",a),i=`>=${r}.${n}.${o}-${a} <${r}.${+n+1}.0-0`):i=`>=${r}.${n}.${o} <${r}.${+n+1}.0-0`,l("tilde return",i),i})},_=(e,t)=>e.trim().split(/\s+/).map(e=>S(e,t)).join(" "),S=(e,t)=>{l("caret",e,t);let r=t.loose?c[d.CARETLOOSE]:c[d.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(t,r,o,a,i)=>{let s;return l("caret",e,t,r,o,a,i),E(r)?s="":E(o)?s=`>=${r}.0.0${n} <${+r+1}.0.0-0`:E(a)?s="0"===r?`>=${r}.${o}.0${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.0${n} <${+r+1}.0.0-0`:i?(l("replaceCaret pr",i),s="0"===r?"0"===o?`>=${r}.${o}.${a}-${i} <${r}.${o}.${+a+1}-0`:`>=${r}.${o}.${a}-${i} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${a}-${i} <${+r+1}.0.0-0`):(l("no pr"),s="0"===r?"0"===o?`>=${r}.${o}.${a}${n} <${r}.${o}.${+a+1}-0`:`>=${r}.${o}.${a}${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${a} <${+r+1}.0.0-0`),l("caret return",s),s})},C=(e,t)=>(l("replaceXRanges",e,t),e.split(/\s+/).map(e=>k(e,t)).join(" ")),k=(e,t)=>{e=e.trim();let r=t.loose?c[d.XRANGELOOSE]:c[d.XRANGE];return e.replace(r,(r,n,o,a,i,s)=>{l("xRange",e,r,n,o,a,i,s);let u=E(o),c=u||E(a),d=c||E(i);return"="===n&&d&&(n=""),s=t.includePrerelease?"-0":"",u?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&d?(c&&(a=0),i=0,">"===n?(n=">=",c?(o=+o+1,a=0):a=+a+1,i=0):"<="===n&&(n="<",c?o=+o+1:a=+a+1),"<"===n&&(s="-0"),r=`${n+o}.${a}.${i}${s}`):c?r=`>=${o}.0.0${s} <${+o+1}.0.0-0`:d&&(r=`>=${o}.${a}.0${s} <${o}.${+a+1}.0-0`),l("xRange return",r),r})},P=(e,t)=>(l("replaceStars",e,t),e.trim().replace(c[d.STAR],"")),O=(e,t)=>(l("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?d.GTE0PRE:d.GTE0],"")),R=e=>(t,r,n,o,a,i,s,l,u,c,d,f)=>(r=E(n)?"":E(o)?`>=${n}.0.0${e?"-0":""}`:E(a)?`>=${n}.${o}.0${e?"-0":""}`:i?`>=${r}`:`>=${r}${e?"-0":""}`,l=E(u)?"":E(c)?`<${+u+1}.0.0-0`:E(d)?`<${u}.${+c+1}.0-0`:f?`<=${u}.${c}.${d}-${f}`:e?`<${u}.${c}.${+d+1}-0`:`<=${l}`,`${r} ${l}`.trim()),T=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(l(e[r].semver),e[r].semver!==s.ANY&&e[r].semver.prerelease.length>0){let n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},3908(e,t,r){"use strict";let n=r(7272),{MAX_LENGTH:o,MAX_SAFE_INTEGER:a}=r(6874),{safeRe:i,t:s}=r(9718),l=r(968),{compareIdentifiers:u}=r(1123);class c{constructor(e,t){if(t=l(t),e instanceof c)if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;else e=e.version;else if("string"!=typeof e)throw TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>o)throw TypeError(`version is longer than ${o} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?i[s.LOOSE]:i[s.FULL]);if(!r)throw TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>a||this.major<0)throw TypeError("Invalid major version");if(this.minor>a||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>a||this.patch<0)throw TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<a)return t}return e}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(n("SemVer.compare",this.version,this.options,e),!(e instanceof c)){if("string"==typeof e&&e===this.version)return 0;e=new c(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return(e instanceof c||(e=new c(e,this.options)),this.major<e.major)?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:+(this.patch>e.patch)}comparePre(e){if(e instanceof c||(e=new c(e,this.options)),this.prerelease.length&&!e.prerelease.length)return -1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],o=e.prerelease[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return -1;else if(r===o)continue;else return u(r,o)}while(++t)}compareBuild(e){e instanceof c||(e=new c(e,this.options));let t=0;do{let r=this.build[t],o=e.build[t];if(n("build compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return -1;else if(r===o)continue;else return u(r,o)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&!1===r)throw Error("invalid increment argument: identifier is empty");if(t){let e=`-${t}`.match(this.options.loose?i[s.PRERELEASELOOSE]:i[s.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"release":if(0===this.prerelease.length)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(0!==this.minor||0!==this.patch||0===this.prerelease.length)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(0!==this.patch||0===this.prerelease.length)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{let e=+!!Number(r);if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===u(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=c},2111(e,t,r){"use strict";let n=r(4641),o=r(3999),a=r(5580),i=r(4089),s=r(7059),l=r(5200);e.exports=(e,t,r,u)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,u);case"!=":return o(e,r,u);case">":return a(e,r,u);case">=":return i(e,r,u);case"<":return s(e,r,u);case"<=":return l(e,r,u);default:throw TypeError(`Invalid operator: ${t}`)}}},560(e,t,r){"use strict";let n=r(3908);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},4641(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>0===n(e,t,r)},5580(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>n(e,t,r)>0},4089(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>n(e,t,r)>=0},7059(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>0>n(e,t,r)},5200(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>0>=n(e,t,r)},3999(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>0!==n(e,t,r)},7638(e,t,r){"use strict";let n=r(8311);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},6874(e){"use strict";e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||0x1fffffffffffff,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},7272(e){"use strict";e.exports="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{}},1123(e){"use strict";let t=/^[0-9]+$/,r=(e,r)=>{if("number"==typeof e&&"number"==typeof r)return e===r?0:e<r?-1:1;let n=t.test(e),o=t.test(r);return n&&o&&(e*=1,r*=1),e===r?0:n&&!o?-1:o&&!n?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},8794(e){"use strict";e.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(void 0!==t)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}},968(e){"use strict";let t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},9718(e,t,r){"use strict";let{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:a}=r(6874),i=r(7272),s=(t=e.exports={}).re=[],l=t.safeRe=[],u=t.src=[],c=t.safeSrc=[],d=t.t={},f=0,p="[a-zA-Z0-9-]",m=[["\\s",1],["\\d",a],[p,o]],h=(e,t,r)=>{let n=(e=>{for(let[t,r]of m)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),o=f++;i(e,o,t),d[e]=o,u[o]=t,c[o]=n,s[o]=new RegExp(t,r?"g":void 0),l[o]=new RegExp(n,r?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),h("MAINVERSION",`(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASE",`(?:-(${u[d.PRERELEASEIDENTIFIER]}(?:\\.${u[d.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${u[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[d.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${p}+`),h("BUILD",`(?:\\+(${u[d.BUILDIDENTIFIER]}(?:\\.${u[d.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${u[d.MAINVERSION]}${u[d.PRERELEASE]}?${u[d.BUILD]}?`),h("FULL",`^${u[d.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${u[d.MAINVERSIONLOOSE]}${u[d.PRERELEASELOOSE]}?${u[d.BUILD]}?`),h("LOOSE",`^${u[d.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${u[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${u[d.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:${u[d.PRERELEASE]})?${u[d.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:${u[d.PRERELEASELOOSE]})?${u[d.BUILD]}?)?)?`),h("XRANGE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h("COERCE",`${u[d.COERCEPLAIN]}(?:$|[^\\d])`),h("COERCEFULL",u[d.COERCEPLAIN]+`(?:${u[d.PRERELEASE]})?`+`(?:${u[d.BUILD]})?`+"(?:$|[^\\d])"),h("COERCERTL",u[d.COERCE],!0),h("COERCERTLFULL",u[d.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${u[d.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",h("TILDE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${u[d.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",h("CARET",`^${u[d.LONECARET]}${u[d.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${u[d.LONECARET]}${u[d.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${u[d.GTLT]}\\s*(${u[d.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]}|${u[d.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${u[d.XRANGEPLAIN]})\\s+-\\s+(${u[d.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${u[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[d.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},6369(e,t,r){"use strict";function n(e){if(Array.isArray(e))return e}r.d(t,{A:()=>n})},3029(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}r.d(t,{A:()=>n})},2901(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(6192);function o(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(0,n.A)(o.key),o)}}function a(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}},4467(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(6192);function o(e,t,r){return(t=(0,n.A)(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},6562(e,t,r){"use strict";function n(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}r.d(t,{A:()=>n})},6192(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(2284);function o(e){var t=function(e,t){if("object"!=(0,n.A)(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=(0,n.A)(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==(0,n.A)(t)?t:t+""}},2284(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}r.d(t,{A:()=>n})},3612(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function o(e,t){if(e){if("string"==typeof e)return n(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}r.d(t,{A:()=>o})},4106(e,t,r){"use strict";let n,o,a,i,s,l,u,c,d,f,p;r.r(t),r.d(t,{GenderUnknownIcon:()=>pp,evaluateAsNumber:()=>lB,getImportMapOverrideMap:()=>sM,StockManagementPictogram:()=>D9,ChemistryIcon:()=>f6,BabyIcon:()=>fZ,DashboardExtension:()=>mp,openmrsComponentDecorator:()=>cY,tryRegisterExtension:()=>fn,pictogramIds:()=>DA,ActivityIcon:()=>fV,compile:()=>lH,removeRouteMapOverride:()=>ln,TableBatchActions:()=>fw,getAsyncLifecycle:()=>cJ,subscribeOpenmrsEvent:()=>lh,PasswordIcon:()=>pM,Assessment2Pictogram:()=>DL,CloseIcon:()=>pe,setupRouteMapOverrides:()=>li,useFeatureFlag:()=>dw,reset:()=>uJ,LabOrderIcon:()=>pD,VisitMode:()=>lE,useLocations:()=>dU,getLifecycle:()=>cq,formatDatetime:()=>EJ,getVisitsForPatient:()=>lO,formatPartialDate:()=>EG,CustomOverflowMenu:()=>fk,LocationIcon:()=>pS,GroupIcon:()=>ph,createUseStore:()=>cb,VisitStatus:()=>lx,getSessionLocation:()=>sf,getCurrentImportMap:()=>sY,usePatient:()=>dZ,useRenderableExtensions:()=>dq,getOpenedWindowIndexByWorkspace:()=>u9,setLeftNav:()=>uQ,clearHistory:()=>i1,clearConfigErrors:()=>oo,formatTime:()=>Eq,isDevEnabled:()=>sE,closeWorkspaceGroup2:()=>_S,getCurrentRouteMap:()=>s8,ConfigurableLink:()=>cf,sessionStore:()=>st,setSessionLocale:()=>sm,subscribeSnackbarShown:()=>S,getLoggedInUser:()=>sd,GenderMaleIcon:()=>pd,getExtensionSlotConfigFromStore:()=>ny,evaluateAsNumberAsync:()=>lU,getImportMapDefaultMap:()=>s$,unregisterExtensionRendering:()=>uy,implementerToolsConfigStore:()=>nT,Type:()=>nn,InPatientPictogram:()=>DZ,cleanupObsoleteFeatureFlags:()=>ur,getAttachmentsUrl:()=>lc,showSnackbar:()=>_d,PatientBannerActionsMenu:()=>Dk,PatientSearchPictogram:()=>D0,DocumentAttachmentIcon:()=>po,Snackbar:()=>_i,CardiologyPictogram:()=>DB,ImageMedicalIcon:()=>pv,ActionableNotificationComponent:()=>x2,DiagnosisTags:()=>xT,iconIds:()=>fU,PatientsPictogram:()=>D1,interpolateUrl:()=>iG,setupHistory:()=>iX,subscribeToastShown:()=>_,detachAll:()=>uK,convertToLocaleCalendar:()=>EX,DocumentIcon:()=>pn,configInternalStore:()=>nd,ActionMenuButton2:()=>_U,setupDynamicOfflineDataHandler:()=>Sc,makeUrl:()=>i8,oneOf:()=>od,selectPreferredName:()=>Dh,MobileCheckIcon:()=>pT,createErrorHandler:()=>P,parseDate:()=>EU,getAttachmentByUuid:()=>ll,LeftNavMenu:()=>xM,getExtensionRegistration:()=>uV,ShoppingCartAddItemIcon:()=>mc,ReferralOrderIcon:()=>pW,ReportIcon:()=>pz,dispatchToastShown:()=>E,getImportMapNextPageMap:()=>sI,registerExtension:()=>uW,setupOfflineSync:()=>Su,DownloadIcon:()=>pa,useConnectivity:()=>Sh,provide:()=>nG,ShoppingCartArrowDownIcon:()=>pX,featureFlagsStore:()=>ue,jsep:()=>lT,GeriatricsPictogram:()=>DK,SearchIcon:()=>pZ,reportError:()=>k,slugify:()=>sK,isOmrsDateToday:()=>EL,getExtensionStore:()=>uv,BloodBankPictogram:()=>DF,TriagePictogram:()=>D7,Workspace2:()=>_$,refetchCurrentUser:()=>sl,CheckmarkOutlineIcon:()=>f3,registerExtensionSlot:()=>uq,AllergiesIcon:()=>mi,ArrowDownIcon:()=>fH,useOpenmrsInfinite:()=>dO,getExtensionConfigFromExtensionSlotStore:()=>nE,OpenmrsDatePicker:()=>xO,getExtensionConfigFromStore:()=>nw,getDynamicOfflineDataEntries:()=>Sd,getLocaleDisplayName:()=>En,messageOmrsServiceWorker:()=>Sp,navigate:()=>iY,launchWorkspace2:()=>_C,getGroupByWindowName:()=>u5,CustomOverflowMenuItem:()=>fP,isUrl:()=>oc,CaretDownIcon:()=>fJ,ArrowLeftIcon:()=>fz,FacilityPictogram:()=>Dz,ViewOffIcon:()=>mn,updateInternalExtensionStore:()=>ud,dispatchActionableNotificationShown:()=>b,resetRouteMapOverrides:()=>lo,formatDurationBetween:()=>E5,defaultVisitCustomRepresentation:()=>lD,getBreadcrumbsFor:()=>ow,useOpenmrsPagination:()=>dx,Pagination:()=>Dc,CheckmarkFilledIcon:()=>f4,clearCurrentUser:()=>su,showModal:()=>xJ,ChevronUpIcon:()=>f7,saveVisit:()=>lk,useAttachments:()=>da,Pictogram:()=>_o,useExtensionSlot:()=>cS,ChevronDownIcon:()=>f5,OpenmrsDateRangePicker:()=>xR,deleteAttachmentPermanently:()=>lf,getVisitTypes:()=>lw,OverflowMenuHorizontalIcon:()=>p$,EventScheduleIcon:()=>pl,getSessionStore:()=>si,ProcedureOrderIcon:()=>pU,preloadImport:()=>sZ,registerWorkspaceWindows2:()=>u7,useOnVisible:()=>dW,setSessionLocation:()=>sp,userHasAccess:()=>sc,ChartAverageIcon:()=>f1,getFeatureFlag:()=>un,UserAvatarIcon:()=>p7,renderExtension:()=>cl,useFhirInfinite:()=>dA,toVisitTypeObject:()=>lv,useSession:()=>dJ,EmergencyDepartmentPictogram:()=>DH,Notification:()=>x0,dispatchSnackbarShown:()=>w,formatDate:()=>EZ,workspace2StoreActions:()=>_O,SwitcherIcon:()=>pq,esmStyleGuideSchema:()=>fy,getImportMapDisabledOverrides:()=>sL,useAssignedExtensionIds:()=>dr,CaretRightIcon:()=>fQ,evaluateAsType:()=>lV,PageHeader:()=>Dl,TranslateIcon:()=>p6,setUserProperties:()=>sh,MovementIcon:()=>pA,renderInlineNotifications:()=>x7,subscribePrecacheStaticDependencies:()=>Sm,PaymentsDeskPictogram:()=>D2,usePrimaryIdentifierCode:()=>dY,useLayoutType:()=>dI,getCurrentUser:()=>sa,XrayPictogram:()=>_e,CaretUpIcon:()=>f0,renderActionableNotifications:()=>Dt,OpenmrsAppContext:()=>c9,setupModals:()=>xq,getDefaultsFromConfigSchema:()=>function e(t){let r={};for(let n of Object.keys(t))if(Sn(t[n])&&t[n].hasOwnProperty("_default"))r[n]=t[n]._default;else{if(n.startsWith("_"))continue;Sn(t[n])?r[n]=e(t[n]):r[n]=t[n]}return r},subscribeTo:()=>W,recordConfigDerivationError:()=>nO,useAbortController:()=>c7,Extension:()=>cp,getFhirServerPaginationHandlers:()=>dC,useConnectedExtensions:()=>dc,registerApp:()=>fa,HospitalBedIcon:()=>py,useExtensionInternalStore:()=>dy,configExtensionStore:()=>np,getSynchronizationItems:()=>Sf,getExtensionSlotsConfigStore:()=>nh,registerExtensionRendering:()=>ug,RenderIfValueIsTruthy:()=>c8,registerFeatureFlag:()=>ut,useFhirFetchAll:()=>dj,restBaseUrl:()=>i6,CalendarHeatMapIcon:()=>fY,isImportMapOverrideDisabled:()=>sF,resetConfigSystem:()=>oa,getExtensionInternalStore:()=>uu,registerGlobalStore:()=>U,evaluateAsBoolean:()=>lL,PatientBannerPatientInfo:()=>DS,addRouteMapOverride:()=>lr,getDefaultCalendar:()=>Ez,SettingsIcon:()=>pY,DrugOrderIcon:()=>pi,ProgramsIcon:()=>pV,useAssignedExtensions:()=>c_,CloseFilledIcon:()=>pt,canAccessStorage:()=>Sr,registerDefaultCalendar:()=>EH,TreeViewAltIcon:()=>p9,OverflowMenuVerticalIcon:()=>pI,clearConfigDerivationError:()=>nR,getConfigStore:()=>nm,InformationSquareIcon:()=>pE,EmptyCard:()=>xA,ChevronLeftIcon:()=>f9,RadiologyIcon:()=>mu,useCandidateExtensions:()=>dn,renderToasts:()=>_g,isDesktop:()=>dM,integrateBreakpoints:()=>fc,RegistrationPictogram:()=>D6,CardHeader:()=>fm,getExtensionRegistrationFrom:()=>uU,InformationIcon:()=>pb,TrashCanIcon:()=>p5,useShallowStableValue:()=>cm,PatientDocumentsPictogram:()=>DQ,useOpenmrsSWR:()=>dH,Assessment1Pictogram:()=>DM,finishRegisteringAllApps:()=>fi,importDynamic:()=>sG,useFhirPagination:()=>dS,useVisitContextStore:()=>d6,ArrowUpIcon:()=>fG,showActionableNotification:()=>Dr,useForceUpdate:()=>dE,useVisit:()=>d5,PatientBannerPatientIdentifiers:()=>DE,TransferPictogram:()=>D8,usePagination:()=>dz,Breakpoint:()=>fs,PatientBannerToggleContactDetailsButton:()=>_V,CloseOutlineIcon:()=>pr,ObstetricsPictogram:()=>DX,parseDateInput:()=>E0,getConfig:()=>nY,attach:()=>uH,getLocale:()=>Eo,isUrlWithTemplateParameters:()=>ou,useEmrConfiguration:()=>dh,useLeftNav:()=>dL,ToolsIcon:()=>p3,ErrorState:()=>x$,detach:()=>uz,setCurrentVisit:()=>lC,ConditionsIcon:()=>ml,SaveIcon:()=>pG,useConfig:()=>du,validator:()=>no,CalendarIcon:()=>fq,getHistory:()=>iQ,StickyNoteAddIcon:()=>pQ,useWorkspace2Store:()=>_R,getPatientName:()=>Dd,getVisitStore:()=>lS,getCoreTranslation:()=>iK,registerModuleWithConfigSystem:()=>nW,registerModuleLoad:()=>nH,getBreadcrumbs:()=>oy,extractVariableNames:()=>l9,translateFrom:()=>iz,useStoreWithActions:()=>cv,EditIcon:()=>ps,getCandidateExtensions:()=>uY,shallowEqual:()=>R,subscribeNotificationShown:()=>x,MaximizeIcon:()=>pk,promptForClosingWorkspaces:()=>_P,WarningIcon:()=>ma,fhirBaseUrl:()=>i5,matchLocale:()=>St,usePatientPhoto:()=>DR,registerBreadcrumb:()=>oh,EventsIcon:()=>pu,createGlobalStore:()=>B,subscribeToFeatureFlag:()=>uo,useExtensionStore:()=>db,createAttachment:()=>ld,useLeftNavStore:()=>dF,TableIcon:()=>p2,Icon:()=>mf,InformationFilledIcon:()=>pw,getCurrentPageMap:()=>sA,LaboratoryPictogram:()=>DY,temporaryConfigStore:()=>nf,toDateObjectStrict:()=>EF,defineConfigSchema:()=>nV,filterBreadcrumbs:()=>ob,invalidateImplementerToolsConfig:()=>nk,PatientBannerContactDetails:()=>_Z,getAssignedExtensions:()=>uZ,PatientPhoto:()=>Dj,MaterialOrderIcon:()=>pC,MicroscopeIcon:()=>pR,visitTypesUrl:()=>lb,scheduleRecomputation:()=>uD,PharmacyPictogram:()=>D4,AttachmentIcon:()=>ms,MoneyIcon:()=>pN,getAttachments:()=>lu,PageHeaderContent:()=>Du,MedicationIcon:()=>pP,PrinterIcon:()=>pB,PatientListsPictogram:()=>_r,useAppContext:()=>de,isOpenmrsRoutes:()=>sX,AppointmentsAltPictogram:()=>DI,GenericOrderTypeIcon:()=>pm,batchExtensionUpdates:()=>uE,useExtensionSlotStore:()=>cx,ViewIcon:()=>mo,formattedName:()=>Dm,sessionEndpoint:()=>i9,duration:()=>E3,resetImportMapOverrides:()=>sV,TableOfContentsIcon:()=>p1,CaretLeftIcon:()=>fX,getTranslationOverrides:()=>nq,isVersionSatisfied:()=>Si,EmptyCardIllustration:()=>xj,PenIcon:()=>pF,verifyTotpCode:()=>sg,validators:()=>of,setupImportMapOverrides:()=>sz,showToast:()=>_y,useDefineAppContext:()=>c5,getGlobalStore:()=>V,useOnClickOutside:()=>dV,getWindowByWorkspaceName:()=>u6,ArrowRightIcon:()=>fK,loadLifeCycles:()=>fe,registerBreadcrumbs:()=>og,MotherIcon:()=>pj,fetchCurrentPatient:()=>lp,Toast:()=>_f,MessageQueueIcon:()=>pO,TwoFactorAuthenticationIcon:()=>p8,Pharmacy2Pictogram:()=>D3,goBackInHistory:()=>i0,GroupAccessIcon:()=>pg,getExtensionRenderingsStore:()=>uc,setImplementerToolsConfigRecomputer:()=>nC,getAsyncExtensionLifecycle:()=>cQ,setupApiModule:()=>sD,renderLoadingSpinner:()=>_Y,showNotification:()=>De,getModalRegistration:()=>u4,ListCheckedIcon:()=>p_,ResponsiveWrapper:()=>_a,GynaecologyPictogram:()=>DG,ShoppingCartIcon:()=>pJ,getRouteMapNextPageMap:()=>le,MetadataExportPictogram:()=>DJ,updateVisit:()=>lP,backendDependencies:()=>sx,MaybePictogram:()=>_n,createParcelMounter:()=>ci,openmrsFetch:()=>i7,useStore:()=>cy,isOpenmrsAppRoutes:()=>sJ,HomePictogram:()=>_t,DentistryPictogram:()=>DV,ServiceQueuesPictogram:()=>D5,toLanguageTag:()=>Er,setFeatureFlag:()=>ua,DigitalTrustPictogram:()=>DW,NumericObservation:()=>Di,attachmentUrl:()=>ls,interpolateString:()=>iZ,inRange:()=>ol,useExtensionSlotMeta:()=>dv,AppointmentsPictogram:()=>D$,renderSnackbars:()=>_c,getRegisteredWorkspace2Names:()=>_N,logout:()=>sy,toLocationObject:()=>lg,ChartLineIcon:()=>f2,UserHasAccess:()=>dX,evaluateAsBooleanAsync:()=>lF,createDashboard:()=>mm,getLocations:()=>ly,useExtensionContext:()=>dg,getExtensionsConfigStore:()=>nv,getRouteMapDefaultMap:()=>s7,age:()=>Dy,isOmrsDateStrict:()=>EM,registerWorkspaceGroups2:()=>u8,usePaginationInfo:()=>dK,evaluateAsync:()=>lM,useOpenmrsFetchAll:()=>dT,removeImportMapOverride:()=>sU,useVisitTypes:()=>d8,ageAsDuration:()=>Dg,getExtensionNameFromId:()=>uB,renderParcel:()=>ca,useWorkspace2Context:()=>_T,ResetIcon:()=>pK,RenewIcon:()=>pH,subscribeActionableNotificationShown:()=>D,ErrorCard:()=>xI,GenderFemaleIcon:()=>pc,enableImportMapOverride:()=>sW,retry:()=>Ss,ComponentContext:()=>cd,ExtensionSlot:()=>ck,unsetLeftNav:()=>u0,addImportMapOverride:()=>sB,MaybeIcon:()=>md,useCustomOverflowMenu:()=>fC,PedestrianFamilyIcon:()=>pL,CtScanPictogram:()=>DU,dispatchNotificationShown:()=>v,leftNavStore:()=>uX,OpenmrsFetchError:()=>se,UserFollowIcon:()=>me,launchWorkspaceGroup2:()=>__,ChevronRightIcon:()=>f8,UserXrayIcon:()=>mt,GenderOtherIcon:()=>pf,formatDuration:()=>EQ,toOmrsIsoString:()=>EB,Labs2Pictogram:()=>Dq,workspace2Store:()=>u3,setUserLanguage:()=>ss,useBodyScrollLock:()=>di,getExtensionConfig:()=>nb,SyringeIcon:()=>p0,LocationPicker:()=>xL,useDebounce:()=>dd,TimeIcon:()=>p4,getExtensionSlotConfig:()=>ng,AddIcon:()=>fW,getRouteMapOverrideMap:()=>lt,processConfig:()=>nJ,InventoryManagementIcon:()=>px,registerWorkspaces2:()=>ce,UserIcon:()=>mr,formatPatientName:()=>Dp,fireOpenmrsEvent:()=>lm,registerModal:()=>u2,registerTranslationNamespace:()=>nz,displayName:()=>Df,evaluate:()=>lI,defineExtensionConfigSchema:()=>nK,renderWorkspaceWindowsAndMenu:()=>_7,getSyncLifecycle:()=>cX,evaluateAsTypeAsync:()=>lW});let m="openmrs:notification-shown",h="openmrs:actionable-notification-shown",g="openmrs:toast-shown",y="openmrs:snack-bar-shown";function v(e){window.dispatchEvent(new CustomEvent(m,{detail:e}))}function b(e){window.dispatchEvent(new CustomEvent(h,{detail:e}))}function w(e){window.dispatchEvent(new CustomEvent(y,{detail:e}))}function E(e){window.dispatchEvent(new CustomEvent(g,{detail:e}))}function x(e){let t=t=>e(t.detail);return window.addEventListener(m,t),()=>window.removeEventListener(m,t)}function D(e){let t=t=>e(t.detail);return window.addEventListener(h,t),()=>window.removeEventListener(h,t)}function _(e){let t=t=>e(t.detail);return window.addEventListener(g,t),()=>window.removeEventListener(g,t)}function S(e){let t=t=>e(t.detail);return window.addEventListener(y,t),()=>window.removeEventListener(y,t)}function C(e,t){let{message:r}=O(e);return"string"==typeof r&&r?r:t}function k(e){let t=O(e);setTimeout(()=>{throw t})}function P(){let e=Error();return t=>{let r=O(t);r.stack+=`
|
|
2
2
|
Async stacktrace:
|
|
3
|
-
${e.stack}`,k(t)}}function O(e){let t;if(e instanceof Error)return e;if(null===e)return Error("'null' was thrown as an error");if("object"==typeof e){try{t=`Object thrown as error: ${JSON.stringify(e)}`}catch(r){t=`Object thrown as error with the following properties: ${Object.keys(e)}`}return Error(t)}if(void 0===e)return Error("'undefined' was thrown as an error");return Error(e.toString())}function R(e,t){if(e===t||Object.is(e,t))return!0;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}if(Array.isArray(t)||"object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;let r=Object.getOwnPropertyNames(e),n=Object.getOwnPropertyNames(t);return r.length===n.length&&r.every(r=>e[r]===t[r])}function T(e,t){let r;try{r=e()}catch(e){return}return{getItem:e=>{var n;let o=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),a=null!=(n=r.getItem(e))?n:null;return a instanceof Promise?a.then(o):o(a)},setItem:(e,n)=>r.setItem(e,JSON.stringify(n,null==t?void 0:t.replacer)),removeItem:e=>r.removeItem(e)}}window.onerror=function(e,t,r,n,o){return console.error("Unexpected error: ",o??e),E({description:C(o??e,"Oops! An unexpected error occurred."),kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(e){console.error("Unhandled rejection: ",e.reason),E({description:C(e.reason,"Oops! An unhandled promise rejection occurred."),kind:"error",title:"Error"})};let N=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>N(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>N(t)(e)}}},j=e=>{let t,r=new Set,n=(e,n)=>{let o="function"==typeof e?e(t):e;if(!Object.is(o,t)){let e=t;t=(null!=n?n:"object"!=typeof o||null===o)?o:Object.assign({},t,o),r.forEach(r=>r(t,e))}},o=()=>t,a={setState:n,getState:o,getInitialState:()=>i,subscribe:e=>(r.add(e),()=>r.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},i=t=e(n,o,a);return a},A=e=>e?j(e):j;function $(){try{return"u">typeof process&&("true"===process.env.VITEST||void 0!==process.env.JEST_WORKER_ID)||"u">typeof globalThis&&("__vitest_worker__"in globalThis||"__jest__"in globalThis)}catch{return!1}}let I={},M=Symbol.for("openmrs.esm-state.instanceCount"),L=globalThis,F=(L[M]??0)+1;function B(e,t,r="none"){let n=I[e];if(n)return n.active?$()||console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):n.value.setState(t,!0),n.active=!0,n.value;{let n=H(e,t,r);return I[e]={value:n,active:!0},n}}function U(e,t){let r=I[e];return r?(r.active?$()||console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):r.value=t,r.active=!0,r.value):(I[e]={value:t,active:!0},t)}function V(e,t,r="none"){let n=I[e];if(!n){let n=H(e,t??{},r);return I[e]={value:n,active:!1},n}return n.value}function W(...e){let[t,r,n]=e,o=void 0===n?r:n,a=void 0===n?e=>e:r,i=a(t.getState());return o(i),t.subscribe(e=>{let t=a(e);R(i,t)||(i=t,o(t))})}function H(e,t,r){return"sessionStorage"===r?A()(((e,t)=>{if("getStorage"in t||"serialize"in t||"deserialize"in t)return console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),(r,n,o)=>{let a,i,s={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},l=!1,u=new Set,c=new Set;try{a=s.getStorage()}catch(e){}if(!a)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...e)},n,o);let d=N(s.serialize),f=()=>{let e,t=d({state:s.partialize({...n()}),version:s.version}).then(e=>a.setItem(s.name,e)).catch(t=>{e=t});if(e)throw e;return t},p=o.setState;o.setState=(e,t)=>{p(e,t),f()};let m=e((...e)=>{r(...e),f()},n,o),h=()=>{var e;if(!a)return;l=!1,u.forEach(e=>e(n()));let t=(null==(e=s.onRehydrateStorage)?void 0:e.call(s,n()))||void 0;return N(a.getItem.bind(a))(s.name).then(e=>{if(e)return s.deserialize(e)}).then(e=>{if(e)if("number"!=typeof e.version||e.version===s.version)return e.state;else{if(s.migrate)return s.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}}).then(e=>{var t;return r(i=s.merge(e,null!=(t=n())?t:m),!0),f()}).then(()=>{null==t||t(i,void 0),l=!0,c.forEach(e=>e(i))}).catch(e=>{null==t||t(void 0,e)})};return o.persist={setOptions:e=>{s={...s,...e},e.getStorage&&(a=e.getStorage())},clearStorage:()=>{null==a||a.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>h(),hasHydrated:()=>l,onHydrate:e=>(u.add(e),()=>{u.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},h(),i||m};return(r,n,o)=>{let a,i={storage:T(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},s=!1,l=new Set,u=new Set,c=i.storage;if(!c)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),r(...e)},n,o);let d=()=>{let e=i.partialize({...n()});return c.setItem(i.name,{state:e,version:i.version})},f=o.setState;o.setState=(e,t)=>{f(e,t),d()};let p=e((...e)=>{r(...e),d()},n,o);o.getInitialState=()=>p;let m=()=>{var e,t;if(!c)return;s=!1,l.forEach(e=>{var t;return e(null!=(t=n())?t:p)});let o=(null==(t=i.onRehydrateStorage)?void 0:t.call(i,null!=(e=n())?e:p))||void 0;return N(c.getItem.bind(c))(i.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===i.version)return[!1,e.state];else{if(i.migrate)return[!0,i.migrate(e.state,e.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(e=>{var t;let[o,s]=e;if(r(a=i.merge(s,null!=(t=n())?t:p),!0),o)return d()}).then(()=>{null==o||o(a,void 0),a=n(),s=!0,u.forEach(e=>e(a))}).catch(e=>{null==o||o(void 0,e)})};return o.persist={setOptions:e=>{i={...i,...e},e.storage&&(c=e.storage)},clearStorage:()=>{null==c||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>m(),hasHydrated:()=>s,onHydrate:e=>(l.add(e),()=>{l.delete(e)}),onFinishHydration:e=>(u.add(e),()=>{u.delete(e)})},i.skipHydration||m(),a||p}})(()=>t,{name:e,storage:T(()=>sessionStorage)})):A()(()=>t)}L[M]=F,F>1&&!$()&&console.error(`Detected ${F} copies of @openmrs/esm-framework running on this page. Each copy keeps its own store registry, so stores, configuration and extension state are not shared between them. This usually means a frontend module loaded its own bundled framework instead of the one the app shell provides.`),globalThis.setTimeout?.(()=>{"u">typeof window&&"development"===window.spaEnv&&(window.stores=I)},1e3);let z=function(e){return void 0===e};var K,G,Z,Y,q,J,X,Q,ee,et,er,en,eo,ea,ei=r(8348);let es=function(e,t){return function(r){return e(t(r))}};var el=es(Object.getPrototypeOf,Object),eu=r(3098),ec=Object.prototype,ed=Function.prototype.toString,ef=ec.hasOwnProperty,ep=ed.call(Object);let em=function(e){if(!(0,eu.A)(e)||"[object Object]"!=(0,ei.A)(e))return!1;var t=el(e);if(null===t)return!0;var r=ef.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&ed.call(r)==ep},eh=function(e,t){return e===t||e!=e&&t!=t},eg=function(e,t){for(var r=e.length;r--;)if(eh(e[r][0],t))return r;return -1};var ey=Array.prototype.splice;function ev(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])}}ev.prototype.clear=function(){this.__data__=[],this.size=0},ev.prototype.delete=function(e){var t=this.__data__,r=eg(t,e);return!(r<0)&&(r==t.length-1?t.pop():ey.call(t,r,1),--this.size,!0)},ev.prototype.get=function(e){var t=this.__data__,r=eg(t,e);return r<0?void 0:t[r][1]},ev.prototype.has=function(e){return eg(this.__data__,e)>-1},ev.prototype.set=function(e,t){var r=this.__data__,n=eg(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};var eb=r(3149);let ew=function(e){if(!(0,eb.A)(e))return!1;var t=(0,ei.A)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};var eE=r(1917),ex=eE.A["__core-js_shared__"],eD=(K=/[^.]+$/.exec(ex&&ex.keys&&ex.keys.IE_PROTO||""))?"Symbol(src)_1."+K:"",e_=Function.prototype.toString;let eS=function(e){if(null!=e){try{return e_.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var eC=/^\[object .+?Constructor\]$/,ek=Object.prototype,eP=Function.prototype.toString,eO=ek.hasOwnProperty,eR=RegExp("^"+eP.call(eO).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");let eT=function(e){return!!(0,eb.A)(e)&&(!eD||!(eD in e))&&(ew(e)?eR:eC).test(eS(e))},eN=function(e,t){var r=null==e?void 0:e[t];return eT(r)?r:void 0};var ej=eN(eE.A,"Map"),eA=eN(Object,"create"),e$=Object.prototype.hasOwnProperty,eI=Object.prototype.hasOwnProperty;function eM(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])}}eM.prototype.clear=function(){this.__data__=eA?eA(null):{},this.size=0},eM.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t},eM.prototype.get=function(e){var t=this.__data__;if(eA){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return e$.call(t,e)?t[e]:void 0},eM.prototype.has=function(e){var t=this.__data__;return eA?void 0!==t[e]:eI.call(t,e)},eM.prototype.set=function(e,t){var r=this.__data__;return this.size+=+!this.has(e),r[e]=eA&&void 0===t?"__lodash_hash_undefined__":t,this};let eL=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},eF=function(e,t){var r=e.__data__;return eL(t)?r["string"==typeof t?"string":"hash"]:r.map};function eB(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function eU(e){var t=this.__data__=new ev(e);this.size=t.size}eB.prototype.clear=function(){this.size=0,this.__data__={hash:new eM,map:new(ej||ev),string:new eM}},eB.prototype.delete=function(e){var t=eF(this,e).delete(e);return this.size-=!!t,t},eB.prototype.get=function(e){return eF(this,e).get(e)},eB.prototype.has=function(e){return eF(this,e).has(e)},eB.prototype.set=function(e,t){var r=eF(this,e),n=r.size;return r.set(e,t),this.size+=+(r.size!=n),this},eU.prototype.clear=function(){this.__data__=new ev,this.size=0},eU.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},eU.prototype.get=function(e){return this.__data__.get(e)},eU.prototype.has=function(e){return this.__data__.has(e)},eU.prototype.set=function(e,t){var r=this.__data__;if(r instanceof ev){var n=r.__data__;if(!ej||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new eB(n)}return r.set(e,t),this.size=r.size,this};var eV=function(){try{var e=eN(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();let eW=function(e,t,r){"__proto__"==t&&eV?eV(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r},eH=function(e,t,r){(void 0===r||eh(e[t],r))&&(void 0!==r||t in e)||eW(e,t,r)},ez=function(e,t,r){for(var n=-1,o=Object(e),a=r(e),i=a.length;i--;){var s=a[++n];if(!1===t(o[s],s,o))break}return e};var eK="object"==typeof exports&&exports&&!exports.nodeType&&exports,eG=eK&&"object"==typeof module&&module&&!module.nodeType&&module,eZ=eG&&eG.exports===eK?eE.A.Buffer:void 0,eY=eZ?eZ.allocUnsafe:void 0;let eq=function(e,t){if(t)return e.slice();var r=e.length,n=eY?eY(r):new e.constructor(r);return e.copy(n),n};var eJ=eE.A.Uint8Array;let eX=function(e){var t=new e.constructor(e.byteLength);return new eJ(t).set(new eJ(e)),t},eQ=function(e,t){var r=t?eX(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)},e0=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t};var e1=Object.create,e2=function(){function e(){}return function(t){if(!(0,eb.A)(t))return{};if(e1)return e1(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),e4=Object.prototype;let e3=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||e4)},e6=function(e){return"function"!=typeof e.constructor||e3(e)?{}:e2(el(e))},e5=function(e){return(0,eu.A)(e)&&"[object Arguments]"==(0,ei.A)(e)};var e9=Object.prototype,e8=e9.hasOwnProperty,e7=e9.propertyIsEnumerable,te=e5(function(){return arguments}())?e5:function(e){return(0,eu.A)(e)&&e8.call(e,"callee")&&!e7.call(e,"callee")},tt=Array.isArray;let tr=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff},tn=function(e){return null!=e&&tr(e.length)&&!ew(e)};var to="object"==typeof exports&&exports&&!exports.nodeType&&exports,ta=to&&"object"==typeof module&&module&&!module.nodeType&&module,ti=ta&&ta.exports===to?eE.A.Buffer:void 0;let ts=(ti?ti.isBuffer:void 0)||function(){return!1};var tl={};tl["[object Float32Array]"]=tl["[object Float64Array]"]=tl["[object Int8Array]"]=tl["[object Int16Array]"]=tl["[object Int32Array]"]=tl["[object Uint8Array]"]=tl["[object Uint8ClampedArray]"]=tl["[object Uint16Array]"]=tl["[object Uint32Array]"]=!0,tl["[object Arguments]"]=tl["[object Array]"]=tl["[object ArrayBuffer]"]=tl["[object Boolean]"]=tl["[object DataView]"]=tl["[object Date]"]=tl["[object Error]"]=tl["[object Function]"]=tl["[object Map]"]=tl["[object Number]"]=tl["[object Object]"]=tl["[object RegExp]"]=tl["[object Set]"]=tl["[object String]"]=tl["[object WeakMap]"]=!1;let tu=function(e){return function(t){return e(t)}};var tc=r(2136),td="object"==typeof exports&&exports&&!exports.nodeType&&exports,tf=td&&"object"==typeof module&&module&&!module.nodeType&&module,tp=tf&&tf.exports===td&&tc.A.process,tm=function(){try{var e=tf&&tf.require&&tf.require("util").types;if(e)return e;return tp&&tp.binding&&tp.binding("util")}catch(e){}}(),th=tm&&tm.isTypedArray,tg=th?tu(th):function(e){return(0,eu.A)(e)&&tr(e.length)&&!!tl[(0,ei.A)(e)]};let ty=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};var tv=Object.prototype.hasOwnProperty;let tb=function(e,t,r){var n=e[t];tv.call(e,t)&&eh(n,r)&&(void 0!==r||t in e)||eW(e,t,r)},tw=function(e,t,r,n){var o=!r;r||(r={});for(var a=-1,i=t.length;++a<i;){var s=t[a],l=n?n(r[s],e[s],s,r,e):void 0;void 0===l&&(l=e[s]),o?eW(r,s,l):tb(r,s,l)}return r},tE=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n};var tx=/^(?:0|[1-9]\d*)$/;let tD=function(e,t){var r=typeof e;return!!(t=null==t?0x1fffffffffffff:t)&&("number"==r||"symbol"!=r&&tx.test(e))&&e>-1&&e%1==0&&e<t};var t_=Object.prototype.hasOwnProperty;let tS=function(e,t){var r=tt(e),n=!r&&te(e),o=!r&&!n&&ts(e),a=!r&&!n&&!o&&tg(e),i=r||n||o||a,s=i?tE(e.length,String):[],l=s.length;for(var u in e)(t||t_.call(e,u))&&!(i&&("length"==u||o&&("offset"==u||"parent"==u)||a&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||tD(u,l)))&&s.push(u);return s},tC=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t};var tk=Object.prototype.hasOwnProperty;let tP=function(e){if(!(0,eb.A)(e))return tC(e);var t=e3(e),r=[];for(var n in e)"constructor"==n&&(t||!tk.call(e,n))||r.push(n);return r},tO=function(e){return tn(e)?tS(e,!0):tP(e)},tR=function(e,t,r,n,o,a,i){var s=ty(e,r),l=ty(t,r),u=i.get(l);if(u)return void eH(e,r,u);var c=a?a(s,l,r+"",e,t,i):void 0,d=void 0===c;if(d){var f=tt(l),p=!f&&ts(l),m=!f&&!p&&tg(l);(c=l,f||p||m)?tt(s)?c=s:(0,eu.A)(s)&&tn(s)?c=e0(s):p?(d=!1,c=eq(l,!0)):m?(d=!1,c=eQ(l,!0)):c=[]:em(l)||te(l)?(c=s,te(s))?c=tw(s,tO(s)):(!(0,eb.A)(s)||ew(s))&&(c=e6(l)):d=!1}d&&(i.set(l,c),o(c,l,n,a,i),i.delete(l)),eH(e,r,c)},tT=function e(t,r,n,o,a){t!==r&&ez(r,function(i,s){if(a||(a=new eU),(0,eb.A)(i))tR(t,r,s,n,e,o,a);else{var l=o?o(ty(t,s),i,s+"",t,r,a):void 0;void 0===l&&(l=i),eH(t,s,l)}},tO)},tN=function(e){return e},tj=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 tA=Math.max;let t$=function(e,t,r){return t=tA(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,a=tA(n.length-t,0),i=Array(a);++o<a;)i[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(i),tj(e,this,s)}};var tI=Date.now,tM=(G=eV?function(e,t){return eV(e,"toString",{configurable:!0,enumerable:!1,value:function(){return t},writable:!0})}:tN,Z=0,Y=0,function(){var e=tI(),t=16-(e-Y);if(Y=e,t>0){if(++Z>=800)return arguments[0]}else Z=0;return G.apply(void 0,arguments)});let tL=function(e,t,r){if(!(0,eb.A)(r))return!1;var n=typeof t;return("number"==n?!!(tn(r)&&tD(t,r.length)):"string"==n&&t in r)&&eh(r[t],e)},tF=function(e){var t;return tM(t$(t=function(t,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,i=o>2?r[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,i&&tL(r[0],r[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++n<o;){var s=r[n];s&&e(t,s,n,a)}return t},void 0,tN),t+"")};var tB=tF(function(e,t,r,n){tT(e,t,r,n)});function tU(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new eB;++t<r;)this.add(e[t])}tU.prototype.add=tU.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},tU.prototype.has=function(e){return this.__data__.has(e)};let tV=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},tW=function(e,t,r,n,o,a){var i=1&r,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var u=a.get(e),c=a.get(t);if(u&&c)return u==t&&c==e;var d=-1,f=!0,p=2&r?new tU:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(n)var g=i?n(h,m,d,t,e,a):n(m,h,d,e,t,a);if(void 0!==g){if(g)continue;f=!1;break}if(p){if(!tV(t,function(e,t){if(!p.has(t)&&(m===e||o(m,e,r,n,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||o(m,h,r,n,a))){f=!1;break}}return a.delete(e),a.delete(t),f};var tH=r(241);let tz=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r},tK=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r};var tG=tH.A?tH.A.prototype:void 0,tZ=tG?tG.valueOf:void 0;let tY=function(e,t,r,n,o,a,i){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!a(new eJ(e),new eJ(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return eh(+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=tz;case"[object Set]":var l=1&n;if(s||(s=tK),e.size!=t.size&&!l)break;var u=i.get(e);if(u)return u==t;n|=2,i.set(e,t);var c=tW(s(e),s(t),n,o,a,i);return i.delete(e),c;case"[object Symbol]":if(tZ)return tZ.call(e)==tZ.call(t)}return!1},tq=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e},tJ=function(e,t,r){var n=t(e);return tt(e)?n:tq(n,r(e))},tX=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,a=[];++r<n;){var i=e[r];t(i,r,e)&&(a[o++]=i)}return a},tQ=function(){return[]};var t0=Object.prototype.propertyIsEnumerable,t1=Object.getOwnPropertySymbols,t2=t1?function(e){return null==e?[]:tX(t1(e=Object(e)),function(t){return t0.call(e,t)})}:tQ,t4=es(Object.keys,Object),t3=Object.prototype.hasOwnProperty;let t6=function(e){if(!e3(e))return t4(e);var t=[];for(var r in Object(e))t3.call(e,r)&&"constructor"!=r&&t.push(r);return t},t5=function(e){return tn(e)?tS(e):t6(e)},t9=function(e){return tJ(e,t5,t2)};var t8=Object.prototype.hasOwnProperty;let t7=function(e,t,r,n,o,a){var i=1&r,s=t9(e),l=s.length;if(l!=t9(t).length&&!i)return!1;for(var u=l;u--;){var c=s[u];if(!(i?c in t:t8.call(t,c)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=i;++u<l;){var h=e[c=s[u]],g=t[c];if(n)var y=i?n(g,h,c,t,e,a):n(h,g,c,e,t,a);if(!(void 0===y?h===g||o(h,g,r,n,a):y)){p=!1;break}m||(m="constructor"==c)}if(p&&!m){var v=e.constructor,b=t.constructor;v!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b)&&(p=!1)}return a.delete(e),a.delete(t),p};var re=eN(eE.A,"DataView"),rt=eN(eE.A,"Promise"),rr=eN(eE.A,"Set"),rn=eN(eE.A,"WeakMap"),ro="[object Map]",ra="[object Promise]",ri="[object Set]",rs="[object WeakMap]",rl="[object DataView]",ru=eS(re),rc=eS(ej),rd=eS(rt),rf=eS(rr),rp=eS(rn),rm=ei.A;(re&&rm(new re(new ArrayBuffer(1)))!=rl||ej&&rm(new ej)!=ro||rt&&rm(rt.resolve())!=ra||rr&&rm(new rr)!=ri||rn&&rm(new rn)!=rs)&&(rm=function(e){var t=(0,ei.A)(e),r="[object Object]"==t?e.constructor:void 0,n=r?eS(r):"";if(n)switch(n){case ru:return rl;case rc:return ro;case rd:return ra;case rf:return ri;case rp:return rs}return t});let rh=rm;var rg="[object Arguments]",ry="[object Array]",rv="[object Object]",rb=Object.prototype.hasOwnProperty;let rw=function(e,t,r,n,o,a){var i=tt(e),s=tt(t),l=i?ry:rh(e),u=s?ry:rh(t);l=l==rg?rv:l,u=u==rg?rv:u;var c=l==rv,d=u==rv,f=l==u;if(f&&ts(e)){if(!ts(t))return!1;i=!0,c=!1}if(f&&!c)return a||(a=new eU),i||tg(e)?tW(e,t,r,n,o,a):tY(e,t,l,r,n,o,a);if(!(1&r)){var p=c&&rb.call(e,"__wrapped__"),m=d&&rb.call(t,"__wrapped__");if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||(a=new eU),o(h,g,r,n,a)}}return!!f&&(a||(a=new eU),t7(e,t,r,n,o,a))},rE=function(e,t){return function e(t,r,n,o,a){return t===r||(null!=t&&null!=r&&((0,eu.A)(t)||(0,eu.A)(r))?rw(t,r,n,o,e,a):t!=t&&r!=r)}(e,t)},rx=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},rD=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e};var r_=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)tq(t,t2(e)),e=el(e);return t}:tQ;let rS=function(e){return tJ(e,tO,r_)};var rC=Object.prototype.hasOwnProperty;let rk=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&rC.call(e,"index")&&(r.index=e.index,r.input=e.input),r},rP=function(e,t){var r=t?eX(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)};var rO=/\w*$/;let rR=function(e){var t=new e.constructor(e.source,rO.exec(e));return t.lastIndex=e.lastIndex,t};var rT=tH.A?tH.A.prototype:void 0,rN=rT?rT.valueOf:void 0;let rj=function(e,t,r){var n=e.constructor;switch(t){case"[object ArrayBuffer]":return eX(e);case"[object Boolean]":case"[object Date]":return new n(+e);case"[object DataView]":return rP(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 eQ(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 rR(e);case"[object Symbol]":return rN?Object(rN.call(e)):{}}};var rA=tm&&tm.isMap,r$=rA?tu(rA):function(e){return(0,eu.A)(e)&&"[object Map]"==rh(e)},rI=tm&&tm.isSet,rM=rI?tu(rI):function(e){return(0,eu.A)(e)&&"[object Set]"==rh(e)},rL="[object Arguments]",rF="[object Function]",rB="[object Object]",rU={};rU[rL]=rU["[object Array]"]=rU["[object ArrayBuffer]"]=rU["[object DataView]"]=rU["[object Boolean]"]=rU["[object Date]"]=rU["[object Float32Array]"]=rU["[object Float64Array]"]=rU["[object Int8Array]"]=rU["[object Int16Array]"]=rU["[object Int32Array]"]=rU["[object Map]"]=rU["[object Number]"]=rU[rB]=rU["[object RegExp]"]=rU["[object Set]"]=rU["[object String]"]=rU["[object Symbol]"]=rU["[object Uint8Array]"]=rU["[object Uint8ClampedArray]"]=rU["[object Uint16Array]"]=rU["[object Uint32Array]"]=!0,rU["[object Error]"]=rU[rF]=rU["[object WeakMap]"]=!1;let rV=function e(t,r,n,o,a,i){var s,l=1&r,u=2&r,c=4&r;if(n&&(s=a?n(t,o,a,i):n(t)),void 0!==s)return s;if(!(0,eb.A)(t))return t;var d=tt(t);if(d){if(s=rk(t),!l)return e0(t,s)}else{var f,p,m,h,g=rh(t),y=g==rF||"[object GeneratorFunction]"==g;if(ts(t))return eq(t,l);if(g==rB||g==rL||y&&!a){if(s=u||y?{}:e6(t),!l)return u?(p=(f=s)&&tw(t,tO(t),f),tw(t,r_(t),p)):(h=(m=s)&&tw(t,t5(t),m),tw(t,t2(t),h))}else{if(!rU[g])return a?t:{};s=rj(t,g,l)}}i||(i=new eU);var v=i.get(t);if(v)return v;i.set(t,s),rM(t)?t.forEach(function(o){s.add(e(o,r,n,o,t,i))}):r$(t)&&t.forEach(function(o,a){s.set(a,e(o,r,n,a,t,i))});var b=c?u?rS:t9:u?tO:t5,w=d?void 0:b(t);return rD(w||t,function(o,a){w&&(o=t[a=o]),tb(s,a,e(o,r,n,a,t,i))}),s};var rW=r(1882),rH=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rz=/^\w*$/;let rK=function(e,t){if(tt(e))return!1;var r=typeof e;return!!("number"==r||"symbol"==r||"boolean"==r||null==e||(0,rW.A)(e))||rz.test(e)||!rH.test(e)||null!=t&&e in Object(t)};function rG(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=e.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(rG.Cache||eB),r}rG.Cache=eB;var rZ=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rY=/\\(\\)?/g,rq=(J=(q=rG(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(rZ,function(e,r,n,o){t.push(n?o.replace(rY,"$1"):r||e)}),t},function(e){return 500===J.size&&J.clear(),e})).cache,q),rJ=1/0,rX=tH.A?tH.A.prototype:void 0,rQ=rX?rX.toString:void 0;let r0=function e(t){if("string"==typeof t)return t;if(tt(t))return rx(t,e)+"";if((0,rW.A)(t))return rQ?rQ.call(t):"";var r=t+"";return"0"==r&&1/t==-rJ?"-0":r},r1=function(e,t){return tt(e)?e:rK(e,t)?[e]:rq(null==e?"":r0(e))},r2=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};var r4=1/0;let r3=function(e){if("string"==typeof e||(0,rW.A)(e))return e;var t=e+"";return"0"==t&&1/e==-r4?"-0":t},r6=function(e,t){t=r1(t,e);for(var r=0,n=t.length;null!=e&&r<n;)e=e[r3(t[r++])];return r&&r==n?e:void 0},r5=function(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(o);++n<o;)a[n]=e[n+t];return a},r9=function(e,t){var r,n;return t=r1(t,e),r=e,null==(e=(n=t).length<2?r:r6(r,r5(n,0,-1)))||delete e[r3(r2(t))]},r8=function(e){return em(e)?void 0:e};var r7=tH.A?tH.A.isConcatSpreadable:void 0;let ne=function(e){return tt(e)||te(e)||!!(r7&&e&&e[r7])},nt=function e(t,r,n,o,a){var i=-1,s=t.length;for(n||(n=ne),a||(a=[]);++i<s;){var l=t[i];r>0&&n(l)?r>1?e(l,r-1,n,o,a):tq(a,l):o||(a[a.length]=l)}return a};var nr=tM(t$(X=function(e,t){var r={};if(null==e)return r;var n=!1;t=rx(t,function(t){return t=r1(t,e),n||(n=t.length>1),t}),tw(e,rS(e),r),n&&(r=rV(r,7,r8));for(var o=t.length;o--;)r9(r,t[o]);return r},void 0,function(e){return(null==e?0:e.length)?nt(e,1):[]}),X+""),nn=((Q={}).Array="Array",Q.Boolean="Boolean",Q.ConceptUuid="ConceptUuid",Q.Number="Number",Q.Object="Object",Q.String="String",Q.UUID="UUID",Q.PersonAttributeTypeUuid="PersonAttributeTypeUuid",Q.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid",Q);function no(e,t){return r=>{if(!e(r))if("function"==typeof t)return t(r);else return t}}let na=no(e=>Array.isArray(e),"must be an array"),ni=no(e=>"boolean"==typeof e,"must be a boolean"),ns=no(e=>"number"==typeof e,"must be a number"),nl=no(e=>"string"==typeof e,"must be a string"),nu=no(e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,"must be an object (not an array or null)"),nc=no(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"),nd=B("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),nf=B("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});nf.subscribe(e=>{var t=e.config;try{localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}catch(e){}});let np=B("config-store-of-extension-state",{mountedExtensions:[]});function nm(e){return V(`config-module-${e}`,{config:null,loaded:!1,translationOverridesLoaded:!1})}function nh(){return V("config-extension-slots",{slots:{}})}function ng(e){return ny(nh().getState(),e)}function ny(e,t){return e.slots[t]??{loaded:!1,config:{}}}function nv(){return V("config-extensions",{configs:{}})}function nb(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=nv(),n=r=>r.configs[e]?.[t];return{getInitialState:()=>n(r.getInitialState()),getState:()=>n(r.getState())??{loaded:!1,config:null},subscribe:e=>r.subscribe((t,r)=>{let o=n(t),a=n(r);R(o,a)||e(o,a)})}}function nw(e,t,r){return e.configs[t]?.[r]??{loaded:!1,config:null}}function nE(e,t,r){return e.configure?.[r]??null}let nx=A()(()=>({config:{}})),nD=0,n_=!0,nS=!1;function nC(e){n=e}function nk(){n_=!0,nD>0&&nP()}function nP(){if(n_&&n&&!nS){nS=!0,n_=!1;try{n()}catch(e){n_=!0,nO(e),console.error("Failed to derive the implementer tools config",e)}finally{nS=!1}}}function nO(e){nx.setState({derivationError:e instanceof Error?e.message:String(e)})}function nR(){nx.getState().derivationError&&nx.setState({derivationError:void 0})}let nT=U("config-implementer-tools",{...nx,getState:()=>(0===nD&&nP(),nx.getState()),setState:(...e)=>(n_=!1,nx.setState(...e)),subscribe(e){nD++,nP();let t=nx.subscribe(e),r=!1;return()=>{!r&&(r=!0,nD--),t()}}});function nN(e,t){if(Array.isArray(t))return t}function nj(e,t){return tB({},e,t,nN)}let nA=[];function n$(){let e=nd.getState(),t=nf.getState(),r=np.getState();if(nI?.configState===e&&nI.tempConfigState===t)return void nU(e,r,t,nI.slotConfigs,!0);!function(e,t){for(let r of Object.keys(e.schemas)){let n,o=nm(r),a=e.schemas[r],i=!!e.moduleLoaded[r],s=nB.get(r);if(s&&s.schema===a&&s.moduleLoaded===i&&s.providedConfigs===e.providedConfigs&&s.temporaryConfig===t.config)n=s.state;else{let o=i?function(e,t,r){let n=t.schemas[e],o=n4(e,n1(t,r));n6(n,o,e);let a=n7(n,o);return n5(n,a,e),delete a.extensionSlots,a}(r,e,t):function(e,t,r){let n=n7(os,n4(e,n1(t,r)));return n5(os,n,e),delete n.extensionSlots,n}(r,e,t);n={translationOverridesLoaded:!0,loaded:i,config:o},nB.set(r,{schema:a,moduleLoaded:i,providedConfigs:e.providedConfigs,temporaryConfig:t.config,state:n})}let l=o.getState();l.loaded===n.loaded&&l.translationOverridesLoaded===n.translationOverridesLoaded&&rE(l.config,n.config)||o.setState(n)}}(e,t);let n=function(e,t){let r=n3(n1(e,t)),n=Object.keys(r).reduce((e,t)=>(r[t]?.extensionSlots&&(e[t]=r[t]?.extensionSlots),e),{});var o=n;for(let[e,t]of Object.entries(o))for(let[r,n]of Object.entries(t))!function(e,t,r){let n=`${t}.extensionSlots.${r}`,o=`Extension slot config '${n}'`,a=Object.keys(e).filter(e=>!["add","remove","order","configure"].includes(e));a.length&&on(n,o+`' contains invalid keys '${a.join("', '")}'`),!e.add||Array.isArray(e.add)&&e.add.every(e=>"string"==typeof e)||on(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)||on(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)||on(n,o+".order' is invalid. Must be an array of strings (extension IDs)"),e.configure&&!ot(e.configure)&&on(n,o+".configure' is invalid. Must be an object with extension IDs for keys")}(n,e,r);let a={},i={};for(let e of Object.values(n))for(let[t,r]of Object.entries(e))a[t]=r,r.configure&&(i[t]??(i[t]=[])).push(r.configure);for(let[e,t]of Object.entries(i)){let r=1===t.length?t[0]:n3(t);a[e].configure!==r&&(a[e]={...a[e],configure:r})}return a}(e,t);(function(e){let t=nh(),r=t.getState().slots,n={},o=!1;for(let[t,a]of Object.entries(e)){let e=r[t];e?.loaded&&rE(e.config,a)?n[t]=e:(n[t]={loaded:!0,config:a},o=!0)}(o||Object.keys(r).length!==Object.keys(n).length)&&t.setState({slots:n})})(n),nU(e,r,t,n,!1),nI={configState:e,tempConfigState:t,slotConfigs:n},nk()}let nI=null,nM=new WeakMap;function nL(){n=()=>{var e,t;let r,n;return e=nd.getState(),t=nf.getState(),r=nT.getState(),n={config:function(e,t){let r=function(e){let t={};for(let[r,n]of Object.entries(e)){let e=n0.get(r);if(e&&e.schema===n)t[r]=e.annotated;else{let e=function e(t){return t.hasOwnProperty("_default")?{...t,_value:t._default,_source:"default"}:ot(t)?Object.keys(t).reduce((r,n)=>(r[n]=e(t[n]),r),{}):{}}(rV(n,5));n0.set(r,{schema:n,annotated:e}),t[r]=e}}return t}(e.schemas),n=[...e.providedConfigs.map(e=>[e.config,e.source]),[t.config,"temporary config"]],o=new Set(Object.keys(r));for(let[e]of n)for(let t of Object.keys(e))o.add(t);let a={};for(let e of o){let t=r[e],o=n.map(([t])=>t[e]),i=n.map(([,e])=>e),s=nQ.get(e);if(s&&s.annotatedSchema===t&&s.configSlices.length===o.length&&s.configSlices.every((e,t)=>e===o[t])&&s.sources.every((e,t)=>e===i[t])){a[e]=s.result;continue}let l=t??{};n.forEach(([,e],t)=>{let r=o[t];void 0!==r&&(l=nj(l,function e(t,r){return ot(t)?Object.keys(t).reduce((n,o)=>(n[o]=e(t[o],r),n),{}):{_value:t,_source:r}}(r,e)))}),nQ.set(e,{annotatedSchema:t,configSlices:o,sources:i,result:l}),a[e]=l}return a}(e,t)},void(rE(r.config,n.config)||nT.setState(n))},n$(),nA.push(nd.subscribe(nF),nf.subscribe(nF),np.subscribe(nF))}function nF(){nR();try{n$()}catch(e){nO(e),console.error("Failed to recompute the configuration",e)}}nL();let nB=new Map;function nU(e,t,r,n,o){let a=nv(),i=a.getState().configs,s={},l=!1,u=0;for(let a of t.mountedExtensions){let t,c=i[a.slotName]?.[a.extensionId],d=c&&nM.get(c);if(o&&c?.loaded&&d?.slotModuleName===a.slotModuleName&&d.extensionModuleName===a.extensionModuleName)t=c;else{let o=function(e,t,r,n,o,a,i){let s=function(e){let[t]=e.split("#");return t}(n),l=o.schemas[s],u=JSON.stringify([r,n,e,t]),c=nX.get(u);if(c&&c.extensionSchema===l&&c.extensionModuleSchema===o.schemas[t]&&c.providedConfigs===o.providedConfigs&&c.temporaryConfig===a.config)return c.config;let d=l?s:t,f=n1(o,a),p=i?.configure?.[n]??{},m=n4(e,f),h=m?.extensionSlots?.[r]?.configure?.[n]??{},g=n3([n4(d,f),p,h]),y=l??o.schemas[t];n6(y,g,d);let v=n7(y,g);return n5(y,v,d),delete v.extensionSlots,nX.set(u,{extensionSchema:l,extensionModuleSchema:o.schemas[t],providedConfigs:o.providedConfigs,temporaryConfig:a.config,config:v}),v}(a.slotModuleName,a.extensionModuleName,a.slotName,a.extensionId,e,r,n[a.slotName]);t=c?.loaded&&rE(c.config,o)?c:{config:o,loaded:!0}}nM.set(t,a),t!==c&&(l=!0),s[a.slotName]||(s[a.slotName]={}),s[a.slotName][a.extensionId]=t,u++}for(let[e,t]of Object.entries(s)){let r=i[e];r&&Object.keys(r).length===Object.keys(t).length&&Object.entries(t).every(([e,t])=>r[e]===t)&&(s[e]=r)}l||(l=Object.keys(i).length!==Object.keys(s).length||Object.values(i).reduce((e,t)=>e+Object.keys(t).length,0)!==u),l&&a.setState({configs:s})}function nV(e,t){n2(e,t);let r=nj(t,os);nd.setState(t=>({...t,schemas:{...t.schemas,[e]:r},moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function nW(e){nd.setState(t=>({...t,schemas:{...t.schemas,[e]:os}}))}function nH(e){nd.setState(t=>({...t,moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function nz(e){nd.setState(t=>({...t,schemas:{...t.schemas,[e]:oi}}))}function nK(e,t){n2(e,t);let r=nj(t,os);nd.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.`),nd.setState(t=>({...t,schemas:{...t.schemas,[e]:r}}))}function nG(e,t="provided"){nd.setState(r=>({...r,providedConfigs:[...r.providedConfigs,{source:t,config:e}]}))}function nZ(e,t,r){return new Promise(n=>{let o,a=!1;function i(e){!a&&t(e)&&(a=!0,n(r(e)),o?.())}i(e.getState()),a||(o=e.subscribe(i))})}function nY(e){return nZ(nm(e),e=>!!(e.loaded&&e.config),e=>nr(e.config,["Display conditions","Translation overrides"]))}function nq(e,t,r){let n=[nZ(nm(e),e=>!!(e.translationOverridesLoaded&&e.config),e=>e.config["Translation overrides"]??{})];return t&&r&&n.push(nZ(nb(t,r),e=>!!(e.loaded&&e.config),e=>e.config["Translation overrides"]??{})),Promise.all(n)}function nJ(e,t,r){n6(e,t,r);let n=n7(e,t);return n5(e,n,r),n}let nX=new Map,nQ=new Map,n0=new Map;function n1(e,t){return[...e.providedConfigs.map(e=>e.config),t.config]}function n2(e,t,r=""){let n="Please verify that you are running the latest version and, if so, alert the maintainer.";for(let o of Object.keys(t).filter(e=>!e.startsWith("_"))){let a=r+(r&&".")+o,i=t[o];if("Display conditions"===a&&console.error(`${e} declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ${n}`),"Translation overrides"===a&&console.error(`${e} declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ${n}`),!ot(i)){console.error(`${e} has bad config schema definition for key '${a}'. ${n}`);continue}i.hasOwnProperty("_default")||n2(e,i,a);let s=i._elements;if(oe(s)&&n2(e,s,a+"._elements"),i._validators)for(let t of i._validators)"function"!=typeof t&&console.error(`${e} has invalid validator for key '${a}' ${n}.
|
|
3
|
+
${e.stack}`,k(t)}}function O(e){let t;if(e instanceof Error)return e;if(null===e)return Error("'null' was thrown as an error");if("object"==typeof e){try{t=`Object thrown as error: ${JSON.stringify(e)}`}catch(r){t=`Object thrown as error with the following properties: ${Object.keys(e)}`}return Error(t)}if(void 0===e)return Error("'undefined' was thrown as an error");return Error(e.toString())}function R(e,t){if(e===t||Object.is(e,t))return!0;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}if(Array.isArray(t)||"object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;let r=Object.getOwnPropertyNames(e),n=Object.getOwnPropertyNames(t);return r.length===n.length&&r.every(r=>e[r]===t[r])}function T(e,t){let r;try{r=e()}catch(e){return}return{getItem:e=>{var n;let o=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),a=null!=(n=r.getItem(e))?n:null;return a instanceof Promise?a.then(o):o(a)},setItem:(e,n)=>r.setItem(e,JSON.stringify(n,null==t?void 0:t.replacer)),removeItem:e=>r.removeItem(e)}}window.onerror=function(e,t,r,n,o){return console.error("Unexpected error: ",o??e),E({description:C(o,"Oops! An unexpected error occurred."),kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(e){console.error("Unhandled rejection: ",e.reason),E({description:C(e.reason,"Oops! An unhandled promise rejection occurred."),kind:"error",title:"Error"})};let N=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>N(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>N(t)(e)}}},j=e=>{let t,r=new Set,n=(e,n)=>{let o="function"==typeof e?e(t):e;if(!Object.is(o,t)){let e=t;t=(null!=n?n:"object"!=typeof o||null===o)?o:Object.assign({},t,o),r.forEach(r=>r(t,e))}},o=()=>t,a={setState:n,getState:o,getInitialState:()=>i,subscribe:e=>(r.add(e),()=>r.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},i=t=e(n,o,a);return a},A=e=>e?j(e):j;function $(){try{return"u">typeof process&&("true"===process.env.VITEST||void 0!==process.env.JEST_WORKER_ID)||"u">typeof globalThis&&("__vitest_worker__"in globalThis||"__jest__"in globalThis)}catch{return!1}}let I={},M=Symbol.for("openmrs.esm-state.instanceCount"),L=globalThis,F=(L[M]??0)+1;function B(e,t,r="none"){let n=I[e];if(n)return n.active?$()||console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):n.value.setState(t,!0),n.active=!0,n.value;{let n=H(e,t,r);return I[e]={value:n,active:!0},n}}function U(e,t){let r=I[e];return r?(r.active?$()||console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):r.value=t,r.active=!0,r.value):(I[e]={value:t,active:!0},t)}function V(e,t,r="none"){let n=I[e];if(!n){let n=H(e,t??{},r);return I[e]={value:n,active:!1},n}return n.value}function W(...e){let[t,r,n]=e,o=void 0===n?r:n,a=void 0===n?e=>e:r,i=a(t.getState());return o(i),t.subscribe(e=>{let t=a(e);R(i,t)||(i=t,o(t))})}function H(e,t,r){return"sessionStorage"===r?A()(((e,t)=>{if("getStorage"in t||"serialize"in t||"deserialize"in t)return console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),(r,n,o)=>{let a,i,s={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},l=!1,u=new Set,c=new Set;try{a=s.getStorage()}catch(e){}if(!a)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...e)},n,o);let d=N(s.serialize),f=()=>{let e,t=d({state:s.partialize({...n()}),version:s.version}).then(e=>a.setItem(s.name,e)).catch(t=>{e=t});if(e)throw e;return t},p=o.setState;o.setState=(e,t)=>{p(e,t),f()};let m=e((...e)=>{r(...e),f()},n,o),h=()=>{var e;if(!a)return;l=!1,u.forEach(e=>e(n()));let t=(null==(e=s.onRehydrateStorage)?void 0:e.call(s,n()))||void 0;return N(a.getItem.bind(a))(s.name).then(e=>{if(e)return s.deserialize(e)}).then(e=>{if(e)if("number"!=typeof e.version||e.version===s.version)return e.state;else{if(s.migrate)return s.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}}).then(e=>{var t;return r(i=s.merge(e,null!=(t=n())?t:m),!0),f()}).then(()=>{null==t||t(i,void 0),l=!0,c.forEach(e=>e(i))}).catch(e=>{null==t||t(void 0,e)})};return o.persist={setOptions:e=>{s={...s,...e},e.getStorage&&(a=e.getStorage())},clearStorage:()=>{null==a||a.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>h(),hasHydrated:()=>l,onHydrate:e=>(u.add(e),()=>{u.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},h(),i||m};return(r,n,o)=>{let a,i={storage:T(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},s=!1,l=new Set,u=new Set,c=i.storage;if(!c)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),r(...e)},n,o);let d=()=>{let e=i.partialize({...n()});return c.setItem(i.name,{state:e,version:i.version})},f=o.setState;o.setState=(e,t)=>{f(e,t),d()};let p=e((...e)=>{r(...e),d()},n,o);o.getInitialState=()=>p;let m=()=>{var e,t;if(!c)return;s=!1,l.forEach(e=>{var t;return e(null!=(t=n())?t:p)});let o=(null==(t=i.onRehydrateStorage)?void 0:t.call(i,null!=(e=n())?e:p))||void 0;return N(c.getItem.bind(c))(i.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===i.version)return[!1,e.state];else{if(i.migrate)return[!0,i.migrate(e.state,e.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(e=>{var t;let[o,s]=e;if(r(a=i.merge(s,null!=(t=n())?t:p),!0),o)return d()}).then(()=>{null==o||o(a,void 0),a=n(),s=!0,u.forEach(e=>e(a))}).catch(e=>{null==o||o(void 0,e)})};return o.persist={setOptions:e=>{i={...i,...e},e.storage&&(c=e.storage)},clearStorage:()=>{null==c||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>m(),hasHydrated:()=>s,onHydrate:e=>(l.add(e),()=>{l.delete(e)}),onFinishHydration:e=>(u.add(e),()=>{u.delete(e)})},i.skipHydration||m(),a||p}})(()=>t,{name:e,storage:T(()=>sessionStorage)})):A()(()=>t)}L[M]=F,F>1&&!$()&&console.error(`Detected ${F} copies of @openmrs/esm-framework running on this page. Each copy keeps its own store registry, so stores, configuration and extension state are not shared between them. This usually means a frontend module loaded its own bundled framework instead of the one the app shell provides.`),globalThis.setTimeout?.(()=>{"u">typeof window&&"development"===window.spaEnv&&(window.stores=I)},1e3);let z=function(e){return void 0===e};var K,G,Z,Y,q,J,X,Q,ee,et,er,en,eo,ea,ei=r(8348);let es=function(e,t){return function(r){return e(t(r))}};var el=es(Object.getPrototypeOf,Object),eu=r(3098),ec=Object.prototype,ed=Function.prototype.toString,ef=ec.hasOwnProperty,ep=ed.call(Object);let em=function(e){if(!(0,eu.A)(e)||"[object Object]"!=(0,ei.A)(e))return!1;var t=el(e);if(null===t)return!0;var r=ef.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&ed.call(r)==ep},eh=function(e,t){return e===t||e!=e&&t!=t},eg=function(e,t){for(var r=e.length;r--;)if(eh(e[r][0],t))return r;return -1};var ey=Array.prototype.splice;function ev(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])}}ev.prototype.clear=function(){this.__data__=[],this.size=0},ev.prototype.delete=function(e){var t=this.__data__,r=eg(t,e);return!(r<0)&&(r==t.length-1?t.pop():ey.call(t,r,1),--this.size,!0)},ev.prototype.get=function(e){var t=this.__data__,r=eg(t,e);return r<0?void 0:t[r][1]},ev.prototype.has=function(e){return eg(this.__data__,e)>-1},ev.prototype.set=function(e,t){var r=this.__data__,n=eg(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};var eb=r(3149);let ew=function(e){if(!(0,eb.A)(e))return!1;var t=(0,ei.A)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};var eE=r(1917),ex=eE.A["__core-js_shared__"],eD=(K=/[^.]+$/.exec(ex&&ex.keys&&ex.keys.IE_PROTO||""))?"Symbol(src)_1."+K:"",e_=Function.prototype.toString;let eS=function(e){if(null!=e){try{return e_.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var eC=/^\[object .+?Constructor\]$/,ek=Object.prototype,eP=Function.prototype.toString,eO=ek.hasOwnProperty,eR=RegExp("^"+eP.call(eO).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");let eT=function(e){return!!(0,eb.A)(e)&&(!eD||!(eD in e))&&(ew(e)?eR:eC).test(eS(e))},eN=function(e,t){var r=null==e?void 0:e[t];return eT(r)?r:void 0};var ej=eN(eE.A,"Map"),eA=eN(Object,"create"),e$=Object.prototype.hasOwnProperty,eI=Object.prototype.hasOwnProperty;function eM(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])}}eM.prototype.clear=function(){this.__data__=eA?eA(null):{},this.size=0},eM.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t},eM.prototype.get=function(e){var t=this.__data__;if(eA){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return e$.call(t,e)?t[e]:void 0},eM.prototype.has=function(e){var t=this.__data__;return eA?void 0!==t[e]:eI.call(t,e)},eM.prototype.set=function(e,t){var r=this.__data__;return this.size+=+!this.has(e),r[e]=eA&&void 0===t?"__lodash_hash_undefined__":t,this};let eL=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},eF=function(e,t){var r=e.__data__;return eL(t)?r["string"==typeof t?"string":"hash"]:r.map};function eB(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function eU(e){var t=this.__data__=new ev(e);this.size=t.size}eB.prototype.clear=function(){this.size=0,this.__data__={hash:new eM,map:new(ej||ev),string:new eM}},eB.prototype.delete=function(e){var t=eF(this,e).delete(e);return this.size-=!!t,t},eB.prototype.get=function(e){return eF(this,e).get(e)},eB.prototype.has=function(e){return eF(this,e).has(e)},eB.prototype.set=function(e,t){var r=eF(this,e),n=r.size;return r.set(e,t),this.size+=+(r.size!=n),this},eU.prototype.clear=function(){this.__data__=new ev,this.size=0},eU.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},eU.prototype.get=function(e){return this.__data__.get(e)},eU.prototype.has=function(e){return this.__data__.has(e)},eU.prototype.set=function(e,t){var r=this.__data__;if(r instanceof ev){var n=r.__data__;if(!ej||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new eB(n)}return r.set(e,t),this.size=r.size,this};var eV=function(){try{var e=eN(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();let eW=function(e,t,r){"__proto__"==t&&eV?eV(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r},eH=function(e,t,r){(void 0===r||eh(e[t],r))&&(void 0!==r||t in e)||eW(e,t,r)},ez=function(e,t,r){for(var n=-1,o=Object(e),a=r(e),i=a.length;i--;){var s=a[++n];if(!1===t(o[s],s,o))break}return e};var eK="object"==typeof exports&&exports&&!exports.nodeType&&exports,eG=eK&&"object"==typeof module&&module&&!module.nodeType&&module,eZ=eG&&eG.exports===eK?eE.A.Buffer:void 0,eY=eZ?eZ.allocUnsafe:void 0;let eq=function(e,t){if(t)return e.slice();var r=e.length,n=eY?eY(r):new e.constructor(r);return e.copy(n),n};var eJ=eE.A.Uint8Array;let eX=function(e){var t=new e.constructor(e.byteLength);return new eJ(t).set(new eJ(e)),t},eQ=function(e,t){var r=t?eX(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)},e0=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t};var e1=Object.create,e2=function(){function e(){}return function(t){if(!(0,eb.A)(t))return{};if(e1)return e1(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),e4=Object.prototype;let e3=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||e4)},e6=function(e){return"function"!=typeof e.constructor||e3(e)?{}:e2(el(e))},e5=function(e){return(0,eu.A)(e)&&"[object Arguments]"==(0,ei.A)(e)};var e9=Object.prototype,e8=e9.hasOwnProperty,e7=e9.propertyIsEnumerable,te=e5(function(){return arguments}())?e5:function(e){return(0,eu.A)(e)&&e8.call(e,"callee")&&!e7.call(e,"callee")},tt=Array.isArray;let tr=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff},tn=function(e){return null!=e&&tr(e.length)&&!ew(e)};var to="object"==typeof exports&&exports&&!exports.nodeType&&exports,ta=to&&"object"==typeof module&&module&&!module.nodeType&&module,ti=ta&&ta.exports===to?eE.A.Buffer:void 0;let ts=(ti?ti.isBuffer:void 0)||function(){return!1};var tl={};tl["[object Float32Array]"]=tl["[object Float64Array]"]=tl["[object Int8Array]"]=tl["[object Int16Array]"]=tl["[object Int32Array]"]=tl["[object Uint8Array]"]=tl["[object Uint8ClampedArray]"]=tl["[object Uint16Array]"]=tl["[object Uint32Array]"]=!0,tl["[object Arguments]"]=tl["[object Array]"]=tl["[object ArrayBuffer]"]=tl["[object Boolean]"]=tl["[object DataView]"]=tl["[object Date]"]=tl["[object Error]"]=tl["[object Function]"]=tl["[object Map]"]=tl["[object Number]"]=tl["[object Object]"]=tl["[object RegExp]"]=tl["[object Set]"]=tl["[object String]"]=tl["[object WeakMap]"]=!1;let tu=function(e){return function(t){return e(t)}};var tc=r(2136),td="object"==typeof exports&&exports&&!exports.nodeType&&exports,tf=td&&"object"==typeof module&&module&&!module.nodeType&&module,tp=tf&&tf.exports===td&&tc.A.process,tm=function(){try{var e=tf&&tf.require&&tf.require("util").types;if(e)return e;return tp&&tp.binding&&tp.binding("util")}catch(e){}}(),th=tm&&tm.isTypedArray,tg=th?tu(th):function(e){return(0,eu.A)(e)&&tr(e.length)&&!!tl[(0,ei.A)(e)]};let ty=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};var tv=Object.prototype.hasOwnProperty;let tb=function(e,t,r){var n=e[t];tv.call(e,t)&&eh(n,r)&&(void 0!==r||t in e)||eW(e,t,r)},tw=function(e,t,r,n){var o=!r;r||(r={});for(var a=-1,i=t.length;++a<i;){var s=t[a],l=n?n(r[s],e[s],s,r,e):void 0;void 0===l&&(l=e[s]),o?eW(r,s,l):tb(r,s,l)}return r},tE=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n};var tx=/^(?:0|[1-9]\d*)$/;let tD=function(e,t){var r=typeof e;return!!(t=null==t?0x1fffffffffffff:t)&&("number"==r||"symbol"!=r&&tx.test(e))&&e>-1&&e%1==0&&e<t};var t_=Object.prototype.hasOwnProperty;let tS=function(e,t){var r=tt(e),n=!r&&te(e),o=!r&&!n&&ts(e),a=!r&&!n&&!o&&tg(e),i=r||n||o||a,s=i?tE(e.length,String):[],l=s.length;for(var u in e)(t||t_.call(e,u))&&!(i&&("length"==u||o&&("offset"==u||"parent"==u)||a&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||tD(u,l)))&&s.push(u);return s},tC=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t};var tk=Object.prototype.hasOwnProperty;let tP=function(e){if(!(0,eb.A)(e))return tC(e);var t=e3(e),r=[];for(var n in e)"constructor"==n&&(t||!tk.call(e,n))||r.push(n);return r},tO=function(e){return tn(e)?tS(e,!0):tP(e)},tR=function(e,t,r,n,o,a,i){var s=ty(e,r),l=ty(t,r),u=i.get(l);if(u)return void eH(e,r,u);var c=a?a(s,l,r+"",e,t,i):void 0,d=void 0===c;if(d){var f=tt(l),p=!f&&ts(l),m=!f&&!p&&tg(l);(c=l,f||p||m)?tt(s)?c=s:(0,eu.A)(s)&&tn(s)?c=e0(s):p?(d=!1,c=eq(l,!0)):m?(d=!1,c=eQ(l,!0)):c=[]:em(l)||te(l)?(c=s,te(s))?c=tw(s,tO(s)):(!(0,eb.A)(s)||ew(s))&&(c=e6(l)):d=!1}d&&(i.set(l,c),o(c,l,n,a,i),i.delete(l)),eH(e,r,c)},tT=function e(t,r,n,o,a){t!==r&&ez(r,function(i,s){if(a||(a=new eU),(0,eb.A)(i))tR(t,r,s,n,e,o,a);else{var l=o?o(ty(t,s),i,s+"",t,r,a):void 0;void 0===l&&(l=i),eH(t,s,l)}},tO)},tN=function(e){return e},tj=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 tA=Math.max;let t$=function(e,t,r){return t=tA(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,a=tA(n.length-t,0),i=Array(a);++o<a;)i[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(i),tj(e,this,s)}};var tI=Date.now,tM=(G=eV?function(e,t){return eV(e,"toString",{configurable:!0,enumerable:!1,value:function(){return t},writable:!0})}:tN,Z=0,Y=0,function(){var e=tI(),t=16-(e-Y);if(Y=e,t>0){if(++Z>=800)return arguments[0]}else Z=0;return G.apply(void 0,arguments)});let tL=function(e,t,r){if(!(0,eb.A)(r))return!1;var n=typeof t;return("number"==n?!!(tn(r)&&tD(t,r.length)):"string"==n&&t in r)&&eh(r[t],e)},tF=function(e){var t;return tM(t$(t=function(t,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,i=o>2?r[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,i&&tL(r[0],r[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++n<o;){var s=r[n];s&&e(t,s,n,a)}return t},void 0,tN),t+"")};var tB=tF(function(e,t,r,n){tT(e,t,r,n)});function tU(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new eB;++t<r;)this.add(e[t])}tU.prototype.add=tU.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},tU.prototype.has=function(e){return this.__data__.has(e)};let tV=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},tW=function(e,t,r,n,o,a){var i=1&r,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var u=a.get(e),c=a.get(t);if(u&&c)return u==t&&c==e;var d=-1,f=!0,p=2&r?new tU:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(n)var g=i?n(h,m,d,t,e,a):n(m,h,d,e,t,a);if(void 0!==g){if(g)continue;f=!1;break}if(p){if(!tV(t,function(e,t){if(!p.has(t)&&(m===e||o(m,e,r,n,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||o(m,h,r,n,a))){f=!1;break}}return a.delete(e),a.delete(t),f};var tH=r(241);let tz=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r},tK=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r};var tG=tH.A?tH.A.prototype:void 0,tZ=tG?tG.valueOf:void 0;let tY=function(e,t,r,n,o,a,i){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!a(new eJ(e),new eJ(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return eh(+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=tz;case"[object Set]":var l=1&n;if(s||(s=tK),e.size!=t.size&&!l)break;var u=i.get(e);if(u)return u==t;n|=2,i.set(e,t);var c=tW(s(e),s(t),n,o,a,i);return i.delete(e),c;case"[object Symbol]":if(tZ)return tZ.call(e)==tZ.call(t)}return!1},tq=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e},tJ=function(e,t,r){var n=t(e);return tt(e)?n:tq(n,r(e))},tX=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,a=[];++r<n;){var i=e[r];t(i,r,e)&&(a[o++]=i)}return a},tQ=function(){return[]};var t0=Object.prototype.propertyIsEnumerable,t1=Object.getOwnPropertySymbols,t2=t1?function(e){return null==e?[]:tX(t1(e=Object(e)),function(t){return t0.call(e,t)})}:tQ,t4=es(Object.keys,Object),t3=Object.prototype.hasOwnProperty;let t6=function(e){if(!e3(e))return t4(e);var t=[];for(var r in Object(e))t3.call(e,r)&&"constructor"!=r&&t.push(r);return t},t5=function(e){return tn(e)?tS(e):t6(e)},t9=function(e){return tJ(e,t5,t2)};var t8=Object.prototype.hasOwnProperty;let t7=function(e,t,r,n,o,a){var i=1&r,s=t9(e),l=s.length;if(l!=t9(t).length&&!i)return!1;for(var u=l;u--;){var c=s[u];if(!(i?c in t:t8.call(t,c)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=i;++u<l;){var h=e[c=s[u]],g=t[c];if(n)var y=i?n(g,h,c,t,e,a):n(h,g,c,e,t,a);if(!(void 0===y?h===g||o(h,g,r,n,a):y)){p=!1;break}m||(m="constructor"==c)}if(p&&!m){var v=e.constructor,b=t.constructor;v!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b)&&(p=!1)}return a.delete(e),a.delete(t),p};var re=eN(eE.A,"DataView"),rt=eN(eE.A,"Promise"),rr=eN(eE.A,"Set"),rn=eN(eE.A,"WeakMap"),ro="[object Map]",ra="[object Promise]",ri="[object Set]",rs="[object WeakMap]",rl="[object DataView]",ru=eS(re),rc=eS(ej),rd=eS(rt),rf=eS(rr),rp=eS(rn),rm=ei.A;(re&&rm(new re(new ArrayBuffer(1)))!=rl||ej&&rm(new ej)!=ro||rt&&rm(rt.resolve())!=ra||rr&&rm(new rr)!=ri||rn&&rm(new rn)!=rs)&&(rm=function(e){var t=(0,ei.A)(e),r="[object Object]"==t?e.constructor:void 0,n=r?eS(r):"";if(n)switch(n){case ru:return rl;case rc:return ro;case rd:return ra;case rf:return ri;case rp:return rs}return t});let rh=rm;var rg="[object Arguments]",ry="[object Array]",rv="[object Object]",rb=Object.prototype.hasOwnProperty;let rw=function(e,t,r,n,o,a){var i=tt(e),s=tt(t),l=i?ry:rh(e),u=s?ry:rh(t);l=l==rg?rv:l,u=u==rg?rv:u;var c=l==rv,d=u==rv,f=l==u;if(f&&ts(e)){if(!ts(t))return!1;i=!0,c=!1}if(f&&!c)return a||(a=new eU),i||tg(e)?tW(e,t,r,n,o,a):tY(e,t,l,r,n,o,a);if(!(1&r)){var p=c&&rb.call(e,"__wrapped__"),m=d&&rb.call(t,"__wrapped__");if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||(a=new eU),o(h,g,r,n,a)}}return!!f&&(a||(a=new eU),t7(e,t,r,n,o,a))},rE=function(e,t){return function e(t,r,n,o,a){return t===r||(null!=t&&null!=r&&((0,eu.A)(t)||(0,eu.A)(r))?rw(t,r,n,o,e,a):t!=t&&r!=r)}(e,t)},rx=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},rD=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e};var r_=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)tq(t,t2(e)),e=el(e);return t}:tQ;let rS=function(e){return tJ(e,tO,r_)};var rC=Object.prototype.hasOwnProperty;let rk=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&rC.call(e,"index")&&(r.index=e.index,r.input=e.input),r},rP=function(e,t){var r=t?eX(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)};var rO=/\w*$/;let rR=function(e){var t=new e.constructor(e.source,rO.exec(e));return t.lastIndex=e.lastIndex,t};var rT=tH.A?tH.A.prototype:void 0,rN=rT?rT.valueOf:void 0;let rj=function(e,t,r){var n=e.constructor;switch(t){case"[object ArrayBuffer]":return eX(e);case"[object Boolean]":case"[object Date]":return new n(+e);case"[object DataView]":return rP(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 eQ(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 rR(e);case"[object Symbol]":return rN?Object(rN.call(e)):{}}};var rA=tm&&tm.isMap,r$=rA?tu(rA):function(e){return(0,eu.A)(e)&&"[object Map]"==rh(e)},rI=tm&&tm.isSet,rM=rI?tu(rI):function(e){return(0,eu.A)(e)&&"[object Set]"==rh(e)},rL="[object Arguments]",rF="[object Function]",rB="[object Object]",rU={};rU[rL]=rU["[object Array]"]=rU["[object ArrayBuffer]"]=rU["[object DataView]"]=rU["[object Boolean]"]=rU["[object Date]"]=rU["[object Float32Array]"]=rU["[object Float64Array]"]=rU["[object Int8Array]"]=rU["[object Int16Array]"]=rU["[object Int32Array]"]=rU["[object Map]"]=rU["[object Number]"]=rU[rB]=rU["[object RegExp]"]=rU["[object Set]"]=rU["[object String]"]=rU["[object Symbol]"]=rU["[object Uint8Array]"]=rU["[object Uint8ClampedArray]"]=rU["[object Uint16Array]"]=rU["[object Uint32Array]"]=!0,rU["[object Error]"]=rU[rF]=rU["[object WeakMap]"]=!1;let rV=function e(t,r,n,o,a,i){var s,l=1&r,u=2&r,c=4&r;if(n&&(s=a?n(t,o,a,i):n(t)),void 0!==s)return s;if(!(0,eb.A)(t))return t;var d=tt(t);if(d){if(s=rk(t),!l)return e0(t,s)}else{var f,p,m,h,g=rh(t),y=g==rF||"[object GeneratorFunction]"==g;if(ts(t))return eq(t,l);if(g==rB||g==rL||y&&!a){if(s=u||y?{}:e6(t),!l)return u?(p=(f=s)&&tw(t,tO(t),f),tw(t,r_(t),p)):(h=(m=s)&&tw(t,t5(t),m),tw(t,t2(t),h))}else{if(!rU[g])return a?t:{};s=rj(t,g,l)}}i||(i=new eU);var v=i.get(t);if(v)return v;i.set(t,s),rM(t)?t.forEach(function(o){s.add(e(o,r,n,o,t,i))}):r$(t)&&t.forEach(function(o,a){s.set(a,e(o,r,n,a,t,i))});var b=c?u?rS:t9:u?tO:t5,w=d?void 0:b(t);return rD(w||t,function(o,a){w&&(o=t[a=o]),tb(s,a,e(o,r,n,a,t,i))}),s};var rW=r(1882),rH=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rz=/^\w*$/;let rK=function(e,t){if(tt(e))return!1;var r=typeof e;return!!("number"==r||"symbol"==r||"boolean"==r||null==e||(0,rW.A)(e))||rz.test(e)||!rH.test(e)||null!=t&&e in Object(t)};function rG(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=e.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(rG.Cache||eB),r}rG.Cache=eB;var rZ=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rY=/\\(\\)?/g,rq=(J=(q=rG(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(rZ,function(e,r,n,o){t.push(n?o.replace(rY,"$1"):r||e)}),t},function(e){return 500===J.size&&J.clear(),e})).cache,q),rJ=1/0,rX=tH.A?tH.A.prototype:void 0,rQ=rX?rX.toString:void 0;let r0=function e(t){if("string"==typeof t)return t;if(tt(t))return rx(t,e)+"";if((0,rW.A)(t))return rQ?rQ.call(t):"";var r=t+"";return"0"==r&&1/t==-rJ?"-0":r},r1=function(e,t){return tt(e)?e:rK(e,t)?[e]:rq(null==e?"":r0(e))},r2=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};var r4=1/0;let r3=function(e){if("string"==typeof e||(0,rW.A)(e))return e;var t=e+"";return"0"==t&&1/e==-r4?"-0":t},r6=function(e,t){t=r1(t,e);for(var r=0,n=t.length;null!=e&&r<n;)e=e[r3(t[r++])];return r&&r==n?e:void 0},r5=function(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(o);++n<o;)a[n]=e[n+t];return a},r9=function(e,t){var r,n;return t=r1(t,e),r=e,null==(e=(n=t).length<2?r:r6(r,r5(n,0,-1)))||delete e[r3(r2(t))]},r8=function(e){return em(e)?void 0:e};var r7=tH.A?tH.A.isConcatSpreadable:void 0;let ne=function(e){return tt(e)||te(e)||!!(r7&&e&&e[r7])},nt=function e(t,r,n,o,a){var i=-1,s=t.length;for(n||(n=ne),a||(a=[]);++i<s;){var l=t[i];r>0&&n(l)?r>1?e(l,r-1,n,o,a):tq(a,l):o||(a[a.length]=l)}return a};var nr=tM(t$(X=function(e,t){var r={};if(null==e)return r;var n=!1;t=rx(t,function(t){return t=r1(t,e),n||(n=t.length>1),t}),tw(e,rS(e),r),n&&(r=rV(r,7,r8));for(var o=t.length;o--;)r9(r,t[o]);return r},void 0,function(e){return(null==e?0:e.length)?nt(e,1):[]}),X+""),nn=((Q={}).Array="Array",Q.Boolean="Boolean",Q.ConceptUuid="ConceptUuid",Q.Number="Number",Q.Object="Object",Q.String="String",Q.UUID="UUID",Q.PersonAttributeTypeUuid="PersonAttributeTypeUuid",Q.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid",Q);function no(e,t){return r=>{if(!e(r))if("function"==typeof t)return t(r);else return t}}let na=no(e=>Array.isArray(e),"must be an array"),ni=no(e=>"boolean"==typeof e,"must be a boolean"),ns=no(e=>"number"==typeof e,"must be a number"),nl=no(e=>"string"==typeof e,"must be a string"),nu=no(e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,"must be an object (not an array or null)"),nc=no(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"),nd=B("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),nf=B("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});nf.subscribe(e=>{var t=e.config;try{localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}catch(e){}});let np=B("config-store-of-extension-state",{mountedExtensions:[]});function nm(e){return V(`config-module-${e}`,{config:null,loaded:!1,translationOverridesLoaded:!1})}function nh(){return V("config-extension-slots",{slots:{}})}function ng(e){return ny(nh().getState(),e)}function ny(e,t){return e.slots[t]??{loaded:!1,config:{}}}function nv(){return V("config-extensions",{configs:{}})}function nb(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=nv(),n=r=>r.configs[e]?.[t];return{getInitialState:()=>n(r.getInitialState()),getState:()=>n(r.getState())??{loaded:!1,config:null},subscribe:e=>r.subscribe((t,r)=>{let o=n(t),a=n(r);R(o,a)||e(o,a)})}}function nw(e,t,r){return e.configs[t]?.[r]??{loaded:!1,config:null}}function nE(e,t,r){return e.configure?.[r]??null}let nx=A()(()=>({config:{}})),nD=0,n_=!0,nS=!1;function nC(e){n=e}function nk(){n_=!0,nD>0&&nP()}function nP(){if(n_&&n&&!nS){nS=!0,n_=!1;try{n()}catch(e){n_=!0,nO(e),console.error("Failed to derive the implementer tools config",e)}finally{nS=!1}}}function nO(e){nx.setState({derivationError:e instanceof Error?e.message:String(e)})}function nR(){nx.getState().derivationError&&nx.setState({derivationError:void 0})}let nT=U("config-implementer-tools",{...nx,getState:()=>(0===nD&&nP(),nx.getState()),setState:(...e)=>(n_=!1,nx.setState(...e)),subscribe(e){nD++,nP();let t=nx.subscribe(e),r=!1;return()=>{!r&&(r=!0,nD--),t()}}});function nN(e,t){if(Array.isArray(t))return t}function nj(e,t){return tB({},e,t,nN)}let nA=[];function n$(){let e=nd.getState(),t=nf.getState(),r=np.getState();if(nI?.configState===e&&nI.tempConfigState===t)return void nU(e,r,t,nI.slotConfigs,!0);!function(e,t){for(let r of Object.keys(e.schemas)){let n,o=nm(r),a=e.schemas[r],i=!!e.moduleLoaded[r],s=nB.get(r);if(s&&s.schema===a&&s.moduleLoaded===i&&s.providedConfigs===e.providedConfigs&&s.temporaryConfig===t.config)n=s.state;else{let o=i?function(e,t,r){let n=t.schemas[e],o=n4(e,n1(t,r));n6(n,o,e);let a=n7(n,o);return n5(n,a,e),delete a.extensionSlots,a}(r,e,t):function(e,t,r){let n=n7(os,n4(e,n1(t,r)));return n5(os,n,e),delete n.extensionSlots,n}(r,e,t);n={translationOverridesLoaded:!0,loaded:i,config:o},nB.set(r,{schema:a,moduleLoaded:i,providedConfigs:e.providedConfigs,temporaryConfig:t.config,state:n})}let l=o.getState();l.loaded===n.loaded&&l.translationOverridesLoaded===n.translationOverridesLoaded&&rE(l.config,n.config)||o.setState(n)}}(e,t);let n=function(e,t){let r=n3(n1(e,t)),n=Object.keys(r).reduce((e,t)=>(r[t]?.extensionSlots&&(e[t]=r[t]?.extensionSlots),e),{});var o=n;for(let[e,t]of Object.entries(o))for(let[r,n]of Object.entries(t))!function(e,t,r){let n=`${t}.extensionSlots.${r}`,o=`Extension slot config '${n}'`,a=Object.keys(e).filter(e=>!["add","remove","order","configure"].includes(e));a.length&&on(n,o+`' contains invalid keys '${a.join("', '")}'`),!e.add||Array.isArray(e.add)&&e.add.every(e=>"string"==typeof e)||on(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)||on(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)||on(n,o+".order' is invalid. Must be an array of strings (extension IDs)"),e.configure&&!ot(e.configure)&&on(n,o+".configure' is invalid. Must be an object with extension IDs for keys")}(n,e,r);let a={},i={};for(let e of Object.values(n))for(let[t,r]of Object.entries(e))a[t]=r,r.configure&&(i[t]??(i[t]=[])).push(r.configure);for(let[e,t]of Object.entries(i)){let r=1===t.length?t[0]:n3(t);a[e].configure!==r&&(a[e]={...a[e],configure:r})}return a}(e,t);(function(e){let t=nh(),r=t.getState().slots,n={},o=!1;for(let[t,a]of Object.entries(e)){let e=r[t];e?.loaded&&rE(e.config,a)?n[t]=e:(n[t]={loaded:!0,config:a},o=!0)}(o||Object.keys(r).length!==Object.keys(n).length)&&t.setState({slots:n})})(n),nU(e,r,t,n,!1),nI={configState:e,tempConfigState:t,slotConfigs:n},nk()}let nI=null,nM=new WeakMap;function nL(){n=()=>{var e,t;let r,n;return e=nd.getState(),t=nf.getState(),r=nT.getState(),n={config:function(e,t){let r=function(e){let t={};for(let[r,n]of Object.entries(e)){let e=n0.get(r);if(e&&e.schema===n)t[r]=e.annotated;else{let e=function e(t){return t.hasOwnProperty("_default")?{...t,_value:t._default,_source:"default"}:ot(t)?Object.keys(t).reduce((r,n)=>(r[n]=e(t[n]),r),{}):{}}(rV(n,5));n0.set(r,{schema:n,annotated:e}),t[r]=e}}return t}(e.schemas),n=[...e.providedConfigs.map(e=>[e.config,e.source]),[t.config,"temporary config"]],o=new Set(Object.keys(r));for(let[e]of n)for(let t of Object.keys(e))o.add(t);let a={};for(let e of o){let t=r[e],o=n.map(([t])=>t[e]),i=n.map(([,e])=>e),s=nQ.get(e);if(s&&s.annotatedSchema===t&&s.configSlices.length===o.length&&s.configSlices.every((e,t)=>e===o[t])&&s.sources.every((e,t)=>e===i[t])){a[e]=s.result;continue}let l=t??{};n.forEach(([,e],t)=>{let r=o[t];void 0!==r&&(l=nj(l,function e(t,r){return ot(t)?Object.keys(t).reduce((n,o)=>(n[o]=e(t[o],r),n),{}):{_value:t,_source:r}}(r,e)))}),nQ.set(e,{annotatedSchema:t,configSlices:o,sources:i,result:l}),a[e]=l}return a}(e,t)},void(rE(r.config,n.config)||nT.setState(n))},n$(),nA.push(nd.subscribe(nF),nf.subscribe(nF),np.subscribe(nF))}function nF(){nR();try{n$()}catch(e){nO(e),console.error("Failed to recompute the configuration",e)}}nL();let nB=new Map;function nU(e,t,r,n,o){let a=nv(),i=a.getState().configs,s={},l=!1,u=0;for(let a of t.mountedExtensions){let t,c=i[a.slotName]?.[a.extensionId],d=c&&nM.get(c);if(o&&c?.loaded&&d?.slotModuleName===a.slotModuleName&&d.extensionModuleName===a.extensionModuleName)t=c;else{let o=function(e,t,r,n,o,a,i){let s=function(e){let[t]=e.split("#");return t}(n),l=o.schemas[s],u=JSON.stringify([r,n,e,t]),c=nX.get(u);if(c&&c.extensionSchema===l&&c.extensionModuleSchema===o.schemas[t]&&c.providedConfigs===o.providedConfigs&&c.temporaryConfig===a.config)return c.config;let d=l?s:t,f=n1(o,a),p=i?.configure?.[n]??{},m=n4(e,f),h=m?.extensionSlots?.[r]?.configure?.[n]??{},g=n3([n4(d,f),p,h]),y=l??o.schemas[t];n6(y,g,d);let v=n7(y,g);return n5(y,v,d),delete v.extensionSlots,nX.set(u,{extensionSchema:l,extensionModuleSchema:o.schemas[t],providedConfigs:o.providedConfigs,temporaryConfig:a.config,config:v}),v}(a.slotModuleName,a.extensionModuleName,a.slotName,a.extensionId,e,r,n[a.slotName]);t=c?.loaded&&rE(c.config,o)?c:{config:o,loaded:!0}}nM.set(t,a),t!==c&&(l=!0),s[a.slotName]||(s[a.slotName]={}),s[a.slotName][a.extensionId]=t,u++}for(let[e,t]of Object.entries(s)){let r=i[e];r&&Object.keys(r).length===Object.keys(t).length&&Object.entries(t).every(([e,t])=>r[e]===t)&&(s[e]=r)}l||(l=Object.keys(i).length!==Object.keys(s).length||Object.values(i).reduce((e,t)=>e+Object.keys(t).length,0)!==u),l&&a.setState({configs:s})}function nV(e,t){n2(e,t);let r=nj(t,os);nd.setState(t=>({...t,schemas:{...t.schemas,[e]:r},moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function nW(e){nd.setState(t=>({...t,schemas:{...t.schemas,[e]:os}}))}function nH(e){nd.setState(t=>({...t,moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function nz(e){nd.setState(t=>({...t,schemas:{...t.schemas,[e]:oi}}))}function nK(e,t){n2(e,t);let r=nj(t,os);nd.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.`),nd.setState(t=>({...t,schemas:{...t.schemas,[e]:r}}))}function nG(e,t="provided"){nd.setState(r=>({...r,providedConfigs:[...r.providedConfigs,{source:t,config:e}]}))}function nZ(e,t,r){return new Promise(n=>{let o,a=!1;function i(e){!a&&t(e)&&(a=!0,n(r(e)),o?.())}i(e.getState()),a||(o=e.subscribe(i))})}function nY(e){return nZ(nm(e),e=>!!(e.loaded&&e.config),e=>nr(e.config,["Display conditions","Translation overrides"]))}function nq(e,t,r){let n=[nZ(nm(e),e=>!!(e.translationOverridesLoaded&&e.config),e=>e.config["Translation overrides"]??{})];return t&&r&&n.push(nZ(nb(t,r),e=>!!(e.loaded&&e.config),e=>e.config["Translation overrides"]??{})),Promise.all(n)}function nJ(e,t,r){n6(e,t,r);let n=n7(e,t);return n5(e,n,r),n}let nX=new Map,nQ=new Map,n0=new Map;function n1(e,t){return[...e.providedConfigs.map(e=>e.config),t.config]}function n2(e,t,r=""){let n="Please verify that you are running the latest version and, if so, alert the maintainer.";for(let o of Object.keys(t).filter(e=>!e.startsWith("_"))){let a=r+(r&&".")+o,i=t[o];if("Display conditions"===a&&console.error(`${e} declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ${n}`),"Translation overrides"===a&&console.error(`${e} declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ${n}`),!ot(i)){console.error(`${e} has bad config schema definition for key '${a}'. ${n}`);continue}i.hasOwnProperty("_default")||n2(e,i,a);let s=i._elements;if(oe(s)&&n2(e,s,a+"._elements"),i._validators)for(let t of i._validators)"function"!=typeof t&&console.error(`${e} has invalid validator for key '${a}' ${n}.
|
|
4
4
|
|
|
5
5
|
If you're the maintainer: validators must be functions that return either undefined or an error string. Received ${t}.`);let l=i._type;l&&!Object.values(nn).includes(l)&&console.error(`${e} has invalid type for key '${a}' ${n}.
|
|
6
6
|
|