@openmrs/esm-app-shell 10.0.1-pre.5364 → 10.0.1-pre.5378

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.
@@ -1,7 +1,7 @@
1
1
  (globalThis.webpackChunk_openmrs_esm_app_shell=globalThis.webpackChunk_openmrs_esm_app_shell||[]).push([["316"],{68558(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)}}},31441(e){e.exports=function(e,t,r){var n=t.prototype,i=function(e){var t=e.date,i=e.utc,o={};if(!(null===t||t instanceof Date||t instanceof Array||n.$utils().u(t)||"Object"!==t.constructor.name)){if(!Object.keys(t).length)return new Date;var a=i?r.utc():r();Object.keys(t).forEach(function(e){var r;o["date"===(r=n.$utils().p(e))?"day":r]=t[e]});var s=o.day||(o.year||o.month>=0?1:a.date()),l=o.year||a.year(),u=o.month>=0?o.month:o.year||o.day?0:a.month(),c=o.hour||0,d=o.minute||0,f=o.second||0,p=o.millisecond||0;return i?new Date(Date.UTC(l,u,s,c,d,f,p)):new Date(l,u,s,c,d,f,p)}return t},o=n.parse;n.parse=function(e){e.date=i.bind(this)(e),o.bind(this)(e)};var a=n.set,s=n.add,l=n.subtract,u=function(e,t,r,n){void 0===n&&(n=1);var i=Object.keys(t),o=this;return i.forEach(function(r){o=e.bind(o)(t[r]*n,r)}),o};n.set=function(e,t){return t=void 0===t?e:t,"Object"===e.constructor.name?u.bind(this)(function(e,t){return a.bind(this)(t,e)},t,e):a.bind(this)(e,t)},n.add=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t):s.bind(this)(e,t)},n.subtract=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t,-1):l.bind(this)(e,t)}}},43117(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,i,o){var a=i.prototype;o.utc=function(e){var t={date:e,utc:!0,args:arguments};return new i(t)},a.utc=function(t){var r=o(this.toDate(),{locale:this.$L,utc:!0});return t?r.add(this.utcOffset(),e):r},a.local=function(){return o(this.toDate(),{locale:this.$L,utc:!1})};var s=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var l=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else l.call(this)};var u=a.utcOffset;a.utcOffset=function(n,i){var o=this.$utils().u;if(o(n))return this.$u?0:o(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 i=(""+n[0]).match(r)||["-",0,0],o=i[0],a=60*i[1]+ +i[2];return 0===a?0:"+"===o?a:-a}(n)))return this;var a=16>=Math.abs(n)?60*n:n,s=this;if(i)return s.$offset=a,s.$u=0===n,s;if(0!==n){var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(a+l,e)).$offset=a,s.$x.$localOffset=l}else s=this.utc();return s};var c=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var d=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?o(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var f=a.diff;a.diff=function(e,t,r){if(e&&this.$u===e.$u)return f.call(this,e,t,r);var n=this.local(),i=o(e).local();return f.call(n,i,t,r)}}}()},3570(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,i=t.call(e,"constructor"),o=t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(n in e);return void 0===n||t.call(e,n)}e.exports=function e(){var t,r,i,o,a,s,l=arguments[0]||{},u=1,c=arguments.length,d=!1;for("boolean"==typeof l&&(d=l,l=arguments[1]||{},u=2),"object"!=typeof l&&"function"!=typeof l&&(l={});u<c;u++)if(null!=(t=arguments[u]))for(r in t)i=l[r],l!==(o=t[r])&&(d&&o&&(n(o)||(a=Array.isArray(o)))?(a?(a=!1,s=i&&Array.isArray(i)?i:[]):s=i&&n(i)?i:{},l[r]=e(d,s,o)):void 0!==o&&(l[r]=o));return l}},51982(e,t,r){!function(t){"use strict";var n=r(50017);function i(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 o=e.exports={generate:i(function(e,t){return new n(e,t)})};t&&(t.fn.geopattern=i(function(e,r){return this.each(function(){var n=t(this).attr("data-title-sha");n&&(r=t.extend({hash:n},r));var i=o.generate(e,r);t(this).css("background-image",i.toDataUrl())})}))}("u">typeof jQuery?jQuery:null)},26072(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,i=e.g,o=e.b,a=Math.max(n/=255,i/=255,o/=255),s=Math.min(n,i,o),l=(a+s)/2;if(a===s)t=r=0;else{var u=a-s;switch(r=l>.5?u/(2-a-s):u/(a+s),a){case n:t=(i-o)/u+6*(i<o);break;case i:t=(o-n)/u+2;break;case o:t=(n-i)/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,i,o=e.h,a=e.s,s=e.l;if(0===a)r=n=i=s;else{var l=s<.5?s*(1+a):s+a-s*a,u=2*s-l;r=t(u,l,o+1/3),n=t(u,l,o),i=t(u,l,o-1/3)}return{r:Math.round(255*r),g:Math.round(255*n),b:Math.round(255*i)}},rgb2rgbString:function(e){return"rgb("+[e.r,e.g,e.b].join(",")+")"}}},50017(e,t,r){"use strict";var n=r(3570),i=r(26072),o=r(19930),a=r(78045),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,i){return(parseFloat(e)-t)*(i-n)/(r-t)+n}function f(e){return e%2==0?"#ddd":"#222"}function p(e){return d(e,0,15,.02,.15)}var h=e.exports=function(e,t){return this.opts=n({},s,t),this.hash=t.hash||o(e),this.svg=new a,this.generateBackground(),this.generatePattern(),this};function m(e){return[[e,0,e,3*e],[0,e,3*e,e]]}function y(e){return[0,0,e,e,0,e,0,0].join(",")}function v(e,t,r,n,i){var o=y(n),a=p(i[0]),s=f(i[0]),l={stroke:u,"stroke-opacity":.02,"fill-opacity":a,fill:s};e.polyline(o,l).transform({translate:[t+n,r],scale:[-1,1]}),e.polyline(o,l).transform({translate:[t+n,r+2*n],scale:[1,-1]}),l={stroke:u,"stroke-opacity":.02,"fill-opacity":a=p(i[1]),fill:s=f(i[1])},e.polyline(o,l).transform({translate:[t+n,r+2*n],scale:[-1,-1]}),e.polyline(o,l).transform({translate:[t+n,r],scale:[1,1]})}function g(e,t,r,n,i){var o=p(i),a=f(i),s=y(n),l={stroke:u,"stroke-opacity":.02,"fill-opacity":o,fill:a};e.polyline(s,l).transform({translate:[t,r+n],scale:[1,-1]}),e.polyline(s,l).transform({translate:[t+2*n,r+n],scale:[-1,-1]}),e.polyline(s,l).transform({translate:[t,r+n],scale:[1,1]}),e.polyline(s,l).transform({translate:[t+2*n,r+n],scale:[-1,1]})}h.prototype.toSvg=function(){return this.svg.toString()},h.prototype.toString=function(){return this.toSvg()},h.prototype.toBase64=function(){var e=this.toSvg();return"u">typeof window&&"function"==typeof window.btoa?window.btoa(e):new Buffer(e).toString("base64")},h.prototype.toDataUri=function(){return"data:image/svg+xml;base64,"+this.toBase64()},h.prototype.toDataUrl=function(){return'url("'+this.toDataUri()+'")'},h.prototype.generateBackground=function(){var e,t,r,n;this.opts.color?r=i.hex2rgb(this.opts.color):(t=d(c(this.hash,14,3),0,4095,0,359),n=c(this.hash,17),(e=i.rgb2hsl(i.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=i.hsl2rgb(e)),this.color=i.rgb2hex(r),this.svg.rect(0,0,"100%","100%",{fill:i.rgb2rgbString(r)})},h.prototype.generatePattern=function(){var e=this.opts.generator;if(e){if(0>l.indexOf(e))throw Error("The generator "+e+" does not exist.")}else e=l[c(this.hash,20)];return this["geo"+e.slice(0,1).toUpperCase()+e.slice(1)]()},h.prototype.geoHexagons=function(){var e,t,r,n,i,o,a,s,l,h=d(c(this.hash,0),0,15,8,60),m=h*Math.sqrt(3),y=2*h,v=(s=h/2,[0,l=Math.sin(60*Math.PI/180)*h,s,0,s+h,0,2*h,l,s+h,2*l,s,2*l,0,l].join(","));for(this.svg.setWidth(3*y+3*h),this.svg.setHeight(6*m),t=0,a=0;a<6;a++)for(o=0;o<6;o++)i=c(this.hash,t),e=o%2==0?a*m:a*m+m/2,r=p(i),n={fill:f(i),"fill-opacity":r,stroke:u,"stroke-opacity":.02},this.svg.polyline(v,n).transform({translate:[o*h*1.5-y/2,e-m/2]}),0===o&&this.svg.polyline(v,n).transform({translate:[6*h*1.5-y/2,e-m/2]}),0===a&&(e=o%2==0?6*m:6*m+m/2,this.svg.polyline(v,n).transform({translate:[o*h*1.5-y/2,e-m/2]})),0===o&&0===a&&this.svg.polyline(v,n).transform({translate:[6*h*1.5-y/2,5*m+m/2]}),t++},h.prototype.geoSineWaves=function(){var e,t,r,n,i,o,a,s=Math.floor(d(c(this.hash,0),0,15,100,400)),l=Math.floor(d(c(this.hash,1),0,15,30,100)),u=Math.floor(d(c(this.hash,2),0,15,3,30));for(this.svg.setWidth(s),this.svg.setHeight(36*u),t=0;t<36;t++)r=p(o=c(this.hash,t)),e=f(o),a=s/4*.7,i={fill:"none",stroke:e,opacity:r,"stroke-width":""+u+"px"},n="M0 "+l+" C "+a+" 0, "+(s/2-a)+" 0, "+s/2+" "+l+" S "+(s-a)+" "+2*l+", "+s+" "+l+" S "+(1.5*s-a)+" 0, "+1.5*s+", "+l,this.svg.path(n,i).transform({translate:[-s/4,u*t-1.5*l]}),this.svg.path(n,i).transform({translate:[-s/4,u*t-1.5*l+36*u]})},h.prototype.geoChevrons=function(){var e,t,r,n,i,o,a,s=d(c(this.hash,0),0,15,30,80),l=d(c(this.hash,0),0,15,30,80),h=(e=.66*l,[[0,0,s/2,l-e,s/2,l,0,e,0,0],[s/2,l-e,s,0,s,e,s/2,l,s/2,l-e]].map(function(e){return e.join(",")}));for(this.svg.setWidth(6*s),this.svg.setHeight(6*l*.66),t=0,a=0;a<6;a++)for(o=0;o<6;o++)r=p(i=c(this.hash,t)),n={stroke:u,"stroke-opacity":.02,fill:f(i),"fill-opacity":r,"stroke-width":1},this.svg.group(n).transform({translate:[o*s,a*l*.66-l/2]}).polyline(h).end(),0===a&&this.svg.group(n).transform({translate:[o*s,6*l*.66-l/2]}).polyline(h).end(),t+=1},h.prototype.geoPlusSigns=function(){var e,t,r,n,i,o,a,s,l=d(c(this.hash,0),0,15,10,25),h=3*l,y=m(l);for(this.svg.setWidth(12*l),this.svg.setHeight(12*l),r=0,s=0;s<6;s++)for(a=0;a<6;a++)n=p(o=c(this.hash,r)),t=f(o),e=+(s%2!=0),i={fill:t,stroke:u,"stroke-opacity":.02,"fill-opacity":n},this.svg.group(i).transform({translate:[a*h-a*l+e*l-l,s*h-s*l-h/2]}).rect(y).end(),0===a&&this.svg.group(i).transform({translate:[4*h-a*l+e*l-l,s*h-s*l-h/2]}).rect(y).end(),0===s&&this.svg.group(i).transform({translate:[a*h-a*l+e*l-l,4*h-s*l-h/2]}).rect(y).end(),0===a&&0===s&&this.svg.group(i).transform({translate:[4*h-a*l+e*l-l,4*h-s*l-h/2]}).rect(y).end(),r++},h.prototype.geoXes=function(){var e,t,r,n,i,o,a,s=d(c(this.hash,0),0,15,10,25),l=m(s),u=3*s*.943;for(this.svg.setWidth(3*u),this.svg.setHeight(3*u),t=0,a=0;a<6;a++)for(o=0;o<6;o++)r=p(i=c(this.hash,t)),e=o%2==0?a*u-.5*u:a*u-.5*u+u/4,n={fill:f(i),opacity:r},this.svg.group(n).transform({translate:[o*u/2-u/2,e-a*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===o&&this.svg.group(n).transform({translate:[6*u/2-u/2,e-a*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===a&&(e=o%2==0?6*u-u/2:6*u-u/2+u/4,this.svg.group(n).transform({translate:[o*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end()),5===a&&this.svg.group(n).transform({translate:[o*u/2-u/2,e-11*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===o&&0===a&&this.svg.group(n).transform({translate:[6*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),t++},h.prototype.geoOverlappingCircles=function(){var e,t,r,n,i,o,a=d(c(this.hash,0),0,15,25,200)/2;for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),e=0,o=0;o<6;o++)for(i=0;i<6;i++)t=p(n=c(this.hash,e)),r={fill:f(n),opacity:t},this.svg.circle(i*a,o*a,a,r),0===i&&this.svg.circle(6*a,o*a,a,r),0===o&&this.svg.circle(i*a,6*a,a,r),0===i&&0===o&&this.svg.circle(6*a,6*a,a,r),e++},h.prototype.geoOctogons=function(){var e,t,r,n,i,o,a,s=d(c(this.hash,0),0,15,10,60),l=[e=.33*s,0,s-e,0,s,e,s,s-e,s-e,s,e,s,0,s-e,0,e,e,0].join(",");for(this.svg.setWidth(6*s),this.svg.setHeight(6*s),r=0,a=0;a<6;a++)for(o=0;o<6;o++)n=p(i=c(this.hash,r)),t=f(i),this.svg.polyline(l,{fill:t,"fill-opacity":n,stroke:u,"stroke-opacity":.02}).transform({translate:[o*s,a*s]}),r+=1},h.prototype.geoSquares=function(){var e,t,r,n,i,o,a=d(c(this.hash,0),0,15,10,60);for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),t=0,o=0;o<6;o++)for(i=0;i<6;i++)r=p(n=c(this.hash,t)),e=f(n),this.svg.rect(i*a,o*a,a,a,{fill:e,"fill-opacity":r,stroke:u,"stroke-opacity":.02}),t+=1},h.prototype.geoConcentricCircles=function(){var e,t,r,n,i,o,a=d(c(this.hash,0),0,15,10,60),s=a/5;for(this.svg.setWidth((a+s)*6),this.svg.setHeight((a+s)*6),t=0,o=0;o<6;o++)for(i=0;i<6;i++)r=p(n=c(this.hash,t)),e=f(n),this.svg.circle(i*a+i*s+(a+s)/2,o*a+o*s+(a+s)/2,a/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(i*a+i*s+(a+s)/2,o*a+o*s+(a+s)/2,a/4,{fill:e,"fill-opacity":r}),t+=1},h.prototype.geoOverlappingRings=function(){var e,t,r,n,i,o,a=d(c(this.hash,0),0,15,10,60),s=a/4;for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),e=0,o=0;o<6;o++)for(i=0;i<6;i++)t=p(n=c(this.hash,e)),r={fill:"none",stroke:f(n),opacity:t,"stroke-width":s+"px"},this.svg.circle(i*a,o*a,a-s/2,r),0===i&&this.svg.circle(6*a,o*a,a-s/2,r),0===o&&this.svg.circle(i*a,6*a,a-s/2,r),0===i&&0===o&&this.svg.circle(6*a,6*a,a-s/2,r),e+=1},h.prototype.geoTriangles=function(){var e,t,r,n,i,o,a,s,l=d(c(this.hash,0),0,15,15,80),h=l/2*Math.sqrt(3),m=[s=l/2,0,l,h,0,h,s,0].join(",");for(this.svg.setWidth(3*l),this.svg.setHeight(6*h),e=0,a=0;a<6;a++)for(o=0;o<6;o++)t=p(i=c(this.hash,e)),n={fill:f(i),"fill-opacity":t,stroke:u,"stroke-opacity":.02},r=a%2==0?180*(o%2==0):180*(o%2!=0),this.svg.polyline(m,n).transform({translate:[o*l*.5-l/2,h*a],rotate:[r,l/2,h/2]}),0===o&&this.svg.polyline(m,n).transform({translate:[6*l*.5-l/2,h*a],rotate:[r,l/2,h/2]}),e+=1},h.prototype.geoDiamonds=function(){var e,t,r,n,i,o,a,s=d(c(this.hash,0),0,15,10,50),l=d(c(this.hash,1),0,15,10,50),h=[s/2,0,s,l/2,s/2,l,0,l/2].join(",");for(this.svg.setWidth(6*s),this.svg.setHeight(3*l),t=0,a=0;a<6;a++)for(o=0;o<6;o++)r=p(i=c(this.hash,t)),n={fill:f(i),"fill-opacity":r,stroke:u,"stroke-opacity":.02},e=a%2==0?0:s/2,this.svg.polyline(h,n).transform({translate:[o*s-s/2+e,l/2*a-l/2]}),0===o&&this.svg.polyline(h,n).transform({translate:[6*s-s/2+e,l/2*a-l/2]}),0===a&&this.svg.polyline(h,n).transform({translate:[o*s-s/2+e,l/2*6-l/2]}),0===o&&0===a&&this.svg.polyline(h,n).transform({translate:[6*s-s/2+e,l/2*6-l/2]}),t+=1},h.prototype.geoNestedSquares=function(){var e,t,r,n,i,o,a=d(c(this.hash,0),0,15,4,12),s=7*a;for(this.svg.setWidth((s+a)*6+6*a),this.svg.setHeight((s+a)*6+6*a),e=0,o=0;o<6;o++)for(i=0;i<6;i++)t=p(n=c(this.hash,e)),r={fill:"none",stroke:f(n),opacity:t,"stroke-width":a+"px"},this.svg.rect(i*s+i*a*2+a/2,o*s+o*a*2+a/2,s,s,r),t=p(n=c(this.hash,39-e)),r={fill:"none",stroke:f(n),opacity:t,"stroke-width":a+"px"},this.svg.rect(i*s+i*a*2+a/2+2*a,o*s+o*a*2+a/2+2*a,3*a,3*a,r),e+=1},h.prototype.geoMosaicSquares=function(){var e,t,r,n=d(c(this.hash,0),0,15,15,50);for(this.svg.setWidth(8*n),this.svg.setHeight(8*n),e=0,r=0;r<4;r++)for(t=0;t<4;t++)t%2==0?r%2==0?g(this.svg,t*n*2,r*n*2,n,c(this.hash,e)):v(this.svg,t*n*2,r*n*2,n,[c(this.hash,e),c(this.hash,e+1)]):r%2==0?v(this.svg,t*n*2,r*n*2,n,[c(this.hash,e),c(this.hash,e+1)]):g(this.svg,t*n*2,r*n*2,n,c(this.hash,e)),e+=1},h.prototype.geoPlaid=function(){var e,t,r,n,i,o,a=0,s=0;for(t=0;t<36;)a+=c(this.hash,t)+5,r=p(o=c(this.hash,t+1)),e=f(o),n=o+5,this.svg.rect(0,a,"100%",n,{opacity:r,fill:e}),a+=n,t+=2;for(t=0;t<36;)s+=c(this.hash,t)+5,r=p(o=c(this.hash,t+1)),e=f(o),i=o+5,this.svg.rect(s,0,i,"100%",{opacity:r,fill:e}),s+=i,t+=2;this.svg.setWidth(s),this.svg.setHeight(a)},h.prototype.geoTessellation=function(){var e,t,r,n,i=d(c(this.hash,0),0,15,5,40),o=i*Math.sqrt(3),a=2*i,s=i/2*Math.sqrt(3),l=[0,0,s,i/2,0,i,0,0].join(","),h=3*i+2*s,m=2*o+2*i;for(this.svg.setWidth(h),this.svg.setHeight(m),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(-i/2,-i/2,i,i,r),this.svg.rect(h-i/2,-i/2,i,i,r),this.svg.rect(-i/2,m-i/2,i,i,r),this.svg.rect(h-i/2,m-i/2,i,i,r);break;case 1:this.svg.rect(a/2+s,o/2,i,i,r);break;case 2:this.svg.rect(-i/2,m/2-i/2,i,i,r),this.svg.rect(h-i/2,m/2-i/2,i,i,r);break;case 3:this.svg.rect(a/2+s,1.5*o+i,i,i,r);break;case 4:this.svg.polyline(l,r).transform({translate:[i/2,-i/2],rotate:[0,i/2,s/2]}),this.svg.polyline(l,r).transform({translate:[i/2,m- -i/2],rotate:[0,i/2,s/2],scale:[1,-1]});break;case 5:this.svg.polyline(l,r).transform({translate:[h-i/2,-i/2],rotate:[0,i/2,s/2],scale:[-1,1]}),this.svg.polyline(l,r).transform({translate:[h-i/2,m+i/2],rotate:[0,i/2,s/2],scale:[-1,-1]});break;case 6:this.svg.polyline(l,r).transform({translate:[h/2+i/2,o/2]});break;case 7:this.svg.polyline(l,r).transform({translate:[h-h/2-i/2,o/2],scale:[-1,1]});break;case 8:this.svg.polyline(l,r).transform({translate:[h/2+i/2,m-o/2],scale:[1,-1]});break;case 9:this.svg.polyline(l,r).transform({translate:[h-h/2-i/2,m-o/2],scale:[-1,-1]});break;case 10:this.svg.polyline(l,r).transform({translate:[i/2,m/2-i/2]});break;case 11:this.svg.polyline(l,r).transform({translate:[h-i/2,m/2-i/2],scale:[-1,1]});break;case 12:this.svg.rect(0,0,i,i,r).transform({translate:[i/2,i/2],rotate:[-30,0,0]});break;case 13:this.svg.rect(0,0,i,i,r).transform({scale:[-1,1],translate:[-h+i/2,i/2],rotate:[-30,0,0]});break;case 14:this.svg.rect(0,0,i,i,r).transform({translate:[i/2,m/2-i/2-i],rotate:[30,0,i]});break;case 15:this.svg.rect(0,0,i,i,r).transform({scale:[-1,1],translate:[-h+i/2,m/2-i/2-i],rotate:[30,0,i]});break;case 16:this.svg.rect(0,0,i,i,r).transform({scale:[1,-1],translate:[i/2,-m+m/2-i/2-i],rotate:[30,0,i]});break;case 17:this.svg.rect(0,0,i,i,r).transform({scale:[-1,-1],translate:[-h+i/2,-m+m/2-i/2-i],rotate:[30,0,i]});break;case 18:this.svg.rect(0,0,i,i,r).transform({scale:[1,-1],translate:[i/2,-m+i/2],rotate:[-30,0,0]});break;case 19:this.svg.rect(0,0,i,i,r).transform({scale:[-1,-1],translate:[-h+i/2,-m+i/2],rotate:[-30,0,0]})}}},19930(e){"use strict";function t(){var e=0x67452301,t=0xefcdab89,r=0x98badcfe,n=0x10325476,i=0xc3d2e1f0,o=new Uint32Array(80),a=0,s=24,l=0;function u(){for(var s,l,u=16;u<80;u++){var c=o[u-3]^o[u-8]^o[u-14]^o[u-16];o[u]=c<<1|c>>>31}var d=e,f=t,p=r,h=n,m=i;for(u=0;u<80;u++){u<20?(s=h^f&(p^h),l=0x5a827999):u<40?(s=f^p^h,l=0x6ed9eba1):u<60?(s=f&p|h&(f|p),l=0x8f1bbcdc):(s=f^p^h,l=0xca62c1d6);var y=(d<<5|d>>>27)+s+m+l+(0|o[u]);m=h,h=p,p=f<<30|f>>>2,f=d,d=y}for(u=0,e=e+d|0,t=t+f|0,r=r+p|0,n=n+h|0,i=i+m|0,a=0;u<16;u++)o[u]=0}function c(e){o[a]|=(255&e)<<s,s?s-=8:(a++,s=24),16===a&&u()}function d(e){for(var t="",r=28;r>=0;r-=4)t+=(e>>r&15).toString(16);return t}return{update:function(e){if("string"==typeof e){var t=e.length;l+=8*t;for(var r=0;r<t;r++)c(e.charCodeAt(r));return}var n=e.length;l+=8*n;for(var i=0;i<n;i++)c(e[i])},digest:function(){c(128),(a>14||14===a&&s<24)&&u(),a=14,s=24,c(0),c(0),c(l>0xffffffffff?l/0x10000000000:0),c(l>0xffffffff?l/0x100000000:0);for(var o=24;o>=0;o-=8)c(l>>o);return d(e)+d(t)+d(r)+d(n)+d(i)}}}e.exports=function(e){if(void 0===e)return t();var r=t();return r.update(e),r.digest()}},78045(e,t,r){"use strict";var n=r(3570),i=r(55462);function o(){return this.width=100,this.height=100,this.svg=i("svg"),this.context=[],this.setAttributes(this.svg,{xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height}),this}e.exports=o,o.prototype.currentContext=function(){return this.context[this.context.length-1]||this.svg},o.prototype.end=function(){return this.context.pop(),this},o.prototype.currentNode=function(){var e=this.currentContext();return e.lastChild||e},o.prototype.transform=function(e){return this.currentNode().setAttribute("transform",Object.keys(e).map(function(t){return t+"("+e[t].join(",")+")"}).join(" ")),this},o.prototype.setAttributes=function(e,t){Object.keys(t).forEach(function(r){e.setAttribute(r,t[r])})},o.prototype.setWidth=function(e){this.svg.setAttribute("width",Math.floor(e))},o.prototype.setHeight=function(e){this.svg.setAttribute("height",Math.floor(e))},o.prototype.toString=function(){return this.svg.toString()},o.prototype.rect=function(e,t,r,o,a){var s=this;if(Array.isArray(e))return e.forEach(function(e){s.rect.apply(s,e.concat(a))}),this;var l=i("rect");return this.currentContext().appendChild(l),this.setAttributes(l,n({x:e,y:t,width:r,height:o},a)),this},o.prototype.circle=function(e,t,r,o){var a=i("circle");return this.currentContext().appendChild(a),this.setAttributes(a,n({cx:e,cy:t,r:r},o)),this},o.prototype.path=function(e,t){var r=i("path");return this.currentContext().appendChild(r),this.setAttributes(r,n({d:e},t)),this},o.prototype.polyline=function(e,t){var r=this;if(Array.isArray(e))return e.forEach(function(e){r.polyline(e,t)}),this;var o=i("polyline");return this.currentContext().appendChild(o),this.setAttributes(o,n({points:e},t)),this},o.prototype.group=function(e){var t=i("g");return this.currentContext().appendChild(t),this.context.push(t),this.setAttributes(t,n({},e)),this}},55462(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("")}},79758(e,t){"use strict";t.pathToRegexp=function(e,t={}){let{delimiter:u="/",end:c=!0,sensitive:d=!1,trailing:f=!0}=t,p=[],h=[];for(let c of function e(t,r){if(Array.isArray(t))for(let n of t)e(n,r);else r.push(t);return r}(e,[])){let e="object"==typeof c?c:function(e,t={}){let{encodePath:a=r}=t,u=[...e],c=[],d=0,f=0;function p(){let t="";if(n.test(u[d]))do t+=u[d++];while(i.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=o[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 i=c[f++];if(i.type===r)break;if("char"===i.type||"escape"===i.type){let e=i.value,t=c[f];for(;"char"===t.type||"escape"===t.type;)e+=t.value,t=c[++f];n.push({type:"text",value:a(e)});continue}if("param"===i.type||"wildcard"===i.type){n.push({type:i.type,name:i.value});continue}if("{"===i.type){n.push({type:"group",tokens:t("}")});continue}throw new l(`Unexpected ${i.type} at index ${i.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 i=t[r];if("group"===i.type)for(let o of e(i.tokens,0,n.slice()))yield*e(t,r+1,o);else n.push(i);yield*e(t,r+1,n)}(e.tokens,0,[]))h.push(function(e,t,r,n){let i="",o="",s=!0;for(let d of e){if("text"===d.type){i+=a(d.value),o+=d.value,s||(s=d.value.includes(t));continue}if("param"===d.type||"wildcard"===d.type){var u,c;if(!s&&!o)throw new l(`Missing text before "${d.name}" ${d.type}`,n);"param"===d.type?i+=`(${u=t,(c=s?"":o).length<2?u.length<2?`[^${a(u+c)}]`:`(?:(?!${a(u)})[^${a(c)}])`:u.length<2?`(?:(?!${a(c)})[^${a(u)}])`:`(?:(?!${a(c)}|${a(u)})[\\s\\S])`}+)`:i+="([\\s\\S]+)",r.push(d),o="",s=!1;continue}}return i}(t,u,p,e.originalPath))}let m=`^(?:${h.join("|")})`;return f&&(m+=`(?:${a(u)}$)?`),{regexp:new RegExp(m+=c?"$":`(?=${a(u)}|$)`,d?"":"i"),keys:p}};let r=e=>e,n=/^[$_\p{ID_Start}]$/u,i=/^[$\u200c\u200d\p{ID_Continue}]$/u,o={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function a(e){return e.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}class s{constructor(e,t){this.tokens=e,this.originalPath=t}}class l extends TypeError{constructor(e,t){let r=e;t&&(r+=`: ${t}`),super(r+="; visit https://git.new/pathToRegexpError for info"),this.originalPath=t}}},6661(e,t,r){"use strict";var n=r(22065);t.createRoot=n.createRoot,t.hydrateRoot=n.hydrateRoot},41205(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(50185),a=r(22572);t.AsyncSubject=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.value=null,t.hasNext=!1,t.hasCompleted=!1,t}return i(t,e),t.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),a.Subscription.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),a.Subscription.EMPTY):e.prototype._subscribe.call(this,t)},t.prototype.next=function(e){this.hasCompleted||(this.value=e,this.hasNext=!0)},t.prototype.error=function(t){this.hasCompleted||e.prototype.error.call(this,t)},t.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&e.prototype.next.call(this,this.value),e.prototype.complete.call(this)},t}(o.Subject)},96915(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(50185),a=r(60944);t.BehaviorSubject=function(e){function t(t){var r=e.call(this)||this;return r._value=t,r}return i(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return r&&!r.closed&&t.next(this._value),r},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(!this.closed)return this._value;throw new a.ObjectUnsubscribedError},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(o.Subject)},87251(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.InnerSubscriber=function(e){function t(t,r,n){var i=e.call(this)||this;return i.parent=t,i.outerValue=r,i.outerIndex=n,i.index=0,i}return i(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)},t.prototype._error=function(e){this.parent.notifyError(e,this),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(r(49571).Subscriber)},99914(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(18686),o=r(10734),a=r(669);(n=t.NotificationKind||(t.NotificationKind={})).NEXT="N",n.ERROR="E",n.COMPLETE="C",t.Notification=function(){function e(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}return e.prototype.observe=function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}},e.prototype.do=function(e,t,r){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return r&&r()}},e.prototype.accept=function(e,t,r){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,r)},e.prototype.toObservable=function(){switch(this.kind){case"N":return o.of(this.value);case"E":return a.throwError(this.error);case"C":return i.empty()}throw Error("unexpected notification kind value")},e.createNext=function(t){return void 0!==t?new e("N",t):e.undefinedValueNotification},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e.undefinedValueNotification=new e("N",void 0),e}()},62256(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(46694),i=r(45591),o=r(19469),a=r(13308),s=r(23083);function l(e){if(e||(e=s.config.Promise||Promise),!e)throw Error("no Promise impl found");return e}t.Observable=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n=this.operator,o=i.toSubscriber(e,t,r);if(n?o.add(n.call(o,this.source)):o.add(this.source||s.config.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),s.config.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){s.config.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),n.canReportError(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=l(t))(function(t,n){var i;i=r.subscribe(function(t){try{e(t)}catch(e){n(e),i&&i.unsubscribe()}},n,t)})},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[o.observable]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:a.pipeFromArray(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=l(e))(function(e,r){var n;t.subscribe(function(e){return n=e},function(e){return r(e)},function(){return e(n)})})},e.create=function(t){return new e(t)},e}()},19059(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(23083),i=r(34216);t.empty={closed:!0,next:function(e){},error:function(e){if(n.config.useDeprecatedSynchronousErrorHandling)throw e;i.hostReportError(e)},complete:function(){}}},58748(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.OuterSubscriber=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.notifyNext=function(e,t,r,n,i){this.destination.next(t)},t.prototype.notifyError=function(e,t){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(r(49571).Subscriber)},21404(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(50185),a=r(99468),s=r(22572),l=r(93186),u=r(60944),c=r(17368);t.ReplaySubject=function(e){function t(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0);var i=e.call(this)||this;return i.scheduler=n,i._events=[],i._infiniteTimeWindow=!1,i._bufferSize=t<1?1:t,i._windowTime=r<1?1:r,r===1/0?(i._infiniteTimeWindow=!0,i.next=i.nextInfiniteTimeWindow):i.next=i.nextTimeWindow,i}return i(t,e),t.prototype.nextInfiniteTimeWindow=function(t){if(!this.isStopped){var r=this._events;r.push(t),r.length>this._bufferSize&&r.shift()}e.prototype.next.call(this,t)},t.prototype.nextTimeWindow=function(t){this.isStopped||(this._events.push(new d(this._getNow(),t)),this._trimBufferThenGetEvents()),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){var t,r=this._infiniteTimeWindow,n=r?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=n.length;if(this.closed)throw new u.ObjectUnsubscribedError;if(this.isStopped||this.hasError?t=s.Subscription.EMPTY:(this.observers.push(e),t=new c.SubjectSubscription(this,e)),i&&e.add(e=new l.ObserveOnSubscriber(e,i)),r)for(var a=0;a<o&&!e.closed;a++)e.next(n[a]);else for(var a=0;a<o&&!e.closed;a++)e.next(n[a].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),t},t.prototype._getNow=function(){return(this.scheduler||a.queue).now()},t.prototype._trimBufferThenGetEvents=function(){for(var e=this._getNow(),t=this._bufferSize,r=this._windowTime,n=this._events,i=n.length,o=0;o<i&&!(e-n[o].time<r);)o++;return i>t&&(o=Math.max(o,i-t)),o>0&&n.splice(0,o),n},t}(o.Subject);var d=function(e,t){this.time=e,this.value=t}},96548(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scheduler=function(){function e(t,r){void 0===r&&(r=e.now),this.SchedulerAction=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.SchedulerAction(this,e).schedule(r,t)},e.now=function(){return Date.now()},e}()},50185(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(62256),a=r(49571),s=r(22572),l=r(60944),u=r(17368),c=r(55336),d=function(e){function t(t){var r=e.call(this,t)||this;return r.destination=t,r}return i(t,e),t}(a.Subscriber);t.SubjectSubscriber=d;var f=function(e){function t(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return i(t,e),t.prototype[c.rxSubscriber]=function(){return new d(this)},t.prototype.lift=function(e){var t=new p(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new l.ObjectUnsubscribedError;if(!this.isStopped)for(var t=this.observers,r=t.length,n=t.slice(),i=0;i<r;i++)n[i].next(e)},t.prototype.error=function(e){if(this.closed)throw new l.ObjectUnsubscribedError;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,r=t.length,n=t.slice(),i=0;i<r;i++)n[i].error(e);this.observers.length=0},t.prototype.complete=function(){if(this.closed)throw new l.ObjectUnsubscribedError;this.isStopped=!0;for(var e=this.observers,t=e.length,r=e.slice(),n=0;n<t;n++)r[n].complete();this.observers.length=0},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(t){if(!this.closed)return e.prototype._trySubscribe.call(this,t);throw new l.ObjectUnsubscribedError},t.prototype._subscribe=function(e){if(this.closed)throw new l.ObjectUnsubscribedError;return this.hasError?(e.error(this.thrownError),s.Subscription.EMPTY):this.isStopped?(e.complete(),s.Subscription.EMPTY):(this.observers.push(e),new u.SubjectSubscription(this,e))},t.prototype.asObservable=function(){var e=new o.Observable;return e.source=this,e},t.create=function(e,t){return new p(e,t)},t}(o.Observable);t.Subject=f;var p=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return i(t,e),t.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},t.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},t.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},t.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):s.Subscription.EMPTY},t}(f);t.AnonymousSubject=p},17368(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.SubjectSubscription=function(e){function t(t,r){var n=e.call(this)||this;return n.subject=t,n.subscriber=r,n.closed=!1,n}return i(t,e),t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var r=t.indexOf(this.subscriber);-1!==r&&t.splice(r,1)}}},t}(r(22572).Subscription)},49571(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(140),a=r(19059),s=r(22572),l=r(55336),u=r(23083),c=r(34216),d=function(e){function t(r,n,i){var o=e.call(this)||this;switch(o.syncErrorValue=null,o.syncErrorThrown=!1,o.syncErrorThrowable=!1,o.isStopped=!1,arguments.length){case 0:o.destination=a.empty;break;case 1:if(!r){o.destination=a.empty;break}if("object"==typeof r){r instanceof t?(o.syncErrorThrowable=r.syncErrorThrowable,o.destination=r,r.add(o)):(o.syncErrorThrowable=!0,o.destination=new f(o,r));break}default:o.syncErrorThrowable=!0,o.destination=new f(o,r,n,i)}return o}return i(t,e),t.prototype[l.rxSubscriber]=function(){return this},t.create=function(e,r,n){var i=new t(e,r,n);return i.syncErrorThrowable=!1,i},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(s.Subscription);t.Subscriber=d;var f=function(e){function t(t,r,n,i){var s,l=e.call(this)||this;l._parentSubscriber=t;var u=l;return o.isFunction(r)?s=r:r&&(s=r.next,n=r.error,i=r.complete,r!==a.empty&&(u=Object.create(r),o.isFunction(u.unsubscribe)&&l.add(u.unsubscribe.bind(u)),u.unsubscribe=l.unsubscribe.bind(l))),l._context=u,l._next=s,l._error=n,l._complete=i,l}return i(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;u.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,r=u.config.useDeprecatedSynchronousErrorHandling;if(this._error)r&&t.syncErrorThrowable?this.__tryOrSetError(t,this._error,e):this.__tryOrUnsub(this._error,e),this.unsubscribe();else if(t.syncErrorThrowable)r?(t.syncErrorValue=e,t.syncErrorThrown=!0):c.hostReportError(e),this.unsubscribe();else{if(this.unsubscribe(),r)throw e;c.hostReportError(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var r=function(){return e._complete.call(e._context)};u.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,r):this.__tryOrUnsub(r),this.unsubscribe()}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),u.config.useDeprecatedSynchronousErrorHandling)throw e;c.hostReportError(e)}},t.prototype.__tryOrSetError=function(e,t,r){if(!u.config.useDeprecatedSynchronousErrorHandling)throw Error("bad call");try{t.call(this._context,r)}catch(t){if(u.config.useDeprecatedSynchronousErrorHandling)return e.syncErrorValue=t,e.syncErrorThrown=!0,!0;return c.hostReportError(t),!0}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(d);t.SafeSubscriber=f},22572(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(61691),i=r(63995),o=r(140),a=r(29042);function s(e){return e.reduce(function(e,t){return e.concat(t instanceof a.UnsubscriptionError?t.errors:t)},[])}t.Subscription=function(){var e;function t(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return t.prototype.unsubscribe=function(){if(!this.closed){var e,r=this._parentOrParents,l=this._ctorUnsubscribe,u=this._unsubscribe,c=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r instanceof t)r.remove(this);else if(null!==r)for(var d=0;d<r.length;++d)r[d].remove(this);if(o.isFunction(u)){l&&(this._unsubscribe=void 0);try{u.call(this)}catch(t){e=t instanceof a.UnsubscriptionError?s(t.errors):[t]}}if(n.isArray(c))for(var d=-1,f=c.length;++d<f;){var p=c[d];if(i.isObject(p))try{p.unsubscribe()}catch(t){e=e||[],t instanceof a.UnsubscriptionError?e=e.concat(s(t.errors)):e.push(t)}}if(e)throw new a.UnsubscriptionError(e)}},t.prototype.add=function(e){var r=e;if(!e)return t.EMPTY;switch(typeof e){case"function":r=new t(e);case"object":if(r===this||r.closed||"function"!=typeof r.unsubscribe)return r;if(this.closed)return r.unsubscribe(),r;if(!(r instanceof t)){var n=r;(r=new t)._subscriptions=[n]}break;default:throw Error("unrecognized teardown "+e+" added to Subscription.")}var i=r._parentOrParents;if(null===i)r._parentOrParents=this;else if(i instanceof t){if(i===this)return r;r._parentOrParents=[i,this]}else{if(-1!==i.indexOf(this))return r;i.push(this)}var o=this._subscriptions;return null===o?this._subscriptions=[r]:o.push(r),r},t.prototype.remove=function(e){var t=this._subscriptions;if(t){var r=t.indexOf(e);-1!==r&&t.splice(r,1)}},(e=new t).closed=!0,t.EMPTY=e,t}()},23083(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=!1;t.config={Promise:void 0,set useDeprecatedSynchronousErrorHandling(value){value?console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+Error().stack):r&&console.log("RxJS: Back to a better error behavior. Thank you. <3"),r=value},get useDeprecatedSynchronousErrorHandling(){return r}}},61065(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571),a=r(62256),s=r(85891);t.SimpleInnerSubscriber=function(e){function t(t){var r=e.call(this)||this;return r.parent=t,r}return i(t,e),t.prototype._next=function(e){this.parent.notifyNext(e)},t.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},t}(o.Subscriber),t.ComplexInnerSubscriber=function(e){function t(t,r,n){var i=e.call(this)||this;return i.parent=t,i.outerValue=r,i.outerIndex=n,i}return i(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this)},t.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(o.Subscriber),t.SimpleOuterSubscriber=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.destination.complete()},t}(o.Subscriber),t.ComplexOuterSubscriber=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.notifyNext=function(e,t,r,n){this.destination.next(t)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(o.Subscriber),t.innerSubscribe=function(e,t){var r;if(!t.closed){if(e instanceof a.Observable)return e.subscribe(t);try{r=s.subscribeTo(e)(t)}catch(e){t.error(e)}return r}}},79644(e,t,r){"use strict";var n,i,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var a=r(50185),s=r(62256),l=r(49571),u=r(22572),c=r(91919),d=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subjectFactory=r,n._refCount=0,n._isComplete=!1,n}return o(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject},t.prototype.connect=function(){var e=this._connection;return!e&&(this._isComplete=!1,(e=this._connection=new u.Subscription).add(this.source.subscribe(new f(this.getSubject(),this))),e.closed&&(this._connection=null,e=u.Subscription.EMPTY)),e},t.prototype.refCount=function(){return c.refCount()(this)},t}(s.Observable);t.ConnectableObservable=d,t.connectableObservableDescriptor={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:(i=d.prototype)._subscribe},_isComplete:{value:i._isComplete,writable:!0},getSubject:{value:i.getSubject},connect:{value:i.connect},refCount:{value:i.refCount}};var f=function(e){function t(t,r){var n=e.call(this,t)||this;return n.connectable=r,n}return o(t,e),t.prototype._error=function(t){this._unsubscribe(),e.prototype._error.call(this,t)},t.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}},t}(a.SubjectSubscriber);(function(e){this.connectable=e}).prototype.call=function(e,t){var r=this.connectable;r._refCount++;var n=new p(e,r),i=t.subscribe(n);return n.closed||(n.connection=r.connect()),i};var p=function(e){function t(t,r){var n=e.call(this,t)||this;return n.connectable=r,n}return o(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(!e){this.connection=null;return}this.connectable=null;var t=e._refCount;if(t<=0||(e._refCount=t-1,t>1)){this.connection=null;return}var r=this.connection,n=e._connection;this.connection=null,n&&(!r||n===r)&&n.unsubscribe()},t}(l.Subscriber)},89383(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(62256),a=r(81930),s=r(86957);t.SubscribeOnObservable=function(e){function t(t,r,n){void 0===r&&(r=0),void 0===n&&(n=a.asap);var i=e.call(this)||this;return i.source=t,i.delayTime=r,i.scheduler=n,(!s.isNumeric(r)||r<0)&&(i.delayTime=0),n&&"function"==typeof n.schedule||(i.scheduler=a.asap),i}return i(t,e),t.create=function(e,r,n){return void 0===r&&(r=0),void 0===n&&(n=a.asap),new t(e,r,n)},t.dispatch=function(e){var t=e.source,r=e.subscriber;return this.add(t.subscribe(r))},t.prototype._subscribe=function(e){var r=this.delayTime,n=this.source;return this.scheduler.schedule(t.dispatch,r,{source:n,subscriber:e})},t}(o.Observable)},72433(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(60571),a=r(61691),s=r(58748),l=r(69238),u=r(58738),c={};t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=void 0,n=void 0;return o.isScheduler(e[e.length-1])&&(n=e.pop()),"function"==typeof e[e.length-1]&&(r=e.pop()),1===e.length&&a.isArray(e[0])&&(e=e[0]),u.fromArray(e,n).lift(new d(r))};var d=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new f(e,this.resultSelector))},e}();t.CombineLatestOperator=d;var f=function(e){function t(t,r){var n=e.call(this,t)||this;return n.resultSelector=r,n.active=0,n.values=[],n.observables=[],n}return i(t,e),t.prototype._next=function(e){this.values.push(c),this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(var r=0;r<t;r++){var n=e[r];this.add(l.subscribeToResult(this,n,void 0,r))}}},t.prototype.notifyComplete=function(e){0==(this.active-=1)&&this.destination.complete()},t.prototype.notifyNext=function(e,t,r){var n=this.values,i=n[r],o=this.toRespond?i===c?--this.toRespond:this.toRespond:0;n[r]=t,0===o&&(this.resultSelector?this._tryResultSelector(n):this.destination.next(n.slice()))},t.prototype._tryResultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(s.OuterSubscriber);t.CombineLatestSubscriber=f},84859(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(10734),i=r(52012);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i.concatAll()(n.of.apply(void 0,e))}},11431(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(62256),i=r(55523),o=r(18686);t.defer=function(e){return new n.Observable(function(t){var r;try{r=e()}catch(e){t.error(e);return}return(r?i.from(r):o.empty()).subscribe(t)})}},18686(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(62256);t.EMPTY=new n.Observable(function(e){return e.complete()}),t.empty=function(e){var r;return e?(r=e,new n.Observable(function(e){return r.schedule(function(){return e.complete()})})):t.EMPTY}},55523(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(62256),i=r(85891),o=r(53034);t.from=function(e,t){return t?o.scheduled(e,t):e instanceof n.Observable?e:new n.Observable(i.subscribeTo(e))}},58738(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(62256),i=r(24658),o=r(21691);t.fromArray=function(e,t){return t?o.scheduleArray(e,t):new n.Observable(i.subscribeToArray(e))}},70791(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(62256),i=r(60571),o=r(70096),a=r(58738);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=1/0,s=null,l=e[e.length-1];return(i.isScheduler(l)?(s=e.pop(),e.length>1&&"number"==typeof e[e.length-1]&&(r=e.pop())):"number"==typeof l&&(r=e.pop()),null===s&&1===e.length&&e[0]instanceof n.Observable)?e[0]:o.mergeAll(r)(a.fromArray(e,s))}},10734(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(60571),i=r(58738),o=r(21691);t.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return n.isScheduler(r)?(e.pop(),o.scheduleArray(e,r)):i.fromArray(e)}},75530(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(61691),a=r(58738),s=r(58748),l=r(69238);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length)if(!o.isArray(e[0]))return e[0];else e=e[0];return a.fromArray(e,void 0).lift(new u)};var u=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new c(e))},e}();t.RaceOperator=u;var c=function(e){function t(t){var r=e.call(this,t)||this;return r.hasFirst=!1,r.observables=[],r.subscriptions=[],r}return i(t,e),t.prototype._next=function(e){this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{for(var r=0;r<t&&!this.hasFirst;r++){var n=e[r],i=l.subscribeToResult(this,n,void 0,r);this.subscriptions&&this.subscriptions.push(i),this.add(i)}this.observables=null}},t.prototype.notifyNext=function(e,t,r){if(!this.hasFirst){this.hasFirst=!0;for(var n=0;n<this.subscriptions.length;n++)if(n!==r){var i=this.subscriptions[n];i.unsubscribe(),this.remove(i)}this.subscriptions=null}this.destination.next(t)},t}(s.OuterSubscriber);t.RaceSubscriber=c},669(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(62256);function i(e){var t=e.error;e.subscriber.error(t)}t.throwError=function(e,t){return new n.Observable(t?function(r){return t.schedule(i,0,{error:e,subscriber:r})}:function(t){return t.error(e)})}},37950(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(62256),i=r(32115),o=r(86957),a=r(60571);function s(e){var t=e.index,r=e.period,n=e.subscriber;if(n.next(t),!n.closed){if(-1===r)return n.complete();e.index=t+1,this.schedule(e,r)}}t.timer=function(e,t,r){void 0===e&&(e=0);var l=-1;return o.isNumeric(t)?l=1>Number(t)&&1||Number(t):a.isScheduler(t)&&(r=t),a.isScheduler(r)||(r=i.async),new n.Observable(function(t){var n=o.isNumeric(e)?e:e-r.now();return r.schedule(s,n,{index:0,period:l,subscriber:t})})}},18848(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(58738),a=r(61691),s=r(49571),l=r(12238),u=r(61065);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return"function"==typeof r&&e.pop(),o.fromArray(e,void 0).lift(new c(r))};var c=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new d(e,this.resultSelector))},e}();t.ZipOperator=c;var d=function(e){function t(t,r,n){void 0===n&&(n=Object.create(null));var i=e.call(this,t)||this;return i.resultSelector=r,i.iterators=[],i.active=0,i.resultSelector="function"==typeof r?r:void 0,i}return i(t,e),t.prototype._next=function(e){var t=this.iterators;a.isArray(e)?t.push(new p(e)):"function"==typeof e[l.iterator]?t.push(new f(e[l.iterator]())):t.push(new h(this.destination,this,e))},t.prototype._complete=function(){var e=this.iterators,t=e.length;if(this.unsubscribe(),0===t)return void this.destination.complete();this.active=t;for(var r=0;r<t;r++){var n=e[r];n.stillUnsubscribed?this.destination.add(n.subscribe()):this.active--}},t.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},t.prototype.checkIterators=function(){for(var e=this.iterators,t=e.length,r=this.destination,n=0;n<t;n++){var i=e[n];if("function"==typeof i.hasValue&&!i.hasValue())return}for(var o=!1,a=[],n=0;n<t;n++){var i=e[n],s=i.next();if(i.hasCompleted()&&(o=!0),s.done)return void r.complete();a.push(s.value)}this.resultSelector?this._tryresultSelector(a):r.next(a),o&&r.complete()},t.prototype._tryresultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(s.Subscriber);t.ZipSubscriber=d;var f=function(){function e(e){this.iterator=e,this.nextResult=e.next()}return e.prototype.hasValue=function(){return!0},e.prototype.next=function(){var e=this.nextResult;return this.nextResult=this.iterator.next(),e},e.prototype.hasCompleted=function(){var e=this.nextResult;return!!(e&&e.done)},e}(),p=function(){function e(e){this.array=e,this.index=0,this.length=0,this.length=e.length}return e.prototype[l.iterator]=function(){return this},e.prototype.next=function(e){var t=this.index++,r=this.array;return t<this.length?{value:r[t],done:!1}:{value:null,done:!0}},e.prototype.hasValue=function(){return this.array.length>this.index},e.prototype.hasCompleted=function(){return this.array.length===this.index},e}(),h=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.parent=r,i.observable=n,i.stillUnsubscribed=!0,i.buffer=[],i.isComplete=!1,i}return i(t,e),t.prototype[l.iterator]=function(){return this},t.prototype.next=function(){var e=this.buffer;return 0===e.length&&this.isComplete?{value:null,done:!0}:{value:e.shift(),done:!1}},t.prototype.hasValue=function(){return this.buffer.length>0},t.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},t.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},t.prototype.notifyNext=function(e){this.buffer.push(e),this.parent.checkIterators()},t.prototype.subscribe=function(){return u.innerSubscribe(this.observable,new u.SimpleInnerSubscriber(this))},t}(u.SimpleOuterSubscriber)},43976(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(61065);t.audit=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.durationSelector))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.durationSelector=r,n.hasValue=!1,n}return i(t,e),t.prototype._next=function(e){if(this.value=e,this.hasValue=!0,!this.throttled){var t=void 0;try{t=(0,this.durationSelector)(e)}catch(e){return this.destination.error(e)}var r=o.innerSubscribe(t,new o.SimpleInnerSubscriber(this));!r||r.closed?this.clearThrottle():this.add(this.throttled=r)}},t.prototype.clearThrottle=function(){var e=this.value,t=this.hasValue,r=this.throttled;r&&(this.remove(r),this.throttled=void 0,r.unsubscribe()),t&&(this.value=void 0,this.hasValue=!1,this.destination.next(e))},t.prototype.notifyNext=function(){this.clearThrottle()},t.prototype.notifyComplete=function(){this.clearThrottle()},t}(o.SimpleOuterSubscriber)},41957(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(32115),i=r(43976),o=r(37950);t.auditTime=function(e,t){return void 0===t&&(t=n.async),i.audit(function(){return o.timer(e,t)})}},2505(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(61065);t.buffer=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.closingNotifier=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.closingNotifier))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.buffer=[],n.add(o.innerSubscribe(r,new o.SimpleInnerSubscriber(n))),n}return i(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype.notifyNext=function(){var e=this.buffer;this.buffer=[],this.destination.next(e)},t}(o.SimpleOuterSubscriber)},11062(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571);t.bufferCount=function(e,t){return void 0===t&&(t=null),function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.bufferSize=e,this.startBufferEvery=t,t&&e!==t?this.subscriberClass=l:this.subscriberClass=s}return e.prototype.call=function(e,t){return t.subscribe(new this.subscriberClass(e,this.bufferSize,this.startBufferEvery))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.bufferSize=r,n.buffer=[],n}return i(t,e),t.prototype._next=function(e){var t=this.buffer;t.push(e),t.length==this.bufferSize&&(this.destination.next(t),this.buffer=[])},t.prototype._complete=function(){var t=this.buffer;t.length>0&&this.destination.next(t),e.prototype._complete.call(this)},t}(o.Subscriber),l=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.bufferSize=r,i.startBufferEvery=n,i.buffers=[],i.count=0,i}return i(t,e),t.prototype._next=function(e){var t=this.bufferSize,r=this.startBufferEvery,n=this.buffers,i=this.count;this.count++,i%r==0&&n.push([]);for(var o=n.length;o--;){var a=n[o];a.push(e),a.length===t&&(n.splice(o,1),this.destination.next(a))}},t.prototype._complete=function(){for(var t=this.buffers,r=this.destination;t.length>0;){var n=t.shift();n.length>0&&r.next(n)}e.prototype._complete.call(this)},t}(o.Subscriber)},68188(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(32115),a=r(49571),s=r(60571);t.bufferTime=function(e){var t=arguments.length,r=o.async;s.isScheduler(arguments[arguments.length-1])&&(r=arguments[arguments.length-1],t--);var n=null;t>=2&&(n=arguments[1]);var i=1/0;return t>=3&&(i=arguments[2]),function(t){return t.lift(new l(e,n,i,r))}};var l=function(){function e(e,t,r,n){this.bufferTimeSpan=e,this.bufferCreationInterval=t,this.maxBufferSize=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},e}(),u=function(){this.buffer=[]},c=function(e){function t(t,r,n,i,o){var a=e.call(this,t)||this;a.bufferTimeSpan=r,a.bufferCreationInterval=n,a.maxBufferSize=i,a.scheduler=o,a.contexts=[];var s=a.openContext();return a.timespanOnly=null==n||n<0,a.timespanOnly?a.add(s.closeAction=o.schedule(d,r,{subscriber:a,context:s,bufferTimeSpan:r})):(a.add(s.closeAction=o.schedule(p,r,{subscriber:a,context:s})),a.add(o.schedule(f,n,{bufferTimeSpan:r,bufferCreationInterval:n,subscriber:a,scheduler:o}))),a}return i(t,e),t.prototype._next=function(e){for(var t,r=this.contexts,n=r.length,i=0;i<n;i++){var o=r[i],a=o.buffer;a.push(e),a.length==this.maxBufferSize&&(t=o)}t&&this.onBufferFull(t)},t.prototype._error=function(t){this.contexts.length=0,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts,r=this.destination;t.length>0;){var n=t.shift();r.next(n.buffer)}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.contexts=null},t.prototype.onBufferFull=function(e){this.closeContext(e);var t=e.closeAction;if(t.unsubscribe(),this.remove(t),!this.closed&&this.timespanOnly){e=this.openContext();var r=this.bufferTimeSpan,n={subscriber:this,context:e,bufferTimeSpan:r};this.add(e.closeAction=this.scheduler.schedule(d,r,n))}},t.prototype.openContext=function(){var e=new u;return this.contexts.push(e),e},t.prototype.closeContext=function(e){this.destination.next(e.buffer);var t=this.contexts;(t?t.indexOf(e):-1)>=0&&t.splice(t.indexOf(e),1)},t}(a.Subscriber);function d(e){var t=e.subscriber,r=e.context;r&&t.closeContext(r),t.closed||(e.context=t.openContext(),e.context.closeAction=this.schedule(e,e.bufferTimeSpan))}function f(e){var t=e.bufferCreationInterval,r=e.bufferTimeSpan,n=e.subscriber,i=e.scheduler,o=n.openContext();n.closed||(n.add(o.closeAction=i.schedule(p,r,{subscriber:n,context:o})),this.schedule(e,t))}function p(e){var t=e.subscriber,r=e.context;t.closeContext(r)}},54945(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(22572),a=r(69238),s=r(58748);t.bufferToggle=function(e,t){return function(r){return r.lift(new l(e,t))}};var l=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.openings,this.closingSelector))},e}(),u=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.closingSelector=n,i.contexts=[],i.add(a.subscribeToResult(i,r)),i}return i(t,e),t.prototype._next=function(e){for(var t=this.contexts,r=t.length,n=0;n<r;n++)t[n].buffer.push(e)},t.prototype._error=function(t){for(var r=this.contexts;r.length>0;){var n=r.shift();n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts;t.length>0;){var r=t.shift();this.destination.next(r.buffer),r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,e.prototype._complete.call(this)},t.prototype.notifyNext=function(e,t){e?this.closeBuffer(e):this.openBuffer(t)},t.prototype.notifyComplete=function(e){this.closeBuffer(e.context)},t.prototype.openBuffer=function(e){try{var t=this.closingSelector.call(this,e);t&&this.trySubscribe(t)}catch(e){this._error(e)}},t.prototype.closeBuffer=function(e){var t=this.contexts;if(t&&e){var r=e.buffer,n=e.subscription;this.destination.next(r),t.splice(t.indexOf(e),1),this.remove(n),n.unsubscribe()}},t.prototype.trySubscribe=function(e){var t=this.contexts,r=new o.Subscription,n={buffer:[],subscription:r};t.push(n);var i=a.subscribeToResult(this,e,n);!i||i.closed?this.closeBuffer(n):(i.context=n,this.add(i),r.add(i))},t}(s.OuterSubscriber)},19089(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(22572),a=r(61065);t.bufferWhen=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.closingSelector))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.closingSelector=r,n.subscribing=!1,n.openBuffer(),n}return i(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype._complete=function(){var t=this.buffer;t&&this.destination.next(t),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},t.prototype.notifyNext=function(){this.openBuffer()},t.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},t.prototype.openBuffer=function(){var e,t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var r=this.buffer;this.buffer&&this.destination.next(r),this.buffer=[];try{e=(0,this.closingSelector)()}catch(e){return this.error(e)}t=new o.Subscription,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(a.innerSubscribe(e,new a.SimpleInnerSubscriber(this))),this.subscribing=!1},t}(a.SimpleOuterSubscriber)},12928(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(61065);t.catchError=function(e){return function(t){var r=new a(e),n=t.lift(r);return r.caught=n}};var a=function(){function e(e){this.selector=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.selector,this.caught))},e}(),s=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.selector=r,i.caught=n,i}return i(t,e),t.prototype.error=function(t){if(!this.isStopped){var r=void 0;try{r=this.selector(t,this.caught)}catch(t){e.prototype.error.call(this,t);return}this._unsubscribeAndRecycle();var n=new o.SimpleInnerSubscriber(this);this.add(n);var i=o.innerSubscribe(r,n);i!==n&&this.add(i)}},t}(o.SimpleOuterSubscriber)},61947(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(72433);t.combineAll=function(e){return function(t){return t.lift(new n.CombineLatestOperator(e))}}},65689(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(61691),i=r(72433),o=r(55523);t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=null;return"function"==typeof e[e.length-1]&&(r=e.pop()),1===e.length&&n.isArray(e[0])&&(e=e[0].slice()),function(t){return t.lift.call(o.from([t].concat(e)),new i.CombineLatestOperator(r))}}},13379(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(84859);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(n.concat.apply(void 0,[t].concat(e)))}}},52012(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(70096);t.concatAll=function(){return n.mergeAll(1)}},66005(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(47953);t.concatMap=function(e,t){return n.mergeMap(e,t,1)}},81476(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(66005);t.concatMapTo=function(e,t){return n.concatMap(function(){return e},t)}},61720(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571);t.count=function(e){return function(t){return t.lift(new a(e,t))}};var a=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.source))},e}(),s=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.predicate=r,i.source=n,i.count=0,i.index=0,i}return i(t,e),t.prototype._next=function(e){this.predicate?this._tryPredicate(e):this.count++},t.prototype._tryPredicate=function(e){var t;try{t=this.predicate(e,this.index++,this.source)}catch(e){this.destination.error(e);return}t&&this.count++},t.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},t}(o.Subscriber)},56308(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(61065);t.debounce=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.durationSelector))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.durationSelector=r,n.hasValue=!1,n}return i(t,e),t.prototype._next=function(e){try{var t=this.durationSelector.call(this,e);t&&this._tryNext(e,t)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.emitValue(),this.destination.complete()},t.prototype._tryNext=function(e,t){var r=this.durationSubscription;this.value=e,this.hasValue=!0,r&&(r.unsubscribe(),this.remove(r)),(r=o.innerSubscribe(t,new o.SimpleInnerSubscriber(this)))&&!r.closed&&this.add(this.durationSubscription=r)},t.prototype.notifyNext=function(){this.emitValue()},t.prototype.notifyComplete=function(){this.emitValue()},t.prototype.emitValue=function(){if(this.hasValue){var t=this.value,r=this.durationSubscription;r&&(this.durationSubscription=void 0,r.unsubscribe(),this.remove(r)),this.value=void 0,this.hasValue=!1,e.prototype._next.call(this,t)}},t}(o.SimpleOuterSubscriber)},54009(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571),a=r(32115);t.debounceTime=function(e,t){return void 0===t&&(t=a.async),function(r){return r.lift(new s(e,t))}};var s=function(){function e(e,t){this.dueTime=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.dueTime,this.scheduler))},e}(),l=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.dueTime=r,i.scheduler=n,i.debouncedSubscription=null,i.lastValue=null,i.hasValue=!1,i}return i(t,e),t.prototype._next=function(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(u,this.dueTime,this))},t.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},t.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var e=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(e)}},t.prototype.clearDebounce=function(){var e=this.debouncedSubscription;null!==e&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)},t}(o.Subscriber);function u(e){e.debouncedNext()}},86564(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571);t.defaultIfEmpty=function(e){return void 0===e&&(e=null),function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.defaultValue=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.defaultValue))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.defaultValue=r,n.isEmpty=!0,n}return i(t,e),t.prototype._next=function(e){this.isEmpty=!1,this.destination.next(e)},t.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},t}(o.Subscriber)},39928(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(32115),a=r(81416),s=r(49571),l=r(99914);t.delay=function(e,t){void 0===t&&(t=o.async);var r=a.isDate(e)?e-t.now():Math.abs(e);return function(e){return e.lift(new u(r,t))}};var u=function(){function e(e,t){this.delay=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.delay,this.scheduler))},e}(),c=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.delay=r,i.scheduler=n,i.queue=[],i.active=!1,i.errored=!1,i}return i(t,e),t.dispatch=function(e){for(var t=e.source,r=t.queue,n=e.scheduler,i=e.destination;r.length>0&&r[0].time-n.now()<=0;)r.shift().notification.observe(i);if(r.length>0){var o=Math.max(0,r[0].time-n.now());this.schedule(e,o)}else this.unsubscribe(),t.active=!1},t.prototype._schedule=function(e){this.active=!0,this.destination.add(e.schedule(t.dispatch,this.delay,{source:this,destination:this.destination,scheduler:e}))},t.prototype.scheduleNotification=function(e){if(!0!==this.errored){var t=this.scheduler,r=new d(t.now()+this.delay,e);this.queue.push(r),!1===this.active&&this._schedule(t)}},t.prototype._next=function(e){this.scheduleNotification(l.Notification.createNext(e))},t.prototype._error=function(e){this.errored=!0,this.queue=[],this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.scheduleNotification(l.Notification.createComplete()),this.unsubscribe()},t}(s.Subscriber),d=function(e,t){this.time=e,this.notification=t}},89956(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571),a=r(62256),s=r(58748),l=r(69238);t.delayWhen=function(e,t){return t?function(r){return new d(r,t).lift(new u(e))}:function(t){return t.lift(new u(e))}};var u=function(){function e(e){this.delayDurationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.delayDurationSelector))},e}(),c=function(e){function t(t,r){var n=e.call(this,t)||this;return n.delayDurationSelector=r,n.completed=!1,n.delayNotifierSubscriptions=[],n.index=0,n}return i(t,e),t.prototype.notifyNext=function(e,t,r,n,i){this.destination.next(e),this.removeSubscription(i),this.tryComplete()},t.prototype.notifyError=function(e,t){this._error(e)},t.prototype.notifyComplete=function(e){var t=this.removeSubscription(e);t&&this.destination.next(t),this.tryComplete()},t.prototype._next=function(e){var t=this.index++;try{var r=this.delayDurationSelector(e,t);r&&this.tryDelay(r,e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},t.prototype.removeSubscription=function(e){e.unsubscribe();var t=this.delayNotifierSubscriptions.indexOf(e);return -1!==t&&this.delayNotifierSubscriptions.splice(t,1),e.outerValue},t.prototype.tryDelay=function(e,t){var r=l.subscribeToResult(this,e,t);r&&!r.closed&&(this.destination.add(r),this.delayNotifierSubscriptions.push(r))},t.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},t}(s.OuterSubscriber),d=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subscriptionDelay=r,n}return i(t,e),t.prototype._subscribe=function(e){this.subscriptionDelay.subscribe(new f(e,this.source))},t}(a.Observable),f=function(e){function t(t,r){var n=e.call(this)||this;return n.parent=t,n.source=r,n.sourceSubscribed=!1,n}return i(t,e),t.prototype._next=function(e){this.subscribeToSource()},t.prototype._error=function(e){this.unsubscribe(),this.parent.error(e)},t.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},t.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},t}(o.Subscriber)},51135(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571);t.dematerialize=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){return e.call(this,t)||this}return i(t,e),t.prototype._next=function(e){e.observe(this.destination)},t}(o.Subscriber)},89643(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(61065);t.distinct=function(e,t){return function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.keySelector=e,this.flushes=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.keySelector,this.flushes))},e}(),s=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.keySelector=r,i.values=new Set,n&&i.add(o.innerSubscribe(n,new o.SimpleInnerSubscriber(i))),i}return i(t,e),t.prototype.notifyNext=function(){this.values.clear()},t.prototype.notifyError=function(e){this._error(e)},t.prototype._next=function(e){this.keySelector?this._useKeySelector(e):this._finalizeNext(e,e)},t.prototype._useKeySelector=function(e){var t,r=this.destination;try{t=this.keySelector(e)}catch(e){r.error(e);return}this._finalizeNext(t,e)},t.prototype._finalizeNext=function(e,t){var r=this.values;r.has(e)||(r.add(e),this.destination.next(t))},t}(o.SimpleOuterSubscriber);t.DistinctSubscriber=s},72479(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571);t.distinctUntilChanged=function(e,t){return function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.compare=e,this.keySelector=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.compare,this.keySelector))},e}(),s=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.keySelector=n,i.hasKey=!1,"function"==typeof r&&(i.compare=r),i}return i(t,e),t.prototype.compare=function(e,t){return e===t},t.prototype._next=function(e){try{var t,r=this.keySelector;t=r?r(e):e}catch(e){return this.destination.error(e)}var n=!1;if(this.hasKey)try{n=(0,this.compare)(this.key,t)}catch(e){return this.destination.error(e)}else this.hasKey=!0;n||(this.key=t,this.destination.next(e))},t}(o.Subscriber)},49794(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(72479);t.distinctUntilKeyChanged=function(e,t){return n.distinctUntilChanged(function(r,n){return t?t(r[e],n[e]):r[e]===n[e]})}},81786(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(79035),i=r(6017),o=r(68431),a=r(86564),s=r(80788);t.elementAt=function(e,t){if(e<0)throw new n.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(l){return l.pipe(i.filter(function(t,r){return r===e}),s.take(1),r?a.defaultIfEmpty(t):o.throwIfEmpty(function(){return new n.ArgumentOutOfRangeError}))}}},85870(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(84859),i=r(10734);t.endWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return n.concat(t,i.of.apply(void 0,e))}}},49860(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571);t.every=function(e,t){return function(r){return r.lift(new a(e,t,r))}};var a=function(){function e(e,t,r){this.predicate=e,this.thisArg=t,this.source=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.thisArg,this.source))},e}(),s=function(e){function t(t,r,n,i){var o=e.call(this,t)||this;return o.predicate=r,o.thisArg=n,o.source=i,o.index=0,o.thisArg=n||o,o}return i(t,e),t.prototype.notifyComplete=function(e){this.destination.next(e),this.destination.complete()},t.prototype._next=function(e){var t=!1;try{t=this.predicate.call(this.thisArg,e,this.index++,this.source)}catch(e){this.destination.error(e);return}t||this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(o.Subscriber)},12801(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(61065);t.exhaust=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){var r=e.call(this,t)||this;return r.hasCompleted=!1,r.hasSubscription=!1,r}return i(t,e),t.prototype._next=function(e){this.hasSubscription||(this.hasSubscription=!0,this.add(o.innerSubscribe(e,new o.SimpleInnerSubscriber(this))))},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},t.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},t}(o.SimpleOuterSubscriber)},28207(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(96525),a=r(55523),s=r(61065);t.exhaustMap=function e(t,r){return r?function(n){return n.pipe(e(function(e,n){return a.from(t(e,n)).pipe(o.map(function(t,i){return r(e,t,n,i)}))}))}:function(e){return e.lift(new l(t))}};var l=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.project))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.project=r,n.hasSubscription=!1,n.hasCompleted=!1,n.index=0,n}return i(t,e),t.prototype._next=function(e){this.hasSubscription||this.tryNext(e)},t.prototype.tryNext=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(e){this.destination.error(e);return}this.hasSubscription=!0,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new s.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=s.innerSubscribe(e,t);n!==t&&r.add(n)},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},t}(s.SimpleOuterSubscriber)},99251(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(61065);t.expand=function(e,t,r){return void 0===t&&(t=1/0),t=1>(t||0)?1/0:t,function(n){return n.lift(new a(e,t,r))}};var a=function(){function e(e,t,r){this.project=e,this.concurrent=t,this.scheduler=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.project,this.concurrent,this.scheduler))},e}();t.ExpandOperator=a;var s=function(e){function t(t,r,n,i){var o=e.call(this,t)||this;return o.project=r,o.concurrent=n,o.scheduler=i,o.index=0,o.active=0,o.hasCompleted=!1,n<1/0&&(o.buffer=[]),o}return i(t,e),t.dispatch=function(e){var t=e.subscriber,r=e.result,n=e.value,i=e.index;t.subscribeToProjection(r,n,i)},t.prototype._next=function(e){var r=this.destination;if(r.closed)return void this._complete();var n=this.index++;if(this.active<this.concurrent){r.next(e);try{var i=(0,this.project)(e,n);this.scheduler?this.destination.add(this.scheduler.schedule(t.dispatch,0,{subscriber:this,result:i,value:e,index:n})):this.subscribeToProjection(i,e,n)}catch(e){r.error(e)}}else this.buffer.push(e)},t.prototype.subscribeToProjection=function(e,t,r){this.active++,this.destination.add(o.innerSubscribe(e,new o.SimpleInnerSubscriber(this)))},t.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this._next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e&&e.length>0&&this._next(e.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},t}(o.SimpleOuterSubscriber);t.ExpandSubscriber=s},6017(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571);t.filter=function(e,t){return function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.thisArg))},e}(),s=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.predicate=r,i.thisArg=n,i.count=0,i}return i(t,e),t.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(e){this.destination.error(e);return}t&&this.destination.next(e)},t}(o.Subscriber)},47577(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571),a=r(22572);t.finalize=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.callback=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.callback))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.add(new a.Subscription(r)),n}return i(t,e),t}(o.Subscriber)},32348(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571);t.find=function(e,t){if("function"!=typeof e)throw TypeError("predicate is not a function");return function(r){return r.lift(new a(e,r,!1,t))}};var a=function(){function e(e,t,r,n){this.predicate=e,this.source=t,this.yieldIndex=r,this.thisArg=n}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.source,this.yieldIndex,this.thisArg))},e}();t.FindValueOperator=a;var s=function(e){function t(t,r,n,i,o){var a=e.call(this,t)||this;return a.predicate=r,a.source=n,a.yieldIndex=i,a.thisArg=o,a.index=0,a}return i(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete(),this.unsubscribe()},t.prototype._next=function(e){var t=this.predicate,r=this.thisArg,n=this.index++;try{t.call(r||this,e,n,this.source)&&this.notifyComplete(this.yieldIndex?n:e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},t}(o.Subscriber);t.FindValueSubscriber=s},25334(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(32348);t.findIndex=function(e,t){return function(r){return r.lift(new n.FindValueOperator(e,r,!0,t))}}},69541(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(69025),i=r(6017),o=r(80788),a=r(86564),s=r(68431),l=r(99790);t.first=function(e,t){var r=arguments.length>=2;return function(u){return u.pipe(e?i.filter(function(t,r){return e(t,r,u)}):l.identity,o.take(1),r?a.defaultIfEmpty(t):s.throwIfEmpty(function(){return new n.EmptyError}))}}},89333(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571),a=r(22572),s=r(62256),l=r(50185);t.groupBy=function(e,t,r,n){return function(i){return i.lift(new u(e,t,r,n))}};var u=function(){function e(e,t,r,n){this.keySelector=e,this.elementSelector=t,this.durationSelector=r,this.subjectSelector=n}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},e}(),c=function(e){function t(t,r,n,i,o){var a=e.call(this,t)||this;return a.keySelector=r,a.elementSelector=n,a.durationSelector=i,a.subjectSelector=o,a.groups=null,a.attemptedToUnsubscribe=!1,a.count=0,a}return i(t,e),t.prototype._next=function(e){var t;try{t=this.keySelector(e)}catch(e){this.error(e);return}this._group(e,t)},t.prototype._group=function(e,t){var r,n=this.groups;n||(n=this.groups=new Map);var i=n.get(t);if(this.elementSelector)try{r=this.elementSelector(e)}catch(e){this.error(e)}else r=e;if(!i){i=this.subjectSelector?this.subjectSelector():new l.Subject,n.set(t,i);var o=new f(t,i,this);if(this.destination.next(o),this.durationSelector){var a=void 0;try{a=this.durationSelector(new f(t,i))}catch(e){this.error(e);return}this.add(a.subscribe(new d(t,i,this)))}}i.closed||i.next(r)},t.prototype._error=function(e){var t=this.groups;t&&(t.forEach(function(t,r){t.error(e)}),t.clear()),this.destination.error(e)},t.prototype._complete=function(){var e=this.groups;e&&(e.forEach(function(e,t){e.complete()}),e.clear()),this.destination.complete()},t.prototype.removeGroup=function(e){this.groups.delete(e)},t.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&e.prototype.unsubscribe.call(this))},t}(o.Subscriber),d=function(e){function t(t,r,n){var i=e.call(this,r)||this;return i.key=t,i.group=r,i.parent=n,i}return i(t,e),t.prototype._next=function(e){this.complete()},t.prototype._unsubscribe=function(){var e=this.parent,t=this.key;this.key=this.parent=null,e&&e.removeGroup(t)},t}(o.Subscriber),f=function(e){function t(t,r,n){var i=e.call(this)||this;return i.key=t,i.groupSubject=r,i.refCountSubscription=n,i}return i(t,e),t.prototype._subscribe=function(e){var t=new a.Subscription,r=this.refCountSubscription,n=this.groupSubject;return r&&!r.closed&&t.add(new p(r)),t.add(n.subscribe(e)),t},t}(s.Observable);t.GroupedObservable=f;var p=function(e){function t(t){var r=e.call(this)||this;return r.parent=t,t.count++,r}return i(t,e),t.prototype.unsubscribe=function(){var t=this.parent;t.closed||this.closed||(e.prototype.unsubscribe.call(this),t.count-=1,0===t.count&&t.attemptedToUnsubscribe&&t.unsubscribe())},t}(a.Subscription)},66172(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571);t.ignoreElements=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype._next=function(e){},t}(o.Subscriber)},66542(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571);t.isEmpty=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){return e.call(this,t)||this}return i(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype._next=function(e){this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(o.Subscriber)},21195(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(69025),i=r(6017),o=r(34676),a=r(68431),s=r(86564),l=r(99790);t.last=function(e,t){var r=arguments.length>=2;return function(u){return u.pipe(e?i.filter(function(t,r){return e(t,r,u)}):l.identity,o.takeLast(1),r?s.defaultIfEmpty(t):a.throwIfEmpty(function(){return new n.EmptyError}))}}},96525(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571);t.map=function(e,t){return function(r){if("function"!=typeof e)throw TypeError("argument is not a function. Are you looking for `mapTo()`?");return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.project,this.thisArg))},e}();t.MapOperator=a;var s=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.project=r,i.count=0,i.thisArg=n||i,i}return i(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(o.Subscriber)},64780(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571);t.mapTo=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.value=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.value))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.value=r,n}return i(t,e),t.prototype._next=function(e){this.destination.next(this.value)},t}(o.Subscriber)},56230(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571),a=r(99914);t.materialize=function(){return function(e){return e.lift(new s)}};var s=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new l(e))},e}(),l=function(e){function t(t){return e.call(this,t)||this}return i(t,e),t.prototype._next=function(e){this.destination.next(a.Notification.createNext(e))},t.prototype._error=function(e){var t=this.destination;t.next(a.Notification.createError(e)),t.complete()},t.prototype._complete=function(){var e=this.destination;e.next(a.Notification.createComplete()),e.complete()},t}(o.Subscriber)},85285(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(23109);t.max=function(e){return n.reduce("function"==typeof e?function(t,r){return e(t,r)>0?t:r}:function(e,t){return e>t?e:t})}},48655(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(70791);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(n.merge.apply(void 0,[t].concat(e)))}}},70096(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(47953),i=r(99790);t.mergeAll=function(e){return void 0===e&&(e=1/0),n.mergeMap(i.identity,e)}},47953(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(96525),a=r(55523),s=r(61065);function l(e,t,r){return(void 0===r&&(r=1/0),"function"==typeof t)?function(n){return n.pipe(l(function(r,n){return a.from(e(r,n)).pipe(o.map(function(e,i){return t(r,e,n,i)}))},r))}:("number"==typeof t&&(r=t),function(t){return t.lift(new u(e,r))})}t.mergeMap=l;var u=function(){function e(e,t){void 0===t&&(t=1/0),this.project=e,this.concurrent=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.project,this.concurrent))},e}();t.MergeMapOperator=u;var c=function(e){function t(t,r,n){void 0===n&&(n=1/0);var i=e.call(this,t)||this;return i.project=r,i.concurrent=n,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return i(t,e),t.prototype._next=function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)},t.prototype._tryNext=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(e){this.destination.error(e);return}this.active++,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new s.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=s.innerSubscribe(e,t);n!==t&&r.add(n)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(s.SimpleOuterSubscriber);t.MergeMapSubscriber=c,t.flatMap=l},26624(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(47953);t.mergeMapTo=function(e,t,r){return(void 0===r&&(r=1/0),"function"==typeof t)?n.mergeMap(function(){return e},t,r):("number"==typeof t&&(r=t),n.mergeMap(function(){return e},r))}},9194(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(61065);t.mergeScan=function(e,t,r){return void 0===r&&(r=1/0),function(n){return n.lift(new a(e,t,r))}};var a=function(){function e(e,t,r){this.accumulator=e,this.seed=t,this.concurrent=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.accumulator,this.seed,this.concurrent))},e}();t.MergeScanOperator=a;var s=function(e){function t(t,r,n,i){var o=e.call(this,t)||this;return o.accumulator=r,o.acc=n,o.concurrent=i,o.hasValue=!1,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return i(t,e),t.prototype._next=function(e){if(this.active<this.concurrent){var t=this.index++,r=this.destination,n=void 0;try{n=(0,this.accumulator)(this.acc,e,t)}catch(e){return r.error(e)}this.active++,this._innerSub(n)}else this.buffer.push(e)},t.prototype._innerSub=function(e){var t=new o.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=o.innerSubscribe(e,t);n!==t&&r.add(n)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe()},t.prototype.notifyNext=function(e){var t=this.destination;this.acc=e,this.hasValue=!0,t.next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},t}(o.SimpleOuterSubscriber);t.MergeScanSubscriber=s},30447(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(23109);t.min=function(e){return n.reduce("function"==typeof e?function(t,r){return 0>e(t,r)?t:r}:function(e,t){return e<t?e:t})}},66805(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(79644);t.multicast=function(e,t){return function(r){if(o="function"==typeof e?e:function(){return e},"function"==typeof t)return r.lift(new i(o,t));var o,a=Object.create(r,n.connectableObservableDescriptor);return a.source=r,a.subjectFactory=o,a}};var i=function(){function e(e,t){this.subjectFactory=e,this.selector=t}return e.prototype.call=function(e,t){var r=this.selector,n=this.subjectFactory(),i=r(n).subscribe(e);return i.add(t.subscribe(n)),i},e}();t.MulticastOperator=i},93186(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571),a=r(99914);t.observeOn=function(e,t){return void 0===t&&(t=0),function(r){return r.lift(new s(e,t))}};var s=function(){function e(e,t){void 0===t&&(t=0),this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.scheduler,this.delay))},e}();t.ObserveOnOperator=s;var l=function(e){function t(t,r,n){void 0===n&&(n=0);var i=e.call(this,t)||this;return i.scheduler=r,i.delay=n,i}return i(t,e),t.dispatch=function(e){var t=e.notification,r=e.destination;t.observe(r),this.unsubscribe()},t.prototype.scheduleMessage=function(e){this.destination.add(this.scheduler.schedule(t.dispatch,this.delay,new u(e,this.destination)))},t.prototype._next=function(e){this.scheduleMessage(a.Notification.createNext(e))},t.prototype._error=function(e){this.scheduleMessage(a.Notification.createError(e)),this.unsubscribe()},t.prototype._complete=function(){this.scheduleMessage(a.Notification.createComplete()),this.unsubscribe()},t}(o.Subscriber);t.ObserveOnSubscriber=l;var u=function(e,t){this.notification=e,this.destination=t};t.ObserveOnMessage=u},87048(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(55523),a=r(61691),s=r(61065);t.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length&&a.isArray(e[0])&&(e=e[0]),function(t){return t.lift(new l(e))}},t.onErrorResumeNextStatic=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=void 0;return 1===e.length&&a.isArray(e[0])&&(e=e[0]),r=e.shift(),o.from(r).lift(new l(e))};var l=function(){function e(e){this.nextSources=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.nextSources))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.destination=t,n.nextSources=r,n}return i(t,e),t.prototype.notifyError=function(){this.subscribeToNextSource()},t.prototype.notifyComplete=function(){this.subscribeToNextSource()},t.prototype._error=function(e){this.subscribeToNextSource(),this.unsubscribe()},t.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},t.prototype.subscribeToNextSource=function(){var e=this.nextSources.shift();if(e){var t=new s.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=s.innerSubscribe(e,t);n!==t&&r.add(n)}else this.destination.complete()},t}(s.SimpleOuterSubscriber)},54071(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571);t.pairwise=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){var r=e.call(this,t)||this;return r.hasPrev=!1,r}return i(t,e),t.prototype._next=function(e){var t;this.hasPrev?t=[this.prev,e]:this.hasPrev=!0,this.prev=e,t&&this.destination.next(t)},t}(o.Subscriber)},27517(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(49587),i=r(6017);t.partition=function(e,t){return function(r){return[i.filter(e,t)(r),i.filter(n.not(e,t))(r)]}}},94182(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(96525);t.pluck=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.length;if(0===r)throw Error("list of properties cannot be empty.");return function(t){var i,o;return n.map((i=e,o=r,function(e){for(var t=e,r=0;r<o;r++){var n=null!=t?t[i[r]]:void 0;if(void 0===n)return;t=n}return t}))(t)}}},78092(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(50185),i=r(66805);t.publish=function(e){return e?i.multicast(function(){return new n.Subject},e):i.multicast(new n.Subject)}},65066(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(96915),i=r(66805);t.publishBehavior=function(e){return function(t){return i.multicast(new n.BehaviorSubject(e))(t)}}},70876(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(41205),i=r(66805);t.publishLast=function(){return function(e){return i.multicast(new n.AsyncSubject)(e)}}},6135(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(21404),i=r(66805);t.publishReplay=function(e,t,r,o){r&&"function"!=typeof r&&(o=r);var a="function"==typeof r?r:void 0,s=new n.ReplaySubject(e,t,o);return function(e){return i.multicast(function(){return s},a)(e)}}},24914(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(61691),i=r(75530);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return 1===e.length&&n.isArray(e[0])&&(e=e[0]),t.lift.call(i.race.apply(void 0,[t].concat(e)))}}},23109(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(42494),i=r(34676),o=r(86564),a=r(13308);t.reduce=function(e,t){return arguments.length>=2?function(r){return a.pipe(n.scan(e,t),i.takeLast(1),o.defaultIfEmpty(t))(r)}:function(t){return a.pipe(n.scan(function(t,r,n){return e(t,r,n+1)}),i.takeLast(1))(t)}}},91919(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571);t.refCount=function(){return function(e){return e.lift(new a(e))}};var a=function(){function e(e){this.connectable=e}return e.prototype.call=function(e,t){var r=this.connectable;r._refCount++;var n=new s(e,r),i=t.subscribe(n);return n.closed||(n.connection=r.connect()),i},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.connectable=r,n}return i(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(!e){this.connection=null;return}this.connectable=null;var t=e._refCount;if(t<=0||(e._refCount=t-1,t>1)){this.connection=null;return}var r=this.connection,n=e._connection;this.connection=null,n&&(!r||n===r)&&n.unsubscribe()},t}(o.Subscriber)},40312(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571),a=r(18686);t.repeat=function(e){return void 0===e&&(e=-1),function(t){return 0===e?a.empty():e<0?t.lift(new s(-1,t)):t.lift(new s(e-1,t))}};var s=function(){function e(e,t){this.count=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.count,this.source))},e}(),l=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.count=r,i.source=n,i}return i(t,e),t.prototype.complete=function(){if(!this.isStopped){var t=this.source,r=this.count;if(0===r)return e.prototype.complete.call(this);r>-1&&(this.count=r-1),t.subscribe(this._unsubscribeAndRecycle())}},t}(o.Subscriber)},35332(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(50185),a=r(61065);t.repeatWhen=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.notifier,t))},e}(),l=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.notifier=r,i.source=n,i.sourceIsBeingSubscribedTo=!0,i}return i(t,e),t.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},t.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return e.prototype.complete.call(this)},t.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return e.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},t.prototype._unsubscribe=function(){var e=this.notifications,t=this.retriesSubscription;e&&(e.unsubscribe(),this.notifications=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype._unsubscribeAndRecycle=function(){var t=this._unsubscribe;return this._unsubscribe=null,e.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=t,this},t.prototype.subscribeToRetries=function(){this.notifications=new o.Subject;try{var t;t=(0,this.notifier)(this.notifications)}catch(t){return e.prototype.complete.call(this)}this.retries=t,this.retriesSubscription=a.innerSubscribe(t,new a.SimpleInnerSubscriber(this))},t}(a.SimpleOuterSubscriber)},44017(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571);t.retry=function(e){return void 0===e&&(e=-1),function(t){return t.lift(new a(e,t))}};var a=function(){function e(e,t){this.count=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.count,this.source))},e}(),s=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.count=r,i.source=n,i}return i(t,e),t.prototype.error=function(t){if(!this.isStopped){var r=this.source,n=this.count;if(0===n)return e.prototype.error.call(this,t);n>-1&&(this.count=n-1),r.subscribe(this._unsubscribeAndRecycle())}},t}(o.Subscriber)},51033(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(50185),a=r(61065);t.retryWhen=function(e){return function(t){return t.lift(new s(e,t))}};var s=function(){function e(e,t){this.notifier=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.notifier,this.source))},e}(),l=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.notifier=r,i.source=n,i}return i(t,e),t.prototype.error=function(t){if(!this.isStopped){var r=this.errors,n=this.retries,i=this.retriesSubscription;if(n)this.errors=void 0,this.retriesSubscription=void 0;else{r=new o.Subject;try{n=(0,this.notifier)(r)}catch(t){return e.prototype.error.call(this,t)}i=a.innerSubscribe(n,new a.SimpleInnerSubscriber(this))}this._unsubscribeAndRecycle(),this.errors=r,this.retries=n,this.retriesSubscription=i,r.next(t)}},t.prototype._unsubscribe=function(){var e=this.errors,t=this.retriesSubscription;e&&(e.unsubscribe(),this.errors=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype.notifyNext=function(){var e=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=e,this.source.subscribe(this)},t}(a.SimpleOuterSubscriber)},24817(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(61065);t.sample=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var r=new s(e),n=t.subscribe(r);return n.add(o.innerSubscribe(this.notifier,new o.SimpleInnerSubscriber(r))),n},e}(),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hasValue=!1,t}return i(t,e),t.prototype._next=function(e){this.value=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.emitValue()},t.prototype.notifyComplete=function(){this.emitValue()},t.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},t}(o.SimpleOuterSubscriber)},39716(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571),a=r(32115);t.sampleTime=function(e,t){return void 0===t&&(t=a.async),function(r){return r.lift(new s(e,t))}};var s=function(){function e(e,t){this.period=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.period,this.scheduler))},e}(),l=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.period=r,i.scheduler=n,i.hasValue=!1,i.add(n.schedule(u,r,{subscriber:i,period:r})),i}return i(t,e),t.prototype._next=function(e){this.lastValue=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},t}(o.Subscriber);function u(e){var t=e.subscriber,r=e.period;t.notifyNext(),this.schedule(e,r)}},42494(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571);t.scan=function(e,t){var r=!1;return arguments.length>=2&&(r=!0),function(n){return n.lift(new a(e,t,r))}};var a=function(){function e(e,t,r){void 0===r&&(r=!1),this.accumulator=e,this.seed=t,this.hasSeed=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.accumulator,this.seed,this.hasSeed))},e}(),s=function(e){function t(t,r,n,i){var o=e.call(this,t)||this;return o.accumulator=r,o._seed=n,o.hasSeed=i,o.index=0,o}return i(t,e),Object.defineProperty(t.prototype,"seed",{get:function(){return this._seed},set:function(e){this.hasSeed=!0,this._seed=e},enumerable:!0,configurable:!0}),t.prototype._next=function(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)},t.prototype._tryNext=function(e){var t,r=this.index++;try{t=this.accumulator(this.seed,e,r)}catch(e){this.destination.error(e)}this.seed=t,this.destination.next(t)},t}(o.Subscriber)},10064(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571);t.sequenceEqual=function(e,t){return function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.compareTo=e,this.comparator=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.compareTo,this.comparator))},e}();t.SequenceEqualOperator=a;var s=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.compareTo=r,i.comparator=n,i._a=[],i._b=[],i._oneComplete=!1,i.destination.add(r.subscribe(new l(t,i))),i}return i(t,e),t.prototype._next=function(e){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(e),this.checkValues())},t.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},t.prototype.checkValues=function(){for(var e=this._a,t=this._b,r=this.comparator;e.length>0&&t.length>0;){var n=e.shift(),i=t.shift(),o=!1;try{o=r?r(n,i):n===i}catch(e){this.destination.error(e)}o||this.emit(!1)}},t.prototype.emit=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype.nextB=function(e){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(e),this.checkValues())},t.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},t}(o.Subscriber);t.SequenceEqualSubscriber=s;var l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.parent=r,n}return i(t,e),t.prototype._next=function(e){this.parent.nextB(e)},t.prototype._error=function(e){this.parent.error(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},t}(o.Subscriber)},11340(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(66805),i=r(91919),o=r(50185);function a(){return new o.Subject}t.share=function(){return function(e){return i.refCount()(n.multicast(a)(e))}}},41655(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(21404);t.shareReplay=function(e,t,r){var i;return i=e&&"object"==typeof e?e:{bufferSize:e,windowTime:t,refCount:!1,scheduler:r},function(e){var t,r,o,a,s,l,u,c,d,f,p,h;return e.lift((s=void 0===(a=(t=i).bufferSize)?1/0:a,u=void 0===(l=t.windowTime)?1/0:l,c=t.refCount,d=t.scheduler,f=0,p=!1,h=!1,function(e){var t;f++,!r||p?(p=!1,t=(r=new n.ReplaySubject(s,u,d)).subscribe(this),o=e.subscribe({next:function(e){r.next(e)},error:function(e){p=!0,r.error(e)},complete:function(){h=!0,o=void 0,r.complete()}}),h&&(o=void 0)):t=r.subscribe(this),this.add(function(){f--,t.unsubscribe(),t=void 0,o&&!h&&c&&0===f&&(o.unsubscribe(),o=void 0,r=void 0)})}))}}},13727(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571),a=r(69025);t.single=function(e){return function(t){return t.lift(new s(e,t))}};var s=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.predicate,this.source))},e}(),l=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.predicate=r,i.source=n,i.seenValue=!1,i.index=0,i}return i(t,e),t.prototype.applySingleValue=function(e){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=e)},t.prototype._next=function(e){var t=this.index++;this.predicate?this.tryNext(e,t):this.applySingleValue(e)},t.prototype.tryNext=function(e,t){try{this.predicate(e,t,this.source)&&this.applySingleValue(e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){var e=this.destination;this.index>0?(e.next(this.seenValue?this.singleValue:void 0),e.complete()):e.error(new a.EmptyError)},t}(o.Subscriber)},63776(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571);t.skip=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.total=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.total))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.count=0,n}return i(t,e),t.prototype._next=function(e){++this.count>this.total&&this.destination.next(e)},t}(o.Subscriber)},5872(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571),a=r(79035);t.skipLast=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){if(this._skipCount=e,this._skipCount<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return 0===this._skipCount?t.subscribe(new o.Subscriber(e)):t.subscribe(new l(e,this._skipCount))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n._skipCount=r,n._count=0,n._ring=Array(r),n}return i(t,e),t.prototype._next=function(e){var t=this._skipCount,r=this._count++;if(r<t)this._ring[r]=e;else{var n=r%t,i=this._ring,o=i[n];i[n]=e,this.destination.next(o)}},t}(o.Subscriber)},36934(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(61065);t.skipUntil=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.notifier))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;n.hasValue=!1;var i=new o.SimpleInnerSubscriber(n);n.add(i),n.innerSubscription=i;var a=o.innerSubscribe(r,i);return a!==i&&(n.add(a),n.innerSubscription=a),n}return i(t,e),t.prototype._next=function(t){this.hasValue&&e.prototype._next.call(this,t)},t.prototype.notifyNext=function(){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},t.prototype.notifyComplete=function(){},t}(o.SimpleOuterSubscriber)},45507(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571);t.skipWhile=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.predicate=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.predicate=r,n.skipping=!0,n.index=0,n}return i(t,e),t.prototype._next=function(e){var t=this.destination;this.skipping&&this.tryCallPredicate(e),this.skipping||t.next(e)},t.prototype.tryCallPredicate=function(e){try{var t=this.predicate(e,this.index++);this.skipping=!!t}catch(e){this.destination.error(e)}},t}(o.Subscriber)},52295(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(84859),i=r(60571);t.startWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return i.isScheduler(r)?(e.pop(),function(t){return n.concat(e,t,r)}):function(t){return n.concat(e,t)}}},2678(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(89383);t.subscribeOn=function(e,t){return void 0===t&&(t=0),function(r){return r.lift(new i(e,t))}};var i=function(){function e(e,t){this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return new n.SubscribeOnObservable(t,this.delay,this.scheduler).subscribe(e)},e}()},17024(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(54081),i=r(99790);t.switchAll=function(){return n.switchMap(i.identity)}},54081(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(96525),a=r(55523),s=r(61065);t.switchMap=function e(t,r){return"function"==typeof r?function(n){return n.pipe(e(function(e,n){return a.from(t(e,n)).pipe(o.map(function(t,i){return r(e,t,n,i)}))}))}:function(e){return e.lift(new l(t))}};var l=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.project))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.project=r,n.index=0,n}return i(t,e),t.prototype._next=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(e){this.destination.error(e);return}this._innerSub(t)},t.prototype._innerSub=function(e){var t=this.innerSubscription;t&&t.unsubscribe();var r=new s.SimpleInnerSubscriber(this),n=this.destination;n.add(r),this.innerSubscription=s.innerSubscribe(e,r),this.innerSubscription!==r&&n.add(this.innerSubscription)},t.prototype._complete=function(){var t=this.innerSubscription;(!t||t.closed)&&e.prototype._complete.call(this),this.unsubscribe()},t.prototype._unsubscribe=function(){this.innerSubscription=void 0},t.prototype.notifyComplete=function(){this.innerSubscription=void 0,this.isStopped&&e.prototype._complete.call(this)},t.prototype.notifyNext=function(e){this.destination.next(e)},t}(s.SimpleOuterSubscriber)},73648(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(54081);t.switchMapTo=function(e,t){return t?n.switchMap(function(){return e},t):n.switchMap(function(){return e})}},80788(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571),a=r(79035),s=r(18686);t.take=function(e){return function(t){return 0===e?s.empty():t.lift(new l(e))}};var l=function(){function e(e){if(this.total=e,this.total<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.total))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.count=0,n}return i(t,e),t.prototype._next=function(e){var t=this.total,r=++this.count;r<=t&&(this.destination.next(e),r===t&&(this.destination.complete(),this.unsubscribe()))},t}(o.Subscriber)},34676(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571),a=r(79035),s=r(18686);t.takeLast=function(e){return function(t){return 0===e?s.empty():t.lift(new l(e))}};var l=function(){function e(e){if(this.total=e,this.total<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.total))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.ring=[],n.count=0,n}return i(t,e),t.prototype._next=function(e){var t=this.ring,r=this.total,n=this.count++;t.length<r?t.push(e):t[n%r]=e},t.prototype._complete=function(){var e=this.destination,t=this.count;if(t>0)for(var r=this.count>=this.total?this.total:this.count,n=this.ring,i=0;i<r;i++){var o=t++%r;e.next(n[o])}e.complete()},t}(o.Subscriber)},81746(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(61065);t.takeUntil=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var r=new s(e),n=o.innerSubscribe(this.notifier,new o.SimpleInnerSubscriber(r));return n&&!r.seenValue?(r.add(n),t.subscribe(r)):r},e}(),s=function(e){function t(t){var r=e.call(this,t)||this;return r.seenValue=!1,r}return i(t,e),t.prototype.notifyNext=function(){this.seenValue=!0,this.complete()},t.prototype.notifyComplete=function(){},t}(o.SimpleOuterSubscriber)},62359(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571);t.takeWhile=function(e,t){return void 0===t&&(t=!1),function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.predicate=e,this.inclusive=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.inclusive))},e}(),s=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.predicate=r,i.inclusive=n,i.index=0,i}return i(t,e),t.prototype._next=function(e){var t,r=this.destination;try{t=this.predicate(e,this.index++)}catch(e){r.error(e);return}this.nextOrComplete(e,t)},t.prototype.nextOrComplete=function(e,t){var r=this.destination;t?r.next(e):(this.inclusive&&r.next(e),r.complete())},t}(o.Subscriber)},5282(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571),a=r(94268),s=r(140);t.tap=function(e,t,r){return function(n){return n.lift(new l(e,t,r))}};var l=function(){function e(e,t,r){this.nextOrObserver=e,this.error=t,this.complete=r}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.nextOrObserver,this.error,this.complete))},e}(),u=function(e){function t(t,r,n,i){var o=e.call(this,t)||this;return o._tapNext=a.noop,o._tapError=a.noop,o._tapComplete=a.noop,o._tapError=n||a.noop,o._tapComplete=i||a.noop,s.isFunction(r)?(o._context=o,o._tapNext=r):r&&(o._context=r,o._tapNext=r.next||a.noop,o._tapError=r.error||a.noop,o._tapComplete=r.complete||a.noop),o}return i(t,e),t.prototype._next=function(e){try{this._tapNext.call(this._context,e)}catch(e){this.destination.error(e);return}this.destination.next(e)},t.prototype._error=function(e){try{this._tapError.call(this._context,e)}catch(e){this.destination.error(e);return}this.destination.error(e)},t.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(e){this.destination.error(e);return}return this.destination.complete()},t}(o.Subscriber)},23383(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(61065);t.defaultThrottleConfig={leading:!0,trailing:!1},t.throttle=function(e,r){return void 0===r&&(r=t.defaultThrottleConfig),function(t){return t.lift(new a(e,!!r.leading,!!r.trailing))}};var a=function(){function e(e,t,r){this.durationSelector=e,this.leading=t,this.trailing=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.durationSelector,this.leading,this.trailing))},e}(),s=function(e){function t(t,r,n,i){var o=e.call(this,t)||this;return o.destination=t,o.durationSelector=r,o._leading=n,o._trailing=i,o._hasValue=!1,o}return i(t,e),t.prototype._next=function(e){this._hasValue=!0,this._sendValue=e,this._throttled||(this._leading?this.send():this.throttle(e))},t.prototype.send=function(){var e=this._hasValue,t=this._sendValue;e&&(this.destination.next(t),this.throttle(t)),this._hasValue=!1,this._sendValue=void 0},t.prototype.throttle=function(e){var t=this.tryDurationSelector(e);t&&this.add(this._throttled=o.innerSubscribe(t,new o.SimpleInnerSubscriber(this)))},t.prototype.tryDurationSelector=function(e){try{return this.durationSelector(e)}catch(e){return this.destination.error(e),null}},t.prototype.throttlingDone=function(){var e=this._throttled,t=this._trailing;e&&e.unsubscribe(),this._throttled=void 0,t&&this.send()},t.prototype.notifyNext=function(){this.throttlingDone()},t.prototype.notifyComplete=function(){this.throttlingDone()},t}(o.SimpleOuterSubscriber)},54706(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571),a=r(32115),s=r(23383);t.throttleTime=function(e,t,r){return void 0===t&&(t=a.async),void 0===r&&(r=s.defaultThrottleConfig),function(n){return n.lift(new l(e,t,r.leading,r.trailing))}};var l=function(){function e(e,t,r,n){this.duration=e,this.scheduler=t,this.leading=r,this.trailing=n}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.duration,this.scheduler,this.leading,this.trailing))},e}(),u=function(e){function t(t,r,n,i,o){var a=e.call(this,t)||this;return a.duration=r,a.scheduler=n,a.leading=i,a.trailing=o,a._hasTrailingValue=!1,a._trailingValue=null,a}return i(t,e),t.prototype._next=function(e){this.throttled?this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(c,this.duration,{subscriber:this})),this.leading?this.destination.next(e):this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0))},t.prototype._complete=function(){this._hasTrailingValue&&this.destination.next(this._trailingValue),this.destination.complete()},t.prototype.clearThrottle=function(){var e=this.throttled;e&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),e.unsubscribe(),this.remove(e),this.throttled=null)},t}(o.Subscriber);function c(e){e.subscriber.clearThrottle()}},68431(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(69025),a=r(49571);t.throwIfEmpty=function(e){return void 0===e&&(e=u),function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.errorFactory=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.errorFactory))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.errorFactory=r,n.hasValue=!1,n}return i(t,e),t.prototype._next=function(e){this.hasValue=!0,this.destination.next(e)},t.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var e=void 0;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)},t}(a.Subscriber);function u(){return new o.EmptyError}},96807(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(32115),i=r(42494),o=r(11431),a=r(96525);t.timeInterval=function(e){return void 0===e&&(e=n.async),function(t){return o.defer(function(){return t.pipe(i.scan(function(t,r){var n=t.current;return{value:r,current:e.now(),last:n}},{current:e.now(),value:void 0,last:void 0}),a.map(function(e){var t=e.current,r=e.last;return new s(e.value,t-r)}))})}};var s=function(e,t){this.value=e,this.interval=t};t.TimeInterval=s},10900(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(32115),i=r(58207),o=r(63612),a=r(669);t.timeout=function(e,t){return void 0===t&&(t=n.async),o.timeoutWith(e,a.throwError(new i.TimeoutError),t)}},63612(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(32115),a=r(81416),s=r(61065);t.timeoutWith=function(e,t,r){return void 0===r&&(r=o.async),function(n){var i=a.isDate(e),o=i?e-r.now():Math.abs(e);return n.lift(new l(o,i,t,r))}};var l=function(){function e(e,t,r,n){this.waitFor=e,this.absoluteTimeout=t,this.withObservable=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},e}(),u=function(e){function t(t,r,n,i,o){var a=e.call(this,t)||this;return a.absoluteTimeout=r,a.waitFor=n,a.withObservable=i,a.scheduler=o,a.scheduleTimeout(),a}return i(t,e),t.dispatchTimeout=function(e){var t=e.withObservable;e._unsubscribeAndRecycle(),e.add(s.innerSubscribe(t,new s.SimpleInnerSubscriber(e)))},t.prototype.scheduleTimeout=function(){var e=this.action;e?this.action=e.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(t.dispatchTimeout,this.waitFor,this))},t.prototype._next=function(t){this.absoluteTimeout||this.scheduleTimeout(),e.prototype._next.call(this,t)},t.prototype._unsubscribe=function(){this.action=void 0,this.scheduler=null,this.withObservable=null},t}(s.SimpleOuterSubscriber)},18219(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(32115),i=r(96525);t.timestamp=function(e){return void 0===e&&(e=n.async),i.map(function(t){return new o(t,e.now())})};var o=function(e,t){this.value=e,this.timestamp=t};t.Timestamp=o},4385(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(23109);function i(e,t,r){return 0===r?[t]:(e.push(t),e)}t.toArray=function(){return n.reduce(i,[])}},68751(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(50185),a=r(61065);t.window=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.windowBoundaries=e}return e.prototype.call=function(e,t){var r=new l(e),n=t.subscribe(r);return n.closed||r.add(a.innerSubscribe(this.windowBoundaries,new a.SimpleInnerSubscriber(r))),n},e}(),l=function(e){function t(t){var r=e.call(this,t)||this;return r.window=new o.Subject,t.next(r.window),r}return i(t,e),t.prototype.notifyNext=function(){this.openWindow()},t.prototype.notifyError=function(e){this._error(e)},t.prototype.notifyComplete=function(){this._complete()},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e)},t.prototype._complete=function(){this.window.complete(),this.destination.complete()},t.prototype._unsubscribe=function(){this.window=null},t.prototype.openWindow=function(){var e=this.window;e&&e.complete();var t=this.destination,r=this.window=new o.Subject;t.next(r)},t}(a.SimpleOuterSubscriber)},4548(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(49571),a=r(50185);t.windowCount=function(e,t){return void 0===t&&(t=0),function(r){return r.lift(new s(e,t))}};var s=function(){function e(e,t){this.windowSize=e,this.startWindowEvery=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.windowSize,this.startWindowEvery))},e}(),l=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.destination=t,i.windowSize=r,i.startWindowEvery=n,i.windows=[new a.Subject],i.count=0,t.next(i.windows[0]),i}return i(t,e),t.prototype._next=function(e){for(var t=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,r=this.destination,n=this.windowSize,i=this.windows,o=i.length,s=0;s<o&&!this.closed;s++)i[s].next(e);var l=this.count-n+1;if(l>=0&&l%t==0&&!this.closed&&i.shift().complete(),++this.count%t==0&&!this.closed){var u=new a.Subject;i.push(u),r.next(u)}},t.prototype._error=function(e){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().complete();this.destination.complete()},t.prototype._unsubscribe=function(){this.count=0,this.windows=null},t}(o.Subscriber)},36266(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(50185),a=r(32115),s=r(49571),l=r(86957),u=r(60571);t.windowTime=function(e){var t=a.async,r=null,n=1/0;return u.isScheduler(arguments[3])&&(t=arguments[3]),u.isScheduler(arguments[2])?t=arguments[2]:l.isNumeric(arguments[2])&&(n=Number(arguments[2])),u.isScheduler(arguments[1])?t=arguments[1]:l.isNumeric(arguments[1])&&(r=Number(arguments[1])),function(i){return i.lift(new c(e,r,n,t))}};var c=function(){function e(e,t,r,n){this.windowTimeSpan=e,this.windowCreationInterval=t,this.maxWindowSize=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new f(e,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},e}(),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._numberOfNextedValues=0,t}return i(t,e),t.prototype.next=function(t){this._numberOfNextedValues++,e.prototype.next.call(this,t)},Object.defineProperty(t.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),t}(o.Subject),f=function(e){function t(t,r,n,i,o){var a=e.call(this,t)||this;a.destination=t,a.windowTimeSpan=r,a.windowCreationInterval=n,a.maxWindowSize=i,a.scheduler=o,a.windows=[];var s=a.openWindow();return null!==n&&n>=0?(a.add(o.schedule(m,r,{subscriber:a,window:s,context:null})),a.add(o.schedule(h,n,{windowTimeSpan:r,windowCreationInterval:n,subscriber:a,scheduler:o}))):a.add(o.schedule(p,r,{subscriber:a,window:s,windowTimeSpan:r})),a}return i(t,e),t.prototype._next=function(e){for(var t=this.windows,r=t.length,n=0;n<r;n++){var i=t[n];!i.closed&&(i.next(e),i.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(i))}},t.prototype._error=function(e){for(var t=this.windows;t.length>0;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){for(var e=this.windows;e.length>0;){var t=e.shift();t.closed||t.complete()}this.destination.complete()},t.prototype.openWindow=function(){var e=new d;return this.windows.push(e),this.destination.next(e),e},t.prototype.closeWindow=function(e){e.complete();var t=this.windows;t.splice(t.indexOf(e),1)},t}(s.Subscriber);function p(e){var t=e.subscriber,r=e.windowTimeSpan,n=e.window;n&&t.closeWindow(n),e.window=t.openWindow(),this.schedule(e,r)}function h(e){var t=e.windowTimeSpan,r=e.subscriber,n=e.scheduler,i=e.windowCreationInterval,o=r.openWindow(),a={action:this,subscription:null};a.subscription=n.schedule(m,t,{subscriber:r,window:o,context:a}),this.add(a.subscription),this.schedule(e,i)}function m(e){var t=e.subscriber,r=e.window,n=e.context;n&&n.action&&n.subscription&&n.action.remove(n.subscription),t.closeWindow(r)}},9411(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(50185),a=r(22572),s=r(58748),l=r(69238);t.windowToggle=function(e,t){return function(r){return r.lift(new u(e,t))}};var u=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.openings,this.closingSelector))},e}(),c=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.openings=r,i.closingSelector=n,i.contexts=[],i.add(i.openSubscription=l.subscribeToResult(i,r,r)),i}return i(t,e),t.prototype._next=function(e){var t=this.contexts;if(t)for(var r=t.length,n=0;n<r;n++)t[n].window.next(e)},t.prototype._error=function(t){var r=this.contexts;if(this.contexts=null,r)for(var n=r.length,i=-1;++i<n;){var o=r[i];o.window.error(t),o.subscription.unsubscribe()}e.prototype._error.call(this,t)},t.prototype._complete=function(){var t=this.contexts;if(this.contexts=null,t)for(var r=t.length,n=-1;++n<r;){var i=t[n];i.window.complete(),i.subscription.unsubscribe()}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.contexts;if(this.contexts=null,e)for(var t=e.length,r=-1;++r<t;){var n=e[r];n.window.unsubscribe(),n.subscription.unsubscribe()}},t.prototype.notifyNext=function(e,t,r,n,i){if(e===this.openings){var s=void 0;try{s=(0,this.closingSelector)(t)}catch(e){return this.error(e)}var u=new o.Subject,c=new a.Subscription,d={window:u,subscription:c};this.contexts.push(d);var f=l.subscribeToResult(this,s,d);f.closed?this.closeWindow(this.contexts.length-1):(f.context=d,c.add(f)),this.destination.next(u)}else this.closeWindow(this.contexts.indexOf(e))},t.prototype.notifyError=function(e){this.error(e)},t.prototype.notifyComplete=function(e){e!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(e.context))},t.prototype.closeWindow=function(e){if(-1!==e){var t=this.contexts,r=t[e],n=r.window,i=r.subscription;t.splice(e,1),n.complete(),i.unsubscribe()}},t}(s.OuterSubscriber)},92687(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(50185),a=r(58748),s=r(69238);t.windowWhen=function(e){return function(t){return t.lift(new l(e))}};var l=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.closingSelector))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.destination=t,n.closingSelector=r,n.openWindow(),n}return i(t,e),t.prototype.notifyNext=function(e,t,r,n,i){this.openWindow(i)},t.prototype.notifyError=function(e){this._error(e)},t.prototype.notifyComplete=function(e){this.openWindow(e)},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e),this.unsubscribeClosingNotification()},t.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},t.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},t.prototype.openWindow=function(e){void 0===e&&(e=null),e&&(this.remove(e),e.unsubscribe());var t,r=this.window;r&&r.complete();var n=this.window=new o.Subject;this.destination.next(n);try{t=(0,this.closingSelector)()}catch(e){this.destination.error(e),this.window.error(e);return}this.add(this.closingNotification=s.subscribeToResult(this,t))},t}(a.OuterSubscriber)},7864(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(58748),a=r(69238);t.withLatestFrom=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var r;return"function"==typeof e[e.length-1]&&(r=e.pop()),t.lift(new s(e,r))}};var s=function(){function e(e,t){this.observables=e,this.project=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.observables,this.project))},e}(),l=function(e){function t(t,r,n){var i=e.call(this,t)||this;i.observables=r,i.project=n,i.toRespond=[];var o=r.length;i.values=Array(o);for(var s=0;s<o;s++)i.toRespond.push(s);for(var s=0;s<o;s++){var l=r[s];i.add(a.subscribeToResult(i,l,void 0,s))}return i}return i(t,e),t.prototype.notifyNext=function(e,t,r){this.values[r]=t;var n=this.toRespond;if(n.length>0){var i=n.indexOf(r);-1!==i&&n.splice(i,1)}},t.prototype.notifyComplete=function(){},t.prototype._next=function(e){if(0===this.toRespond.length){var t=[e].concat(this.values);this.project?this._tryProject(t):this.destination.next(t)}},t.prototype._tryProject=function(e){var t;try{t=this.project.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(o.OuterSubscriber)},95e3(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(18848);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(n.zip.apply(void 0,[t].concat(e)))}}},49097(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(18848);t.zipAll=function(e){return function(t){return t.lift(new n.ZipOperator(e))}}},21691(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(62256),i=r(22572);t.scheduleArray=function(e,t){return new n.Observable(function(r){var n=new i.Subscription,o=0;return n.add(t.schedule(function(){o===e.length?r.complete():(r.next(e[o++]),r.closed||n.add(this.schedule()))})),n})}},23174(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(62256),i=r(22572),o=r(12238);t.scheduleIterable=function(e,t){if(!e)throw Error("Iterable cannot be null");return new n.Observable(function(r){var n,a=new i.Subscription;return a.add(function(){n&&"function"==typeof n.return&&n.return()}),a.add(t.schedule(function(){n=e[o.iterator](),a.add(t.schedule(function(){if(!r.closed){try{var e,t,i=n.next();e=i.value,t=i.done}catch(e){r.error(e);return}t?r.complete():(r.next(e),this.schedule())}}))})),a})}},11109(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(62256),i=r(22572),o=r(19469);t.scheduleObservable=function(e,t){return new n.Observable(function(r){var n=new i.Subscription;return n.add(t.schedule(function(){var i=e[o.observable]();n.add(i.subscribe({next:function(e){n.add(t.schedule(function(){return r.next(e)}))},error:function(e){n.add(t.schedule(function(){return r.error(e)}))},complete:function(){n.add(t.schedule(function(){return r.complete()}))}}))})),n})}},44723(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(62256),i=r(22572);t.schedulePromise=function(e,t){return new n.Observable(function(r){var n=new i.Subscription;return n.add(t.schedule(function(){return e.then(function(e){n.add(t.schedule(function(){r.next(e),n.add(t.schedule(function(){return r.complete()}))}))},function(e){n.add(t.schedule(function(){return r.error(e)}))})})),n})}},53034(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(11109),i=r(44723),o=r(21691),a=r(23174),s=r(39378),l=r(40083),u=r(22916),c=r(76006);t.scheduled=function(e,t){if(null!=e){if(s.isInteropObservable(e))return n.scheduleObservable(e,t);else if(l.isPromise(e))return i.schedulePromise(e,t);else if(u.isArrayLike(e))return o.scheduleArray(e,t);else if(c.isIterable(e)||"string"==typeof e)return a.scheduleIterable(e,t)}throw TypeError((null!==e&&typeof e||e)+" is not observable")}},91165(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Action=function(e){function t(t,r){return e.call(this)||this}return i(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(r(22572).Subscription)},63568(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(19387);t.AsapAction=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return i(t,e),t.prototype.requestAsyncId=function(t,r,n){return(void 0===n&&(n=0),null!==n&&n>0)?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t.scheduled||(t.scheduled=o.Immediate.setImmediate(t.flush.bind(t,null))))},t.prototype.recycleAsyncId=function(t,r,n){if(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);0===t.actions.length&&(o.Immediate.clearImmediate(r),t.scheduled=void 0)},t}(r(27697).AsyncAction)},64017(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapScheduler=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,r=this.actions,n=-1,i=r.length;e=e||r.shift();do if(t=e.execute(e.state,e.delay))break;while(++n<i&&(e=r.shift()));if(this.active=!1,t){for(;++n<i&&(e=r.shift());)e.unsubscribe();throw t}},t}(r(80866).AsyncScheduler)},27697(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAction=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n.pending=!1,n}return i(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,n=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(n,r,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(n,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),setInterval(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!==r&&this.delay===r&&!1===this.pending)return t;clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var r=!1,n=void 0;try{this.work(e)}catch(e){r=!0,n=!!e&&e||Error(e)}if(r)return this.unsubscribe(),n},t.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,r=t.actions,n=r.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==n&&r.splice(n,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null},t}(r(91165).Action)},80866(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(96548);t.AsyncScheduler=function(e){function t(r,n){void 0===n&&(n=o.Scheduler.now);var i=e.call(this,r,function(){return t.delegate&&t.delegate!==i?t.delegate.now():n()})||this;return i.actions=[],i.active=!1,i.scheduled=void 0,i}return i(t,e),t.prototype.schedule=function(r,n,i){return(void 0===n&&(n=0),t.delegate&&t.delegate!==this)?t.delegate.schedule(r,n,i):e.prototype.schedule.call(this,r,n,i)},t.prototype.flush=function(e){var t,r=this.actions;if(this.active)return void r.push(e);this.active=!0;do if(t=e.execute(e.state,e.delay))break;while(e=r.shift());if(this.active=!1,t){for(;e=r.shift();)e.unsubscribe();throw t}},t}(o.Scheduler)},57390(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueAction=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return i(t,e),t.prototype.schedule=function(t,r){return(void 0===r&&(r=0),r>0)?e.prototype.schedule.call(this,t,r):(this.delay=r,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,r){return r>0||this.closed?e.prototype.execute.call(this,t,r):this._execute(t,r)},t.prototype.requestAsyncId=function(t,r,n){return(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)?e.prototype.requestAsyncId.call(this,t,r,n):t.flush(this)},t}(r(27697).AsyncAction)},23323(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueScheduler=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(r(80866).AsyncScheduler)},81930(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(63568);t.asapScheduler=new(r(64017)).AsapScheduler(n.AsapAction),t.asap=t.asapScheduler},32115(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(27697);t.asyncScheduler=new(r(80866)).AsyncScheduler(n.AsyncAction),t.async=t.asyncScheduler},99468(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(57390);t.queueScheduler=new(r(23323)).QueueScheduler(n.QueueAction),t.queue=t.queueScheduler},12238(e,t){"use strict";function r(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(t,"__esModule",{value:!0}),t.getSymbolIterator=r,t.iterator=r(),t.$$iterator=t.iterator},19469(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},55336(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rxSubscriber="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),t.$$rxSubscriber=t.rxSubscriber},79035(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArgumentOutOfRangeError=function(){function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e}()},69025(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyError=function(){function e(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return e.prototype=Object.create(Error.prototype),e}()},19387(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=1,n=Promise.resolve(),i={};function o(e){return e in i&&(delete i[e],!0)}t.Immediate={setImmediate:function(e){var t=r++;return i[t]=!0,n.then(function(){return o(t)&&e()}),t},clearImmediate:function(e){o(e)}},t.TestTools={pending:function(){return Object.keys(i).length}}},60944(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUnsubscribedError=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}()},58207(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeoutError=function(){function e(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return e.prototype=Object.create(Error.prototype),e}()},29042(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsubscriptionError=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}()},46694(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(49571);t.canReportError=function(e){for(;e;){var t=e,r=t.closed,i=t.destination,o=t.isStopped;if(r||o)return!1;e=i&&i instanceof n.Subscriber?i:null}return!0}},34216(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hostReportError=function(e){setTimeout(function(){throw e},0)}},99790(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.identity=function(e){return e}},61691(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArray=Array.isArray||function(e){return e&&"number"==typeof e.length}},22916(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},81416(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDate=function(e){return e instanceof Date&&!isNaN(+e)}},140(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=function(e){return"function"==typeof e}},39378(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(19469);t.isInteropObservable=function(e){return e&&"function"==typeof e[n.observable]}},76006(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(12238);t.isIterable=function(e){return e&&"function"==typeof e[n.iterator]}},86957(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(61691);t.isNumeric=function(e){return!n.isArray(e)&&e-parseFloat(e)+1>=0}},63995(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=function(e){return null!==e&&"object"==typeof e}},40083(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=function(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}},60571(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isScheduler=function(e){return e&&"function"==typeof e.schedule}},94268(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=function(){}},49587(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.not=function(e,t){function r(){return!r.pred.apply(r.thisArg,arguments)}return r.pred=e,r.thisArg=t,r}},13308(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(99790);function i(e){return 0===e.length?n.identity:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}t.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i(e)},t.pipeFromArray=i},85891(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(24658),i=r(9526),o=r(18537),a=r(54606),s=r(22916),l=r(40083),u=r(63995),c=r(12238),d=r(19469);t.subscribeTo=function(e){if(e&&"function"==typeof e[d.observable])return a.subscribeToObservable(e);if(s.isArrayLike(e))return n.subscribeToArray(e);if(l.isPromise(e))return i.subscribeToPromise(e);if(e&&"function"==typeof e[c.iterator])return o.subscribeToIterable(e);throw TypeError("You provided "+(u.isObject(e)?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},24658(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.subscribeToArray=function(e){return function(t){for(var r=0,n=e.length;r<n&&!t.closed;r++)t.next(e[r]);t.complete()}}},18537(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(12238);t.subscribeToIterable=function(e){return function(t){for(var r=e[n.iterator]();;){var i=void 0;try{i=r.next()}catch(e){return t.error(e),t}if(i.done){t.complete();break}if(t.next(i.value),t.closed)break}return"function"==typeof r.return&&t.add(function(){r.return&&r.return()}),t}}},54606(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(19469);t.subscribeToObservable=function(e){return function(t){var r=e[n.observable]();if("function"==typeof r.subscribe)return r.subscribe(t);throw TypeError("Provided object does not correctly implement Symbol.observable")}}},9526(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(34216);t.subscribeToPromise=function(e){return function(t){return e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,n.hostReportError),t}}},69238(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(87251),i=r(85891),o=r(62256);t.subscribeToResult=function(e,t,r,a,s){if(void 0===s&&(s=new n.InnerSubscriber(e,r,a)),!s.closed)return t instanceof o.Observable?t.subscribe(s):i.subscribeTo(t)(s)}},45591(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(49571),i=r(55336),o=r(19059);t.toSubscriber=function(e,t,r){if(e){if(e instanceof n.Subscriber)return e;if(e[i.rxSubscriber])return e[i.rxSubscriber]()}return e||t||r?new n.Subscriber(e,t,r):new n.Subscriber(o.empty)}},55841(e,t,r){"use strict";r(43976).audit,r(41957).auditTime,r(2505).buffer,r(11062).bufferCount,r(68188).bufferTime,r(54945).bufferToggle,r(19089).bufferWhen,r(12928).catchError,r(61947).combineAll,r(65689).combineLatest,r(13379).concat,r(52012).concatAll,r(66005).concatMap,r(81476).concatMapTo,r(61720).count,r(56308).debounce,r(54009).debounceTime,r(86564).defaultIfEmpty,r(39928).delay,r(89956).delayWhen,r(51135).dematerialize,r(89643).distinct,r(72479).distinctUntilChanged,r(49794).distinctUntilKeyChanged,r(81786).elementAt,r(85870).endWith,r(49860).every,r(12801).exhaust,r(28207).exhaustMap,r(99251).expand,r(6017).filter,r(47577).finalize,r(32348).find,r(25334).findIndex,r(69541).first,r(89333).groupBy,r(66172).ignoreElements,r(66542).isEmpty,r(21195).last,t.map=r(96525).map,r(64780).mapTo,r(56230).materialize,r(85285).max,r(48655).merge,r(70096).mergeAll;var n=r(47953);n.mergeMap,n.flatMap,r(26624).mergeMapTo,r(9194).mergeScan,r(30447).min,r(66805).multicast,r(93186).observeOn,r(87048).onErrorResumeNext,r(54071).pairwise,r(27517).partition,r(94182).pluck,r(78092).publish,r(65066).publishBehavior,r(70876).publishLast,r(6135).publishReplay,r(24914).race,r(23109).reduce,r(40312).repeat,r(35332).repeatWhen,r(44017).retry,r(51033).retryWhen,r(91919).refCount,r(24817).sample,r(39716).sampleTime,r(42494).scan,r(10064).sequenceEqual,r(11340).share,r(41655).shareReplay,r(13727).single,r(63776).skip,r(5872).skipLast,r(36934).skipUntil,r(45507).skipWhile,r(52295).startWith,r(2678).subscribeOn,r(17024).switchAll,r(54081).switchMap,r(73648).switchMapTo,t.take=r(80788).take,r(34676).takeLast,r(81746).takeUntil,r(62359).takeWhile,r(5282).tap,r(23383).throttle,r(54706).throttleTime,r(68431).throwIfEmpty,r(96807).timeInterval,r(10900).timeout,r(63612).timeoutWith,r(18219).timestamp,r(4385).toArray,r(68751).window,r(4548).windowCount,r(36266).windowTime,r(9411).windowToggle,r(92687).windowWhen,r(7864).withLatestFrom,r(95e3).zip,r(49097).zipAll},68081(e,t,r){"use strict";let n=Symbol("SemVer ANY");class i{static get ANY(){return n}constructor(e,t){if(t=o(t),e instanceof i)if(!!t.loose===e.loose)return e;else e=e.value;u("comparator",e=e.trim().split(/\s+/).join(" "),t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){let t=this.options.loose?a[s.COMPARATORLOOSE]:a[s.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof i))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=o(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=i;let o=r(17538),{safeRe:a,t:s}=r(33557),l=r(60280),u=r(99949),c=r(42345),d=r(21240)},21240(e,t,r){"use strict";let n=/\s+/g;class i{constructor(e,t){if(t=a(t),e instanceof i)if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;else return new i(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=>!v(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&&g(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&m)|(this.options.loose&&y))+":"+e,r=o.get(t);if(r)return r;let n=this.options.loose,i=n?c[d.HYPHENRANGELOOSE]:c[d.HYPHENRANGE];l("hyphen replace",e=e.replace(i,k(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],h));let a=e.split(" ").map(e=>w(e,this.options)).join(" ").split(/\s+/).map(e=>j(e,this.options));n&&(a=a.filter(e=>(l("loose invalid filter",e,this.options),!!e.match(c[d.COMPARATORLOOSE])))),l("range list",a);let u=new Map;for(let e of a.map(e=>new s(e,this.options))){if(v(e))return[e];u.set(e.value,e)}u.size>1&&u.has("")&&u.delete("");let g=[...u.values()];return o.set(t,g),g}intersects(e,t){if(!(e instanceof i))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=i;let o=new(r(76181)),a=r(17538),s=r(68081),l=r(99949),u=r(42345),{safeRe:c,t:d,comparatorTrimReplace:f,tildeTrimReplace:p,caretTrimReplace:h}=r(33557),{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:y}=r(7371),v=e=>"<0.0.0-0"===e.value,g=e=>""===e.value,b=(e,t)=>{let r=!0,n=e.slice(),i=n.pop();for(;r&&n.length;)r=n.every(e=>i.intersects(e,t)),i=n.pop();return r},w=(e,t)=>(l("comp",e=e.replace(c[d.BUILD],""),t),l("caret",e=D(e,t)),l("tildes",e=E(e,t)),l("xrange",e=P(e,t)),l("stars",e=A(e,t)),e),x=e=>!e||"x"===e.toLowerCase()||"*"===e,E=(e,t)=>e.trim().split(/\s+/).map(e=>S(e,t)).join(" "),S=(e,t)=>{let r=t.loose?c[d.TILDELOOSE]:c[d.TILDE];return e.replace(r,(t,r,n,i,o)=>{let a;return l("tilde",e,t,r,n,i,o),x(r)?a="":x(n)?a=`>=${r}.0.0 <${+r+1}.0.0-0`:x(i)?a=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:o?(l("replaceTilde pr",o),a=`>=${r}.${n}.${i}-${o} <${r}.${+n+1}.0-0`):a=`>=${r}.${n}.${i} <${r}.${+n+1}.0-0`,l("tilde return",a),a})},D=(e,t)=>e.trim().split(/\s+/).map(e=>O(e,t)).join(" "),O=(e,t)=>{l("caret",e,t);let r=t.loose?c[d.CARETLOOSE]:c[d.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(t,r,i,o,a)=>{let s;return l("caret",e,t,r,i,o,a),x(r)?s="":x(i)?s=`>=${r}.0.0${n} <${+r+1}.0.0-0`:x(o)?s="0"===r?`>=${r}.${i}.0${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.0${n} <${+r+1}.0.0-0`:a?(l("replaceCaret pr",a),s="0"===r?"0"===i?`>=${r}.${i}.${o}-${a} <${r}.${i}.${+o+1}-0`:`>=${r}.${i}.${o}-${a} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${o}-${a} <${+r+1}.0.0-0`):(l("no pr"),s="0"===r?"0"===i?`>=${r}.${i}.${o}${n} <${r}.${i}.${+o+1}-0`:`>=${r}.${i}.${o}${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${o} <${+r+1}.0.0-0`),l("caret return",s),s})},P=(e,t)=>(l("replaceXRanges",e,t),e.split(/\s+/).map(e=>C(e,t)).join(" ")),C=(e,t)=>{e=e.trim();let r=t.loose?c[d.XRANGELOOSE]:c[d.XRANGE];return e.replace(r,(r,n,i,o,a,s)=>{l("xRange",e,r,n,i,o,a,s);let u=x(i),c=u||x(o),d=c||x(a);return"="===n&&d&&(n=""),s=t.includePrerelease?"-0":"",u?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&d?(c&&(o=0),a=0,">"===n?(n=">=",c?(i=+i+1,o=0):o=+o+1,a=0):"<="===n&&(n="<",c?i=+i+1:o=+o+1),"<"===n&&(s="-0"),r=`${n+i}.${o}.${a}${s}`):c?r=`>=${i}.0.0${s} <${+i+1}.0.0-0`:d&&(r=`>=${i}.${o}.0${s} <${i}.${+o+1}.0-0`),l("xRange return",r),r})},A=(e,t)=>(l("replaceStars",e,t),e.trim().replace(c[d.STAR],"")),j=(e,t)=>(l("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?d.GTE0PRE:d.GTE0],"")),k=e=>(t,r,n,i,o,a,s,l,u,c,d,f)=>(r=x(n)?"":x(i)?`>=${n}.0.0${e?"-0":""}`:x(o)?`>=${n}.${i}.0${e?"-0":""}`:a?`>=${r}`:`>=${r}${e?"-0":""}`,l=x(u)?"":x(c)?`<${+u+1}.0.0-0`:x(d)?`<${u}.${+c+1}.0-0`: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}},42345(e,t,r){"use strict";let n=r(99949),{MAX_LENGTH:i,MAX_SAFE_INTEGER:o}=r(7371),{safeRe:a,t:s}=r(33557),l=r(17538),{compareIdentifiers:u}=r(48506);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>i)throw TypeError(`version is longer than ${i} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?a[s.LOOSE]:a[s.FULL]);if(!r)throw TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>o||this.major<0)throw TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>o||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<o)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],i=e.prerelease[t];if(n("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return -1;else if(r===i)continue;else return u(r,i)}while(++t)}compareBuild(e){e instanceof c||(e=new c(e,this.options));let t=0;do{let r=this.build[t],i=e.build[t];if(n("build compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return -1;else if(r===i)continue;else return u(r,i)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&!1===r)throw Error("invalid increment argument: identifier is empty");if(t){let e=`-${t}`.match(this.options.loose?a[s.PRERELEASELOOSE]:a[s.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"release":if(0===this.prerelease.length)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(0!==this.minor||0!==this.patch||0===this.prerelease.length)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(0!==this.patch||0===this.prerelease.length)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{let e=+!!Number(r);if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===u(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=c},61677(e,t,r){"use strict";let n=r(68311);e.exports=(e,t)=>{let r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},60280(e,t,r){"use strict";let n=r(64012),i=r(43592),o=r(82517),a=r(80166),s=r(13842),l=r(73403);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 i(e,r,u);case">":return o(e,r,u);case">=":return a(e,r,u);case"<":return s(e,r,u);case"<=":return l(e,r,u);default:throw TypeError(`Invalid operator: ${t}`)}}},83499(e,t,r){"use strict";let n=r(42345),i=r(68311),{safeRe:o,t:a}=r(33557);e.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let n,i=t.includePrerelease?o[a.COERCERTLFULL]:o[a.COERCERTL];for(;(n=i.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&n.index+n[0].length===r.index+r[0].length||(r=n),i.lastIndex=n.index+n[1].length+n[2].length;i.lastIndex=-1}else r=e.match(t.includePrerelease?o[a.COERCEFULL]:o[a.COERCE]);if(null===r)return null;let s=r[2],l=r[3]||"0",u=r[4]||"0",c=t.includePrerelease&&r[5]?`-${r[5]}`:"",d=t.includePrerelease&&r[6]?`+${r[6]}`:"";return i(`${s}.${l}.${u}${c}${d}`,t)}},57214(e,t,r){"use strict";let n=r(42345);e.exports=(e,t,r)=>{let i=new n(e,r),o=new n(t,r);return i.compare(o)||i.compareBuild(o)}},14368(e,t,r){"use strict";let n=r(38111);e.exports=(e,t)=>n(e,t,!0)},38111(e,t,r){"use strict";let n=r(42345);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},88673(e,t,r){"use strict";let n=r(68311);e.exports=(e,t)=>{let r=n(e,null,!0),i=n(t,null,!0),o=r.compare(i);if(0===o)return null;let a=o>0,s=a?r:i,l=a?i:r,u=!!s.prerelease.length;if(l.prerelease.length&&!u){if(!l.patch&&!l.minor)return"major";if(0===l.compareMain(s))return l.minor&&!l.patch?"minor":"patch"}let c=u?"pre":"";return r.major!==i.major?c+"major":r.minor!==i.minor?c+"minor":r.patch!==i.patch?c+"patch":"prerelease"}},64012(e,t,r){"use strict";let n=r(38111);e.exports=(e,t,r)=>0===n(e,t,r)},82517(e,t,r){"use strict";let n=r(38111);e.exports=(e,t,r)=>n(e,t,r)>0},80166(e,t,r){"use strict";let n=r(38111);e.exports=(e,t,r)=>n(e,t,r)>=0},98184(e,t,r){"use strict";let n=r(42345);e.exports=(e,t,r,i,o)=>{"string"==typeof r&&(o=i,i=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,i,o).version}catch(e){return null}}},13842(e,t,r){"use strict";let n=r(38111);e.exports=(e,t,r)=>0>n(e,t,r)},73403(e,t,r){"use strict";let n=r(38111);e.exports=(e,t,r)=>0>=n(e,t,r)},64921(e,t,r){"use strict";let n=r(42345);e.exports=(e,t)=>new n(e,t).major},50109(e,t,r){"use strict";let n=r(42345);e.exports=(e,t)=>new n(e,t).minor},43592(e,t,r){"use strict";let n=r(38111);e.exports=(e,t,r)=>0!==n(e,t,r)},68311(e,t,r){"use strict";let n=r(42345);e.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}},81942(e,t,r){"use strict";let n=r(42345);e.exports=(e,t)=>new n(e,t).patch},29008(e,t,r){"use strict";let n=r(68311);e.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}},93183(e,t,r){"use strict";let n=r(38111);e.exports=(e,t,r)=>n(t,e,r)},92014(e,t,r){"use strict";let n=r(57214);e.exports=(e,t)=>e.sort((e,r)=>n(r,e,t))},12225(e,t,r){"use strict";let n=r(21240);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},27502(e,t,r){"use strict";let n=r(57214);e.exports=(e,t)=>e.sort((e,r)=>n(e,r,t))},79310(e,t,r){"use strict";let n=r(68311);e.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}},60574(e,t,r){"use strict";let n=r(33557),i=r(7371),o=r(42345),a=r(48506),s=r(68311),l=r(79310),u=r(61677),c=r(98184),d=r(88673),f=r(64921),p=r(50109),h=r(81942),m=r(29008),y=r(38111),v=r(93183),g=r(14368),b=r(57214),w=r(27502),x=r(92014),E=r(82517),S=r(13842),D=r(64012),O=r(43592),P=r(80166),C=r(73403),A=r(60280),j=r(83499),k=r(68081),T=r(21240),R=r(12225),N=r(18824),I=r(93075),M=r(13113),$=r(14596),L=r(26655),F=r(25258),B=r(22406),V=r(85163),U=r(6731);e.exports={parse:s,valid:l,clean:u,inc:c,diff:d,major:f,minor:p,patch:h,prerelease:m,compare:y,rcompare:v,compareLoose:g,compareBuild:b,sort:w,rsort:x,gt:E,lt:S,eq:D,neq:O,gte:P,lte:C,cmp:A,coerce:j,Comparator:k,Range:T,satisfies:R,toComparators:N,maxSatisfying:I,minSatisfying:M,minVersion:$,validRange:L,outside:F,gtr:B,ltr:V,intersects:U,simplifyRange:r(85490),subset:r(75011),SemVer:o,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}},7371(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}},99949(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):()=>{}},48506(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),i=t.test(r);return n&&i&&(e*=1,r*=1),e===r?0:n&&!i?-1:i&&!n?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},76181(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}}},17538(e){"use strict";let t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},33557(e,t,r){"use strict";let{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:o}=r(7371),a=r(99949),s=(t=e.exports={}).re=[],l=t.safeRe=[],u=t.src=[],c=t.safeSrc=[],d=t.t={},f=0,p="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",o],[p,i]],m=(e,t,r)=>{let n=(e=>{for(let[t,r]of h)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),i=f++;a(e,i,t),d[e]=i,u[i]=t,c[i]=n,s[i]=new RegExp(t,r?"g":void 0),l[i]=new RegExp(n,r?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),m("MAINVERSION",`(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASE",`(?:-(${u[d.PRERELEASEIDENTIFIER]}(?:\\.${u[d.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${u[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[d.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${p}+`),m("BUILD",`(?:\\+(${u[d.BUILDIDENTIFIER]}(?:\\.${u[d.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${u[d.MAINVERSION]}${u[d.PRERELEASE]}?${u[d.BUILD]}?`),m("FULL",`^${u[d.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${u[d.MAINVERSIONLOOSE]}${u[d.PRERELEASELOOSE]}?${u[d.BUILD]}?`),m("LOOSE",`^${u[d.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${u[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${u[d.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:${u[d.PRERELEASE]})?${u[d.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:${u[d.PRERELEASELOOSE]})?${u[d.BUILD]}?)?)?`),m("XRANGE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),m("COERCE",`${u[d.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",u[d.COERCEPLAIN]+`(?:${u[d.PRERELEASE]})?`+`(?:${u[d.BUILD]})?`+"(?:$|[^\\d])"),m("COERCERTL",u[d.COERCE],!0),m("COERCERTLFULL",u[d.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${u[d.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",m("TILDE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${u[d.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",m("CARET",`^${u[d.LONECARET]}${u[d.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${u[d.LONECARET]}${u[d.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${u[d.GTLT]}\\s*(${u[d.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]}|${u[d.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${u[d.XRANGEPLAIN]})\\s+-\\s+(${u[d.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${u[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[d.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},22406(e,t,r){"use strict";let n=r(25258);e.exports=(e,t,r)=>n(e,t,">",r)},6731(e,t,r){"use strict";let n=r(21240);e.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))},85163(e,t,r){"use strict";let n=r(25258);e.exports=(e,t,r)=>n(e,t,"<",r)},93075(e,t,r){"use strict";let n=r(42345),i=r(21240);e.exports=(e,t,r)=>{let o=null,a=null,s=null;try{s=new i(t,r)}catch(e){return null}return e.forEach(e=>{s.test(e)&&(!o||-1===a.compare(e))&&(a=new n(o=e,r))}),o}},13113(e,t,r){"use strict";let n=r(42345),i=r(21240);e.exports=(e,t,r)=>{let o=null,a=null,s=null;try{s=new i(t,r)}catch(e){return null}return e.forEach(e=>{s.test(e)&&(!o||1===a.compare(e))&&(a=new n(o=e,r))}),o}},14596(e,t,r){"use strict";let n=r(42345),i=r(21240),o=r(82517);e.exports=(e,t)=>{e=new i(e,t);let r=new n("0.0.0");if(e.test(r)||(r=new n("0.0.0-0"),e.test(r)))return r;r=null;for(let t=0;t<e.set.length;++t){let i=e.set[t],a=null;i.forEach(e=>{let t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!a||o(t,a))&&(a=t);break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),a&&(!r||o(r,a))&&(r=a)}return r&&e.test(r)?r:null}},25258(e,t,r){"use strict";let n=r(42345),i=r(68081),{ANY:o}=i,a=r(21240),s=r(12225),l=r(82517),u=r(13842),c=r(73403),d=r(80166);e.exports=(e,t,r,f)=>{let p,h,m,y,v;switch(e=new n(e,f),t=new a(t,f),r){case">":p=l,h=c,m=u,y=">",v=">=";break;case"<":p=u,h=d,m=l,y="<",v="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,t,f))return!1;for(let r=0;r<t.set.length;++r){let n=t.set[r],a=null,s=null;if(n.forEach(e=>{e.semver===o&&(e=new i(">=0.0.0")),a=a||e,s=s||e,p(e.semver,a.semver,f)?a=e:m(e.semver,s.semver,f)&&(s=e)}),a.operator===y||a.operator===v||(!s.operator||s.operator===y)&&h(e,s.semver)||s.operator===v&&m(e,s.semver))return!1}return!0}},85490(e,t,r){"use strict";let n=r(12225),i=r(38111);e.exports=(e,t,r)=>{let o=[],a=null,s=null,l=e.sort((e,t)=>i(e,t,r));for(let e of l)n(e,t,r)?(s=e,a||(a=e)):(s&&o.push([a,s]),s=null,a=null);a&&o.push([a,null]);let u=[];for(let[e,t]of o)e===t?u.push(e):t||e!==l[0]?t?e===l[0]?u.push(`<=${t}`):u.push(`${e} - ${t}`):u.push(`>=${e}`):u.push("*");let c=u.join(" || "),d="string"==typeof t.raw?t.raw:String(t);return c.length<d.length?c:t}},75011(e,t,r){"use strict";let n=r(21240),i=r(68081),{ANY:o}=i,a=r(12225),s=r(38111),l=[new i(">=0.0.0-0")],u=[new i(">=0.0.0")],c=(e,t,r)=>{let n,i,c,p,h,m,y;if(e===t)return!0;if(1===e.length&&e[0].semver===o)if(1===t.length&&t[0].semver===o)return!0;else e=r.includePrerelease?l:u;if(1===t.length&&t[0].semver===o)if(r.includePrerelease)return!0;else t=u;let v=new Set;for(let t of e)">"===t.operator||">="===t.operator?n=d(n,t,r):"<"===t.operator||"<="===t.operator?i=f(i,t,r):v.add(t.semver);if(v.size>1)return null;if(n&&i&&((c=s(n.semver,i.semver,r))>0||0===c&&(">="!==n.operator||"<="!==i.operator)))return null;for(let e of v){if(n&&!a(e,String(n),r)||i&&!a(e,String(i),r))return null;for(let n of t)if(!a(e,String(n),r))return!1;return!0}let g=!!i&&!r.includePrerelease&&!!i.semver.prerelease.length&&i.semver,b=!!n&&!r.includePrerelease&&!!n.semver.prerelease.length&&n.semver;for(let e of(g&&1===g.prerelease.length&&"<"===i.operator&&0===g.prerelease[0]&&(g=!1),t)){if(y=y||">"===e.operator||">="===e.operator,m=m||"<"===e.operator||"<="===e.operator,n){if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),">"===e.operator||">="===e.operator){if((p=d(n,e,r))===e&&p!==n)return!1}else if(">="===n.operator&&!a(n.semver,String(e),r))return!1}if(i){if(g&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===g.major&&e.semver.minor===g.minor&&e.semver.patch===g.patch&&(g=!1),"<"===e.operator||"<="===e.operator){if((h=f(i,e,r))===e&&h!==i)return!1}else if("<="===i.operator&&!a(i.semver,String(e),r))return!1}if(!e.operator&&(i||n)&&0!==c)return!1}return(!n||!m||!!i||0===c)&&(!i||!y||!!n||0===c)&&!b&&!g&&!0},d=(e,t,r)=>{if(!e)return t;let n=s(e.semver,t.semver,r);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},f=(e,t,r)=>{if(!e)return t;let n=s(e.semver,t.semver,r);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let i=!1;e:for(let n of e.set){for(let e of t.set){let t=c(n,e,r);if(i=i||null!==t,t)continue e}if(i)return!1}return!0}},18824(e,t,r){"use strict";let n=r(21240);e.exports=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" "))},26655(e,t,r){"use strict";let n=r(21240);e.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}},60524(e,t,r){"use strict";var n=r(46925),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useState,a=n.useEffect,s=n.useLayoutEffect,l=n.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(e){return!0}}var c="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=o({inst:{value:r,getSnapshot:t}}),i=n[0].inst,c=n[1];return s(function(){i.value=r,i.getSnapshot=t,u(i)&&c({inst:i})},[e,r,t]),a(function(){return u(i)&&c({inst:i}),e(function(){u(i)&&c({inst:i})})},[e]),l(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:c},70727(e,t,r){"use strict";e.exports=r(60524)},49598(e,t,r){"use strict";let n;r.d(t,{A:()=>s});let i="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),o=new Uint8Array(16),a=[];for(let e=0;e<256;++e)a.push((e+256).toString(16).slice(1));let s=function(e,t,r){if(i&&!t&&!e)return i();let s=(e=e||{}).random||(e.rng||function(){if(!n&&!(n="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(o)})();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=s[e];return t}return function(e,t=0){return a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]}(s)}},36580(e,t,r){"use strict";r.d(t,{D3:()=>s,jj:()=>l,uA:()=>a,B4:()=>c,sM:()=>u,jX:()=>o});var n=r(61841);let i={flags:function(){let e={};for(let t of Object.keys(localStorage))if(t.startsWith("openmrs:feature-flag:")){let r=t.replace("openmrs:feature-flag:",""),n=JSON.parse(localStorage.getItem(`openmrs:feature-flag-meta:${r}`)||"{}");e[r]={enabled:"true"===localStorage.getItem(t),...n}}return e}()},o=(0,n.jf)("feature-flags",i);function a(e,t,r){o.setState(n=>({flags:{...n.flags,[e]:{enabled:n.flags[e]?.enabled??!1,label:t,description:r}}}))}function s(){let e=o.getState().flags;Object.keys(localStorage).filter(e=>e.startsWith("openmrs:feature-flag:")).forEach(t=>{let r=t.replace("openmrs:feature-flag:","");e[r]||(localStorage.removeItem(t),localStorage.removeItem(`openmrs:feature-flag-meta:${r}`))})}function l(e){return o.getState().flags[e].enabled}function u(e,t){o.subscribe(r=>{t(r.flags[e].enabled)})}function c(e,t){o.setState(r=>({flags:{...r.flags,[e]:{...r.flags[e],enabled:t}}}))}o.subscribe(e=>{for(let[t,r]of Object.entries(e.flags))localStorage.setItem(`openmrs:feature-flag:${t}`,r.enabled.toString()),localStorage.setItem(`openmrs:feature-flag-meta:${t}`,JSON.stringify({label:r.label,description:r.description}))})},3855(e,t,r){"use strict";r.d(t,{u:()=>a});var n=r(82460);let i=["red","magenta","purple","blue","teal","cyan","gray","green","warm-gray","cool-gray","high-contrast","outline"],o={primaryColor:{_type:n.ZU.String,_description:"The color for displaying primary diagnoses tags",_default:"red",_validators:[n.y$.oneOf(i)]},secondaryColor:{_type:n.ZU.String,_description:"The color for displaying secondary diagnoses tags",_default:"blue",_validators:[n.y$.oneOf(i)]}},a={"Brand color #1":{_default:"#005d5d",_type:n.ZU.String},"Brand color #2":{_default:"#004144",_type:n.ZU.String},"Brand color #3":{_default:"#007d79",_type:n.ZU.String},excludePatientIdentifierCodeTypes:{uuids:{_type:n.ZU.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:n.ZU.UUID}}},implementationName:{_type:n.ZU.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},patientPhotoConceptUuid:{_type:n.ZU.ConceptUuid,_default:"736e8771-e501-4615-bfa7-570c03f4bef5",_description:"Used to look up the patient photo, which is stored as an attachment obs. Set to `null` in order to disable the feature and use only generated avatars. To remove the avatars entirely, use extension configuration's `remove` feature."},preferredCalendar:{_type:n.ZU.Object,_description:"Keys should be locale codes, and values should be the preferred calendar for that locale. For example, {'am': 'ethiopic'}.",_default:{am:"ethiopic"},_elements:{_validators:[n.y$.oneOf(["buddhist","chinese","coptic","dangi","ethioaa","ethiopic","gregory","hebrew","indian","islamic","islamic-umalqura","islamic-tbla","islamic-civil","islamic-rgsa","iso8601","japanese","persian","roc","islamicc"])]}},preferredDateLocale:{_type:n.ZU.Object,_description:"Allows setting the locale used for date formatting for any browser locale. Does not affect time formatting. Keys should be locale codes, and values should be the preferred locale for formatting dates. For example, {'en': 'en-US', 'fr-CA': 'en-CA'}.",_default:{en:"en-GB"},_elements:{_type:n.ZU.String}},diagnosisTags:o}},47488(e,t,r){"use strict";r.d(t,{Ay:()=>c,BE:()=>u});var n=r(46925),i=r.n(n),o=r(70727),a=r(89593);let s=i().use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}),l={dedupe:!0},u=a.OBJECT.defineProperty(a.SWRConfig,"defaultValue",{value:a.defaultConfig}),c=(0,a.withArgs)((e,t,r)=>{let{cache:i,compare:u,suspense:c,fallbackData:d,revalidateOnMount:f,revalidateIfStale:p,refreshInterval:h,refreshWhenHidden:m,refreshWhenOffline:y,keepPreviousData:v}=r,[g,b,w,x]=a.SWRGlobalState.get(i),[E,S]=(0,a.serialize)(e),D=(0,n.useRef)(!1),O=(0,n.useRef)(!1),P=(0,n.useRef)(E),C=(0,n.useRef)(t),A=(0,n.useRef)(r),j=()=>A.current.isVisible()&&A.current.isOnline(),[k,T,R,N]=(0,a.createCacheHelper)(i,E),I=(0,n.useRef)({}).current,M=(0,a.isUndefined)(d)?r.fallback[E]:d,$=(e,t)=>{for(let r in I)if("data"===r){if(!u(e[r],t[r])&&(!(0,a.isUndefined)(e[r])||!u(H,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},L=(0,n.useMemo)(()=>{let e=!!E&&!!t&&((0,a.isUndefined)(f)?!A.current.isPaused()&&!c&&(!!(0,a.isUndefined)(p)||p):f),r=t=>{let r=(0,a.mergeObjects)(t);return(delete r._k,e)?{isValidating:!0,isLoading:!0,...r}:r},n=k(),i=N(),o=r(n),s=n===i?o:r(i),l=o;return[()=>{let e=r(k());return $(e,l)?(l.data=e.data,l.isLoading=e.isLoading,l.isValidating=e.isValidating,l.error=e.error,l):(l=e,e)},()=>s]},[i,E]),F=(0,o.useSyncExternalStore)((0,n.useCallback)(e=>R(E,(t,r)=>{$(r,t)||e()}),[i,E]),L[0],L[1]),B=!D.current,V=g[E]&&g[E].length>0,U=F.data,W=(0,a.isUndefined)(U)?M:U,z=F.error,K=(0,n.useRef)(W),H=v?(0,a.isUndefined)(U)?K.current:U:W,G=(!V||!!(0,a.isUndefined)(z))&&(B&&!(0,a.isUndefined)(f)?f:!A.current.isPaused()&&(c?!(0,a.isUndefined)(W)&&p:(0,a.isUndefined)(W)||p)),q=!!(E&&t&&B&&G),Z=(0,a.isUndefined)(F.isValidating)?q:F.isValidating,Y=(0,a.isUndefined)(F.isLoading)?q:F.isLoading,J=(0,n.useCallback)(async e=>{let t,n,i=C.current;if(!E||!i||O.current||A.current.isPaused())return!1;let o=!0,s=e||{},l=!w[E]||!s.dedupe,c=()=>a.IS_REACT_LEGACY?!O.current&&E===P.current&&D.current:E===P.current,d={isValidating:!1,isLoading:!1},f=()=>{T(d)},p=()=>{let e=w[E];e&&e[1]===n&&delete w[E]},h={isValidating:!0};(0,a.isUndefined)(k().data)&&(h.isLoading=!0);try{if(l&&(T(h),r.loadingTimeout&&(0,a.isUndefined)(k().data)&&setTimeout(()=>{o&&c()&&A.current.onLoadingSlow(E,r)},r.loadingTimeout),w[E]=[i(S),(0,a.getTimestamp)()]),[t,n]=w[E],t=await t,l&&setTimeout(p,r.dedupingInterval),!w[E]||w[E][1]!==n)return l&&c()&&A.current.onDiscarded(E),!1;d.error=a.UNDEFINED;let e=b[E];if(!(0,a.isUndefined)(e)&&(n<=e[0]||n<=e[1]||0===e[1]))return f(),l&&c()&&A.current.onDiscarded(E),!1;let s=k().data;d.data=u(s,t)?s:t,l&&c()&&A.current.onSuccess(t,E,r)}catch(r){p();let e=A.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(d.error=r,l&&c()&&(e.onError(r,E,e),(!0===t||(0,a.isFunction)(t)&&t(r))&&(!A.current.revalidateOnFocus||!A.current.revalidateOnReconnect||j())&&e.onErrorRetry(r,E,e,e=>{let t=g[E];t&&t[0]&&t[0](a.revalidateEvents.ERROR_REVALIDATE_EVENT,e)},{retryCount:(s.retryCount||0)+1,dedupe:!0})))}return o=!1,f(),!0},[E,i]),Q=(0,n.useCallback)((...e)=>(0,a.internalMutate)(i,P.current,...e),[]);if((0,a.useIsomorphicLayoutEffect)(()=>{C.current=t,A.current=r,(0,a.isUndefined)(U)||(K.current=U)}),(0,a.useIsomorphicLayoutEffect)(()=>{if(!E)return;let e=J.bind(a.UNDEFINED,l),t=0,r=(0,a.subscribeCallback)(E,g,(r,n={})=>{if(r==a.revalidateEvents.FOCUS_EVENT){let r=Date.now();A.current.revalidateOnFocus&&r>t&&j()&&(t=r+A.current.focusThrottleInterval,e())}else if(r==a.revalidateEvents.RECONNECT_EVENT)A.current.revalidateOnReconnect&&j()&&e();else if(r==a.revalidateEvents.MUTATE_EVENT)return J();else if(r==a.revalidateEvents.ERROR_REVALIDATE_EVENT)return J(n)});return O.current=!1,P.current=E,D.current=!0,T({_k:S}),G&&((0,a.isUndefined)(W)||a.IS_SERVER?e():(0,a.rAF)(e)),()=>{O.current=!0,r()}},[E]),(0,a.useIsomorphicLayoutEffect)(()=>{let e;function t(){let t=(0,a.isFunction)(h)?h(k().data):h;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!k().error&&(m||A.current.isVisible())&&(y||A.current.isOnline())?J(l).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[h,m,y,E]),(0,n.useDebugValue)(H),c&&(0,a.isUndefined)(W)&&E){if(!a.IS_REACT_LEGACY&&a.IS_SERVER)throw Error("Fallback data is required when using suspense in SSR.");C.current=t,A.current=r,O.current=!1;let e=x[E];if((0,a.isUndefined)(e)||s(Q(e)),(0,a.isUndefined)(z)){let e=J(l);(0,a.isUndefined)(H)||(e.status="fulfilled",e.value=!0),s(e)}else throw z}return{mutate:Q,get data(){return I.data=!0,H},get error(){return I.error=!0,z},get isValidating(){return I.isValidating=!0,Z},get isLoading(){return I.isLoading=!0,Y}}})},96269(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(46925),i=r.n(n),o=r(70727),a=r(89593);let s=i().use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}),l={dedupe:!0};a.OBJECT.defineProperty(a.SWRConfig,"defaultValue",{value:a.defaultConfig});let u=(0,a.withArgs)((e,t,r)=>{let{cache:i,compare:u,suspense:c,fallbackData:d,revalidateOnMount:f,revalidateIfStale:p,refreshInterval:h,refreshWhenHidden:m,refreshWhenOffline:y,keepPreviousData:v}=r,[g,b,w,x]=a.SWRGlobalState.get(i),[E,S]=(0,a.serialize)(e),D=(0,n.useRef)(!1),O=(0,n.useRef)(!1),P=(0,n.useRef)(E),C=(0,n.useRef)(t),A=(0,n.useRef)(r),j=()=>A.current.isVisible()&&A.current.isOnline(),[k,T,R,N]=(0,a.createCacheHelper)(i,E),I=(0,n.useRef)({}).current,M=(0,a.isUndefined)(d)?r.fallback[E]:d,$=(e,t)=>{for(let r in I)if("data"===r){if(!u(e[r],t[r])&&(!(0,a.isUndefined)(e[r])||!u(H,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},L=(0,n.useMemo)(()=>{let e=!!E&&!!t&&((0,a.isUndefined)(f)?!A.current.isPaused()&&!c&&(!!(0,a.isUndefined)(p)||p):f),r=t=>{let r=(0,a.mergeObjects)(t);return(delete r._k,e)?{isValidating:!0,isLoading:!0,...r}:r},n=k(),i=N(),o=r(n),s=n===i?o:r(i),l=o;return[()=>{let e=r(k());return $(e,l)?(l.data=e.data,l.isLoading=e.isLoading,l.isValidating=e.isValidating,l.error=e.error,l):(l=e,e)},()=>s]},[i,E]),F=(0,o.useSyncExternalStore)((0,n.useCallback)(e=>R(E,(t,r)=>{$(r,t)||e()}),[i,E]),L[0],L[1]),B=!D.current,V=g[E]&&g[E].length>0,U=F.data,W=(0,a.isUndefined)(U)?M:U,z=F.error,K=(0,n.useRef)(W),H=v?(0,a.isUndefined)(U)?K.current:U:W,G=(!V||!!(0,a.isUndefined)(z))&&(B&&!(0,a.isUndefined)(f)?f:!A.current.isPaused()&&(c?!(0,a.isUndefined)(W)&&p:(0,a.isUndefined)(W)||p)),q=!!(E&&t&&B&&G),Z=(0,a.isUndefined)(F.isValidating)?q:F.isValidating,Y=(0,a.isUndefined)(F.isLoading)?q:F.isLoading,J=(0,n.useCallback)(async e=>{let t,n,i=C.current;if(!E||!i||O.current||A.current.isPaused())return!1;let o=!0,s=e||{},l=!w[E]||!s.dedupe,c=()=>a.IS_REACT_LEGACY?!O.current&&E===P.current&&D.current:E===P.current,d={isValidating:!1,isLoading:!1},f=()=>{T(d)},p=()=>{let e=w[E];e&&e[1]===n&&delete w[E]},h={isValidating:!0};(0,a.isUndefined)(k().data)&&(h.isLoading=!0);try{if(l&&(T(h),r.loadingTimeout&&(0,a.isUndefined)(k().data)&&setTimeout(()=>{o&&c()&&A.current.onLoadingSlow(E,r)},r.loadingTimeout),w[E]=[i(S),(0,a.getTimestamp)()]),[t,n]=w[E],t=await t,l&&setTimeout(p,r.dedupingInterval),!w[E]||w[E][1]!==n)return l&&c()&&A.current.onDiscarded(E),!1;d.error=a.UNDEFINED;let e=b[E];if(!(0,a.isUndefined)(e)&&(n<=e[0]||n<=e[1]||0===e[1]))return f(),l&&c()&&A.current.onDiscarded(E),!1;let s=k().data;d.data=u(s,t)?s:t,l&&c()&&A.current.onSuccess(t,E,r)}catch(r){p();let e=A.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(d.error=r,l&&c()&&(e.onError(r,E,e),(!0===t||(0,a.isFunction)(t)&&t(r))&&(!A.current.revalidateOnFocus||!A.current.revalidateOnReconnect||j())&&e.onErrorRetry(r,E,e,e=>{let t=g[E];t&&t[0]&&t[0](a.revalidateEvents.ERROR_REVALIDATE_EVENT,e)},{retryCount:(s.retryCount||0)+1,dedupe:!0})))}return o=!1,f(),!0},[E,i]),Q=(0,n.useCallback)((...e)=>(0,a.internalMutate)(i,P.current,...e),[]);if((0,a.useIsomorphicLayoutEffect)(()=>{C.current=t,A.current=r,(0,a.isUndefined)(U)||(K.current=U)}),(0,a.useIsomorphicLayoutEffect)(()=>{if(!E)return;let e=J.bind(a.UNDEFINED,l),t=0,r=(0,a.subscribeCallback)(E,g,(r,n={})=>{if(r==a.revalidateEvents.FOCUS_EVENT){let r=Date.now();A.current.revalidateOnFocus&&r>t&&j()&&(t=r+A.current.focusThrottleInterval,e())}else if(r==a.revalidateEvents.RECONNECT_EVENT)A.current.revalidateOnReconnect&&j()&&e();else if(r==a.revalidateEvents.MUTATE_EVENT)return J();else if(r==a.revalidateEvents.ERROR_REVALIDATE_EVENT)return J(n)});return O.current=!1,P.current=E,D.current=!0,T({_k:S}),G&&((0,a.isUndefined)(W)||a.IS_SERVER?e():(0,a.rAF)(e)),()=>{O.current=!0,r()}},[E]),(0,a.useIsomorphicLayoutEffect)(()=>{let e;function t(){let t=(0,a.isFunction)(h)?h(k().data):h;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!k().error&&(m||A.current.isVisible())&&(y||A.current.isOnline())?J(l).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[h,m,y,E]),(0,n.useDebugValue)(H),c&&(0,a.isUndefined)(W)&&E){if(!a.IS_REACT_LEGACY&&a.IS_SERVER)throw Error("Fallback data is required when using suspense in SSR.");C.current=t,A.current=r,O.current=!1;let e=x[E];if((0,a.isUndefined)(e)||s(Q(e)),(0,a.isUndefined)(z)){let e=J(l);(0,a.isUndefined)(H)||(e.status="fulfilled",e.value=!0),s(e)}else throw z}return{mutate:Q,get data(){return I.data=!0,H},get error(){return I.error=!0,z},get isValidating(){return I.isValidating=!0,Z},get isLoading(){return I.isLoading=!0,Y}}}),c=(0,a.withMiddleware)(u,e=>(t,r,n)=>(n.revalidateOnFocus=!1,n.revalidateIfStale=!1,n.revalidateOnReconnect=!1,e(t,r,n)))},13709(e,t,r){"use strict";r.d(t,{Ay:()=>d});var n=r(46925),i=r.n(n),o=r(70727),a=r(89593);let s=i().use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}),l={dedupe:!0};a.OBJECT.defineProperty(a.SWRConfig,"defaultValue",{value:a.defaultConfig});let u=(0,a.withArgs)((e,t,r)=>{let{cache:i,compare:u,suspense:c,fallbackData:d,revalidateOnMount:f,revalidateIfStale:p,refreshInterval:h,refreshWhenHidden:m,refreshWhenOffline:y,keepPreviousData:v}=r,[g,b,w,x]=a.SWRGlobalState.get(i),[E,S]=(0,a.serialize)(e),D=(0,n.useRef)(!1),O=(0,n.useRef)(!1),P=(0,n.useRef)(E),C=(0,n.useRef)(t),A=(0,n.useRef)(r),j=()=>A.current.isVisible()&&A.current.isOnline(),[k,T,R,N]=(0,a.createCacheHelper)(i,E),I=(0,n.useRef)({}).current,M=(0,a.isUndefined)(d)?r.fallback[E]:d,$=(e,t)=>{for(let r in I)if("data"===r){if(!u(e[r],t[r])&&(!(0,a.isUndefined)(e[r])||!u(H,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},L=(0,n.useMemo)(()=>{let e=!!E&&!!t&&((0,a.isUndefined)(f)?!A.current.isPaused()&&!c&&(!!(0,a.isUndefined)(p)||p):f),r=t=>{let r=(0,a.mergeObjects)(t);return(delete r._k,e)?{isValidating:!0,isLoading:!0,...r}:r},n=k(),i=N(),o=r(n),s=n===i?o:r(i),l=o;return[()=>{let e=r(k());return $(e,l)?(l.data=e.data,l.isLoading=e.isLoading,l.isValidating=e.isValidating,l.error=e.error,l):(l=e,e)},()=>s]},[i,E]),F=(0,o.useSyncExternalStore)((0,n.useCallback)(e=>R(E,(t,r)=>{$(r,t)||e()}),[i,E]),L[0],L[1]),B=!D.current,V=g[E]&&g[E].length>0,U=F.data,W=(0,a.isUndefined)(U)?M:U,z=F.error,K=(0,n.useRef)(W),H=v?(0,a.isUndefined)(U)?K.current:U:W,G=(!V||!!(0,a.isUndefined)(z))&&(B&&!(0,a.isUndefined)(f)?f:!A.current.isPaused()&&(c?!(0,a.isUndefined)(W)&&p:(0,a.isUndefined)(W)||p)),q=!!(E&&t&&B&&G),Z=(0,a.isUndefined)(F.isValidating)?q:F.isValidating,Y=(0,a.isUndefined)(F.isLoading)?q:F.isLoading,J=(0,n.useCallback)(async e=>{let t,n,i=C.current;if(!E||!i||O.current||A.current.isPaused())return!1;let o=!0,s=e||{},l=!w[E]||!s.dedupe,c=()=>a.IS_REACT_LEGACY?!O.current&&E===P.current&&D.current:E===P.current,d={isValidating:!1,isLoading:!1},f=()=>{T(d)},p=()=>{let e=w[E];e&&e[1]===n&&delete w[E]},h={isValidating:!0};(0,a.isUndefined)(k().data)&&(h.isLoading=!0);try{if(l&&(T(h),r.loadingTimeout&&(0,a.isUndefined)(k().data)&&setTimeout(()=>{o&&c()&&A.current.onLoadingSlow(E,r)},r.loadingTimeout),w[E]=[i(S),(0,a.getTimestamp)()]),[t,n]=w[E],t=await t,l&&setTimeout(p,r.dedupingInterval),!w[E]||w[E][1]!==n)return l&&c()&&A.current.onDiscarded(E),!1;d.error=a.UNDEFINED;let e=b[E];if(!(0,a.isUndefined)(e)&&(n<=e[0]||n<=e[1]||0===e[1]))return f(),l&&c()&&A.current.onDiscarded(E),!1;let s=k().data;d.data=u(s,t)?s:t,l&&c()&&A.current.onSuccess(t,E,r)}catch(r){p();let e=A.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(d.error=r,l&&c()&&(e.onError(r,E,e),(!0===t||(0,a.isFunction)(t)&&t(r))&&(!A.current.revalidateOnFocus||!A.current.revalidateOnReconnect||j())&&e.onErrorRetry(r,E,e,e=>{let t=g[E];t&&t[0]&&t[0](a.revalidateEvents.ERROR_REVALIDATE_EVENT,e)},{retryCount:(s.retryCount||0)+1,dedupe:!0})))}return o=!1,f(),!0},[E,i]),Q=(0,n.useCallback)((...e)=>(0,a.internalMutate)(i,P.current,...e),[]);if((0,a.useIsomorphicLayoutEffect)(()=>{C.current=t,A.current=r,(0,a.isUndefined)(U)||(K.current=U)}),(0,a.useIsomorphicLayoutEffect)(()=>{if(!E)return;let e=J.bind(a.UNDEFINED,l),t=0,r=(0,a.subscribeCallback)(E,g,(r,n={})=>{if(r==a.revalidateEvents.FOCUS_EVENT){let r=Date.now();A.current.revalidateOnFocus&&r>t&&j()&&(t=r+A.current.focusThrottleInterval,e())}else if(r==a.revalidateEvents.RECONNECT_EVENT)A.current.revalidateOnReconnect&&j()&&e();else if(r==a.revalidateEvents.MUTATE_EVENT)return J();else if(r==a.revalidateEvents.ERROR_REVALIDATE_EVENT)return J(n)});return O.current=!1,P.current=E,D.current=!0,T({_k:S}),G&&((0,a.isUndefined)(W)||a.IS_SERVER?e():(0,a.rAF)(e)),()=>{O.current=!0,r()}},[E]),(0,a.useIsomorphicLayoutEffect)(()=>{let e;function t(){let t=(0,a.isFunction)(h)?h(k().data):h;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!k().error&&(m||A.current.isVisible())&&(y||A.current.isOnline())?J(l).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[h,m,y,E]),(0,n.useDebugValue)(H),c&&(0,a.isUndefined)(W)&&E){if(!a.IS_REACT_LEGACY&&a.IS_SERVER)throw Error("Fallback data is required when using suspense in SSR.");C.current=t,A.current=r,O.current=!1;let e=x[E];if((0,a.isUndefined)(e)||s(Q(e)),(0,a.isUndefined)(z)){let e=J(l);(0,a.isUndefined)(H)||(e.status="fulfilled",e.value=!0),s(e)}else throw z}return{mutate:Q,get data(){return I.data=!0,H},get error(){return I.error=!0,z},get isValidating(){return I.isValidating=!0,Z},get isLoading(){return I.isLoading=!0,Y}}}),c=Promise.resolve(),d=(0,a.withMiddleware)(u,e=>(t,r,i)=>{let s,l=(0,n.useRef)(!1),{cache:u,initialSize:d=1,revalidateAll:f=!1,persistSize:p=!1,revalidateFirstPage:h=!0,revalidateOnMount:m=!1,parallel:y=!1}=i,[,,,v]=a.SWRGlobalState.get(a.cache);try{(s=(0,a.serialize)(t?t(0,null):null)[0])&&(s=a.INFINITE_PREFIX+s)}catch(e){}let[g,b,w]=(0,a.createCacheHelper)(u,s),x=(0,n.useCallback)(()=>(0,a.isUndefined)(g()._l)?d:g()._l,[u,s,d]);(0,o.useSyncExternalStore)((0,n.useCallback)(e=>s?w(s,()=>{e()}):()=>{},[u,s]),x,x);let E=(0,n.useCallback)(()=>{let e=g()._l;return(0,a.isUndefined)(e)?d:e},[s,d]),S=(0,n.useRef)(E());(0,a.useIsomorphicLayoutEffect)(()=>{if(!l.current){l.current=!0;return}s&&b({_l:p?S.current:E()})},[s,u]);let D=m&&!l.current,O=e(s,async e=>{let n=g()._i,o=g()._r;b({_r:a.UNDEFINED});let s=[],l=E(),[c]=(0,a.createCacheHelper)(u,e),d=c().data,p=[],m=null;for(let e=0;e<l;++e){let[l,c]=(0,a.serialize)(t(e,y?null:m));if(!l)break;let[g,b]=(0,a.createCacheHelper)(u,l),w=g().data,x=f||n||(0,a.isUndefined)(w)||h&&!e&&!(0,a.isUndefined)(d)||D||d&&!(0,a.isUndefined)(d[e])&&!i.compare(d[e],w);if(r&&("function"==typeof o?o(w,c):x)){let t=async()=>{if(l in v){let e=v[l];delete v[l],w=await e}else w=await r(c);b({data:w,_k:c}),s[e]=w};y?p.push(t):await t()}else s[e]=w;y||(m=w)}return y&&await Promise.all(p.map(e=>e())),b({_i:a.UNDEFINED}),s},i),P=(0,n.useCallback)(function(e,t){let r="boolean"==typeof t?{revalidate:t}:t||{},n=!1!==r.revalidate;return s?(n&&((0,a.isUndefined)(e)?b({_i:!0,_r:r.revalidate}):b({_i:!1,_r:r.revalidate})),arguments.length?O.mutate(e,{...r,revalidate:n}):O.mutate()):c},[s,u]),C=(0,n.useCallback)(e=>{let r;if(!s)return c;let[,n]=(0,a.createCacheHelper)(u,s);if((0,a.isFunction)(e)?r=e(E()):"number"==typeof e&&(r=e),"number"!=typeof r)return c;n({_l:r}),S.current=r;let i=[],[o]=(0,a.createCacheHelper)(u,s),l=null;for(let e=0;e<r;++e){let[r]=(0,a.serialize)(t(e,l)),[n]=(0,a.createCacheHelper)(u,r),s=r?n().data:a.UNDEFINED;if((0,a.isUndefined)(s))return P(o().data);i.push(s),l=s}return P(i)},[s,u,P,E]);return{size:E(),setSize:C,mutate:P,get data(){return O.data},get error(){return O.error},get isValidating(){return O.isValidating},get isLoading(){return O.isLoading}}})},19167(e,t,r){"use strict";r.d(t,{y:()=>i});let n=e=>{let t,r=new Set,n=(e,n)=>{let i="function"==typeof e?e(t):e;if(!Object.is(i,t)){let e=t;t=(null!=n?n:"object"!=typeof i||null===i)?i:Object.assign({},t,i),r.forEach(r=>r(t,e))}},i=()=>t,o={setState:n,getState:i,getInitialState:()=>a,subscribe:e=>(r.add(e),()=>r.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},a=t=e(n,i,o);return o},i=e=>e?n(e):n},95486(e,t,r){"use strict";r.d(t,{A:()=>i});class n{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+n.version}static addUnaryOp(e){return n.max_unop_len=Math.max(e.length,n.max_unop_len),n.unary_ops[e]=1,n}static addBinaryOp(e,t,r){return n.max_binop_len=Math.max(e.length,n.max_binop_len),n.binary_ops[e]=t,r?n.right_associative.add(e):n.right_associative.delete(e),n}static addIdentifierChar(e){return n.additional_identifier_chars.add(e),n}static addLiteral(e,t){return n.literals[e]=t,n}static removeUnaryOp(e){return delete n.unary_ops[e],e.length===n.max_unop_len&&(n.max_unop_len=n.getMaxKeyLen(n.unary_ops)),n}static removeAllUnaryOps(){return n.unary_ops={},n.max_unop_len=0,n}static removeIdentifierChar(e){return n.additional_identifier_chars.delete(e),n}static removeBinaryOp(e){return delete n.binary_ops[e],e.length===n.max_binop_len&&(n.max_binop_len=n.getMaxKeyLen(n.binary_ops)),n.right_associative.delete(e),n}static removeAllBinaryOps(){return n.binary_ops={},n.max_binop_len=0,n}static removeLiteral(e){return delete n.literals[e],n}static removeAllLiterals(){return n.literals={},n}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(e){this.expr=e,this.index=0}static parse(e){return new n(e).parse()}static getMaxKeyLen(e){return Math.max(0,...Object.keys(e).map(e=>e.length))}static isDecimalDigit(e){return e>=48&&e<=57}static binaryPrecedence(e){return n.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!n.binary_ops[String.fromCharCode(e)]||n.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return n.isIdentifierStart(e)||n.isDecimalDigit(e)}throwError(e){let t=Error(e+" at character "+this.index);throw t.index=this.index,t.description=e,t}runHook(e,t){if(n.hooks[e]){let r={context:this,node:t};return n.hooks.run(e,r),r.node}return t}searchHook(e){if(n.hooks[e]){let t={context:this};return n.hooks[e].find(function(e){return e.call(t.context,t),t.node}),t.node}}gobbleSpaces(){let e=this.code;for(;e===n.SPACE_CODE||e===n.TAB_CODE||e===n.LF_CODE||e===n.CR_CODE;)e=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");let e=this.gobbleExpressions(),t=1===e.length?e[0]:{type:n.COMPOUND,body:e};return this.runHook("after-all",t)}gobbleExpressions(e){let t=[],r,i;for(;this.index<this.expr.length;)if((r=this.code)===n.SEMCOL_CODE||r===n.COMMA_CODE)this.index++;else if(i=this.gobbleExpression())t.push(i);else if(this.index<this.expr.length){if(r===e)break;this.throwError('Unexpected "'+this.char+'"')}return t}gobbleExpression(){let e=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",e)}gobbleBinaryOp(){this.gobbleSpaces();let e=this.expr.substr(this.index,n.max_binop_len),t=e.length;for(;t>0;){if(n.binary_ops.hasOwnProperty(e)&&(!n.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!n.isIdentifierPart(this.expr.charCodeAt(this.index+e.length))))return this.index+=t,e;e=e.substr(0,--t)}return!1}gobbleBinaryExpression(){let e,t,r,i,o,a,s,l,u;if(!(a=this.gobbleToken())||!(t=this.gobbleBinaryOp()))return a;for(o={value:t,prec:n.binaryPrecedence(t),right_a:n.right_associative.has(t)},(s=this.gobbleToken())||this.throwError("Expected expression after "+t),i=[a,o,s];t=this.gobbleBinaryOp();){if(0===(r=n.binaryPrecedence(t))){this.index-=t.length;break}o={value:t,prec:r,right_a:n.right_associative.has(t)},u=t;let l=e=>o.right_a&&e.right_a?r>e.prec:r<=e.prec;for(;i.length>2&&l(i[i.length-2]);)s=i.pop(),t=i.pop().value,a=i.pop(),e={type:n.BINARY_EXP,operator:t,left:a,right:s},i.push(e);(e=this.gobbleToken())||this.throwError("Expected expression after "+u),i.push(o,e)}for(l=i.length-1,e=i[l];l>1;)e={type:n.BINARY_EXP,operator:i[l-1].value,left:i[l-2],right:e},l-=2;return e}gobbleToken(){let e,t,r,i;if(this.gobbleSpaces(),i=this.searchHook("gobble-token"))return this.runHook("after-token",i);if(e=this.code,n.isDecimalDigit(e)||e===n.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===n.SQUOTE_CODE||e===n.DQUOTE_CODE)i=this.gobbleStringLiteral();else if(e===n.OBRACK_CODE)i=this.gobbleArray();else{for(r=(t=this.expr.substr(this.index,n.max_unop_len)).length;r>0;){if(n.unary_ops.hasOwnProperty(t)&&(!n.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!n.isIdentifierPart(this.expr.charCodeAt(this.index+t.length)))){this.index+=r;let e=this.gobbleToken();return e||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:n.UNARY_EXP,operator:t,argument:e,prefix:!0})}t=t.substr(0,--r)}n.isIdentifierStart(e)?(i=this.gobbleIdentifier(),n.literals.hasOwnProperty(i.name)?i={type:n.LITERAL,value:n.literals[i.name],raw:i.name}:i.name===n.this_str&&(i={type:n.THIS_EXP})):e===n.OPAREN_CODE&&(i=this.gobbleGroup())}return i?(i=this.gobbleTokenProperty(i),this.runHook("after-token",i)):this.runHook("after-token",!1)}gobbleTokenProperty(e){this.gobbleSpaces();let t=this.code;for(;t===n.PERIOD_CODE||t===n.OBRACK_CODE||t===n.OPAREN_CODE||t===n.QUMARK_CODE;){let r;if(t===n.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==n.PERIOD_CODE)break;r=!0,this.index+=2,this.gobbleSpaces(),t=this.code}this.index++,t===n.OBRACK_CODE?((e={type:n.MEMBER_EXP,computed:!0,object:e,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),(t=this.code)!==n.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):t===n.OPAREN_CODE?e={type:n.CALL_EXP,arguments:this.gobbleArguments(n.CPAREN_CODE),callee:e}:(t===n.PERIOD_CODE||r)&&(r&&this.index--,this.gobbleSpaces(),e={type:n.MEMBER_EXP,computed:!1,object:e,property:this.gobbleIdentifier()}),r&&(e.optional=!0),this.gobbleSpaces(),t=this.code}return e}gobbleNumericLiteral(){let e="",t,r;for(;n.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(this.code===n.PERIOD_CODE)for(e+=this.expr.charAt(this.index++);n.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if("e"===(t=this.char)||"E"===t){for(e+=this.expr.charAt(this.index++),("+"===(t=this.char)||"-"===t)&&(e+=this.expr.charAt(this.index++));n.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);n.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+e+this.char+")")}return r=this.code,n.isIdentifierStart(r)?this.throwError("Variable names cannot start with a number ("+e+this.char+")"):(r===n.PERIOD_CODE||1===e.length&&e.charCodeAt(0)===n.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:n.LITERAL,value:parseFloat(e),raw:e}}gobbleStringLiteral(){let e="",t=this.index,r=this.expr.charAt(this.index++),i=!1;for(;this.index<this.expr.length;){let t=this.expr.charAt(this.index++);if(t===r){i=!0;break}if("\\"===t)switch(t=this.expr.charAt(this.index++)){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=t}else e+=t}return i||this.throwError('Unclosed quote after "'+e+'"'),{type:n.LITERAL,value:e,raw:this.expr.substring(t,this.index)}}gobbleIdentifier(){let e=this.code,t=this.index;for(n.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length;)if(e=this.code,n.isIdentifierPart(e))this.index++;else break;return{type:n.IDENTIFIER,name:this.expr.slice(t,this.index)}}gobbleArguments(e){let t=[],r=!1,i=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let o=this.code;if(o===e){r=!0,this.index++,e===n.CPAREN_CODE&&i&&i>=t.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}if(o===n.COMMA_CODE){if(this.index++,++i!==t.length){if(e===n.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===n.CBRACK_CODE)for(let e=t.length;e<i;e++)t.push(null)}}else if(t.length!==i&&0!==i)this.throwError("Expected comma");else{let e=this.gobbleExpression();e&&e.type!==n.COMPOUND||this.throwError("Expected comma"),t.push(e)}}return r||this.throwError("Expected "+String.fromCharCode(e)),t}gobbleGroup(){this.index++;let e=this.gobbleExpressions(n.CPAREN_CODE);if(this.code===n.CPAREN_CODE)return(this.index++,1===e.length)?e[0]:!!e.length&&{type:n.SEQUENCE_EXP,expressions:e};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:n.ARRAY_EXP,elements:this.gobbleArguments(n.CBRACK_CODE)}}}Object.assign(n,{hooks:new class{add(e,t,r){if("string"!=typeof arguments[0])for(let e in arguments[0])this.add(e,arguments[0][e],arguments[1]);else(Array.isArray(e)?e:[e]).forEach(function(e){this[e]=this[e]||[],t&&this[e][r?"unshift":"push"](t)},this)}run(e,t){this[e]=this[e]||[],this[e].forEach(function(e){e.call(t&&t.context?t.context:t,t)})}},plugins:new class{constructor(e){this.jsep=e,this.registered={}}register(...e){e.forEach(e=>{if("object"!=typeof e||!e.name||!e.init)throw Error("Invalid JSEP plugin format");this.registered[e.name]||(e.init(this.jsep),this.registered[e.name]=e)})}}(n),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),n.max_unop_len=n.getMaxKeyLen(n.unary_ops),n.max_binop_len=n.getMaxKeyLen(n.binary_ops);let i=e=>new n(e).parse(),o=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(n).filter(e=>!o.includes(e)&&void 0===i[e]).forEach(e=>{i[e]=n[e]}),i.Jsep=n,i.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let r=t.node,n=this.gobbleExpression();if(n||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let i=this.gobbleExpression();if(i||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:r,consequent:n,alternate:i},r.operator&&e.binary_ops[r.operator]<=.9){let n=r;for(;n.right.operator&&e.binary_ops[n.right.operator]<=.9;)n=n.right;t.node.test=n.right,n.right=t.node,t.node=r}}else this.throwError("Expected :")}})}})},68578(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(76147);let i=function(e,t){for(var r=e.length;r--;)if((0,n.A)(e[r][0],t))return r;return -1};var o=Array.prototype.splice;function a(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])}}a.prototype.clear=function(){this.__data__=[],this.size=0},a.prototype.delete=function(e){var t=this.__data__,r=i(t,e);return!(r<0)&&(r==t.length-1?t.pop():o.call(t,r,1),--this.size,!0)},a.prototype.get=function(e){var t=this.__data__,r=i(t,e);return r<0?void 0:t[r][1]},a.prototype.has=function(e){return i(this.__data__,e)>-1},a.prototype.set=function(e,t){var r=this.__data__,n=i(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};let s=a},47756(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(20014),i=r(69344);let o=(0,n.A)(i.A,"Map")},95732(e,t,r){"use strict";r.d(t,{A:()=>f});var n=(0,r(20014).A)(Object,"create"),i=Object.prototype.hasOwnProperty,o=Object.prototype.hasOwnProperty;function a(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])}}a.prototype.clear=function(){this.__data__=n?n(null):{},this.size=0},a.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t},a.prototype.get=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return i.call(t,e)?t[e]:void 0},a.prototype.has=function(e){var t=this.__data__;return n?void 0!==t[e]:o.call(t,e)},a.prototype.set=function(e,t){var r=this.__data__;return this.size+=+!this.has(e),r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this};var s=r(68578),l=r(47756);let u=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},c=function(e,t){var r=e.__data__;return u(t)?r["string"==typeof t?"string":"hash"]:r.map};function d(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])}}d.prototype.clear=function(){this.size=0,this.__data__={hash:new a,map:new(l.A||s.A),string:new a}},d.prototype.delete=function(e){var t=c(this,e).delete(e);return this.size-=!!t,t},d.prototype.get=function(e){return c(this,e).get(e)},d.prototype.has=function(e){return c(this,e).has(e)},d.prototype.set=function(e,t){var r=c(this,e),n=r.size;return r.set(e,t),this.size+=+(r.size!=n),this};let f=d},86692(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(68578),i=r(47756),o=r(95732);function a(e){var t=this.__data__=new n.A(e);this.size=t.size}a.prototype.clear=function(){this.__data__=new n.A,this.size=0},a.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},a.prototype.get=function(e){return this.__data__.get(e)},a.prototype.has=function(e){return this.__data__.has(e)},a.prototype.set=function(e,t){var r=this.__data__;if(r instanceof n.A){var a=r.__data__;if(!i.A||a.length<199)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new o.A(a)}return r.set(e,t),this.size=r.size,this};let s=a},79788(e,t,r){"use strict";r.d(t,{A:()=>n});let n=r(69344).A.Symbol},52969(e,t,r){"use strict";r.d(t,{A:()=>n});let n=r(69344).A.Uint8Array},70197(e,t,r){"use strict";r.d(t,{A:()=>c});let n=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n};var i=r(36791),o=r(6476),a=r(70200),s=r(97458),l=r(28481),u=Object.prototype.hasOwnProperty;let c=function(e,t){var r=(0,o.A)(e),c=!r&&(0,i.A)(e),d=!r&&!c&&(0,a.A)(e),f=!r&&!c&&!d&&(0,l.A)(e),p=r||c||d||f,h=p?n(e.length,String):[],m=h.length;for(var y in e)(t||u.call(e,y))&&!(p&&("length"==y||d&&("offset"==y||"parent"==y)||f&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||(0,s.A)(y,m)))&&h.push(y);return h}},12477(e,t,r){"use strict";r.d(t,{A:()=>n});let n=function(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}},94215(e,t,r){"use strict";r.d(t,{A:()=>n});let n=function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}},15116(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(70903),i=r(76147),o=Object.prototype.hasOwnProperty;let a=function(e,t,r){var a=e[t];o.call(e,t)&&(0,i.A)(a,r)&&(void 0!==r||t in e)||(0,n.A)(e,t,r)}},70903(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(70382);let i=function(e,t,r){"__proto__"==t&&n.A?(0,n.A)(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},82838(e,t,r){"use strict";r.d(t,{A:()=>W});var n=r(86692);let i=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e};var o=r(15116),a=r(30526),s=r(51897),l=r(33265),u=r(83033),c=r(10564),d=r(98517),f=r(36350),p=r(28667),h=r(50056),m=r(78014),y=Object.prototype.hasOwnProperty;let v=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&y.call(e,"index")&&(r.index=e.index,r.input=e.input),r};var g=r(16548);let b=function(e,t){var r=t?(0,g.A)(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)};var w=/\w*$/;let x=function(e){var t=new e.constructor(e.source,w.exec(e));return t.lastIndex=e.lastIndex,t};var E=r(79788),S=E.A?E.A.prototype:void 0,D=S?S.valueOf:void 0,O=r(72814);let P=function(e,t,r){var n=e.constructor;switch(t){case"[object ArrayBuffer]":return(0,g.A)(e);case"[object Boolean]":case"[object Date]":return new n(+e);case"[object DataView]":return b(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(0,O.A)(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 x(e);case"[object Symbol]":return D?Object(D.call(e)):{}}};var C=r(39493),A=r(6476),j=r(70200),k=r(94337),T=r(86110),R=r(79640),N=R.A&&R.A.isMap,I=N?(0,T.A)(N):function(e){return(0,k.A)(e)&&"[object Map]"==(0,m.A)(e)},M=r(60230),$=R.A&&R.A.isSet,L=$?(0,T.A)($):function(e){return(0,k.A)(e)&&"[object Set]"==(0,m.A)(e)},F="[object Arguments]",B="[object Function]",V="[object Object]",U={};U[F]=U["[object Array]"]=U["[object ArrayBuffer]"]=U["[object DataView]"]=U["[object Boolean]"]=U["[object Date]"]=U["[object Float32Array]"]=U["[object Float64Array]"]=U["[object Int8Array]"]=U["[object Int16Array]"]=U["[object Int32Array]"]=U["[object Map]"]=U["[object Number]"]=U[V]=U["[object RegExp]"]=U["[object Set]"]=U["[object String]"]=U["[object Symbol]"]=U["[object Uint8Array]"]=U["[object Uint8ClampedArray]"]=U["[object Uint16Array]"]=U["[object Uint32Array]"]=!0,U["[object Error]"]=U[B]=U["[object WeakMap]"]=!1;let W=function e(t,r,y,g,b,w){var x,E=1&r,S=2&r,D=4&r;if(y&&(x=b?y(t,g,b,w):y(t)),void 0!==x)return x;if(!(0,M.A)(t))return t;var O=(0,A.A)(t);if(O){if(x=v(t),!E)return(0,c.A)(t,x)}else{var k,T,R,N,$=(0,m.A)(t),W=$==B||"[object GeneratorFunction]"==$;if((0,j.A)(t))return(0,u.A)(t,E);if($==V||$==F||W&&!b){if(x=S||W?{}:(0,C.A)(t),!E)return S?(T=(k=x)&&(0,a.A)(t,(0,l.A)(t),k),(0,a.A)(t,(0,f.A)(t),T)):(N=(R=x)&&(0,a.A)(t,(0,s.A)(t),R),(0,a.A)(t,(0,d.A)(t),N))}else{if(!U[$])return b?t:{};x=P(t,$,E)}}w||(w=new n.A);var z=w.get(t);if(z)return z;w.set(t,x),L(t)?t.forEach(function(n){x.add(e(n,r,y,n,t,w))}):I(t)&&t.forEach(function(n,i){x.set(i,e(n,r,y,i,t,w))});var K=D?S?h.A:p.A:S?l.A:s.A,H=O?void 0:K(t);return i(H||t,function(n,i){H&&(n=t[i=n]),(0,o.A)(x,i,e(n,r,y,i,t,w))}),x}},25246(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(94215),i=r(6476);let o=function(e,t,r){var o=t(e);return(0,i.A)(e)?o:(0,n.A)(o,r(e))}},15893(e,t,r){"use strict";r.d(t,{A:()=>d});var n=r(79788),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=n.A?n.A.toStringTag:void 0;let l=function(e){var t=o.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var i=a.call(e);return n&&(t?e[s]=r:delete e[s]),i};var u=Object.prototype.toString,c=n.A?n.A.toStringTag:void 0;let d=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":c&&c in Object(e)?l(e):u.call(e)}},33743(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(47508),i=(0,r(22684).A)(Object.keys,Object),o=Object.prototype.hasOwnProperty;let a=function(e){if(!(0,n.A)(e))return i(e);var t=[];for(var r in Object(e))o.call(e,r)&&"constructor"!=r&&t.push(r);return t}},44096(e,t,r){"use strict";r.d(t,{A:()=>O});var n=r(86692),i=r(70903),o=r(76147);let a=function(e,t,r){(void 0===r||(0,o.A)(e[t],r))&&(void 0!==r||t in e)||(0,i.A)(e,t,r)},s=function(e,t,r){for(var n=-1,i=Object(e),o=r(e),a=o.length;a--;){var s=o[++n];if(!1===t(i[s],s,i))break}return e};var l=r(83033),u=r(72814),c=r(10564),d=r(39493),f=r(36791),p=r(6476),h=r(39715),m=r(94337),y=r(70200),v=r(45333),g=r(60230),b=r(29642),w=r(28481);let x=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};var E=r(30526),S=r(33265);let D=function(e,t,r,n,i,o,s){var D=x(e,r),O=x(t,r),P=s.get(O);if(P)return void a(e,r,P);var C=o?o(D,O,r+"",e,t,s):void 0,A=void 0===C;if(A){var j=(0,p.A)(O),k=!j&&(0,y.A)(O),T=!j&&!k&&(0,w.A)(O);(C=O,j||k||T)?(0,p.A)(D)?C=D:(0,m.A)(D)&&(0,h.A)(D)?C=(0,c.A)(D):k?(A=!1,C=(0,l.A)(O,!0)):T?(A=!1,C=(0,u.A)(O,!0)):C=[]:(0,b.A)(O)||(0,f.A)(O)?(C=D,(0,f.A)(D))?C=(0,E.A)(D,(0,S.A)(D)):(!(0,g.A)(D)||(0,v.A)(D))&&(C=(0,d.A)(O)):A=!1}A&&(s.set(O,C),i(C,O,n,o,s),s.delete(O)),a(e,r,C)},O=function e(t,r,i,o,l){t!==r&&s(r,function(s,u){if(l||(l=new n.A),(0,g.A)(s))D(t,r,u,i,e,o,l);else{var c=o?o(x(t,u),s,u+"",t,r,l):void 0;void 0===c&&(c=s),a(t,u,c)}},S.A)}},86110(e,t,r){"use strict";r.d(t,{A:()=>n});let n=function(e){return function(t){return e(t)}}},16548(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(52969);let i=function(e){var t=new e.constructor(e.byteLength);return new n.A(t).set(new n.A(e)),t}},83033(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(69344),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&"object"==typeof module&&module&&!module.nodeType&&module,a=o&&o.exports===i?n.A.Buffer:void 0,s=a?a.allocUnsafe:void 0;let l=function(e,t){if(t)return e.slice();var r=e.length,n=s?s(r):new e.constructor(r);return e.copy(n),n}},72814(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(16548);let i=function(e,t){var r=t?(0,n.A)(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}},10564(e,t,r){"use strict";r.d(t,{A:()=>n});let n=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},30526(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(15116),i=r(70903);let o=function(e,t,r,o){var a=!r;r||(r={});for(var s=-1,l=t.length;++s<l;){var u=t[s],c=o?o(r[u],e[u],u,r,e):void 0;void 0===c&&(c=e[u]),a?(0,i.A)(r,u,c):(0,n.A)(r,u,c)}return r}},17723(e,t,r){"use strict";r.d(t,{A:()=>d});var n=r(47351),i=r(61680),o=r(95218),a=r(76147),s=r(39715),l=r(97458),u=r(60230);let c=function(e,t,r){if(!(0,u.A)(r))return!1;var n=typeof t;return("number"==n?!!((0,s.A)(r)&&(0,l.A)(t,r.length)):"string"==n&&t in r)&&(0,a.A)(r[t],e)},d=function(e){var t;return t=function(t,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,a&&c(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++n<i;){var s=r[n];s&&e(t,s,n,o)}return t},(0,o.A)((0,i.A)(t,void 0,n.A),t+"")}},70382(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(20014);let i=function(){try{var e=(0,n.A)(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},35481(e,t,r){"use strict";r.d(t,{A:()=>n});let n="object"==typeof global&&global&&global.Object===Object&&global},28667(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(25246),i=r(98517),o=r(51897);let a=function(e){return(0,n.A)(e,o.A,i.A)}},50056(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(25246),i=r(36350),o=r(33265);let a=function(e){return(0,n.A)(e,o.A,i.A)}},20014(e,t,r){"use strict";r.d(t,{A:()=>m});var n,i=r(45333),o=r(69344).A["__core-js_shared__"],a=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",s=r(60230),l=r(46460),u=/^\[object .+?Constructor\]$/,c=Object.prototype,d=Function.prototype.toString,f=c.hasOwnProperty,p=RegExp("^"+d.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");let h=function(e){return!!(0,s.A)(e)&&(!a||!(a in e))&&((0,i.A)(e)?p:u).test((0,l.A)(e))},m=function(e,t){var r=null==e?void 0:e[t];return h(r)?r:void 0}},20526(e,t,r){"use strict";r.d(t,{A:()=>n});let n=(0,r(22684).A)(Object.getPrototypeOf,Object)},98517(e,t,r){"use strict";r.d(t,{A:()=>s});let n=function(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o};var i=r(70140),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols;let s=a?function(e){return null==e?[]:n(a(e=Object(e)),function(t){return o.call(e,t)})}:i.A},36350(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(94215),i=r(20526),o=r(98517),a=r(70140);let s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)(0,n.A)(t,(0,o.A)(e)),e=(0,i.A)(e);return t}:a.A},78014(e,t,r){"use strict";r.d(t,{A:()=>S});var n=r(20014),i=r(69344),o=(0,n.A)(i.A,"DataView"),a=r(47756),s=(0,n.A)(i.A,"Promise"),l=(0,n.A)(i.A,"Set"),u=(0,n.A)(i.A,"WeakMap"),c=r(15893),d=r(46460),f="[object Map]",p="[object Promise]",h="[object Set]",m="[object WeakMap]",y="[object DataView]",v=(0,d.A)(o),g=(0,d.A)(a.A),b=(0,d.A)(s),w=(0,d.A)(l),x=(0,d.A)(u),E=c.A;(o&&E(new o(new ArrayBuffer(1)))!=y||a.A&&E(new a.A)!=f||s&&E(s.resolve())!=p||l&&E(new l)!=h||u&&E(new u)!=m)&&(E=function(e){var t=(0,c.A)(e),r="[object Object]"==t?e.constructor:void 0,n=r?(0,d.A)(r):"";if(n)switch(n){case v:return y;case g:return f;case b:return p;case w:return h;case x:return m}return t});let S=E},39493(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(60230),i=Object.create,o=function(){function e(){}return function(t){if(!(0,n.A)(t))return{};if(i)return i(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),a=r(20526),s=r(47508);let l=function(e){return"function"!=typeof e.constructor||(0,s.A)(e)?{}:o((0,a.A)(e))}},97458(e,t,r){"use strict";r.d(t,{A:()=>i});var n=/^(?:0|[1-9]\d*)$/;let i=function(e,t){var r=typeof e;return!!(t=null==t?0x1fffffffffffff:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<t}},47508(e,t,r){"use strict";r.d(t,{A:()=>i});var n=Object.prototype;let i=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},79640(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(35481),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&"object"==typeof module&&module&&!module.nodeType&&module,a=o&&o.exports===i&&n.A.process;let s=function(){try{var e=o&&o.require&&o.require("util").types;if(e)return e;return a&&a.binding&&a.binding("util")}catch(e){}}()},22684(e,t,r){"use strict";r.d(t,{A:()=>n});let n=function(e,t){return function(r){return e(t(r))}}},61680(e,t,r){"use strict";r.d(t,{A:()=>o});let n=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 i=Math.max;let o=function(e,t,r){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),l=Array(s);++a<s;)l[a]=o[t+a];a=-1;for(var u=Array(t+1);++a<t;)u[a]=o[a];return u[t]=r(l),n(e,this,u)}}},69344(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(35481),i="object"==typeof self&&self&&self.Object===Object&&self;let o=n.A||i||Function("return this")()},95218(e,t,r){"use strict";r.d(t,{A:()=>u});var n,i,o=r(70382),a=r(47351),s=o.A?function(e,t){return(0,o.A)(e,"toString",{configurable:!0,enumerable:!1,value:function(){return t},writable:!0})}:a.A,l=Date.now;let u=(n=0,i=0,function(){var e=l(),t=16-(e-i);if(i=e,t>0){if(++n>=800)return arguments[0]}else n=0;return s.apply(void 0,arguments)})},46460(e,t,r){"use strict";r.d(t,{A:()=>i});var n=Function.prototype.toString;let i=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},76147(e,t,r){"use strict";r.d(t,{A:()=>n});let n=function(e,t){return e===t||e!=e&&t!=t}},47351(e,t,r){"use strict";r.d(t,{A:()=>n});let n=function(e){return e}},36791(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(15893),i=r(94337);let o=function(e){return(0,i.A)(e)&&"[object Arguments]"==(0,n.A)(e)};var a=Object.prototype,s=a.hasOwnProperty,l=a.propertyIsEnumerable;let u=o(function(){return arguments}())?o:function(e){return(0,i.A)(e)&&s.call(e,"callee")&&!l.call(e,"callee")}},6476(e,t,r){"use strict";r.d(t,{A:()=>n});let n=Array.isArray},39715(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(45333),i=r(27333);let o=function(e){return null!=e&&(0,i.A)(e.length)&&!(0,n.A)(e)}},70200(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(69344),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&"object"==typeof module&&module&&!module.nodeType&&module,a=o&&o.exports===i?n.A.Buffer:void 0;let s=(a?a.isBuffer:void 0)||function(){return!1}},37315(e,t,r){"use strict";r.d(t,{A:()=>j});var n=r(86692),i=r(95732);function o(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new i.A;++t<r;)this.add(e[t])}o.prototype.add=o.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},o.prototype.has=function(e){return this.__data__.has(e)};let a=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},s=function(e,t,r,n,i,s){var l=1&r,u=e.length,c=t.length;if(u!=c&&!(l&&c>u))return!1;var d=s.get(e),f=s.get(t);if(d&&f)return d==t&&f==e;var p=-1,h=!0,m=2&r?new o:void 0;for(s.set(e,t),s.set(t,e);++p<u;){var y=e[p],v=t[p];if(n)var g=l?n(v,y,p,t,e,s):n(y,v,p,e,t,s);if(void 0!==g){if(g)continue;h=!1;break}if(m){if(!a(t,function(e,t){if(!m.has(t)&&(y===e||i(y,e,r,n,s)))return m.push(t)})){h=!1;break}}else if(!(y===v||i(y,v,r,n,s))){h=!1;break}}return s.delete(e),s.delete(t),h};var l=r(79788),u=r(52969),c=r(76147);let d=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r},f=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r};var p=l.A?l.A.prototype:void 0,h=p?p.valueOf:void 0;let m=function(e,t,r,n,i,o,a){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!o(new u.A(e),new u.A(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,c.A)(+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 l=d;case"[object Set]":var p=1&n;if(l||(l=f),e.size!=t.size&&!p)break;var m=a.get(e);if(m)return m==t;n|=2,a.set(e,t);var y=s(l(e),l(t),n,i,o,a);return a.delete(e),y;case"[object Symbol]":if(h)return h.call(e)==h.call(t)}return!1};var y=r(28667),v=Object.prototype.hasOwnProperty;let g=function(e,t,r,n,i,o){var a=1&r,s=(0,y.A)(e),l=s.length;if(l!=(0,y.A)(t).length&&!a)return!1;for(var u=l;u--;){var c=s[u];if(!(a?c in t:v.call(t,c)))return!1}var d=o.get(e),f=o.get(t);if(d&&f)return d==t&&f==e;var p=!0;o.set(e,t),o.set(t,e);for(var h=a;++u<l;){var m=e[c=s[u]],g=t[c];if(n)var b=a?n(g,m,c,t,e,o):n(m,g,c,e,t,o);if(!(void 0===b?m===g||i(m,g,r,n,o):b)){p=!1;break}h||(h="constructor"==c)}if(p&&!h){var w=e.constructor,x=t.constructor;w!=x&&"constructor"in e&&"constructor"in t&&!("function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x)&&(p=!1)}return o.delete(e),o.delete(t),p};var b=r(78014),w=r(6476),x=r(70200),E=r(28481),S="[object Arguments]",D="[object Array]",O="[object Object]",P=Object.prototype.hasOwnProperty;let C=function(e,t,r,i,o,a){var l=(0,w.A)(e),u=(0,w.A)(t),c=l?D:(0,b.A)(e),d=u?D:(0,b.A)(t);c=c==S?O:c,d=d==S?O:d;var f=c==O,p=d==O,h=c==d;if(h&&(0,x.A)(e)){if(!(0,x.A)(t))return!1;l=!0,f=!1}if(h&&!f)return a||(a=new n.A),l||(0,E.A)(e)?s(e,t,r,i,o,a):m(e,t,c,r,i,o,a);if(!(1&r)){var y=f&&P.call(e,"__wrapped__"),v=p&&P.call(t,"__wrapped__");if(y||v){var C=y?e.value():e,A=v?t.value():t;return a||(a=new n.A),o(C,A,r,i,a)}}return!!h&&(a||(a=new n.A),g(e,t,r,i,o,a))};var A=r(94337);let j=function(e,t){return function e(t,r,n,i,o){return t===r||(null!=t&&null!=r&&((0,A.A)(t)||(0,A.A)(r))?C(t,r,n,i,e,o):t!=t&&r!=r)}(e,t)}},45333(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(15893),i=r(60230);let o=function(e){if(!(0,i.A)(e))return!1;var t=(0,n.A)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},27333(e,t,r){"use strict";r.d(t,{A:()=>n});let n=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}},60230(e,t,r){"use strict";r.d(t,{A:()=>n});let n=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},94337(e,t,r){"use strict";r.d(t,{A:()=>n});let n=function(e){return null!=e&&"object"==typeof e}},29642(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(15893),i=r(20526),o=r(94337),a=Object.prototype,s=Function.prototype.toString,l=a.hasOwnProperty,u=s.call(Object);let c=function(e){if(!(0,o.A)(e)||"[object Object]"!=(0,n.A)(e))return!1;var t=(0,i.A)(e);if(null===t)return!0;var r=l.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&s.call(r)==u}},48489(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(15893),i=r(94337);let o=function(e){return"symbol"==typeof e||(0,i.A)(e)&&"[object Symbol]"==(0,n.A)(e)}},28481(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(15893),i=r(27333),o=r(94337),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;var s=r(86110),l=r(79640),u=l.A&&l.A.isTypedArray;let c=u?(0,s.A)(u):function(e){return(0,o.A)(e)&&(0,i.A)(e.length)&&!!a[(0,n.A)(e)]}},51897(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(70197),i=r(33743),o=r(39715);let a=function(e){return(0,o.A)(e)?(0,n.A)(e):(0,i.A)(e)}},33265(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(70197),i=r(60230),o=r(47508);let a=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t};var s=Object.prototype.hasOwnProperty;let l=function(e){if(!(0,i.A)(e))return a(e);var t=(0,o.A)(e),r=[];for(var n in e)"constructor"==n&&(t||!s.call(e,n))||r.push(n);return r};var u=r(39715);let c=function(e){return(0,u.A)(e)?(0,n.A)(e,!0):l(e)}},34221(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(44096);let i=(0,r(17723).A)(function(e,t,r){(0,n.A)(e,t,r)})},61907(e,t,r){"use strict";r.d(t,{A:()=>B});var n,i,o,a=r(12477),s=r(82838),l=r(6476),u=r(48489),c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,d=/^\w*$/;let f=function(e,t){if((0,l.A)(e))return!1;var r=typeof e;return!!("number"==r||"symbol"==r||"boolean"==r||null==e||(0,u.A)(e))||d.test(e)||!c.test(e)||null!=t&&e in Object(t)};var p=r(95732);function h(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(h.Cache||p.A),r}h.Cache=p.A;var m=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,y=/\\(\\)?/g,v=(i=(n=h(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(m,function(e,r,n,i){t.push(n?i.replace(y,"$1"):r||e)}),t},function(e){return 500===i.size&&i.clear(),e})).cache,n),g=r(44314);let b=function(e,t){return(0,l.A)(e)?e:f(e,t)?[e]:v((0,g.A)(e))},w=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};var x=1/0;let E=function(e){if("string"==typeof e||(0,u.A)(e))return e;var t=e+"";return"0"==t&&1/e==-x?"-0":t},S=function(e,t){t=b(t,e);for(var r=0,n=t.length;null!=e&&r<n;)e=e[E(t[r++])];return r&&r==n?e:void 0},D=function(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(i);++n<i;)o[n]=e[n+t];return o};var O=Object.prototype.hasOwnProperty;let P=function(e,t){t=b(t,e);var r,n=-1,i=t.length;if(!i)return!0;for(var o=null==e||"object"!=typeof e&&"function"!=typeof e;++n<i;){var a=t[n];if("string"==typeof a){if("__proto__"===a&&!O.call(e,"__proto__"))return!1;if("constructor"===a&&n+1<i&&"string"==typeof t[n+1]&&"prototype"===t[n+1]){if(o&&0===n)continue;return!1}}}var s=(r=t).length<2?e:S(e,D(r,0,-1));return null==s||delete s[E(w(t))]};var C=r(30526),A=r(29642);let j=function(e){return(0,A.A)(e)?void 0:e};var k=r(94215),T=r(79788),R=r(36791),N=T.A?T.A.isConcatSpreadable:void 0;let I=function(e){return(0,l.A)(e)||(0,R.A)(e)||!!(N&&e&&e[N])},M=function e(t,r,n,i,o){var a=-1,s=t.length;for(n||(n=I),o||(o=[]);++a<s;){var l=t[a];r>0&&n(l)?r>1?e(l,r-1,n,i,o):(0,k.A)(o,l):i||(o[o.length]=l)}return o};var $=r(61680),L=r(95218),F=r(50056);let B=(o=function(e,t){var r={};if(null==e)return r;var n=!1;t=(0,a.A)(t,function(t){return t=b(t,e),n||(n=t.length>1),t}),(0,C.A)(e,(0,F.A)(e),r),n&&(r=(0,s.A)(r,7,j));for(var i=t.length;i--;)P(r,t[i]);return r},(0,L.A)((0,$.A)(o,void 0,function(e){return(null==e?0:e.length)?M(e,1):[]}),o+""))},70140(e,t,r){"use strict";r.d(t,{A:()=>n});let n=function(){return[]}},44314(e,t,r){"use strict";r.d(t,{A:()=>d});var n=r(79788),i=r(12477),o=r(6476),a=r(48489),s=1/0,l=n.A?n.A.prototype:void 0,u=l?l.toString:void 0;let c=function e(t){if("string"==typeof t)return t;if((0,o.A)(t))return(0,i.A)(t,e)+"";if((0,a.A)(t))return u?u.call(t):"";var r=t+"";return"0"==r&&1/t==-s?"-0":r},d=function(e){return null==e?"":c(e)}},87757(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){var n,i,o;n=e,i=t,o=r[t],i in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){var r;if("function"!=typeof(r=t.domElement?function(){return t.domElement}:t.domElementGetter?t.domElementGetter:e.domElementGetter?e.domElementGetter:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var r="single-spa-application:".concat(t);return function(){var e=document.getElementById(r);return e||((e=document.createElement("div")).id=r,document.body.appendChild(e)),e}}(t)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(t.name,"'. Expected a function, received ").concat(a(r)));return function(){var e=r(t);if(!(e instanceof HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(t.name,"'. Expected HTMLElement, received ").concat(a(e)));return e}}r.d(t,{A:()=>c,i:()=>l});var l=null;try{l=require("react").createContext()}catch(e){}var u={React:null,ReactDOM:null,ReactDOMClient:null,rootComponent:null,loadRootComponent:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{},unmountResolves:{}};function c(e){if("object"!==o(e))throw Error("single-spa-react requires a configuration object");var t,r=i(i({},u),e);if(!r.React)throw Error("single-spa-react must be passed opts.React");if(!r.ReactDOM&&!r.ReactDOMClient)throw Error("single-spa-react must be passed opts.ReactDOM or opts.ReactDOMClient");if(r.renderType||(null!=(t=r.ReactDOMClient)&&t.createRoot?r.renderType="createRoot":r.renderType="render"),!r.rootComponent&&!r.loadRootComponent)throw Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(r.errorBoundary&&"function"!=typeof r.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!l&&r.React.createContext&&(l=r.React.createContext()),r.SingleSpaRoot=function(e){function t(e){t.displayName="SingleSpaRoot(".concat(e.name,")")}return t.prototype=Object.create(e.React.Component.prototype),t.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},t.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},t.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},t}(r);var n={bootstrap:d.bind(null,r),mount:f.bind(null,r),unmount:p.bind(null,r)};return r.parcelCanUpdate&&(n.update=h.bind(null,r)),n}function d(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then(function(t){e.rootComponent=t})}function f(e,t){return new Promise(function(r,n){e.suppressComponentDidCatchWarning||!function(e){if(!(e&&"string"==typeof e.version&&e.version.indexOf(".")>=0))return!1;var t=e.version.slice(0,e.version.indexOf("."));try{return Number(t)>=16}catch(e){return!1}}(e.React)||e.errorBoundary||e.errorBoundaryClass||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var i,o=y(e,t,function(){r(this)}),a=s(e,t)(),l=function(e){var t=e.reactDom,r=e.renderType,n=e.elementToRender,i=e.domElement,o=t[r];if("function"!=typeof o)throw Error('renderType "'.concat(r,'" did not return a function.'));switch(r){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var a=o(i);return a.render(n),a;case"hydrateRoot":return o(i,n);default:return o(n,i),null}}({elementToRender:o,domElement:a,reactDom:m(e),renderType:"function"==typeof(i=e).renderType?i.renderType():i.renderType});e.domElements[t.name]=a,e.renderResults[t.name]=l})}function p(e,t){return new Promise(function(r){e.unmountResolves[t.name]=r;var n=e.renderResults[t.name];n&&n.unmount?n.unmount():m(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]})}function h(e,t){return new Promise(function(r){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(r);var n=y(e,t,null),i=e.renderResults[t.name];if(i&&i.render)i.render(n);else{var o=s(e,t)();m(e).render(n,o)}})}function m(e){return e.ReactDOMClient||e.ReactDOM}function y(e,t,r){var n=e.React.createElement(e.rootComponent,t),o=l?e.React.createElement(l.Provider,{value:t},n):n;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function r(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},r.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return r.prototype=Object.create(e.React.Component.prototype),r.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},r.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},r}(e,t),o=e.React.createElement(e.errorBoundaryClass,t,o)),o=e.React.createElement(e.SingleSpaRoot,i(i({},t),{},{mountFinished:r,updateFinished:function(){e.updateResolves[t.name]&&(e.updateResolves[t.name].forEach(function(e){return e()}),delete e.updateResolves[t.name])},unmountFinished:function(){e.unmountResolves[t.name]&&(e.unmountResolves[t.name](),delete e.unmountResolves[t.name])}}),o)}},464(e,t,r){"use strict";r.d(t,{lo:()=>v,HW:()=>E,QE:()=>I,xC:()=>A,$f:()=>b,Kx:()=>j,EW:()=>S,E4:()=>D,Gm:()=>y,eA:()=>w,yH:()=>O,ut:()=>g,Y0:()=>M,L7:()=>N,IU:()=>h,Jj:()=>p,g$:()=>P,Gp:()=>k,Ct:()=>m,Fi:()=>T,st:()=>C});var n=r(8685),i=r(61841);let o=function(e){return void 0===e};var a=r(67436),s=r(29642),l=r(82460),u=r(72448);let c="${openmrsSpaBase}/login",d={redirectAuthFailure:{enabled:{_type:l.ZU.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:l.ZU.String,_default:c,_validators:[l.y$.isUrl],_description:"The url to which users will be redirected when they are logged out. If set to blank, the `location` header from the response will be used."},errors:{_type:l.ZU.Array,_default:[401],_elements:{_type:l.ZU.Number,_validators:[l.y$.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:l.ZU.Boolean,_default:!1,_description:"Changes how requests that fail authentication are handled. Try messing with this if redirects to the login page aren't working correctly."}},followRedirects:{_type:l.ZU.Boolean,_default:!0,_description:"Whether openmrsFetch should support redirects returned from the backend"}};function f(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}let p="/ws/rest/v1",h="/ws/fhir2/R4",m=`${p}/session`;function y(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)}function v(e,t={}){if("string"!=typeof e)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof t)throw Error("The second argument to @openmrs/api's openmrsFetch function must be a plain object.");if(!window.openmrsBase)throw Error("@openmrs/api is running in a browser that doesn't have window.openmrsBase, which is provided by openmrs-module-spa's HTML file.");let r=y(e);if(t.headers||(t.headers={}),(0,s.A)(t.body)&&(t.body=JSON.stringify(t.body)),void 0===t.headers.Accept&&(t.headers.Accept="application/json"),null===t.headers.Accept&&delete t.headers.Accept,e.startsWith(p)&&void 0===t.headers["Disable-WWW-Authenticate"]&&(t.headers["Disable-WWW-Authenticate"]="true"),e.startsWith(h)){let e=new URL(r,window.location.toString());e.searchParams.has("_summary")||(e.searchParams.set("_summary","data"),r=e.toString())}let n=Error();return window.fetch(r,t).then(async e=>{let{redirectAuthFailure:t,followRedirects:i}=await (0,l.zj)("@openmrs/esm-api");if(e.ok){let t=e.headers.get("location");return(i&&t&&(r===y(m)||204===e.status)&&(0,u.oo)({to:t}),204===e.status)?(e.data=null,e):e.clone().text().then(t=>{try{t&&(e.data=JSON.parse(t))}catch(e){}return e})}if(!(r===y(m)&&403===e.status||t.enabled&&t.errors.includes(e.status)))return e.clone().text().then(t=>{let i=t;try{i=JSON.parse(t)}catch(e){}throw new b(r,e,i,n)},t=>{throw new b(r,e,null,n)});{(0,u.g4)();let r=t.url||e.headers.get("location")||c;return(0,u.oo)({to:r}),t.resolvePromise?Promise.resolve():new Promise(()=>{})}})}function g(e,t={}){if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");let r=new AbortController;return t.signal=r.signal,new a.Observable(n=>{let i=!1;return v(e,t).then(e=>{i=!0,n.next(e),n.complete()},e=>{i=!0,n.error(e)}),()=>{i||r.abort()}})}class b extends Error{constructor(e,t,r,n){super(),f(this,"response",void 0),f(this,"responseBody",void 0),this.message=`Server responded with ${t.status} (${t.statusText}) for url ${e}. Check err.responseBody or network tab in dev tools for more info`,n.message=this.message,this.responseBody=r,this.response=t,this.stack=`Stacktrace for outgoing request:
2
2
  ${n.stack}
3
3
  Stacktrace for incoming response:
4
- ${this.stack}`}}let w=(0,i.Zd)("session",{loaded:!1,session:null}),x=0;function E(e={includeAuthStatus:!0}){return(x<Date.now()-6e4||!w.getState().loaded)&&O(),new a.Observable(t=>{let r=r=>{r.loaded&&(e.includeAuthStatus?t.next(r.session):t.next(r.session?.user))};return r(w.getState()),w.subscribe(r)})}function S(){return(x<Date.now()-6e4||!w.getState().loaded)&&O(),w}function D(e){let t=e.locale??e.user?.userProperties?.defaultLocale;t&&t.includes("_")&&(t=t.replaceAll("_","-")),function(e){if(void 0===e||"string"!=typeof e)return!1;try{new Intl.Locale(e)}catch(e){return!1}return!0}(t)&&t!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",t)}function O(e,t){x=Date.now();let r={};return e&&t&&(r.Authorization=`Basic ${window.btoa(`${e}:${t}`)}`),R(v(m,{headers:r}))}function P(){w.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})}function C(e,t){var r,n;if(void 0===t)return!e;if(!e)return!0;return r=e,n=t,("string"==typeof r?!o(n.privileges.find(e=>r===e.display)):Array.isArray(r)?r.every(e=>!o(n.privileges.find(t=>e===t.display))):(o(r)||console.error(`Could not understand privileges "${r}"`),!0))||!o(t.roles.find(e=>"System Developer"===e.display))}function A(){let e,t;return new Promise(r=>{let n=n=>{n.loaded&&n.session.user&&(e=n.session.user,r(n.session.user),t&&t())};n(w.getState()),e||(t=w.subscribe(n))})}function j(){return new Promise((e,t)=>{E().subscribe(t=>{e(t.sessionLocation)},t).unsubscribe()})}async function k(e,t){return R(v(m,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal}))}async function T(e,t,r){return r||(r=new AbortController),await v(`${p}/user/${e}`,{method:"POST",body:{userProperties:t},headers:{"Content-Type":"application/json"},signal:r.signal}),O()}function R(e){return new Promise((t,r)=>{e.then(e=>{let n;"object"==typeof e?.data?(n={loaded:!0,session:e.data},w.setState(n),t(n)):(n={loaded:!1,session:null},w.setState(n),r(n))}).catch(e=>{(0,n.N)(`Failed to fetch new session information: ${e}`);let t={loaded:!1,session:null};w.setState(t),r(t)})})}function N(){return"development"===window.spaEnv||"true"===localStorage.getItem("openmrs:devtools")}w.subscribe(e=>{e.loaded&&e.session&&D(e.session)});let I={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"};function M(){(0,l.T0)("@openmrs/esm-api",d),O()}},82460(e,t,r){"use strict";let n;r.d(t,{Gt:()=>et,ks:()=>ee,GV:()=>X,YP:()=>O,hs:()=>S,T0:()=>Y,Nc:()=>d,ZU:()=>c,td:()=>ei,qG:()=>eP,GI:()=>A,BQ:()=>V,FL:()=>J,g$:()=>T,H:()=>E,zj:()=>en,mq:()=>eo,gU:()=>eC,tN:()=>W,OR:()=>L,EN:()=>$,P0:()=>k,IS:()=>D,UY:()=>j,Nh:()=>ex,kl:()=>Q,lJ:()=>B,vu:()=>C,r4:()=>eO,yL:()=>eA,Nz:()=>eE,y$:()=>ej,G9:()=>P,Rt:()=>x});var i,o=r(44096),a=(0,r(17723).A)(function(e,t,r,n){(0,o.A)(e,t,r,n)}),s=r(37315),l=r(61907),u=r(82838),c=((i={}).Array="Array",i.Boolean="Boolean",i.ConceptUuid="ConceptUuid",i.Number="Number",i.Object="Object",i.String="String",i.UUID="UUID",i.PersonAttributeTypeUuid="PersonAttributeTypeUuid",i.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid",i);function d(e,t){return r=>{if(!e(r))if("function"==typeof t)return t(r);else return t}}let f=d(e=>Array.isArray(e),"must be an array"),p=d(e=>"boolean"==typeof e,"must be a boolean"),h=d(e=>"number"==typeof e,"must be a number"),m=d(e=>"string"==typeof e,"must be a string"),y=d(e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,"must be an object (not an array or null)"),v=d(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");var g=r(61841),b=r(92424),w=r(19167);let x=(0,g.Zd)("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),E=(0,g.Zd)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});E.subscribe(e=>{var t=e.config;try{localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}catch(e){}});let S=(0,g.Zd)("config-store-of-extension-state",{mountedExtensions:[]});function D(e){return(0,g.jf)(`config-module-${e}`,{config:null,loaded:!1,translationOverridesLoaded:!1})}function O(){return(0,g.jf)("config-extension-slots",{slots:{}})}function P(e){return C(O().getState(),e)}function C(e,t){return e.slots[t]??{loaded:!1,config:{}}}function A(){return(0,g.jf)("config-extensions",{configs:{}})}function j(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=A(),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 i=n(t),o=n(r);(0,b.b)(i,o)||e(i,o)})}}function k(e,t,r){return e.configs[t]?.[r]??{loaded:!1,config:null}}function T(e,t,r){return e.configure?.[r]??null}let R=(0,w.y)()(()=>({config:{}})),N=0,I=!0,M=!1;function $(e){n=e}function L(){I=!0,N>0&&F()}function F(){if(I&&n&&!M){M=!0,I=!1;try{n()}catch(e){I=!0,B(e),console.error("Failed to derive the implementer tools config",e)}finally{M=!1}}}function B(e){R.setState({derivationError:e instanceof Error?e.message:String(e)})}function V(){R.getState().derivationError&&R.setState({derivationError:void 0})}let U={...R,getState:()=>(0===N&&F(),R.getState()),setState:(...e)=>(I=!1,R.setState(...e)),subscribe(e){N++,F();let t=R.subscribe(e),r=!1;return()=>{!r&&(r=!0,N--),t()}}},W=(0,g.CE)("config-implementer-tools",U);function z(e,t){return a({},e,t,(e,t)=>{if(Array.isArray(t))return t})}let K=[];function H(){let e=x.getState(),t=E.getState(),r=S.getState();(function(e,t){for(let r of Object.keys(e.schemas)){let n,i=D(r),o=e.schemas[r],a=!!e.moduleLoaded[r],l=Z.get(r);if(l&&l.schema===o&&l.moduleLoaded===a&&l.providedConfigs===e.providedConfigs&&l.temporaryConfig===t.config)n=l.state;else{let i=a?function(e,t,r){let n=t.schemas[e],i=ed(e,eu(t,r));ep(n,i,e);let o=ev(n,i);return eh(n,o,e),delete o.extensionSlots,o}(r,e,t):function(e,t,r){let n=ev(eD,ed(e,eu(t,r)));return eh(eD,n,e),delete n.extensionSlots,n}(r,e,t);n={translationOverridesLoaded:!0,loaded:a,config:i},Z.set(r,{schema:o,moduleLoaded:a,providedConfigs:e.providedConfigs,temporaryConfig:t.config,state:n})}let u=i.getState();u.loaded===n.loaded&&u.translationOverridesLoaded===n.translationOverridesLoaded&&(0,s.A)(u.config,n.config)||i.setState(n)}})(e,t),function(e,t){let r,n,i=(function(e){for(let[t,r]of Object.entries(e))for(let[e,n]of Object.entries(r))!function(e,t,r){let n=`${t}.extensionSlots.${r}`,i=`Extension slot config '${n}'`,o=Object.keys(e).filter(e=>!["add","remove","order","configure"].includes(e));o.length&&e_(n,i+`' contains invalid keys '${o.join("', '")}'`),!e.add||Array.isArray(e.add)&&e.add.every(e=>"string"==typeof e)||e_(n,i+".add' is invalid. Must be an array of strings (extension IDs)"),!e.remove||Array.isArray(e.remove)&&e.remove.every(e=>"string"==typeof e)||e_(n,i+".remove' is invalid. Must be an array of strings (extension IDs)"),!e.order||Array.isArray(e.order)&&e.order.every(e=>"string"==typeof e)||e_(n,i+".order' is invalid. Must be an array of strings (extension IDs)"),e.configure&&!eb(e.configure)&&e_(n,i+".configure' is invalid. Must be an object with extension IDs for keys")}(n,t,e)}(n=Object.keys(r=ef(eu(e,t))).reduce((e,t)=>(r[t]?.extensionSlots&&(e[t]=r[t]?.extensionSlots),e),{})),Object.keys(n).reduce((e,t)=>e={...e,...n[t]},{})),o=O(),a=o.getState().slots,l={},u=!1;for(let[e,t]of Object.entries(i)){let r=a[e];r?.loaded&&(0,s.A)(r.config,t)?l[e]=r:(l[e]={loaded:!0,config:t},u=!0)}(u||Object.keys(a).length!==Object.keys(l).length)&&o.setState({slots:l})}(e,t),function(e,t,r){let n=A(),i=n.getState().configs,o={},a=!1,l=0;for(let n of t.mountedExtensions){let t=function(e,t,r,n,i,o){let a=function(e){let[t]=e.split("#");return t}(n),s=i.schemas[a],l=JSON.stringify([r,n,e,t]),u=ea.get(l);if(u&&u.extensionSchema===s&&u.extensionModuleSchema===i.schemas[t]&&u.providedConfigs===i.providedConfigs&&u.temporaryConfig===o.config)return u.config;let c=s?a:t,d=eu(i,o),f=ed(e,d),p=f?.extensionSlots?.[r]?.configure?.[n]??{},h=ef([ed(c,d),p]),m=s??i.schemas[t];ep(m,h,c);let y=ev(m,h);return eh(m,y,c),delete y.extensionSlots,ea.set(l,{extensionSchema:s,extensionModuleSchema:i.schemas[t],providedConfigs:i.providedConfigs,temporaryConfig:o.config,config:y}),y}(n.slotModuleName,n.extensionModuleName,n.slotName,n.extensionId,e,r),u=i[n.slotName]?.[n.extensionId],c=u?.loaded&&(0,s.A)(u.config,t)?u:{config:t,loaded:!0};c!==u&&(a=!0),o[n.slotName]||(o[n.slotName]={}),o[n.slotName][n.extensionId]=c,l++}for(let[e,t]of Object.entries(o)){let r=i[e];r&&Object.keys(r).length===Object.keys(t).length&&Object.entries(t).every(([e,t])=>r[e]===t)&&(o[e]=r)}a||(a=Object.keys(i).length!==Object.keys(o).length||Object.values(i).reduce((e,t)=>e+Object.keys(t).length,0)!==l),a&&n.setState({configs:o})}(e,r,t),L()}function G(){n=()=>{var e,t;let r,n;return e=x.getState(),t=E.getState(),r=W.getState(),n={config:function(e,t){let r=function(e){let t={};for(let[r,n]of Object.entries(e)){let e=el.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"}:eb(t)?Object.keys(t).reduce((r,n)=>(r[n]=e(t[n]),r),{}):{}}((0,u.A)(n,5));el.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"]],i=new Set(Object.keys(r));for(let[e]of n)for(let t of Object.keys(e))i.add(t);let o={};for(let e of i){let t=r[e],i=n.map(([t])=>t[e]),a=n.map(([,e])=>e),s=es.get(e);if(s&&s.annotatedSchema===t&&s.configSlices.length===i.length&&s.configSlices.every((e,t)=>e===i[t])&&s.sources.every((e,t)=>e===a[t])){o[e]=s.result;continue}let l=t??{};n.forEach(([,e],t)=>{let r=i[t];void 0!==r&&(l=z(l,function e(t,r){return eb(t)?Object.keys(t).reduce((n,i)=>(n[i]=e(t[i],r),n),{}):{_value:t,_source:r}}(r,e)))}),es.set(e,{annotatedSchema:t,configSlices:i,sources:a,result:l}),o[e]=l}return o}(e,t)},void((0,s.A)(r.config,n.config)||W.setState(n))},H(),K.push(x.subscribe(q),E.subscribe(q),S.subscribe(q))}function q(){V();try{H()}catch(e){B(e),console.error("Failed to recompute the configuration",e)}}G();let Z=new Map;function Y(e,t){ec(e,t);let r=z(t,eD);x.setState(t=>({...t,schemas:{...t.schemas,[e]:r},moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function J(e){x.setState(t=>({...t,schemas:{...t.schemas,[e]:eD}}))}function Q(e){x.setState(t=>({...t,moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function X(e){x.setState(t=>({...t,schemas:{...t.schemas,[e]:eS}}))}function ee(e,t){ec(e,t);let r=z(t,eD);x.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.`),x.setState(t=>({...t,schemas:{...t.schemas,[e]:r}}))}function et(e,t="provided"){x.setState(r=>({...r,providedConfigs:[...r.providedConfigs,{source:t,config:e}]}))}function er(e,t,r){return new Promise(n=>{let i,o=!1;function a(e){!o&&t(e)&&(o=!0,n(r(e)),i?.())}a(e.getState()),o||(i=e.subscribe(a))})}function en(e){return er(D(e),e=>!!(e.loaded&&e.config),e=>(0,l.A)(e.config,["Display conditions","Translation overrides"]))}function ei(e,t,r){let n=[er(D(e),e=>!!(e.translationOverridesLoaded&&e.config),e=>e.config["Translation overrides"]??{})];return t&&r&&n.push(er(j(t,r),e=>!!(e.loaded&&e.config),e=>e.config["Translation overrides"]??{})),Promise.all(n)}function eo(e,t,r){ep(e,t,r);let n=ev(e,t);return eh(e,n,r),n}let ea=new Map,es=new Map,el=new Map;function eu(e,t){return[...e.providedConfigs.map(e=>e.config),t.config]}function ec(e,t,r=""){let n="Please verify that you are running the latest version and, if so, alert the maintainer.";for(let i of Object.keys(t).filter(e=>!e.startsWith("_"))){let o=r+(r&&".")+i,a=t[i];if("Display conditions"===o&&console.error(`${e} declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ${n}`),"Translation overrides"===o&&console.error(`${e} declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ${n}`),!eb(a)){console.error(`${e} has bad config schema definition for key '${o}'. ${n}`);continue}a.hasOwnProperty("_default")||ec(e,a,o);let s=a._elements;if(eg(s)&&ec(e,s,o+"._elements"),a._validators)for(let t of a._validators)"function"!=typeof t&&console.error(`${e} has invalid validator for key '${o}' ${n}.
4
+ ${this.stack}`}}let w=(0,i.Zd)("session",{loaded:!1,session:null}),x=0;function E(e={includeAuthStatus:!0}){return(x<Date.now()-6e4||!w.getState().loaded)&&O(),new a.Observable(t=>{let r=r=>{r.loaded&&(e.includeAuthStatus?t.next(r.session):t.next(r.session?.user))};return r(w.getState()),w.subscribe(r)})}function S(){return(x<Date.now()-6e4||!w.getState().loaded)&&O(),w}function D(e){let t=e.locale??e.user?.userProperties?.defaultLocale;t&&t.includes("_")&&(t=t.replaceAll("_","-")),function(e){if(void 0===e||"string"!=typeof e)return!1;try{new Intl.Locale(e)}catch(e){return!1}return!0}(t)&&t!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",t)}function O(e,t){x=Date.now();let r={};return e&&t&&(r.Authorization=`Basic ${window.btoa(`${e}:${t}`)}`),R(v(m,{headers:r}))}function P(){w.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})}function C(e,t){var r,n;if(void 0===t)return!e;if(!e)return!0;return r=e,n=t,("string"==typeof r?!o(n.privileges.find(e=>r===e.display)):Array.isArray(r)?r.every(e=>!o(n.privileges.find(t=>e===t.display))):(o(r)||console.error(`Could not understand privileges "${r}"`),!0))||!o(t.roles.find(e=>"System Developer"===e.display))}function A(){let e,t;return new Promise(r=>{let n=n=>{n.loaded&&n.session.user&&(e=n.session.user,r(n.session.user),t&&t())};n(w.getState()),e||(t=w.subscribe(n))})}function j(){return new Promise((e,t)=>{E().subscribe(t=>{e(t.sessionLocation)},t).unsubscribe()})}async function k(e,t){return R(v(m,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal}))}async function T(e,t,r){return r||(r=new AbortController),await v(`${p}/user/${e}`,{method:"POST",body:{userProperties:t},headers:{"Content-Type":"application/json"},signal:r.signal}),O()}function R(e){return new Promise((t,r)=>{e.then(e=>{let n;"object"==typeof e?.data?(n={loaded:!0,session:e.data},w.setState(n),t(n)):(n={loaded:!1,session:null},w.setState(n),r(n))}).catch(e=>{(0,n.N)(`Failed to fetch new session information: ${e}`);let t={loaded:!1,session:null};w.setState(t),r(t)})})}function N(){return"development"===window.spaEnv||"true"===localStorage.getItem("openmrs:devtools")}w.subscribe(e=>{e.loaded&&e.session&&D(e.session)});let I={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"};function M(){(0,l.T0)("@openmrs/esm-api",d),O()}},82460(e,t,r){"use strict";let n;r.d(t,{Gt:()=>er,ks:()=>et,GV:()=>ee,YP:()=>O,hs:()=>S,T0:()=>J,Nc:()=>d,ZU:()=>c,td:()=>eo,qG:()=>eC,GI:()=>A,BQ:()=>V,FL:()=>Q,g$:()=>T,H:()=>E,zj:()=>ei,mq:()=>ea,gU:()=>eA,tN:()=>W,OR:()=>L,EN:()=>$,P0:()=>k,IS:()=>D,UY:()=>j,Nh:()=>eE,kl:()=>X,lJ:()=>B,vu:()=>C,r4:()=>eP,yL:()=>ej,Nz:()=>eS,y$:()=>ek,G9:()=>P,Rt:()=>x});var i,o=r(44096),a=(0,r(17723).A)(function(e,t,r,n){(0,o.A)(e,t,r,n)}),s=r(37315),l=r(61907),u=r(82838),c=((i={}).Array="Array",i.Boolean="Boolean",i.ConceptUuid="ConceptUuid",i.Number="Number",i.Object="Object",i.String="String",i.UUID="UUID",i.PersonAttributeTypeUuid="PersonAttributeTypeUuid",i.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid",i);function d(e,t){return r=>{if(!e(r))if("function"==typeof t)return t(r);else return t}}let f=d(e=>Array.isArray(e),"must be an array"),p=d(e=>"boolean"==typeof e,"must be a boolean"),h=d(e=>"number"==typeof e,"must be a number"),m=d(e=>"string"==typeof e,"must be a string"),y=d(e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,"must be an object (not an array or null)"),v=d(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");var g=r(61841),b=r(92424),w=r(19167);let x=(0,g.Zd)("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),E=(0,g.Zd)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});E.subscribe(e=>{var t=e.config;try{localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}catch(e){}});let S=(0,g.Zd)("config-store-of-extension-state",{mountedExtensions:[]});function D(e){return(0,g.jf)(`config-module-${e}`,{config:null,loaded:!1,translationOverridesLoaded:!1})}function O(){return(0,g.jf)("config-extension-slots",{slots:{}})}function P(e){return C(O().getState(),e)}function C(e,t){return e.slots[t]??{loaded:!1,config:{}}}function A(){return(0,g.jf)("config-extensions",{configs:{}})}function j(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=A(),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 i=n(t),o=n(r);(0,b.b)(i,o)||e(i,o)})}}function k(e,t,r){return e.configs[t]?.[r]??{loaded:!1,config:null}}function T(e,t,r){return e.configure?.[r]??null}let R=(0,w.y)()(()=>({config:{}})),N=0,I=!0,M=!1;function $(e){n=e}function L(){I=!0,N>0&&F()}function F(){if(I&&n&&!M){M=!0,I=!1;try{n()}catch(e){I=!0,B(e),console.error("Failed to derive the implementer tools config",e)}finally{M=!1}}}function B(e){R.setState({derivationError:e instanceof Error?e.message:String(e)})}function V(){R.getState().derivationError&&R.setState({derivationError:void 0})}let U={...R,getState:()=>(0===N&&F(),R.getState()),setState:(...e)=>(I=!1,R.setState(...e)),subscribe(e){N++,F();let t=R.subscribe(e),r=!1;return()=>{!r&&(r=!0,N--),t()}}},W=(0,g.CE)("config-implementer-tools",U);function z(e,t){if(Array.isArray(t))return t}function K(e,t){return a({},e,t,z)}let H=[];function G(){let e=x.getState(),t=E.getState(),r=S.getState();!function(e,t){for(let r of Object.keys(e.schemas)){let n,i=D(r),o=e.schemas[r],a=!!e.moduleLoaded[r],l=Y.get(r);if(l&&l.schema===o&&l.moduleLoaded===a&&l.providedConfigs===e.providedConfigs&&l.temporaryConfig===t.config)n=l.state;else{let i=a?function(e,t,r){let n=t.schemas[e],i=ef(e,ec(t,r));eh(n,i,e);let o=eg(n,i);return em(n,o,e),delete o.extensionSlots,o}(r,e,t):function(e,t,r){let n=eg(eO,ef(e,ec(t,r)));return em(eO,n,e),delete n.extensionSlots,n}(r,e,t);n={translationOverridesLoaded:!0,loaded:a,config:i},Y.set(r,{schema:o,moduleLoaded:a,providedConfigs:e.providedConfigs,temporaryConfig:t.config,state:n})}let u=i.getState();u.loaded===n.loaded&&u.translationOverridesLoaded===n.translationOverridesLoaded&&(0,s.A)(u.config,n.config)||i.setState(n)}}(e,t);let n=function(e,t){let r=ep(ec(e,t)),n=Object.keys(r).reduce((e,t)=>(r[t]?.extensionSlots&&(e[t]=r[t]?.extensionSlots),e),{});var i=n;for(let[e,t]of Object.entries(i))for(let[r,n]of Object.entries(t))!function(e,t,r){let n=`${t}.extensionSlots.${r}`,i=`Extension slot config '${n}'`,o=Object.keys(e).filter(e=>!["add","remove","order","configure"].includes(e));o.length&&ex(n,i+`' contains invalid keys '${o.join("', '")}'`),!e.add||Array.isArray(e.add)&&e.add.every(e=>"string"==typeof e)||ex(n,i+".add' is invalid. Must be an array of strings (extension IDs)"),!e.remove||Array.isArray(e.remove)&&e.remove.every(e=>"string"==typeof e)||ex(n,i+".remove' is invalid. Must be an array of strings (extension IDs)"),!e.order||Array.isArray(e.order)&&e.order.every(e=>"string"==typeof e)||ex(n,i+".order' is invalid. Must be an array of strings (extension IDs)"),e.configure&&!ew(e.configure)&&ex(n,i+".configure' is invalid. Must be an object with extension IDs for keys")}(n,e,r);let o={},a={};for(let e of Object.values(n))for(let[t,r]of Object.entries(e))o[t]=r,r.configure&&(a[t]??(a[t]=[])).push(r.configure);for(let[e,t]of Object.entries(a)){let r=1===t.length?t[0]:ep(t);o[e].configure!==r&&(o[e]={...o[e],configure:r})}return o}(e,t);(function(e){let t=O(),r=t.getState().slots,n={},i=!1;for(let[t,o]of Object.entries(e)){let e=r[t];e?.loaded&&(0,s.A)(e.config,o)?n[t]=e:(n[t]={loaded:!0,config:o},i=!0)}(i||Object.keys(r).length!==Object.keys(n).length)&&t.setState({slots:n})})(n),function(e,t,r,n){let i=A(),o=i.getState().configs,a={},l=!1,u=0;for(let i of t.mountedExtensions){let t=function(e,t,r,n,i,o,a){let s=function(e){let[t]=e.split("#");return t}(n),l=i.schemas[s],u=JSON.stringify([r,n,e,t]),c=es.get(u);if(c&&c.extensionSchema===l&&c.extensionModuleSchema===i.schemas[t]&&c.providedConfigs===i.providedConfigs&&c.temporaryConfig===o.config)return c.config;let d=l?s:t,f=ec(i,o),p=a?.configure?.[n]??{},h=ef(e,f),m=h?.extensionSlots?.[r]?.configure?.[n]??{},y=ep([ef(d,f),p,m]),v=l??i.schemas[t];eh(v,y,d);let g=eg(v,y);return em(v,g,d),delete g.extensionSlots,es.set(u,{extensionSchema:l,extensionModuleSchema:i.schemas[t],providedConfigs:i.providedConfigs,temporaryConfig:o.config,config:g}),g}(i.slotModuleName,i.extensionModuleName,i.slotName,i.extensionId,e,r,n[i.slotName]),c=o[i.slotName]?.[i.extensionId],d=c?.loaded&&(0,s.A)(c.config,t)?c:{config:t,loaded:!0};d!==c&&(l=!0),a[i.slotName]||(a[i.slotName]={}),a[i.slotName][i.extensionId]=d,u++}for(let[e,t]of Object.entries(a)){let r=o[e];r&&Object.keys(r).length===Object.keys(t).length&&Object.entries(t).every(([e,t])=>r[e]===t)&&(a[e]=r)}l||(l=Object.keys(o).length!==Object.keys(a).length||Object.values(o).reduce((e,t)=>e+Object.keys(t).length,0)!==u),l&&i.setState({configs:a})}(e,r,t,n),L()}function q(){n=()=>{var e,t;let r,n;return e=x.getState(),t=E.getState(),r=W.getState(),n={config:function(e,t){let r=function(e){let t={};for(let[r,n]of Object.entries(e)){let e=eu.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"}:ew(t)?Object.keys(t).reduce((r,n)=>(r[n]=e(t[n]),r),{}):{}}((0,u.A)(n,5));eu.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"]],i=new Set(Object.keys(r));for(let[e]of n)for(let t of Object.keys(e))i.add(t);let o={};for(let e of i){let t=r[e],i=n.map(([t])=>t[e]),a=n.map(([,e])=>e),s=el.get(e);if(s&&s.annotatedSchema===t&&s.configSlices.length===i.length&&s.configSlices.every((e,t)=>e===i[t])&&s.sources.every((e,t)=>e===a[t])){o[e]=s.result;continue}let l=t??{};n.forEach(([,e],t)=>{let r=i[t];void 0!==r&&(l=K(l,function e(t,r){return ew(t)?Object.keys(t).reduce((n,i)=>(n[i]=e(t[i],r),n),{}):{_value:t,_source:r}}(r,e)))}),el.set(e,{annotatedSchema:t,configSlices:i,sources:a,result:l}),o[e]=l}return o}(e,t)},void((0,s.A)(r.config,n.config)||W.setState(n))},G(),H.push(x.subscribe(Z),E.subscribe(Z),S.subscribe(Z))}function Z(){V();try{G()}catch(e){B(e),console.error("Failed to recompute the configuration",e)}}q();let Y=new Map;function J(e,t){ed(e,t);let r=K(t,eO);x.setState(t=>({...t,schemas:{...t.schemas,[e]:r},moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function Q(e){x.setState(t=>({...t,schemas:{...t.schemas,[e]:eO}}))}function X(e){x.setState(t=>({...t,moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function ee(e){x.setState(t=>({...t,schemas:{...t.schemas,[e]:eD}}))}function et(e,t){ed(e,t);let r=K(t,eO);x.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.`),x.setState(t=>({...t,schemas:{...t.schemas,[e]:r}}))}function er(e,t="provided"){x.setState(r=>({...r,providedConfigs:[...r.providedConfigs,{source:t,config:e}]}))}function en(e,t,r){return new Promise(n=>{let i,o=!1;function a(e){!o&&t(e)&&(o=!0,n(r(e)),i?.())}a(e.getState()),o||(i=e.subscribe(a))})}function ei(e){return en(D(e),e=>!!(e.loaded&&e.config),e=>(0,l.A)(e.config,["Display conditions","Translation overrides"]))}function eo(e,t,r){let n=[en(D(e),e=>!!(e.translationOverridesLoaded&&e.config),e=>e.config["Translation overrides"]??{})];return t&&r&&n.push(en(j(t,r),e=>!!(e.loaded&&e.config),e=>e.config["Translation overrides"]??{})),Promise.all(n)}function ea(e,t,r){eh(e,t,r);let n=eg(e,t);return em(e,n,r),n}let es=new Map,el=new Map,eu=new Map;function ec(e,t){return[...e.providedConfigs.map(e=>e.config),t.config]}function ed(e,t,r=""){let n="Please verify that you are running the latest version and, if so, alert the maintainer.";for(let i of Object.keys(t).filter(e=>!e.startsWith("_"))){let o=r+(r&&".")+i,a=t[i];if("Display conditions"===o&&console.error(`${e} declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ${n}`),"Translation overrides"===o&&console.error(`${e} declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ${n}`),!ew(a)){console.error(`${e} has bad config schema definition for key '${o}'. ${n}`);continue}a.hasOwnProperty("_default")||ed(e,a,o);let s=a._elements;if(eb(s)&&ed(e,s,o+"._elements"),a._validators)for(let t of a._validators)"function"!=typeof t&&console.error(`${e} has invalid validator for key '${o}' ${n}.
5
5
 
6
6
  If you're the maintainer: validators must be functions that return either undefined or an error string. Received ${t}.`);let l=a._type;l&&!Object.values(c).includes(l)&&console.error(`${e} has invalid type for key '${o}' ${n}.
7
7
 
@@ -9,8 +9,8 @@ If you're the maintainer: the allowed types are ${Object.values(c).join(", ")}.
9
9
 
10
10
  If you're the maintainer: all config elements must have a default. Received ${JSON.stringify(a)}`),s&&l&&![c.Array,c.Object].includes(l)&&console.error(`${e} has bad config schema definition for key '${o}'. ${n}.
11
11
 
12
- If you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. Received ${JSON.stringify(l)}`)}}function ed(e,t){return ef(t.map(({[e]:t})=>t).filter(e=>!!e))}function ef(e){return e.reduce((e,t)=>z(e,t),{})}function ep(e,t,r=""){for(let n of Object.keys(t)){let i=t[n],o=r+"."+n,a=e[n];if(!e.hasOwnProperty(n)){("extensionSlots"!==n||""===r)&&e_(o,`Unknown config key '${o}' provided. Ignoring.`);continue}(function e(t,r,n){em(n,t._type,r),eb(r)?t._type===c.Object?function(t,r,n){if(t._elements)for(let i of Object.keys(r)){let o=r[i];e(t._elements,o,`${n}.${i}`)}}(t,r,n):t.hasOwnProperty("_default")||t.hasOwnProperty("_type")||ep(t,r,n):t._type===c.Array&&function(t,r,n){if(em(n,c.Array,r)){if(eg(t._elements))for(let i=0;i<r.length;i++)e(t._elements,r[i],`${n}[${i}]`);for(let e=0;e<r.length;e++)em(`${n}[${e}]`,t._elements?._type,r[e])}}(t,r,n)})(a,i,o)}}function eh(e,t,r=""){if(e){if(t!==e._default&&ey(r,e._validators,t),eb(t))for(let n of Object.keys(t)){let i=t[n],o=r+"."+n,a=e[n];e._type===c.Object&&e._elements?eh(e._elements,i,o):eh(a,i,o)}else if(Array.isArray(t)&&e._elements)for(let n=0;n<t.length;n++)eh(e._elements,t[n],`${r}[${n}]`)}}function em(e,t,r){return!t||ey(e,[{Array:f,Boolean:p,ConceptUuid:v,Number:h,Object:y,String:m,UUID:v,PersonAttributeTypeUuid:v,PatientIdentifierTypeUuid:v}[t]],r)}function ey(e,t,r){let n=!0;if(t)try{for(let i of t){let t=i(r);if("string"==typeof t){let i="object"==typeof r?`Invalid configuration for ${e}: ${t}`:`Invalid configuration value ${r} for ${e}: ${t}`;e_(e,i),n=!1}}}catch(t){console.error(`Skipping invalid validator at "${e}". Encountered error
13
- ${t}`)}return n}let ev=(e,t)=>{let r=structuredClone(t);if(!e)return r;for(let t of Object.keys(e)){let n=r[t],i=e[t];if(i&&(i.hasOwnProperty("_type")||i.hasOwnProperty("_default"))){r.hasOwnProperty(t)||(r[t]=i._default);let e=i._elements;if(n&&eg(e)){if(i._type===c.Array&&Array.isArray(n)){let i=n.map(t=>ev(e,t));r[t]=i}else if(i._type===c.Object)for(let t of Object.keys(n))n[t]=ev(e,n[t])}}else if(eb(i)){let e=n??{};eb(e)&&(r[t]=ev(i,e))}}return r};function eg(e){return!!e&&Object.keys(e).filter(e=>!["_default","_validators"].includes(e)).length>0}function eb(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}let ew=new Set;function e_(e,t){let r=`${e}:::${t}`;ew||(ew=new Set),ew.has(r)||(console.error(t),ew.add(r))}function ex(e){e?ew.forEach(t=>{t.startsWith(e)&&ew.delete(t)}):ew.clear()}function eE(){K.forEach(e=>e()),K.length=0,Z.clear(),ea.clear(),el.clear(),es.clear(),G()}let eS={"Translation overrides":{_description:"Per-language overrides for frontend translations should be keyed by language code and each language dictionary contains the translation key and the display value",_type:c.Object,_default:{},_validators:[d(e=>Object.keys(e).every(e=>/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)),e=>{let t=Object.keys(e).filter(e=>!/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e));return`The 'Translation overrides' object should have language codes for keys. Language codes must be in the form of a two-to-three letter language code optionally followed by a hyphen and a two-to-three letter country code. The following keys do not conform: ${t.join(", ")}.`})]}},eD={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:c.Array,_default:[]},expression:{_description:"The expression that determines whether the extension is displayed",_type:c.String,_default:void 0}},...eS},eO=(e,t)=>d(r=>e<=r&&r<=t,`must be between ${e} and ${t}`),eP=e=>{let t=e.concat(["openmrsBase","openmrsSpaBase"]);return d(e=>{if(!e||"string"!=typeof e)return!1;let r=/\${(.*?)}/g,n=r.exec(e);for(;n;){if(!t.includes(n[1]))return!1;n=r.exec(e)}return!0},"Should be a URL or path. The allowed template parameters are "+t.map(e=>"${"+e+"}").join(", "))},eC=eP([]),eA=e=>d(t=>e.includes(t),`Must be one of the following: '${e.join("', '")}'.`),ej={inRange:eO,isUrl:eC,isUrlWithTemplateParameters:eP,oneOf:eA}},71647(e,t,r){"use strict";r.d(t,{hG:()=>f,dx:()=>S,X1:()=>h,Bv:()=>l,Pu:()=>w,Vs:()=>g,cD:()=>u,KU:()=>s,BX:()=>C,Ds:()=>j,DK:()=>R,BR:()=>T,$y:()=>m,xL:()=>k,E$:()=>v,Rb:()=>O,SY:()=>c,NH:()=>A,Cj:()=>D,Qx:()=>b,Zu:()=>a});var n,i,o=r(464);let a=`${o.Jj}/attachment`;function s(e,t){return(0,o.lo)(`${a}/${e}`,{signal:t.signal})}function l(e,t,r){return(0,o.lo)(`${a}?patient=${e}&includeEncounterless=${t}`,{signal:r.signal})}async function u(e,t){let r=new FormData;return r.append("fileCaption",t.fileDescription),r.append("patient",e),t.file?r.append("file",t.file,t.fileName):(r.append("file",new File([""],t.fileName),t.fileName),r.append("base64Content",t.base64Content)),(0,o.lo)(`${a}`,{method:"POST",body:r})}function c(e,t){return(0,o.lo)(`${a}/${e}`,{method:"DELETE",signal:t.signal})}var d=r(36604);async function f(e,t,r=!0){if(e){let n=null,[i,a]=await Promise.all([(0,o.lo)(`${o.IU}/Patient/${e}`,t).catch(e=>n=e),r?p(e):Promise.resolve(null)]);if(i.ok)return i.data;if(a)return a;if(n)throw n}return null}async function p(e){let t=(await (0,d.pb)("patient-registration")).find(t=>t.fhirPatient.id===e);return t?.fhirPatient??null}function h(e,t){let r=new CustomEvent(`openmrs:${e}`,{detail:t??void 0,cancelable:!0,bubbles:!0});return window.dispatchEvent(r)}function m(e,t){let r=e=>{t("detail"in e&&null!==e.detail?e.detail:void 0)};return window.addEventListener(`openmrs:${e}`,r),()=>{window.removeEventListener(`openmrs:${e}`,r)}}var y=r(55841);function v(e){return{uuid:e.uuid,display:e.display}}function g(e=null,t=null){let r=new URLSearchParams;e&&r.set("tag",e),t&&r.set("q",t);let n=r.toString(),i=`${o.Jj}/location${n?"?"+n:""}`;return(0,o.ut)(i).pipe((0,y.map)(e=>e.data.results.map(v))).pipe((0,y.take)(1))}function b(e){return{uuid:e.uuid,display:e.display,name:e.name}}function w(){return(0,o.ut)(`${o.Jj}/visittype`).pipe((0,y.map)(e=>e.data.results.map(b))).pipe((0,y.take)(1))}var x=r(61841),E=r(67436),S=((n={}).NEWVISIT="startVisit",n.EDITVISIT="editVisit",n.LOADING="loadingVisit",n),D=((i={}).NOTSTARTED="notStarted",i.ONGOING="ongoing",i);let O="custom:(uuid,display,voided,indication,startDatetime,stopDatetime,encounters:(uuid,display,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,display),visitType:(uuid,name,display),attributes:(uuid,display,attributeType:(name,datatypeClassname,uuid),value),location:(uuid,name,display))",P=function(){try{return JSON.parse(sessionStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null};function C(){return(0,x.jf)("visit",P)}function A(e,t){C().setState({patientUuid:e,manuallySetVisitUuid:t})}function j(e,t){return(0,o.lo)(`${o.Jj}/visit`,{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function k(e,t,r){return(0,o.lo)(`${o.Jj}/visit/${e}`,{signal:r.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}function T(e,t,r){return(0,o.lo)(`${o.Jj}/visit?patient=${e}&v=${r??O}`,{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}})}C().subscribe(e=>{var t;t=e,sessionStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))});let R=new E.BehaviorSubject(null)},8685(e,t,r){"use strict";r.d(t,{J:()=>o,N:()=>i});var n=r(19076);function i(e){let t=a(e);setTimeout(()=>{throw t})}function o(){let e=Error();return t=>{let r=a(t);r.stack+=`
12
+ If you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. Received ${JSON.stringify(l)}`)}}function ef(e,t){return ep(t.map(({[e]:t})=>t).filter(e=>!!e))}function ep(e){return e.reduce((e,t)=>a(e,t,z),{})}function eh(e,t,r=""){for(let n of Object.keys(t)){let i=t[n],o=r+"."+n,a=e[n];if(!e.hasOwnProperty(n)){("extensionSlots"!==n||""===r)&&ex(o,`Unknown config key '${o}' provided. Ignoring.`);continue}(function e(t,r,n){ey(n,t._type,r),ew(r)?t._type===c.Object?function(t,r,n){if(t._elements)for(let i of Object.keys(r)){let o=r[i];e(t._elements,o,`${n}.${i}`)}}(t,r,n):t.hasOwnProperty("_default")||t.hasOwnProperty("_type")||eh(t,r,n):t._type===c.Array&&function(t,r,n){if(ey(n,c.Array,r)){if(eb(t._elements))for(let i=0;i<r.length;i++)e(t._elements,r[i],`${n}[${i}]`);for(let e=0;e<r.length;e++)ey(`${n}[${e}]`,t._elements?._type,r[e])}}(t,r,n)})(a,i,o)}}function em(e,t,r=""){if(e){if(t!==e._default&&ev(r,e._validators,t),ew(t))for(let n of Object.keys(t)){let i=t[n],o=r+"."+n,a=e[n];e._type===c.Object&&e._elements?em(e._elements,i,o):em(a,i,o)}else if(Array.isArray(t)&&e._elements)for(let n=0;n<t.length;n++)em(e._elements,t[n],`${r}[${n}]`)}}function ey(e,t,r){return!t||ev(e,[{Array:f,Boolean:p,ConceptUuid:v,Number:h,Object:y,String:m,UUID:v,PersonAttributeTypeUuid:v,PatientIdentifierTypeUuid:v}[t]],r)}function ev(e,t,r){let n=!0;if(t)try{for(let i of t){let t=i(r);if("string"==typeof t){let i="object"==typeof r?`Invalid configuration for ${e}: ${t}`:`Invalid configuration value ${r} for ${e}: ${t}`;ex(e,i),n=!1}}}catch(t){console.error(`Skipping invalid validator at "${e}". Encountered error
13
+ ${t}`)}return n}let eg=(e,t)=>{let r=structuredClone(t);if(!e)return r;for(let t of Object.keys(e)){let n=r[t],i=e[t];if(i&&(i.hasOwnProperty("_type")||i.hasOwnProperty("_default"))){r.hasOwnProperty(t)||(r[t]=i._default);let e=i._elements;if(n&&eb(e)){if(i._type===c.Array&&Array.isArray(n)){let i=n.map(t=>eg(e,t));r[t]=i}else if(i._type===c.Object)for(let t of Object.keys(n))n[t]=eg(e,n[t])}}else if(ew(i)){let e=n??{};ew(e)&&(r[t]=eg(i,e))}}return r};function eb(e){return!!e&&Object.keys(e).filter(e=>!["_default","_validators"].includes(e)).length>0}function ew(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}let e_=new Set;function ex(e,t){let r=`${e}:::${t}`;e_||(e_=new Set),e_.has(r)||(console.error(t),e_.add(r))}function eE(e){e?e_.forEach(t=>{t.startsWith(e)&&e_.delete(t)}):e_.clear()}function eS(){H.forEach(e=>e()),H.length=0,Y.clear(),es.clear(),eu.clear(),el.clear(),q()}let eD={"Translation overrides":{_description:"Per-language overrides for frontend translations should be keyed by language code and each language dictionary contains the translation key and the display value",_type:c.Object,_default:{},_validators:[d(e=>Object.keys(e).every(e=>/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)),e=>{let t=Object.keys(e).filter(e=>!/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e));return`The 'Translation overrides' object should have language codes for keys. Language codes must be in the form of a two-to-three letter language code optionally followed by a hyphen and a two-to-three letter country code. The following keys do not conform: ${t.join(", ")}.`})]}},eO={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:c.Array,_default:[]},expression:{_description:"The expression that determines whether the extension is displayed",_type:c.String,_default:void 0}},...eD},eP=(e,t)=>d(r=>e<=r&&r<=t,`must be between ${e} and ${t}`),eC=e=>{let t=e.concat(["openmrsBase","openmrsSpaBase"]);return d(e=>{if(!e||"string"!=typeof e)return!1;let r=/\${(.*?)}/g,n=r.exec(e);for(;n;){if(!t.includes(n[1]))return!1;n=r.exec(e)}return!0},"Should be a URL or path. The allowed template parameters are "+t.map(e=>"${"+e+"}").join(", "))},eA=eC([]),ej=e=>d(t=>e.includes(t),`Must be one of the following: '${e.join("', '")}'.`),ek={inRange:eP,isUrl:eA,isUrlWithTemplateParameters:eC,oneOf:ej}},71647(e,t,r){"use strict";r.d(t,{hG:()=>f,dx:()=>S,X1:()=>h,Bv:()=>l,Pu:()=>w,Vs:()=>g,cD:()=>u,KU:()=>s,BX:()=>C,Ds:()=>j,DK:()=>R,BR:()=>T,$y:()=>m,xL:()=>k,E$:()=>v,Rb:()=>O,SY:()=>c,NH:()=>A,Cj:()=>D,Qx:()=>b,Zu:()=>a});var n,i,o=r(464);let a=`${o.Jj}/attachment`;function s(e,t){return(0,o.lo)(`${a}/${e}`,{signal:t.signal})}function l(e,t,r){return(0,o.lo)(`${a}?patient=${e}&includeEncounterless=${t}`,{signal:r.signal})}async function u(e,t){let r=new FormData;return r.append("fileCaption",t.fileDescription),r.append("patient",e),t.file?r.append("file",t.file,t.fileName):(r.append("file",new File([""],t.fileName),t.fileName),r.append("base64Content",t.base64Content)),(0,o.lo)(`${a}`,{method:"POST",body:r})}function c(e,t){return(0,o.lo)(`${a}/${e}`,{method:"DELETE",signal:t.signal})}var d=r(36604);async function f(e,t,r=!0){if(e){let n=null,[i,a]=await Promise.all([(0,o.lo)(`${o.IU}/Patient/${e}`,t).catch(e=>n=e),r?p(e):Promise.resolve(null)]);if(i.ok)return i.data;if(a)return a;if(n)throw n}return null}async function p(e){let t=(await (0,d.pb)("patient-registration")).find(t=>t.fhirPatient.id===e);return t?.fhirPatient??null}function h(e,t){let r=new CustomEvent(`openmrs:${e}`,{detail:t??void 0,cancelable:!0,bubbles:!0});return window.dispatchEvent(r)}function m(e,t){let r=e=>{t("detail"in e&&null!==e.detail?e.detail:void 0)};return window.addEventListener(`openmrs:${e}`,r),()=>{window.removeEventListener(`openmrs:${e}`,r)}}var y=r(55841);function v(e){return{uuid:e.uuid,display:e.display}}function g(e=null,t=null){let r=new URLSearchParams;e&&r.set("tag",e),t&&r.set("q",t);let n=r.toString(),i=`${o.Jj}/location${n?"?"+n:""}`;return(0,o.ut)(i).pipe((0,y.map)(e=>e.data.results.map(v))).pipe((0,y.take)(1))}function b(e){return{uuid:e.uuid,display:e.display,name:e.name}}function w(){return(0,o.ut)(`${o.Jj}/visittype`).pipe((0,y.map)(e=>e.data.results.map(b))).pipe((0,y.take)(1))}var x=r(61841),E=r(67436),S=((n={}).NEWVISIT="startVisit",n.EDITVISIT="editVisit",n.LOADING="loadingVisit",n),D=((i={}).NOTSTARTED="notStarted",i.ONGOING="ongoing",i);let O="custom:(uuid,display,voided,indication,startDatetime,stopDatetime,encounters:(uuid,display,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,display),visitType:(uuid,name,display),attributes:(uuid,display,attributeType:(name,datatypeClassname,uuid),value),location:(uuid,name,display))",P=function(){try{return JSON.parse(sessionStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null};function C(){return(0,x.jf)("visit",P)}function A(e,t){C().setState({patientUuid:e,manuallySetVisitUuid:t})}function j(e,t){return(0,o.lo)(`${o.Jj}/visit`,{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function k(e,t,r){return(0,o.lo)(`${o.Jj}/visit/${e}`,{signal:r.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}function T(e,t,r){return(0,o.lo)(`${o.Jj}/visit?patient=${e}&v=${r??O}`,{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}})}C().subscribe(e=>{var t;t=e,sessionStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))});let R=new E.BehaviorSubject(null)},8685(e,t,r){"use strict";r.d(t,{J:()=>o,N:()=>i});var n=r(19076);function i(e){let t=a(e);setTimeout(()=>{throw t})}function o(){let e=Error();return t=>{let r=a(t);r.stack+=`
14
14
  Async stacktrace:
15
15
  ${e.stack}`,i(t)}}function a(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())}window.onerror=function(e){return console.error("Unexpected error: ",e),(0,n.Vt)({description:e??"Oops! An unexpected error occurred.",kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(e){console.error("Unhandled rejection: ",e.reason),(0,n.Vt)({description:e.reason??"Oops! An unhandled promise rejection occurred.",kind:"error",title:"Error"})}},96736(e,t,r){"use strict";r.d(t,{dX:()=>c,wE:()=>h,_3:()=>a,uN:()=>p,$F:()=>d,Gz:()=>u,eb:()=>l,Sj:()=>f,mv:()=>s,PQ:()=>n.A});var n=r(95486);let i="ArrowFunctionExpression";var o=r(31063);function a(e,t={}){return f(e,t,m)}async function s(e,t={}){return p(e,t,m)}function l(e,t={}){return f(e,t,y)}function u(e,t={}){return p(e,t,y)}function c(e,t={}){return f(e,t,v)}function d(e,t={}){return p(e,t,v)}function f(e,t={},r){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))throw`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`;if("string"==typeof e&&0===e.trim().length)throw{type:"Empty expression",message:"Expression cannot be an empty string"};null==t&&(t={});let i=w(t,o.z),a=g("string"==typeof e?(0,n.A)(e):e,i);if(r(a))return a;throw{type:"Invalid result",message:"string"==typeof e?`The expression ${e} did not produce a valid result`:"The expression did not produce a valid result"}}async function p(e,t={},r){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))return Promise.reject(`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`);if("string"==typeof e&&0===e.trim().length)throw{type:"Empty expression",message:"Expression cannot be an empty string"};null==t&&(t={});let i=w(t,o.f);return Promise.resolve(g("string"==typeof e?(0,n.A)(e):e,i)).then(t=>{if(r(t))return t;throw{type:"Invalid result",message:"string"==typeof e?`The expression ${e} did not produce a valid result`:"The expression did not produce a valid result"}})}function h(e){return(0,n.A)(e)}function m(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||e instanceof Date}function y(e){return"boolean"==typeof e}function v(e){return"number"==typeof e}function g(e,t){switch(e.type){case"UnaryExpression":var r,n,i,o,a,s,l,u,c,d,f,p,h=e,m=t;let y=g(h.argument,m);switch(h.operator){case"+":return+y;case"-":return-y;case"~":return~y;case"!":return!y;default:throw`Expression evaluator does not support operator '${h.operator}''`}case"BinaryExpression":var v=e,w=t;let D=g(v.left,w),O=g(v.right,w);switch(v.operator){case"+":return D+O;case"-":return D-O;case"*":return D*O;case"/":return D/O;case"%":return D%O;case"**":return D**O;case"==":return D==O;case"===":return D===O;case"!=":return D!=O;case"!==":return D!==O;case">":return D>O;case">=":return D>=O;case"<":return D<O;case"<=":return D<=O;case"in":return D in O;case"&&":return D&&O;case"||":return D||O;case"??":return D??O;default:throw`Expression evaluator does not support operator '${v.operator}' operator`}case"ConditionalExpression":return r=e,n=t,g(r.test,n)?g(r.consequent,n):g(r.alternate,n);case"CallExpression":var P=e,C=t;let A=P.arguments?.map(x(C)),j=g(P.callee,C);if(j){if("function"!=typeof j)throw`${S(P.callee)} is not a function`}else throw`No function named ${S(P.callee)} is defined in this context`;return j(...A);case"ArrowFunctionExpression":let k;return i=e,o=t,k=i.params?.map(e=>{if("Identifier"===e.type)return e.name;throw`Cannot handle parameter of type ${e.type}`})??[],(function(...e){if(e.length<k.length)throw`Required argument(s) ${k.slice(e.length,-1).join(", ")} were not provided`;let t=Object.fromEntries(k.reduce((t,r,n)=>{let i=e[n];return function e(t){if("string"==typeof t||"number"==typeof t||"boolean"==typeof t||"function"==typeof t||null===t||t instanceof RegExp)return!0;if("object"==typeof t){for(let r of Object.keys(t))if(!e(t[r]))return!1;return!0}if(Array.isArray(t)){for(let r of t)if(!e(r))break}return!1}(i)&&t.push([r,i]),t},[]));return g(i.body,o.addVariables(t))}).bind(o.thisObj??null);case"MemberExpression":return function(e,t){let r,n=g(e.object,t);if(void 0===n)switch(e.object.type){case"Identifier":{let r=b(e.object,t);throw ReferenceError(`ReferenceError: ${r} is not defined`)}case"MemberExpression":{let r=b(e.property,t);throw TypeError(`TypeError: cannot read properties of undefined (reading '${r}')`)}default:throw`VisitMemberExpression does not support operator '${e.object.type}' type`}let i=n;if("string"==typeof n)i=String.prototype;else if("number"==typeof n)i=Number.prototype;else if("function"==typeof n);else if("object"!=typeof n)throw`VisitMemberExpression does not support member access on type ${typeof n}`;switch(t.thisObj=i,e.property.type){case"Identifier":case"MemberExpression":r=g(e.property,t);break;default:{let i=g(e.property,t);if(void 0===i)throw{type:"Illegal property access",message:"No property was supplied to the property access"};E(i),r=n[i]}}return"function"==typeof r?r.bind(n):r}(e,t);case"ArrayExpression":return a=e,s=t,a.elements?.map(x(s));case"SequenceExpression":let T;return l=e,u=t,(T=l.expressions.map(x(u)))[T.length-1];case"NewExpression":var R=e,N=t;if(R.callee&&"Identifier"===R.callee.type){let e=R.arguments?.map(x(N));switch(R.callee.name){case"Date":return new Date(...e);case"RegExp":return new RegExp(...e);default:throw`Cannot instantiate object of type ${R.callee.name}`}}if(R.callee)throw"new must be called with either Date or RegExp";throw'Could not handle "new" without a specified class';case"Literal":return E((c=e).value),c.value;case"Identifier":var I=e,M=t;E(I.name);let $=M.thisObj;if($&&("object"==typeof $||"function"==typeof $)&&I.name in $){let e=$[I.name];return E(e),e}if(M.variables&&I.name in M.variables){let e=M.variables[I.name];return E(e),e}return I.name in M.globals?M.globals[I.name]:void 0;case"TemplateLiteral":let L,F;return d=e,f=t,L=d.expressions?.map(x(f))??[],(F=d.quasis?.map(x(f))??[]).filter(e=>!e.tail).map(e=>e.value).join("")+L.join("")+F.filter(e=>e.tail).map(e=>e.value).join("");case"TemplateElement":return{value:(p=e).cooked,tail:p.tail};default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function b(e,t){switch(e.type){case"Literal":return e.value;case"Identifier":return e.name;case"MemberExpression":return b(e.property,t);default:throw`VisitExpressionName does not support expression of type '${e.type}'`}}function w(e,t){let r={thisObj:void 0,variables:{...e},globals:{...t},addVariables(e){return this.variables={...this.variables,...e},this}};return r.addVariables.bind(r),r}function x(e){return function(t){return null===t?null:g(t,e)}}function E(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:`Cannot access the ${e} property of objects`}}function S(e){return e?"MemberExpression"===e.type?e.property?.name:e.name:null}n.A.plugins.register({name:"arrow",init(e){e.addBinaryOp("=>",.1,!0),e.hooks.add("gobble-expression",function(t){if(this.gobbleSpaces(),this.code===e.OPAREN_CODE){let r=this.index;if(this.index++,this.gobbleSpaces(),this.code===e.CPAREN_CODE){this.index++;let e=this.gobbleBinaryOp();if("=>"===e){let r=this.gobbleBinaryExpression();r||this.throwError("Expected expression after "+e),t.node={type:i,params:null,body:r};return}}this.index=r}}),e.hooks.add("after-expression",function(t){!function t(r){r&&(Object.values(r).forEach(e=>{e&&"object"==typeof e&&t(e)}),"=>"===r.operator&&(r.type=i,r.params=r.left?[r.left]:null,r.body=r.right,r.params&&r.params[0].type===e.SEQUENCE_EXP&&(r.params=r.params[0].expressions),delete r.left,delete r.right,delete r.operator))}(t.node)})}}),n.A.plugins.register({name:"new",init(e){e.addUnaryOp("new"),e.hooks.add("after-token",function(t){let r=t.node;if(r&&"new"===r.operator){r.argument&&[e.CALL_EXP,e.MEMBER_EXP].includes(r.argument.type)||this.throwError("Expected new function()"),t.node=r.argument;let n=t.node;for(;n.type===e.MEMBER_EXP||n.type===e.CALL_EXP&&n.callee.type===e.MEMBER_EXP;)n=n.type===e.MEMBER_EXP?n.object:n.callee.object;n.type="NewExpression"}})}}),n.A.plugins.register({name:"numbers",init(e){function t(e){return"x"===e||"X"===e?(this.index+=2,[[48,57],[65,70],[97,102]]):"b"===e||"B"===e?(this.index+=2,[[48,49]]):"o"===e||"O"===e||e>="0"&&e<="7"?(this.index+=e<="7"?1:2,[[48,55]]):null}function r(t){let r=this.index,n="",i=()=>{for(;e.isDecimalDigit(this.code)||95===this.code;)95===this.code?this.index++:n+=this.expr.charAt(this.index++)};i(),this.code===e.PERIOD_CODE&&(n+=this.expr.charAt(this.index++),i());let o=this.char;("e"===o||"E"===o)&&(n+=this.expr.charAt(this.index++),("+"===(o=this.char)||"-"===o)&&(n+=this.expr.charAt(this.index++)),i(),e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+n+this.char+")"));let a=this.code;if(e.isIdentifierStart(a))this.throwError("Variable names cannot start with a number ("+n+this.char+")");else if(a===e.PERIOD_CODE){n.length>1&&this.throwError(`Unexpected period ${JSON.stringify({chCode:a,number:n},null,2)}`),this.index=r;return}t.node={type:e.LITERAL,value:parseFloat(n),raw:this.expr.substring(r,this.index)}}e.hooks.add("gobble-token",function(n){if(48===this.code){var i,o,a;let s=this.index,l=this.expr.charAt(this.index+1),u=t.call(this,l);if(!u)return;let c="";for(;i=this.code,o=u,95===i||o.some(([e,t])=>i>=e&&i<=t);)95===this.code?this.index++:c+=this.expr.charAt(this.index++);if(e.isIdentifierPart(this.code)){if(e.isDecimalDigit(this.code)&&e.isDecimalDigit(l.charCodeAt(0))){this.index=s+1,r.call(this,n);return}this.throwError("unexpected char within number")}n.node={type:e.LITERAL,value:parseInt(c,"x"===(a=l)||"X"===a?16:"b"===a||"B"===a?2:8),raw:this.expr.substring(s,this.index)}}else(e.isDecimalDigit(this.code)||this.code===e.PERIOD_CODE)&&r.call(this,n)})}}),n.A.plugins.register({name:"regex",init(e){e.hooks.add("gobble-token",function(t){if(47===this.code){let r=++this.index,n=!1;for(;this.index<this.expr.length;){if(47===this.code&&!n){let n,i=this.expr.slice(r,this.index),o="";for(;++this.index<this.expr.length;){let e=this.code;if(e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57)o+=this.char;else break}try{n=new RegExp(i,o)}catch(e){this.throwError(e.message)}return t.node={type:e.LITERAL,value:n,raw:this.expr.slice(r-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===e.OBRACK_CODE?n=!0:n&&this.code===e.CBRACK_CODE&&(n=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}})}}),n.A.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let r=t.node,n=this.gobbleExpression();if(n||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let i=this.gobbleExpression();if(i||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:r,consequent:n,alternate:i},r.operator&&e.binary_ops[r.operator]<=.9){let n=r;for(;n.right.operator&&e.binary_ops[n.right.operator]<=.9;)n=n.right;t.node.test=n.right,n.right=t.node,t.node=r}}else this.throwError("Expected :")}})}}),n.A.plugins.register({name:"jsepTemplateLiteral",init(e){function t(e,r=!0){if(96===this.code){let t={type:"TemplateLiteral",quasis:[],expressions:[]},n="",i="",o=!1,a=this.expr.length,s=()=>t.quasis.push({type:"TemplateElement",value:{raw:i,cooked:n},tail:o});for(;this.index<a;){let a=this.expr.charAt(++this.index);if("`"===a)return this.index+=1,o=!0,s(),e.node=t,r&&(e.node=this.gobbleTokenProperty(e.node)),e.node;if("$"===a&&"{"===this.expr.charAt(this.index+1))this.index+=2,s(),i="",n="",t.expressions.push(...this.gobbleExpressions(125)),125!==this.code&&this.throwError("unclosed ${");else if("\\"===a)switch(i+=a,a=this.expr.charAt(++this.index),i+=a,a){case"n":n+="\n";break;case"r":n+="\r";break;case"t":n+=" ";break;case"b":n+="\b";break;case"f":n+="\f";break;case"v":n+="\v";break;default:n+=a}else n+=a,i+=a}this.throwError("Unclosed `")}}e.hooks.add("gobble-token",t),e.hooks.add("after-token",function(r){if((r.node.type===e.IDENTIFIER||r.node.type===e.MEMBER_EXP)&&96===this.code)return r.node={type:"TaggedTemplateExpression",tag:r.node,quasi:t.bind(this)(r,!1)},r.node=this.gobbleTokenProperty(r.node),r.node})}}),n.A.addBinaryOp("in",7),n.A.addBinaryOp("??",1)},31063(e,t,r){"use strict";r.d(t,{f:()=>i,z:()=>n});let n={Array,Boolean,Symbol,Infinity,NaN,Math,Number,BigInt,String,RegExp,JSON,isFinite,isNaN,parseFloat,parseInt,decodeURI,encodeURI,encodeURIComponent,Object:{__proto__:void 0,assign:Object.assign.bind(null),fromEntries:Object.fromEntries.bind(null),hasOwn:Object.hasOwn.bind(null),keys:Object.keys.bind(null),is:Object.is.bind(null),values:Object.values.bind(null)}},i={...n,Promise}},98635(e,t,r){"use strict";r.d(t,{J_:()=>e_,zx:()=>en,ES:()=>Z,FY:()=>eo,zF:()=>O,Uh:()=>eP,io:()=>ev,Ef:()=>f,wG:()=>eI,Qb:()=>eO,dO:()=>d,o1:()=>eE,rD:()=>eD,Wu:()=>eT,eU:()=>k,YX:()=>eS,Tj:()=>J,Vx:()=>el,cp:()=>D,sr:()=>eu,Gp:()=>es,K0:()=>X,UG:()=>v,Q_:()=>ew,a9:()=>y,xg:()=>Y,U2:()=>eR,kc:()=>ei,St:()=>A,Ml:()=>ex,Xb:()=>eb,Fg:()=>ef,VK:()=>Q,pZ:()=>S,DQ:()=>g,pm:()=>ey,Ju:()=>ed,cL:()=>ea,Yo:()=>ee,No:()=>et});var n=r(464),i=r(82460),o=r(96736),a=r(36580),s=r(19076),l=r(27934),u=r(37315),c=r(34221);function d(e=!0,t=!1){return f((0,l.s)(),e,t)}function f(e,t=!0,r=!1){return!!(e?t:r)}var p=r(61841);let h=(0,p.Zd)("extensionsInternal",{slots:{},extensions:{}}),m=(0,p.Zd)("extensionRenderings",{renderings:new Map}),y=()=>(0,p.jf)("extensionsInternal",{slots:{},extensions:{}}),v=()=>(0,p.jf)("extensionRenderings",{renderings:new Map});function g(e){let t=h.getState(),r=e(t);r!==t&&h.setState(r)}let b=null,w=null;function x(){let e=m.getState();return b&&e===w||(b=new Map(e.renderings),w=e,function(e){for(let t of(T.clear(),e.values()))N(t,1);R=!0}(b)),b}function E(e){w={renderings:e},m.setState(w,!0)}function S(e){let t=x();t.has(e.renderingId)||(t.set(e.renderingId,e),N(e,1),E(t))}function D(e){let t=x(),r=t.get(e);r&&(t.delete(e),N(r,-1),E(t))}let O=()=>(0,p.jf)("extensions",{slots:{}}),P=0,C=new Set;function A(e){P++;try{return e()}finally{if(0==--P&&C.size>0){let e=Array.from(C);for(let t of(C.clear(),e))j(t)}}}function j(e){try{e()}catch(t){console.error(`The extension system's '${e.name}' recomputation failed`,t)}}function k(e){P>0?C.add(e):j(e)}let T=new Map,R=!1;function N(e,t){let r=JSON.stringify([e.slotName,e.extensionId,e.slotModuleName,e.extensionModuleName]),n=T.get(r);if(!n){if(t<0)return;T.set(r,{count:1,record:{slotModuleName:e.slotModuleName,extensionModuleName:e.extensionModuleName,slotName:e.slotName,extensionId:e.extensionId}}),R=!0;return}n.count+=t,n.count<1&&(T.delete(r),R=!0)}function I(){var e,t;if(x(),!R)return;R=!1;let r=Array.from(T.values(),({record:e})=>e);r.sort(M),e=i.hs.getState().mountedExtensions,t=r,e.length===t.length&&e.every((e,r)=>0===M(e,t[r]))||i.hs.setState({mountedExtensions:r})}function M(e,t){return $(e.slotName,t.slotName)||$(e.extensionId,t.extensionId)||$(e.slotModuleName,t.slotModuleName)||$(e.extensionModuleName,t.extensionModuleName)}function $(e,t){return e===t?0:e<t?-1:1}I(),m.subscribe(()=>k(I));let L=y(),F=O(),B=(0,i.YP)(),V=(0,i.GI)(),U=new Set,W=!1;function z(e){if(null===e)U=null;else if(null!==U)for(let t of e)U.add(t);k(K)}function K(){if(!W){W=!0;try{for(let e=1;;e++){let t=U;if(null!==t&&0===t.size)return;U=new Set;try{!function(e,t,r,o,a,s=null){let d=F.getState().slots,p={},h=!1,m=(0,l.s)(),y=Object.entries(o.flags).filter(([,{enabled:e}])=>e).map(([e])=>e);for(let[o,l]of Object.entries(e.slots)){let v=d[o];if(v&&s&&!s.has(o)){p[o]=v;continue}let{config:g}=(0,i.vu)(t,l.name),b=function(e,t,r,o,a,s,l){let u=function(e,t){let r=e.add||[],n=e.remove||[],i=e.order||[],{extensions:o}=L.getState();return[...t,...r].filter(e=>!n.includes(e)).sort((e,r)=>er(e,i,o[Z(e)]?.order,t)-er(r,i,o[Z(r)]?.order,t))}(r,t.slots[e].attachedIds),d=[];for(let p of u){let{config:u}=(0,i.P0)(o,e,p),h=(0,i.g$)(r,e,p),m=h?(0,c.A)({},u,h):u,y=Z(p),v=t.extensions[y];if(v){let e=m?.["Display conditions"]?.privileges??v.privileges??[];if(e&&("string"==typeof e||Array.isArray(e)&&e.length>0)&&(!l?.user||!(0,n.st)(e,l.user))||v.featureFlag&&!a.includes(v.featureFlag)||window.offlineEnabled&&!f(s,v.online,v.offline))continue;d.push({id:p,name:y,moduleName:v.moduleName,config:m,featureFlag:v.featureFlag,meta:v.meta,online:m?.["Display conditions"]?.online??v.online??!0,offline:m?.["Display conditions"]?.offline??v.offline??!1,displayConditionExpression:m?.["Display conditions"]?.expression||v.displayExpression})}}return d}(o,e,g,r,y,m,a.session);v&&v.moduleName===l.moduleName&&(0,u.A)(v.candidateExtensions,b)?p[o]=v:(p[o]={moduleName:l.moduleName,candidateExtensions:b},h=!0)}(h||Object.keys(d).length!==Object.keys(p).length)&&F.setState({slots:p})}(L.getState(),B.getState(),V.getState(),a.jX.getState(),n.eA.getState(),t)}catch(e){throw U=null===t||null===U?null:new Set([...t,...U]),e}if(e>=20)return void console.error("The extension system stopped recomputing after 20 passes because something keeps invalidating slots in response to the extension store being written. Some slots are left stale until the next write.")}}finally{W=!1}}}function H(e,t){let r=new Set;for(let n of Object.keys(e))e[n]!==t[n]&&r.add(n);for(let n of Object.keys(t))n in e||r.add(n);return r}function G(){z(null)}function q(e,t){return{moduleName:t,name:e,attachedIds:[]}}function Z(e){let[t]=e.split("#");return t}function Y(e,t){let r=Z(t);return e.extensions[r]}function J(e){return Y(L.getState(),e)}L.subscribe((e,t)=>{z(e.extensions!==t.extensions?null:H(e.slots,t.slots))}),B.subscribe((e,t)=>{z(H(e.slots,t.slots))}),V.subscribe((e,t)=>{z(H(e.configs,t.configs))}),a.jX.subscribe(()=>z(null)),n.eA.subscribe(()=>z(null)),G(),(0,s.gj)(G);let Q=e=>g(t=>({...t,extensions:{...t.extensions,[e.name]:{...e}}}));function X(e,t){g(r=>{let n=r.slots[e];return n?{...r,slots:{...r.slots,[e]:{...n,attachedIds:[...n.attachedIds,t]}}}:{...r,slots:{...r.slots,[e]:{...q(e),attachedIds:[t]}}}})}function ee(e,t){g(r=>{let n=r.slots[e];return n&&n.attachedIds.includes(t)?{...r,slots:{...r.slots,[e]:{...n,attachedIds:n.attachedIds.filter(e=>e!==t)}}}:r})}function et(e){g(t=>{let r=t.slots[e];return r?{...t,slots:{...t.slots,[e]:{...r,attachedIds:[]}}}:t})}function er(e,t,r,n){let i=t.indexOf(e);if(-1!==i)return i;{if(void 0!==r)return 1e3+r;let t=n.indexOf(e);return -1!==t?2e3+t:3e3}}function en(e,t){return function(e,t,r=null,n){let i;return e.filter(e=>{let a=e.displayConditionExpression;if("string"!=typeof a||0===a.trim().length)return!0;i??(i=t&&"object"==typeof t?{session:r,...t}:{session:r});try{return!!(0,o.eb)(a,i)}catch(t){return console.error(`Error while evaluating expression '${a}' for ${e.id}`+(n?` in ${n}`:""),t),!1}})}(ei(e),t,n.eA.getState().session,e)}function ei(e){return F.getState().slots[e]?.candidateExtensions??[]}let eo=(e,t)=>L.setState(r=>{let n=r.slots[t]?.moduleName;if(n&&n!=e)return console.warn(`An extension slot with the name '${t}' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ${n}.`),r;if(n&&n==e)return r;if(r.slots[t])return{...r,slots:{...r.slots,[t]:{...r.slots[t],moduleName:e}}};let i=q(t,e);return{...r,slots:{...r.slots,[t]:{...i}}}}),ea=()=>{U=null,g(()=>({slots:{},extensions:{}})),v().setState({renderings:new Map}),F.setState({slots:{}})},es=(0,p.Zd)("left-nav",{slotName:null,basePath:window.spaBase,mode:"normal"});function el({name:e,basePath:t,mode:r,componentContext:n,state:i}){es.setState({slotName:e,basePath:t,mode:r??"normal",componentContext:n,state:i})}function eu(e){es.getState().slotName===e&&es.setState(es.getInitialState(),!0)}let ec=(0,p.Zd)("modalRegistry",{modals:{}});function ed(e){ec.setState(t=>(t.modals[e.name]=e,t))}function ef(e){let t=ec.getState().modals[e];if(!t){let r=J(e);r&&(t={name:e,load:r.load,moduleName:r.moduleName},console.warn(`Modal ${e} was registered as an extension. This is deprecated and will be removed in the future. Please register it in the "modals" section of routes.json instead of the "extensions" section.`),ed(t))}return t}var ep=r(42007);let eh=(0,p.Zd)("workspaceRegistrations",{workspaces:{}}),em=(0,p.Zd)("workspaceGroups",{workspaceGroups:{}});function ey(e){eh.setState(t=>({workspaces:{...t.workspaces,[e.name]:{...e,load:e.load,preferredWindowSize:e.preferredWindowSize??"normal",type:e.type??"form",canHide:e.canHide??!1,canMaximize:e.canMaximize??!1,width:e.width??"narrow",groups:e.groups??[]}}}))}function ev(e){em.setState(t=>{let r=t.workspaceGroups[e.name];return r?{workspaceGroups:{...t.workspaceGroups,[e.name]:{...r,members:Array.from(new Set([...r.members,...e.members]))}}}:{workspaceGroups:{...t.workspaceGroups,[e.name]:{name:e.name,members:e.members}}}})}let eg=new Set;function eb(e){let t=eh.getState().workspaces;if(t[e])return t[e];{let t=J(e);if(t){var r;let n;return eg.has(e)||(console.warn(`The workspace '${e}' is registered as an extension. This is deprecated. Please register it in the "workspaces" section of the routes.json file.`),eg.add(e)),{name:t.name,title:(r=t,"string"==typeof(n=r?.meta?.title)?n:n&&"object"==typeof n?(0,ep.t)(r.moduleName,n.key,n.default):r.name),moduleName:t.moduleName,preferredWindowSize:t.meta?.screenSize??"normal",load:t.load,type:t.meta?.type??"form",canHide:t.meta?.canHide??!1,canMaximize:t.meta?.canMaximize??!1,width:t.meta?.width??"narrow",groups:t.meta?.groups??[]}}throw Error(`No workspace named '${e}' has been registered.`)}}function ew(e){let t=em.getState().workspaceGroups;if(t[e])return t[e];throw Error(`No workspace group named '${e}' has been registered.`)}let e_=(0,p.Zd)("workspace2",{registeredGroupsByName:{},registeredWindowsByName:{},registeredWorkspacesByName:{},openedGroup:null,openedWindows:[],workspaceTitleByWorkspaceName:{},isMostRecentlyOpenedWindowHidden:!1});function ex(e){let{registeredWorkspacesByName:t,registeredWindowsByName:r}=e_.getState(),n=t[e];if(n){let t=r[n.window];if(t)return t;throw Error(`No workspace window found with name: ${n.window} for workspace: ${e}`)}throw Error(`No workspace found with name: ${e}`)}function eE(e){let{registeredGroupsByName:t,registeredWindowsByName:r}=e_.getState(),n=r[e];if(n){let r=t[n.group];if(r)return r;throw Error(`No workspace group found with name: ${n.group} for window: ${e}`)}throw Error(`No workspace window found with name: ${e}`)}function eS(e){let{openedWindows:t}=e_.getState();return t.findIndex(t=>t.openedWorkspaces.find(t=>t.workspaceName===e))}function eD(e,t){if(0==t.length)return;let{registeredGroupsByName:r}=e_.getState(),n={...r};for(let r of t){if(n[r.name])throw Error(`Cannot register workspace group ${r.name} more than once`);n[r.name]={...r,moduleName:e}}e_.setState({registeredGroupsByName:n})}function eO(e,t){if(0==t.length)return;let{registeredWindowsByName:r}=e_.getState(),n={...r};for(let r of t){if(n[r.name])throw Error(`Cannot register workspace window ${r.name} more than once`);let t={...r,moduleName:e};n[r.name]=t}e_.setState({registeredWindowsByName:n})}function eP(e,t){if(0==t.length)return;let{registeredWorkspacesByName:r}=e_.getState(),n={...r};for(let r of t){if(n[r.name])throw Error(`Cannot register workspace ${r.name} more than once`);let t={...r,moduleName:e};n[r.name]=t}e_.setState({registeredWorkspacesByName:n})}var eC=r(480);let eA=0,ej=null,ek={bootstrap:{millis:15e3,dieOnTimeout:!0},mount:{millis:15e3,dieOnTimeout:!0},unmount:{millis:15e3,dieOnTimeout:!0}};async function eT(e,t){return(await (ej??(ej=new Promise((e,t)=>{(0,eC.mountRootParcel)({name:"openmrs-extension-host",bootstrap:()=>Promise.resolve(),mount:t=>(e(t.mountParcel),Promise.resolve()),unmount:()=>Promise.resolve()},{domElement:document.createElement("div")}).mountPromise.catch(t)}).catch(e=>(console.error("The host parcel used to mount extensions could not be mounted. Falling back to mounting extensions as root parcels, which leaks their DOM elements.",e),eC.mountRootParcel))),ej))("function"==typeof e?()=>e().then(e=>({timeouts:ek,...e})):{timeouts:ek,...e},t)}function eR(){return eN}function eN(e,t){let r,n=eT(e,t).then(e=>r=e);return{mount:()=>n.then(e=>e.mount()),unmount:()=>n.then(e=>e.unmount()),update:e=>n.then(t=>t.update?.(e)),getStatus:()=>r?.getStatus()??"LOADING_SOURCE_CODE",get loadPromise(){return n.then(e=>e.loadPromise)},get bootstrapPromise(){return n.then(e=>e.bootstrapPromise)},get mountPromise(){return n.then(e=>e.mountPromise)},get unmountPromise(){return n.then(e=>e.unmountPromise)}}}async function eI(e,t,r,n,i=e=>e,o={}){let a=Z(n),s=J(n),l=null;if(e){if(!s)throw Error(`Couldn't find extension '${a}' to attach to '${t}'`);let{meta:u,moduleName:c,online:f,offline:p,load:h}=s;if(d(f,p)){let s,d=eA++,f=`${t}/${n}-${d}`;e.dataset.extensionRenderingId=f;let p=e=>{try{D(f)}catch(t){console.error(e,t)}};try{S({renderingId:f,extensionName:a,extensionModuleName:c,extensionId:n,slotName:t,slotModuleName:r})}catch(e){throw p(`Recomputing configuration after registering '${n}' failed also failed`),e}try{s=await h()}catch(e){throw p(`Recomputing configuration after '${n}' failed to load also failed`),e}try{l=await eT(i({...s,name:`${t}/${a}-${d}`}),{...o,_meta:u,_extensionContext:{extensionId:n,extensionSlotName:t,extensionSlotModuleName:r,extensionModuleName:c},domElement:e})}catch(e){throw p(`Recomputing configuration after '${n}' failed to mount also failed`),e}l.mountPromise.then(void 0,e=>{console.error(`Extension '${n}' in slot '${t}' failed to mount`,e),p(`Recomputing configuration after '${n}' failed to mount also failed`)}),l.unmountPromise.then(()=>p(`Recomputing configuration after unmounting '${n}' failed`),e=>{console.error(`Extension '${n}' in slot '${t}' failed to unmount`,e),p(`Recomputing configuration after '${n}' failed to unmount also failed`)})}}else console.warn(`Tried to render ${n} into ${t} but no DOM element was available.`);return l}},26391(e,t,r){"use strict";let n,i,o,a,s,l;r.r(t),r.d(t,{GenderUnknownIcon:()=>tC,evaluateAsNumber:()=>ed.dX,getImportMapOverrideMap:()=>A,StockManagementPictogram:()=>fA,ChemistryIcon:()=>tc,BabyIcon:()=>e7,DashboardExtension:()=>rC,openmrsComponentDecorator:()=>e_.F7,tryRegisterExtension:()=>eP,pictogramIds:()=>fi,ActivityIcon:()=>e2,compile:()=>ed.wE,removeRouteMapOverride:()=>eo,checkStatus:()=>ev.dO,TableBatchActions:()=>eK,getAsyncLifecycle:()=>e_.ns,subscribeOpenmrsEvent:()=>eu.$y,dispatchConnectivityChanged:()=>p.Yt,PasswordIcon:()=>tQ,Assessment2Pictogram:()=>fl,CloseIcon:()=>tm,setupRouteMapOverrides:()=>el,getWorkspaceGroupRegistration:()=>ev.Q_,registerWorkspace:()=>ev.pm,useFeatureFlag:()=>e_.u,reset:()=>ev.cL,LabOrderIcon:()=>tL,VisitMode:()=>eu.dx,offlineUuidPrefix:()=>ew.jU,useLocations:()=>e_.kH,getLifecycle:()=>e_.JK,formatDatetime:()=>cl,getVisitsForPatient:()=>eu.BR,subscribeConnectivity:()=>p.sT,formatPartialDate:()=>ci,CustomOverflowMenu:()=>eQ,LocationIcon:()=>tB,GroupIcon:()=>tj,canBeginEditSynchronizationItemsOfType:()=>ew.xN,VisitStatus:()=>eu.Cj,createUseStore:()=>e_.rr,getCurrentImportMap:()=>V,getSessionLocation:()=>d.Kx,usePatient:()=>e_.tQ,useRenderableExtensions:()=>e_.oU,getOpenedWindowIndexByWorkspace:()=>ev.YX,checkStatusFor:()=>ev.Ef,clearHistory:()=>eb.g4,clearConfigErrors:()=>f.Nh,formatTime:()=>cs,isDevEnabled:()=>d.L7,setLeftNav:()=>ev.Vx,syncOfflinePatientData:()=>ew.sK,closeWorkspaceGroup2:()=>pL,getCurrentRouteMap:()=>ee,ConfigurableLink:()=>e_.i_,sessionStore:()=>d.eA,subscribeSnackbarShown:()=>p.ls,getDynamicOfflineDataEntriesFor:()=>ew.WA,getLoggedInUser:()=>d.xC,GenderMaleIcon:()=>tO,getExtensionSlotConfigFromStore:()=>f.vu,evaluateAsNumberAsync:()=>ed.$F,putDynamicOfflineDataFor:()=>ew.ff,getImportMapDefaultMap:()=>P,unregisterExtensionRendering:()=>ev.cp,implementerToolsConfigStore:()=>f.tN,Type:()=>f.ZU,InPatientPictogram:()=>fg,cleanupObsoleteFeatureFlags:()=>eg.D3,showSnackbar:()=>fW,PatientBannerActionsMenu:()=>d5,PatientSearchPictogram:()=>fx,DocumentAttachmentIcon:()=>tb,Snackbar:()=>fL,CardiologyPictogram:()=>fc,ImageMedicalIcon:()=>tR,ActionableNotificationComponent:()=>dm,DiagnosisTags:()=>cQ,iconIds:()=>e4,PatientsPictogram:()=>fE,interpolateUrl:()=>eb.JG,setupHistory:()=>eb.Wh,subscribeToastShown:()=>p.dX,detachAll:()=>ev.No,convertToLocaleCalendar:()=>cu,DocumentIcon:()=>tg,configInternalStore:()=>f.Rt,ActionMenuButton2:()=>p0,setupDynamicOfflineDataHandler:()=>ew.iD,makeUrl:()=>d.Gm,oneOf:()=>f.yL,selectPreferredName:()=>dq,launchWorkspaceGroup:()=>function e(t,r){let n=(0,ev.Q_)(t),{state:i,onWorkspaceGroupLaunch:o,workspaceGroupCleanup:a,workspaceToLaunch:s}=r,l=function(){return f7}();if(l.getState().openWorkspaces.length){let n=l.getState().workspaceGroup;n?fJ(n?.name,()=>{e(t,r)}):pn(()=>{e(t,r)})}else l.setState(e=>({...e,workspaceGroup:{name:t,members:n.members,cleanup:a}})),pl(t,i),o?.(),s&&fX(s.name,s.additionalProps??{})},syncDynamicOfflineData:()=>ew.u1,MobileCheckIcon:()=>tH,createErrorHandler:()=>ec.J,openmrsObservableFetch:()=>d.ut,parseDate:()=>u8,getAttachmentByUuid:()=>eu.KU,LeftNavMenu:()=>c3,getExtensionRegistration:()=>ev.Tj,ShoppingCartAddItemIcon:()=>rD,ReferralOrderIcon:()=>t3,ReportIcon:()=>t5,dispatchToastShown:()=>p.Vt,getImportMapNextPageMap:()=>C,registerExtension:()=>ev.VK,setupOfflineSync:()=>ew.cy,DownloadIcon:()=>tw,useConnectivity:()=>e_.Fx,provide:()=>f.Gt,getSynchronizationItemsFor:()=>ew.Io,ShoppingCartArrowDownIcon:()=>rn,featureFlagsStore:()=>eg.jX,promptBeforeClosing:()=>f4,removeDynamicOfflineDataFor:()=>ew.wn,jsep:()=>ed.PQ,GeriatricsPictogram:()=>fy,SearchIcon:()=>t7,reportError:()=>ec.N,slugify:()=>L,isOmrsDateToday:()=>u6,getExtensionStore:()=>ev.zF,BloodBankPictogram:()=>fu,TriagePictogram:()=>fk,Workspace2:()=>pq,refetchCurrentUser:()=>d.yH,CheckmarkOutlineIcon:()=>tu,registerExtensionSlot:()=>ev.FY,AllergiesIcon:()=>r_,ArrowDownIcon:()=>e6,useOpenmrsInfinite:()=>e_.iy,getExtensionConfigFromExtensionSlotStore:()=>f.g$,OpenmrsDatePicker:()=>cY,getExtensionConfigFromStore:()=>f.P0,getDynamicOfflineDataEntries:()=>ew.FE,getLocaleDisplayName:()=>ux,messageOmrsServiceWorker:()=>ew.ms,navigate:()=>eb.oo,launchWorkspace2:()=>pF,getGroupByWindowName:()=>ev.o1,CustomOverflowMenuItem:()=>eX,isUrl:()=>f.gU,CaretDownIcon:()=>tr,ArrowLeftIcon:()=>e5,FacilityPictogram:()=>fm,ViewOffIcon:()=>rg,setCurrentOfflineMode:()=>ew.Og,updateInternalExtensionStore:()=>ev.DQ,dispatchActionableNotificationShown:()=>p.LQ,resetRouteMapOverrides:()=>ea,formatDurationBetween:()=>cv,defaultVisitCustomRepresentation:()=>eu.Rb,getBreadcrumbsFor:()=>eb.qh,useOpenmrsPagination:()=>e_.Ed,Pagination:()=>dW,CheckmarkFilledIcon:()=>tl,clearCurrentUser:()=>d.g$,showModal:()=>dd,ChevronUpIcon:()=>th,saveVisit:()=>eu.Ds,useAttachments:()=>e_._9,Pictogram:()=>fM,useExtensionSlot:()=>e_.br,ChevronDownIcon:()=>td,OpenmrsDateRangePicker:()=>cJ,deleteAttachmentPermanently:()=>eu.SY,getVisitTypes:()=>eu.Pu,OverflowMenuHorizontalIcon:()=>tY,EventScheduleIcon:()=>tE,getSessionStore:()=>d.EW,ActionMenu:()=>pT,ProcedureOrderIcon:()=>t4,preloadImport:()=>B,registerWorkspaceWindows2:()=>ev.Qb,useOnVisible:()=>e_.Jm,setSessionLocation:()=>d.Gp,userHasAccess:()=>d.st,ChartAverageIcon:()=>ta,getFeatureFlag:()=>eg.jj,UserAvatarIcon:()=>rh,renderExtension:()=>ev.wG,useFhirInfinite:()=>e_.vL,toVisitTypeObject:()=>eu.Qx,useSession:()=>e_.wV,EmergencyDepartmentPictogram:()=>fh,Notification:()=>dp,dispatchSnackbarShown:()=>p.$3,getSynchronizationItem:()=>ew.Gp,navigateAndLaunchWorkspace:()=>f0,omrsOfflineCachingStrategyHttpHeaderName:()=>ew.JC,formatDate:()=>co,workspace2StoreActions:()=>pU,SwitcherIcon:()=>rt,esmStyleGuideSchema:()=>eU.u,getImportMapDisabledOverrides:()=>j,useAssignedExtensionIds:()=>e_.Tt,CaretRightIcon:()=>ti,evaluateAsType:()=>ed.Sj,PageHeader:()=>dV,TranslateIcon:()=>rc,setUserProperties:()=>d.Fi,MovementIcon:()=>tZ,renderInlineNotifications:()=>dT,subscribePrecacheStaticDependencies:()=>p.ff,PaymentsDeskPictogram:()=>fS,usePrimaryIdentifierCode:()=>e_.wJ,dispatchPrecacheStaticDependencies:()=>p.pc,getCurrentUser:()=>d.HW,useLayoutType:()=>e_.qv,XrayPictogram:()=>fT,CaretUpIcon:()=>to,renderActionableNotifications:()=>dN,OpenmrsAppContext:()=>e_.p6,setupModals:()=>dc,omrsOfflineResponseBodyHttpHeaderName:()=>ew.UH,getDefaultsFromConfigSchema:()=>function e(t){let r={};for(let n of Object.keys(t))if(hc(t[n])&&t[n].hasOwnProperty("_default"))r[n]=t[n]._default;else{if(n.startsWith("_"))continue;hc(t[n])?r[n]=e(t[n]):r[n]=t[n]}return r},subscribeTo:()=>ek.i7,recordConfigDerivationError:()=>f.lJ,useAbortController:()=>e_.Ie,Extension:()=>e_.YY,getFhirServerPaginationHandlers:()=>e_.mw,useConnectedExtensions:()=>e_.zD,registerApp:()=>eA,queueSynchronizationItemFor:()=>ew.Iq,HospitalBedIcon:()=>tT,useExtensionInternalStore:()=>e_.$B,configExtensionStore:()=>f.hs,getSynchronizationItems:()=>ew.pb,getExtensionSlotsConfigStore:()=>f.YP,registerExtensionRendering:()=>ev.pZ,RenderIfValueIsTruthy:()=>e_.fS,registerFeatureFlag:()=>eg.uA,useFhirFetchAll:()=>e_.oq,restBaseUrl:()=>d.Jj,CalendarHeatMapIcon:()=>te,getWorkspaceRegistration:()=>ev.Xb,isImportMapOverrideDisabled:()=>k,resetConfigSystem:()=>f.Nz,getFullSynchronizationItems:()=>ew.C$,getExtensionInternalStore:()=>ev.a9,registerGlobalStore:()=>ek.CE,runSynchronization:()=>ew.AO,evaluateAsBoolean:()=>ed.eb,PatientBannerPatientInfo:()=>d3,addRouteMapOverride:()=>ei,getDefaultCalendar:()=>cr,SettingsIcon:()=>re,DrugOrderIcon:()=>t_,isOnline:()=>hs.s,ProgramsIcon:()=>t2,useAssignedExtensions:()=>e_.CX,CloseFilledIcon:()=>ty,canAccessStorage:()=>hu,registerDefaultCalendar:()=>ct,TreeViewAltIcon:()=>rf,OverflowMenuVerticalIcon:()=>tJ,clearConfigDerivationError:()=>f.BQ,getConfigStore:()=>f.IS,registerWorkspaceGroup:()=>ev.io,InformationSquareIcon:()=>tM,EmptyCard:()=>c1,ChevronLeftIcon:()=>tf,RadiologyIcon:()=>rS,useCandidateExtensions:()=>e_.zA,renderToasts:()=>fq,isDesktop:()=>e_.xl,integrateBreakpoints:()=>eI,RegistrationPictogram:()=>fP,CardHeader:()=>eV,getExtensionRegistrationFrom:()=>ev.xg,InformationIcon:()=>tN,TrashCanIcon:()=>rd,useShallowStableValue:()=>e_.e6,useOpenmrsSWR:()=>e_.M3,Assessment1Pictogram:()=>fs,finishRegisteringAllApps:()=>ej,importDynamic:()=>F,useFhirPagination:()=>e_.to,useVisitContextStore:()=>e_.xH,ArrowUpIcon:()=>e8,showActionableNotification:()=>dI,getDynamicOfflineDataHandlers:()=>ew.qb,useForceUpdate:()=>e_.CH,updateWorkspaceWindowState:()=>pt,useVisit:()=>e_.fq,PatientBannerPatientIdentifiers:()=>d0,WorkspaceNotification:()=>pw,TransferPictogram:()=>fj,usePagination:()=>e_.WQ,Breakpoint:()=>eT,PatientBannerToggleContactDetailsButton:()=>p1,CloseOutlineIcon:()=>tv,ObstetricsPictogram:()=>f_,parseDateInput:()=>cd,getConfig:()=>f.zj,attach:()=>ev.K0,getLocale:()=>uE,ActionMenuButton:()=>pp,isUrlWithTemplateParameters:()=>f.qG,useEmrConfiguration:()=>e_.E4,useLeftNav:()=>e_.if,ToolsIcon:()=>ru,ErrorState:()=>c4,detach:()=>ev.Yo,setCurrentVisit:()=>eu.NH,registerOmrsServiceWorker:()=>ew.sZ,ConditionsIcon:()=>rE,SaveIcon:()=>t8,activateOfflineCapability:()=>ew.nr,useWorkspaces:()=>pi,resetWorkspaceStore:()=>ps,useConfig:()=>e_.UK,validator:()=>f.Nc,CalendarIcon:()=>tt,getHistory:()=>eb.JK,StickyNoteAddIcon:()=>ri,useWorkspace2Store:()=>pW,getPatientName:()=>dz,getVisitStore:()=>eu.BX,getCoreTranslation:()=>h.V,registerModuleWithConfigSystem:()=>f.FL,isOfflineUuid:()=>ew.bO,registerModuleLoad:()=>f.kl,getBreadcrumbs:()=>eb.lz,extractVariableNames:()=>eh,getOfflineSynchronizationStore:()=>ew.LM,translateFrom:()=>h.t,EditIcon:()=>tx,useStoreWithActions:()=>e_.mQ,getCandidateExtensions:()=>ev.kc,putDynamicOfflineData:()=>ew.yD,shallowEqual:()=>pM.b,subscribeNotificationShown:()=>p.bJ,MaximizeIcon:()=>tU,promptForClosingWorkspaces:()=>pV,WarningIcon:()=>rw,closeAllWorkspaces:()=>pn,fhirBaseUrl:()=>d.IU,matchLocale:()=>hl,registerBreadcrumb:()=>eb.vf,usePatientPhoto:()=>fe,EventsIcon:()=>tS,createGlobalStore:()=>ek.Zd,workspaceStore:()=>f7,getCurrentOfflineMode:()=>ew.wJ,subscribeToFeatureFlag:()=>eg.sM,useExtensionStore:()=>e_.Gz,closeWorkspace:()=>f5,createAttachment:()=>eu.cD,useLeftNavStore:()=>e_.TA,TableIcon:()=>rs,Icon:()=>rP,InformationFilledIcon:()=>tI,getCurrentPageMap:()=>O,LaboratoryPictogram:()=>fb,temporaryConfigStore:()=>f.H,getPromptBeforeClosingFcn:()=>f2,toDateObjectStrict:()=>u5,defineConfigSchema:()=>f.T0,filterBreadcrumbs:()=>eb.D_,invalidateImplementerToolsConfig:()=>f.OR,PatientBannerContactDetails:()=>p9,getAssignedExtensions:()=>ev.zx,PatientPhoto:()=>fn,MaterialOrderIcon:()=>tV,MicroscopeIcon:()=>tK,scheduleRecomputation:()=>ev.eU,PharmacyPictogram:()=>fD,AttachmentIcon:()=>rx,MoneyIcon:()=>tG,getAttachments:()=>eu.Bv,getFullSynchronizationItemsFor:()=>ew.xc,PageHeaderContent:()=>dU,MedicationIcon:()=>tW,PrinterIcon:()=>t1,getWorkspaceGroupStore:()=>pl,PatientListsPictogram:()=>fN,useAppContext:()=>e_.Us,isOpenmrsRoutes:()=>z,AppointmentsAltPictogram:()=>fa,GenericOrderTypeIcon:()=>tA,batchExtensionUpdates:()=>ev.St,useExtensionSlotStore:()=>e_.uL,ViewIcon:()=>rb,formattedName:()=>dG,sessionEndpoint:()=>d.Ct,duration:()=>cm,resetImportMapOverrides:()=>N,TableOfContentsIcon:()=>ra,CaretLeftIcon:()=>tn,getTranslationOverrides:()=>f.td,isVersionSatisfied:()=>hp,EmptyCardIllustration:()=>c0,PenIcon:()=>t0,getWorkspaceStore:()=>pe,registerOfflinePatientHandler:()=>ew.KG,setupImportMapOverrides:()=>$,showToast:()=>fZ,useDefineAppContext:()=>e_.jn,validators:()=>f.y$,getGlobalStore:()=>ek.jf,useOnClickOutside:()=>e_.Wr,getWindowByWorkspaceName:()=>ev.Ml,ArrowRightIcon:()=>e9,loadLifeCycles:()=>eS,registerBreadcrumbs:()=>eb.MY,MotherIcon:()=>tq,fetchCurrentPatient:()=>eu.hG,Toast:()=>fz,MessageQueueIcon:()=>tz,TwoFactorAuthenticationIcon:()=>rp,Pharmacy2Pictogram:()=>fO,goBackInHistory:()=>eb.tA,GroupAccessIcon:()=>tk,getExtensionRenderingsStore:()=>ev.UG,setImplementerToolsConfigRecomputer:()=>f.EN,getAsyncExtensionLifecycle:()=>e_.sc,setupApiModule:()=>d.Y0,renderLoadingSpinner:()=>p8,WorkspaceContainer:()=>pR,showNotification:()=>dR,queueSynchronizationItem:()=>ew.Zr,getModalRegistration:()=>ev.Fg,ListCheckedIcon:()=>tF,ResponsiveWrapper:()=>f$,GynaecologyPictogram:()=>fv,ShoppingCartIcon:()=>rr,getRouteMapNextPageMap:()=>er,updateVisit:()=>eu.xL,backendDependencies:()=>d.QE,MaybePictogram:()=>fI,beginEditSynchronizationItem:()=>ew.FO,createParcelMounter:()=>ev.U2,getStartedVisit:()=>eu.DK,omrsOfflineResponseStatusHttpHeaderName:()=>ew.Gj,isOpenmrsAppRoutes:()=>W,openmrsFetch:()=>d.lo,HomePictogram:()=>fR,DentistryPictogram:()=>ff,ServiceQueuesPictogram:()=>fC,toLanguageTag:()=>u_,launchWorkspace:()=>fX,setFeatureFlag:()=>eg.B4,useStore:()=>e_.Pj,DigitalTrustPictogram:()=>fp,NumericObservation:()=>dF,attachmentUrl:()=>eu.Zu,interpolateString:()=>eb.zl,inRange:()=>f.r4,useExtensionSlotMeta:()=>e_.Wq,AppointmentsPictogram:()=>fo,renderSnackbars:()=>fU,getRegisteredWorkspace2Names:()=>pK,toLocationObject:()=>eu.E$,ChartLineIcon:()=>ts,UserHasAccess:()=>e_.qw,evaluateAsBooleanAsync:()=>ed.Gz,changeWorkspaceContext:()=>f9,createDashboard:()=>rA,getLocations:()=>eu.Vs,getOfflineDb:()=>ew.e,canCloseWorkspaceWithoutPrompting:()=>fY,getExtensionsConfigStore:()=>f.GI,getRouteMapDefaultMap:()=>et,age:()=>dY,syncAllDynamicOfflineData:()=>ew.Td,isOmrsDateStrict:()=>u3,registerWorkspaceGroups2:()=>ev.rD,usePaginationInfo:()=>e_.WK,evaluateAsync:()=>ed.mv,useOpenmrsFetchAll:()=>e_.Bf,removeImportMapOverride:()=>R,showWorkspacePrompts:()=>po,useVisitTypes:()=>e_.wr,ageAsDuration:()=>dZ,removeDynamicOfflineData:()=>ew.NU,getExtensionNameFromId:()=>ev.ES,deleteSynchronizationItem:()=>ew.lY,renderParcel:()=>ev.Wu,useWorkspace2Context:()=>pz,ResetIcon:()=>t9,RenewIcon:()=>t6,subscribeActionableNotificationShown:()=>p.bK,ErrorCard:()=>c2,GenderFemaleIcon:()=>tD,enableImportMapOverride:()=>I,getOfflinePatientDataStore:()=>ew.WK,retry:()=>hh,ComponentContext:()=>e_.zq,ExtensionSlot:()=>e_.W3,getOmrsServiceWorker:()=>ew.Rs,addImportMapOverride:()=>T,subscribeConnectivityChanged:()=>p.gj,unsetLeftNav:()=>ev.sr,MaybeIcon:()=>rO,useCustomOverflowMenu:()=>eJ,PedestrianFamilyIcon:()=>tX,generateOfflineUuid:()=>ew.sA,cancelPrompt:()=>f3,CtScanPictogram:()=>fd,dispatchNotificationShown:()=>p.FI,leftNavStore:()=>ev.Gp,OpenmrsFetchError:()=>d.$f,UserFollowIcon:()=>rm,launchWorkspaceGroup2:()=>p$,ChevronRightIcon:()=>tp,UserXrayIcon:()=>ry,GenderOtherIcon:()=>tP,formatDuration:()=>cc,toOmrsIsoString:()=>u9,Labs2Pictogram:()=>fw,workspace2Store:()=>ev.J_,setUserLanguage:()=>d.E4,useBodyScrollLock:()=>e_.yJ,getExtensionConfig:()=>f.UY,SyringeIcon:()=>ro,LocationPicker:()=>c9,useDebounce:()=>e_.d7,TimeIcon:()=>rl,getExtensionSlotConfig:()=>f.G9,AddIcon:()=>e3,getRouteMapOverrideMap:()=>en,processConfig:()=>f.mq,InventoryManagementIcon:()=>t$,registerWorkspaces2:()=>ev.Uh,UserIcon:()=>rv,formatPatientName:()=>dH,fireOpenmrsEvent:()=>eu.X1,registerModal:()=>ev.Ju,registerTranslationNamespace:()=>f.GV,displayName:()=>dK,evaluate:()=>ed._3,defineExtensionConfigSchema:()=>f.ks,renderWorkspaceWindowsAndMenu:()=>ho,getSyncLifecycle:()=>e_.g9,evaluateAsTypeAsync:()=>ed.uN});var u,c,d=r(464),f=r(82460),p=r(19076),h=r(42007);let m="import-map-override:",y="import-map-overrides-disabled",v="import-map-overrides:change",g=!1,b=null,w=null;async function x(){return w??(w=E().then(({map:e,complete:t})=>(t||(w=null),e))),w}async function E(){let e=document.querySelectorAll('script[type="systemjs-importmap"]'),t=[],r=!0;for(let n=0;n<e.length;n++){let i=e[n];try{if(i.src){let e=await fetch(i.src);if(!e.ok)throw Error(`Request for ${i.src} returned ${e.status} ${e.statusText}`);t.push(await e.json())}else i.textContent&&t.push(JSON.parse(i.textContent))}catch(e){r=!1,console.warn(`[import-maps] Failed to parse import map from script tag at index ${n}`,e)}}return{map:S(t),complete:r}}function S(e){let t={imports:{}};for(let r of e)r?.imports&&Object.assign(t.imports,r.imports);return t}function D(){let e={};try{let t=j();for(let r=0;r<localStorage.length;r++){let n=localStorage.key(r);if(n?.startsWith(m)){let r=n.slice(m.length);if(!t.includes(r)){let t=localStorage.getItem(n);t&&(e[r]=t)}}}}catch(e){console.warn("[import-maps] Failed to read import-map overrides from localStorage",e)}return{imports:e}}async function O(){let e=await x();return g?S([e,b??D()]):e}async function P(){return x()}async function C(){return g?S([await x(),D()]):x()}function A(e){if(!g)return{imports:{}};if(e){let e={};for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);if(r?.startsWith(m)){let t=localStorage.getItem(r);t&&(e[r.slice(m.length)]=t)}}return{imports:e}}return D()}function j(){if(!g)return[];try{let e=localStorage.getItem(y);if(e){let t=JSON.parse(e);if(Array.isArray(t))return t}}catch{}return[]}function k(e){return!!g&&j().includes(e)}function T(e,t){if(!g)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.setItem(m+e,t),window.dispatchEvent(new CustomEvent(v))}catch(e){console.warn("[import-maps] Failed to write import-map override to localStorage",e)}}function R(e){if(!g)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.removeItem(m+e);let t=j().filter(t=>t!==e);t.length>0?localStorage.setItem(y,JSON.stringify(t)):localStorage.removeItem(y),window.dispatchEvent(new CustomEvent(v))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}function N(){if(!g)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{let e=[];for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);r?.startsWith(m)&&e.push(r)}e.forEach(e=>localStorage.removeItem(e)),localStorage.removeItem(y),window.dispatchEvent(new CustomEvent(v))}catch(e){console.warn("[import-maps] Failed to clear import-map overrides from localStorage",e)}}function I(e){if(!g)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{let t=j().filter(t=>t!==e);t.length>0?localStorage.setItem(y,JSON.stringify(t)):localStorage.removeItem(y),window.dispatchEvent(new CustomEvent(v))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}let M=!1;function $(){!M&&(M=!0,(g="development"===window.spaEnv)&&(b=D()))}function L(e){return e.replace(/[\/\-@]/g,"_")}async function F(e,t="./start",n){var i;let o,a=!n?.maxLoadingTime||n.maxLoadingTime<=0?6e5:n.maxLoadingTime;await Promise.race([B(e,n?.importMap),new Promise((t,r)=>{o=setTimeout(()=>{var t;r(Error(`Could not resolve requested script, ${e}, within ${(t=a)<1e3?`${t} milliseconds`:t<6e4?`${Math.floor(t/1e3)} seconds`:t<36e5?`${Math.floor(t/6e4)} minutes`:t<864e5?`${Math.floor(t/36e5)} hours`:`${Math.floor(t/864e5)} days`}.`))},a)})]),o&&clearTimeout(o);let s=L(e),l=window[s];if(!("object"==typeof(i=l)&&null!==i&&"init"in i&&"function"==typeof i.init&&"get"in i&&"function"==typeof i.get)){let e=`The global variable ${s} does not refer to a federated module`;throw console.error(e),Error(e)}l.init(r.S.default);let u=(await l.get(t))();if("object"!=typeof u||null===u){let t=`Container for ${e} did not return an ESM module as expected`;throw console.error(t),Error(t)}return u}async function B(e,t){if("string"!=typeof e||0===e.trim().length){let e="Attempted to call importDynamic() without supplying a package to load";throw console.error(e),Error(e)}let r=L(e);if(!window[r]){let r=t??await V();if(!r.imports.hasOwnProperty(e)){let t=`Could not find the package ${e} defined in the current importmap`;throw console.error(t),Error(t)}let n=r.imports[e];n.startsWith("./")&&(n=window.spaBase+n.substring(1));let i=e in A().imports;try{return await function(e){var t;let r=(t=window)[U]??(t[U]=new Map),n=r.get(e);if(n)return n;if(document.head.querySelector(`script[src="${e}"]`))return console.warn(`Script at ${e} already loaded. Not loading it again.`),Promise.resolve();let i=document.createElement("script");i.src=e,i.type="text/javascript",i.async=!0;let o=new Promise((t,n)=>{let o=setTimeout(()=>{console.error(`The script at ${e} did not load within 5 seconds. This may indicate an issue with the imports in the script's entry-point file or with the script's bundler configuration.`)},5e3);function a(){clearTimeout(o),i.removeEventListener("load",s),i.removeEventListener("error",l)}function s(){a(),t()}function l(t){a(),r.delete(e),i.remove();let o=`Failed to load script from ${e}`;console.error(o,t),n(t.message??o)}i.addEventListener("load",s),i.addEventListener("error",l),document.head.appendChild(i)});return r.set(e,o),o}(n)}catch(e){return i&&(0,p.Vt)({kind:"error",title:(0,h.V)("scriptLoadingFailed","Error: Script failed to load"),description:(0,h.V)("scriptLoadingError","Failed to load overridden script from {{- url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",{url:n}),actionButtonLabel:(0,h.V)("resetOverrides","Reset overrides"),onActionButtonClick(){N(),window.location.reload()}}),Promise.reject(e)}}return Promise.resolve()}async function V(){return O()}let U=Symbol.for("__openmrs_script_loading");function W(e){return!!e&&"object"==typeof e&&!(Object.hasOwn(e,"pages")&&(!e.pages||!Array.isArray(e.pages))||Object.hasOwn(e,"extensions")&&(!e.extensions||!Array.isArray(e.extensions))||Object.hasOwn(e,"workspaces")&&(!e.workspaces||!Array.isArray(e.workspaces))||Object.hasOwn(e,"modals")&&(!e.modals||!Array.isArray(e.modals)))}function z(e){return!!e&&"object"==typeof e&&"routes"in e&&!!e.routes&&"object"==typeof e.routes&&Object.entries(e.routes).every(([e,t])=>"string"==typeof e&&W(t))}let K="openmrs-routes:",H="openmrs-routes:change",G=!1,q=null,Z=null;async function Y(){return Z??(Z=J().then(({map:e,complete:t})=>(t||(Z=null),e))),Z}async function J(){let e=document.querySelectorAll("script[type='openmrs-routes']"),t=[],r=!0;for(let n=0;n<e.length;n++){let i=e[n];try{let e;if(i.src){let t=await fetch(i.src);if(!t.ok)throw Error(`Request for ${i.src} returned ${t.status} ${t.statusText}`);e=await t.json()}else i.textContent&&(e=JSON.parse(i.textContent));e&&z(e)&&t.push(e)}catch(e){r=!1,console.warn(`[route-maps] Failed to parse routes from script tag at index ${n}`,e)}}return{map:Q(t),complete:r}}function Q(e){let t={routes:{}};for(let r of e)r&&"object"==typeof r&&!Array.isArray(r)&&(Object.assign(t.routes,r.routes),void 0===t.version&&void 0!==r.version&&(t.version=r.version));return t}async function X(){let e={version:void 0,routes:{}};try{let t=[];for(let e=0;e<localStorage.length;e++){let r=localStorage.key(e);if(r?.startsWith(K)){let e=localStorage.getItem(r);e&&t.push({moduleName:r.slice(K.length),raw:e})}}for(let r of(await Promise.allSettled(t.map(async({moduleName:e,raw:t})=>{let r=JSON.parse(t);if(W(r))return{moduleName:e,routes:r};if("string"==typeof r&&r.startsWith("http")){let t=await fetch(r),n=await t.json();if(W(n))return{moduleName:e,routes:n};throw Error(`${r} did not resolve to a valid OpenmrsAppRoutes object`)}throw Error(`Override for ${e} is neither a valid routes object nor a URL`)}))))"fulfilled"===r.status?e.routes[r.value.moduleName]=r.value.routes:console.warn("[route-maps] Failed to load route override",r.reason)}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}async function ee(){let e=await Y();return G?Q([e,q??await X()]):e}async function et(){return Y()}async function er(){return G?Q([await Y(),await X()]):Y()}function en(){if(!G)return{};let e={};try{for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);if(r?.startsWith(K)){let t=localStorage.getItem(r);t&&(e[r.slice(K.length)]=t)}}}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}function ei(e,t){if(!G)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{if("string"==typeof t)if(t.startsWith("http"))localStorage.setItem(K+e,JSON.stringify(t));else{let r=JSON.parse(t);if(!W(r))return void console.error(`The supplied routes for ${e} is not a valid OpenmrsAppRoutes object`,t);localStorage.setItem(K+e,JSON.stringify(r))}else if(t instanceof URL)localStorage.setItem(K+e,JSON.stringify(t.toString()));else{if(!W(t))return void console.error(`Override for ${e} is not in a valid format. Expected either a Javascript Object, a JSON string of a Javascript object, or a URL`,t);localStorage.setItem(K+e,JSON.stringify(t))}window.dispatchEvent(new CustomEvent(H))}catch(e){console.warn("[route-maps] Failed to write route override to localStorage",e)}}function eo(e){if(!G)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{localStorage.removeItem(K+e),window.dispatchEvent(new CustomEvent(H))}catch(e){console.warn("[route-maps] Failed to remove route override from localStorage",e)}}function ea(){if(!G)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{let e=[];for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);r?.startsWith(K)&&e.push(r)}e.forEach(e=>localStorage.removeItem(e)),window.dispatchEvent(new CustomEvent(H))}catch(e){console.warn("[route-maps] Failed to clear route overrides from localStorage",e)}}let es=null;function el(){return es||(es=(G="development"===window.spaEnv)?X().then(e=>{q=e}):Promise.resolve())}var eu=r(71647),ec=r(8685),ed=r(96736),ef=r(95486),ep=r(31063);function eh(e){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))throw`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`;let t={globals:{...ep.f},isLocalExpression:!1,variables:new Set};return em("string"==typeof e?(0,ef.A)(e):e,t),[...t.variables]}function em(e,t){switch(e.type){case"UnaryExpression":return n=e,i=t,em(n.argument,i);case"BinaryExpression":return o=e,a=t,[em(o.left,a),em(o.right,a)].filter(Boolean);case"ConditionalExpression":return s=e,l=t,[em(s.consequent,l),em(s.test,l),em(s.alternate,l)].filter(Boolean);case"CallExpression":let r;return u=e,c=t,r=em(u.callee,c),u.arguments?.map(ey(c)),r;case"ArrowFunctionExpression":var n,i,o,a,s,l,u,c,d,f,p,h,m,y,v,g,b,w,x=e,E=t;let S={...E};S.isLocalExpression=!0;let D=x.params?.map(ey(S))??[],O=em(x.body,S)??[];if(O&&Array.isArray(O))for(let e of O)D.includes(e)||E.variables.add(e);return;case"MemberExpression":let P;return d=e,f=t,em(d.object,f),void((P={...f}).isLocalExpression=!0,em(d.property,P));case"ArrayExpression":return p=e,h=t,void p.elements?.map(ey(h));case"SequenceExpression":return m=e,y=t,void m.expressions?.map(ey(y));case"NewExpression":return v=e,g=t,void v.arguments?.map(ey(g));case"Literal":case"TemplateElement":return;case"Identifier":var C=e,A=t;if(!(C.name in A.globals))if(A.isLocalExpression)return C.name;else A.variables.add(C.name);return;case"TemplateLiteral":return b=e,w=t,void(b.expressions?.map(ey(w)),b.quasis?.map(ey(w)));default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function ey(e){return function(t){return null===t?null:em(t,e)}}var ev=r(98635),eg=r(36580),eb=r(72448),ew=r(36604),e_=r(66671),ex=r(480);let eE=new Map;async function eS(e,t){let r=t.indexOf("#"),n=r>=0,i=n?t.substring(0,r):e,o=n?t.substring(r+1):t,a=await F(i);return a&&Object.hasOwn(a,o)&&"function"==typeof a[o]?eO(i,a).then(()=>a[o]()):(a?a&&Object.hasOwn(a,o)?console.warn(`The export ${t}, defined in ${e}'s routes.json, is not a function`):console.warn(`${i} does not define a component called "${o}", referenced in ${e}'s routes.json. This cannot be loaded.`):console.warn(`Unknown app ${i} for ${t} defined in ${e}'s routes.json`),eD)}let eD={bootstrap:()=>Promise.resolve(),mount:()=>Promise.resolve(),unmount:()=>Promise.resolve()};async function eO(e,t){if(e in eE)await eE[e];else{let r=t??await F(e);await (eE[e]=new Promise((t,n)=>{if(Object.hasOwn(r,"startupApp")){let i=r.startupApp;if("function"==typeof i)return Promise.resolve(i()).then(()=>{(0,f.kl)(e),t(null)}).catch(n)}(0,f.kl)(e),t(null)}))}}function eP(e,t){let r=t.name;if(!r)return void console.error(`An extension definition in ${e} is missing an name and thus cannot be
16
16
  registered. To fix this, ensure that you define the "name" field inside the