@openmrs/esm-app-shell 4.3.2-pre.678 → 4.3.2-pre.681
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +106 -101
- package/dist/8f8d23f5e4ad92b8.js +1 -0
- package/dist/{84759747c5ec9b83.js.map → 8f8d23f5e4ad92b8.js.map} +1 -1
- package/dist/index.html +1 -1
- package/dist/{openmrs.4d216ca793e8e302.js → openmrs.7f67a01dda216963.js} +2 -2
- package/dist/{openmrs.4d216ca793e8e302.js.map → openmrs.7f67a01dda216963.js.map} +1 -1
- package/dist/service-worker.js +1 -1
- package/lib/esm-devtools-app/68.js +1 -0
- package/lib/esm-devtools-app/68.js.map +1 -0
- package/lib/esm-devtools-app/735.js +2 -0
- package/lib/esm-devtools-app/735.js.LICENSE.txt +9 -0
- package/lib/esm-devtools-app/735.js.map +1 -0
- package/lib/esm-devtools-app/889.js +2 -0
- package/lib/esm-devtools-app/889.js.LICENSE.txt +3 -0
- package/lib/esm-devtools-app/889.js.map +1 -0
- package/lib/esm-devtools-app/988.js +1 -0
- package/lib/esm-devtools-app/988.js.map +1 -0
- package/lib/esm-devtools-app/main.js +1 -0
- package/lib/esm-devtools-app/main.js.map +1 -0
- package/lib/esm-devtools-app/openmrs-esm-devtools-app.js +1 -0
- package/lib/esm-devtools-app/openmrs-esm-devtools-app.js.buildmanifest.json +176 -0
- package/lib/esm-devtools-app/openmrs-esm-devtools-app.js.map +1 -0
- package/lib/esm-devtools-app/openmrs-esm-devtools-app.old +1 -0
- package/lib/esm-implementer-tools-app/102.js +1 -0
- package/lib/esm-implementer-tools-app/102.js.map +1 -0
- package/lib/esm-implementer-tools-app/139.js +2 -0
- package/lib/esm-implementer-tools-app/139.js.LICENSE.txt +9 -0
- package/lib/esm-implementer-tools-app/139.js.map +1 -0
- package/lib/esm-implementer-tools-app/242.js +1 -0
- package/lib/esm-implementer-tools-app/242.js.map +1 -0
- package/lib/esm-implementer-tools-app/246.js +1 -0
- package/lib/esm-implementer-tools-app/246.js.map +1 -0
- package/lib/esm-implementer-tools-app/305.js +1 -0
- package/lib/esm-implementer-tools-app/305.js.map +1 -0
- package/lib/esm-implementer-tools-app/319.js +1 -0
- package/lib/esm-implementer-tools-app/369.js +1 -0
- package/lib/esm-implementer-tools-app/369.js.map +1 -0
- package/lib/esm-implementer-tools-app/426.js +1 -0
- package/lib/esm-implementer-tools-app/426.js.map +1 -0
- package/lib/esm-implementer-tools-app/466.js +1 -0
- package/lib/esm-implementer-tools-app/466.js.map +1 -0
- package/lib/esm-implementer-tools-app/574.js +1 -0
- package/lib/esm-implementer-tools-app/587.js +1 -0
- package/lib/esm-implementer-tools-app/587.js.map +1 -0
- package/lib/esm-implementer-tools-app/600.js +2 -0
- package/lib/esm-implementer-tools-app/600.js.LICENSE.txt +14 -0
- package/lib/esm-implementer-tools-app/600.js.map +1 -0
- package/lib/esm-implementer-tools-app/620.js +2 -0
- package/lib/esm-implementer-tools-app/620.js.LICENSE.txt +38 -0
- package/lib/esm-implementer-tools-app/620.js.map +1 -0
- package/lib/esm-implementer-tools-app/696.js +1 -0
- package/lib/esm-implementer-tools-app/696.js.map +1 -0
- package/lib/esm-implementer-tools-app/735.js +2 -0
- package/lib/esm-implementer-tools-app/735.js.LICENSE.txt +9 -0
- package/lib/esm-implementer-tools-app/735.js.map +1 -0
- package/lib/esm-implementer-tools-app/788.js +2 -0
- package/lib/esm-implementer-tools-app/788.js.LICENSE.txt +19 -0
- package/lib/esm-implementer-tools-app/788.js.map +1 -0
- package/lib/esm-implementer-tools-app/807.js +1 -0
- package/lib/esm-implementer-tools-app/807.js.map +1 -0
- package/lib/esm-implementer-tools-app/889.js +2 -0
- package/lib/esm-implementer-tools-app/889.js.LICENSE.txt +3 -0
- package/lib/esm-implementer-tools-app/889.js.map +1 -0
- package/lib/esm-implementer-tools-app/895.js +1 -0
- package/lib/esm-implementer-tools-app/895.js.map +1 -0
- package/lib/esm-implementer-tools-app/main.js +1 -0
- package/lib/esm-implementer-tools-app/main.js.map +1 -0
- package/lib/esm-implementer-tools-app/openmrs-esm-implementer-tools-app.js +1 -0
- package/lib/esm-implementer-tools-app/openmrs-esm-implementer-tools-app.js.buildmanifest.json +597 -0
- package/lib/esm-implementer-tools-app/openmrs-esm-implementer-tools-app.js.map +1 -0
- package/lib/esm-implementer-tools-app/openmrs-esm-implementer-tools-app.old +1 -0
- package/lib/esm-login-app/236.js +1 -0
- package/lib/esm-login-app/240.js +1 -0
- package/lib/esm-login-app/261.js +1 -0
- package/lib/esm-login-app/261.js.map +1 -0
- package/lib/esm-login-app/263.js +1 -0
- package/lib/esm-login-app/263.js.map +1 -0
- package/lib/esm-login-app/272.js +1 -0
- package/lib/esm-login-app/319.js +1 -0
- package/lib/esm-login-app/336.js +1 -0
- package/lib/esm-login-app/337.js +1 -0
- package/lib/esm-login-app/337.js.map +1 -0
- package/lib/esm-login-app/390.js +1 -0
- package/lib/esm-login-app/390.js.map +1 -0
- package/lib/esm-login-app/438.js +2 -0
- package/lib/esm-login-app/438.js.LICENSE.txt +9 -0
- package/lib/esm-login-app/438.js.map +1 -0
- package/lib/esm-login-app/539.js +1 -0
- package/lib/esm-login-app/574.js +1 -0
- package/lib/esm-login-app/610.js +1 -0
- package/lib/esm-login-app/610.js.map +1 -0
- package/lib/esm-login-app/611.js +1 -0
- package/lib/esm-login-app/611.js.map +1 -0
- package/lib/esm-login-app/63.js +2 -0
- package/lib/esm-login-app/63.js.LICENSE.txt +32 -0
- package/lib/esm-login-app/63.js.map +1 -0
- package/lib/esm-login-app/642.js +1 -0
- package/lib/esm-login-app/642.js.map +1 -0
- package/lib/esm-login-app/644.js +1 -0
- package/lib/esm-login-app/673.js +1 -0
- package/lib/esm-login-app/735.js +2 -0
- package/lib/esm-login-app/735.js.LICENSE.txt +9 -0
- package/lib/esm-login-app/735.js.map +1 -0
- package/lib/esm-login-app/737.js +2 -0
- package/lib/esm-login-app/737.js.LICENSE.txt +5 -0
- package/lib/esm-login-app/737.js.map +1 -0
- package/lib/esm-login-app/757.js +1 -0
- package/lib/esm-login-app/788.js +2 -0
- package/lib/esm-login-app/788.js.LICENSE.txt +19 -0
- package/lib/esm-login-app/788.js.map +1 -0
- package/lib/esm-login-app/829.js +1 -0
- package/lib/esm-login-app/829.js.map +1 -0
- package/lib/esm-login-app/889.js +2 -0
- package/lib/esm-login-app/889.js.LICENSE.txt +3 -0
- package/lib/esm-login-app/889.js.map +1 -0
- package/lib/esm-login-app/main.js +1 -0
- package/lib/esm-login-app/main.js.map +1 -0
- package/lib/esm-login-app/openmrs-esm-login-app.js +1 -0
- package/lib/esm-login-app/openmrs-esm-login-app.js.buildmanifest.json +680 -0
- package/lib/esm-login-app/openmrs-esm-login-app.js.map +1 -0
- package/lib/esm-login-app/openmrs-esm-login-app.old +1 -0
- package/lib/esm-offline-tools-app/1584c81d564cacde.svg +8 -0
- package/lib/esm-offline-tools-app/206.js +1 -0
- package/lib/esm-offline-tools-app/206.js.map +1 -0
- package/lib/esm-offline-tools-app/263.js +1 -0
- package/lib/esm-offline-tools-app/263.js.map +1 -0
- package/lib/esm-offline-tools-app/264.js +1 -0
- package/lib/esm-offline-tools-app/264.js.map +1 -0
- package/lib/esm-offline-tools-app/281.js +1 -0
- package/lib/esm-offline-tools-app/281.js.map +1 -0
- package/lib/esm-offline-tools-app/290.js +1 -0
- package/lib/esm-offline-tools-app/290.js.map +1 -0
- package/lib/esm-offline-tools-app/316.js +1 -0
- package/lib/esm-offline-tools-app/316.js.map +1 -0
- package/lib/esm-offline-tools-app/391.js +1 -0
- package/lib/esm-offline-tools-app/391.js.map +1 -0
- package/lib/esm-offline-tools-app/412.js +1 -0
- package/lib/esm-offline-tools-app/412.js.map +1 -0
- package/lib/esm-offline-tools-app/47.js +1 -0
- package/lib/esm-offline-tools-app/47.js.map +1 -0
- package/lib/esm-offline-tools-app/501.js +1 -0
- package/lib/esm-offline-tools-app/501.js.map +1 -0
- package/lib/esm-offline-tools-app/526.js +1 -0
- package/lib/esm-offline-tools-app/526.js.map +1 -0
- package/lib/esm-offline-tools-app/538.js +1 -0
- package/lib/esm-offline-tools-app/538.js.map +1 -0
- package/lib/esm-offline-tools-app/541.js +1 -0
- package/lib/esm-offline-tools-app/541.js.map +1 -0
- package/lib/esm-offline-tools-app/574.js +1 -0
- package/lib/esm-offline-tools-app/594.js +1 -0
- package/lib/esm-offline-tools-app/594.js.map +1 -0
- package/lib/esm-offline-tools-app/63.js +2 -0
- package/lib/esm-offline-tools-app/63.js.LICENSE.txt +32 -0
- package/lib/esm-offline-tools-app/63.js.map +1 -0
- package/lib/esm-offline-tools-app/697.js +2 -0
- package/lib/esm-offline-tools-app/697.js.LICENSE.txt +9 -0
- package/lib/esm-offline-tools-app/697.js.map +1 -0
- package/lib/esm-offline-tools-app/733.js +1 -0
- package/lib/esm-offline-tools-app/733.js.map +1 -0
- package/lib/esm-offline-tools-app/735.js +2 -0
- package/lib/esm-offline-tools-app/735.js.LICENSE.txt +9 -0
- package/lib/esm-offline-tools-app/735.js.map +1 -0
- package/lib/esm-offline-tools-app/752.js +1 -0
- package/lib/esm-offline-tools-app/752.js.map +1 -0
- package/lib/esm-offline-tools-app/757.js +1 -0
- package/lib/esm-offline-tools-app/78.js +1 -0
- package/lib/esm-offline-tools-app/78.js.map +1 -0
- package/lib/esm-offline-tools-app/788.js +2 -0
- package/lib/esm-offline-tools-app/788.js.LICENSE.txt +19 -0
- package/lib/esm-offline-tools-app/788.js.map +1 -0
- package/lib/esm-offline-tools-app/82.js +2 -0
- package/lib/esm-offline-tools-app/82.js.LICENSE.txt +5 -0
- package/lib/esm-offline-tools-app/82.js.map +1 -0
- package/lib/esm-offline-tools-app/889.js +2 -0
- package/lib/esm-offline-tools-app/889.js.LICENSE.txt +3 -0
- package/lib/esm-offline-tools-app/889.js.map +1 -0
- package/lib/esm-offline-tools-app/937.js +1 -0
- package/lib/esm-offline-tools-app/937.js.map +1 -0
- package/lib/esm-offline-tools-app/967.js +1 -0
- package/lib/esm-offline-tools-app/967.js.map +1 -0
- package/lib/esm-offline-tools-app/main.js +2 -0
- package/lib/esm-offline-tools-app/main.js.LICENSE.txt +5 -0
- package/lib/esm-offline-tools-app/main.js.map +1 -0
- package/lib/esm-offline-tools-app/openmrs-esm-offline-tools-app.js +1 -0
- package/lib/esm-offline-tools-app/openmrs-esm-offline-tools-app.js.buildmanifest.json +754 -0
- package/lib/esm-offline-tools-app/openmrs-esm-offline-tools-app.js.map +1 -0
- package/lib/esm-offline-tools-app/openmrs-esm-offline-tools-app.old +1 -0
- package/lib/esm-primary-navigation-app/113.js +2 -0
- package/lib/esm-primary-navigation-app/113.js.LICENSE.txt +5 -0
- package/lib/esm-primary-navigation-app/113.js.map +1 -0
- package/lib/esm-primary-navigation-app/216.js +1 -0
- package/lib/esm-primary-navigation-app/216.js.map +1 -0
- package/lib/esm-primary-navigation-app/241.js +1 -0
- package/lib/esm-primary-navigation-app/241.js.map +1 -0
- package/lib/esm-primary-navigation-app/242.js +1 -0
- package/lib/esm-primary-navigation-app/242.js.map +1 -0
- package/lib/esm-primary-navigation-app/363.js +1 -0
- package/lib/esm-primary-navigation-app/363.js.map +1 -0
- package/lib/esm-primary-navigation-app/406.js +2 -0
- package/lib/esm-primary-navigation-app/406.js.LICENSE.txt +8 -0
- package/lib/esm-primary-navigation-app/406.js.map +1 -0
- package/lib/esm-primary-navigation-app/414.js +1 -0
- package/lib/esm-primary-navigation-app/414.js.map +1 -0
- package/lib/esm-primary-navigation-app/574.js +1 -0
- package/lib/esm-primary-navigation-app/631.js +1 -0
- package/lib/esm-primary-navigation-app/631.js.map +1 -0
- package/lib/esm-primary-navigation-app/710.js +1 -0
- package/lib/esm-primary-navigation-app/710.js.map +1 -0
- package/lib/esm-primary-navigation-app/716.js +1 -0
- package/lib/esm-primary-navigation-app/716.js.map +1 -0
- package/lib/esm-primary-navigation-app/735.js +2 -0
- package/lib/esm-primary-navigation-app/735.js.LICENSE.txt +9 -0
- package/lib/esm-primary-navigation-app/735.js.map +1 -0
- package/lib/esm-primary-navigation-app/743.js +1 -0
- package/lib/esm-primary-navigation-app/743.js.map +1 -0
- package/lib/esm-primary-navigation-app/757.js +1 -0
- package/lib/esm-primary-navigation-app/788.js +2 -0
- package/lib/esm-primary-navigation-app/788.js.LICENSE.txt +19 -0
- package/lib/esm-primary-navigation-app/788.js.map +1 -0
- package/lib/esm-primary-navigation-app/889.js +2 -0
- package/lib/esm-primary-navigation-app/889.js.LICENSE.txt +3 -0
- package/lib/esm-primary-navigation-app/889.js.map +1 -0
- package/lib/esm-primary-navigation-app/main.js +1 -0
- package/lib/esm-primary-navigation-app/main.js.map +1 -0
- package/lib/esm-primary-navigation-app/openmrs-esm-primary-navigation-app.js +1 -0
- package/lib/esm-primary-navigation-app/openmrs-esm-primary-navigation-app.js.buildmanifest.json +503 -0
- package/lib/esm-primary-navigation-app/openmrs-esm-primary-navigation-app.js.map +1 -0
- package/lib/esm-primary-navigation-app/openmrs-esm-primary-navigation-app.old +1 -0
- package/lib/index.html +3 -0
- package/lib/openmrs.js +25 -25
- package/lib/service-worker.js +2 -2
- package/package.json +4 -4
- package/src/index.ejs +3 -0
- package/webpack.config.js +54 -1
- package/dist/84759747c5ec9b83.js +0 -1
- /package/dist/{openmrs.4d216ca793e8e302.js.LICENSE.txt → openmrs.7f67a01dda216963.js.LICENSE.txt} +0 -0
package/dist/service-worker.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var e={364:function(e){function t(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}e.exports=function(){"use strict";var e=6e4,n=36e5,r="millisecond",o="second",i="minute",a="hour",s="day",u="week",c="month",l="quarter",f="year",h="date",p="Invalid Date",d=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},m={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),o=t.clone().add(r,c),i=n-o<0,a=t.clone().add(r+(i?-1:1),c);return+(-(r+(n-o)/(i?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:f,w:u,d:s,D:h,h:a,m:i,s:o,ms:r,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",w={};w[b]=v;var _=function(e){return t(e,O)},k=function e(t,n,r){var o;if(!t)return b;if("string"==typeof t){var i=t.toLowerCase();w[i]&&(o=i),n&&(w[i]=n,o=i);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var s=t.name;w[s]=t,o=s}return!r&&o&&(b=o),o||!r&&b},x=function(e,t){if(_(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new O(n)},S=m;S.l=k,S.i=_,S.w=function(e,t){return x(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var O=function(){var v=function(e){this.$L=k(e.locale,null,!0),this.parse(e)},g=v.prototype;return g.parse=function(e){this.$d=function(e){var n=e.date,r=e.utc;if(null===n)return new Date(NaN);if(S.u(n))return new Date;if(t(n,Date))return new Date(n);if("string"==typeof n&&!/Z$/i.test(n)){var o=n.match(d);if(o){var i=o[2]-1||0,a=(o[7]||"0").substring(0,3);return r?new Date(Date.UTC(o[1],i,o[3]||1,o[4]||0,o[5]||0,o[6]||0,a)):new Date(o[1],i,o[3]||1,o[4]||0,o[5]||0,o[6]||0,a)}}return new Date(n)}(e),this.$x=e.x||{},this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return S},g.isValid=function(){return!(this.$d.toString()===p)},g.isSame=function(e,t){var n=x(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return x(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<x(e)},g.$g=function(e,t,n){return S.u(e)?this[t]:this.set(n,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var n=this,r=!!S.u(t)||t,l=S.p(e),p=function(e,t){var o=S.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?o:o.endOf(s)},d=function(e,t){return S.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},y=this.$W,v=this.$M,g=this.$D,m="set"+(this.$u?"UTC":"");switch(l){case f:return r?p(1,0):p(31,11);case c:return r?p(1,v):p(0,v+1);case u:var b=this.$locale().weekStart||0,w=(y<b?y+7:y)-b;return p(r?g-w:g+(6-w),v);case s:case h:return d(m+"Hours",0);case a:return d(m+"Minutes",1);case i:return d(m+"Seconds",2);case o:return d(m+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var n,u=S.p(e),l="set"+(this.$u?"UTC":""),p=(n={},n[s]=l+"Date",n[h]=l+"Date",n[c]=l+"Month",n[f]=l+"FullYear",n[a]=l+"Hours",n[i]=l+"Minutes",n[o]=l+"Seconds",n[r]=l+"Milliseconds",n)[u],d=u===s?this.$D+(t-this.$W):t;if(u===c||u===f){var y=this.clone().set(h,1);y.$d[p](d),y.init(),this.$d=y.set(h,Math.min(this.$D,y.daysInMonth())).$d}else p&&this.$d[p](d);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[S.p(e)]()},g.add=function(t,r){var l,h=this;t=Number(t);var p=S.p(r),d=function(e){var n=x(h);return S.w(n.date(n.date()+Math.round(e*t)),h)};if(p===c)return this.set(c,this.$M+t);if(p===f)return this.set(f,this.$y+t);if(p===s)return d(1);if(p===u)return d(7);var y=(l={},l[i]=e,l[a]=n,l[o]=1e3,l)[p]||1,v=this.$d.getTime()+t*y;return S.w(v,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||"YYYY-MM-DDTHH:mm:ssZ",o=S.z(this),i=this.$H,a=this.$m,s=this.$M,u=n.weekdays,c=n.months,l=function(e,n,o,i){return e&&(e[n]||e(t,r))||o[n].slice(0,i)},f=function(e){return S.s(i%12||12,e,"0")},h=n.meridiem||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r},d={YY:String(this.$y).slice(-2),YYYY:this.$y,M:s+1,MM:S.s(s+1,2,"0"),MMM:l(n.monthsShort,s,c,3),MMMM:l(c,s),D:this.$D,DD:S.s(this.$D,2,"0"),d:String(this.$W),dd:l(n.weekdaysMin,this.$W,u,2),ddd:l(n.weekdaysShort,this.$W,u,3),dddd:u[this.$W],H:String(i),HH:S.s(i,2,"0"),h:f(1),hh:f(2),a:h(i,a,!0),A:h(i,a,!1),m:String(a),mm:S.s(a,2,"0"),s:String(this.$s),ss:S.s(this.$s,2,"0"),SSS:S.s(this.$ms,3,"0"),Z:o};return r.replace(y,(function(e,t){return t||d[e]||o.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(t,r,h){var p,d=S.p(r),y=x(t),v=(y.utcOffset()-this.utcOffset())*e,g=this-y,m=S.m(this,y);return m=(p={},p[f]=m/12,p[c]=m,p[l]=m/3,p[u]=(g-v)/6048e5,p[s]=(g-v)/864e5,p[a]=g/n,p[i]=g/e,p[o]=g/1e3,p)[d]||g,h?m:S.a(m)},g.daysInMonth=function(){return this.endOf(c).$D},g.$locale=function(){return w[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=k(e,t,!0);return r&&(n.$L=r),n},g.clone=function(){return S.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},v}(),P=O.prototype;return x.prototype=P,[["$ms",r],["$s",o],["$m",i],["$H",a],["$W",s],["$M",c],["$y",f],["$D",h]].forEach((function(e){P[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),x.extend=function(e,t){return e.$i||(e(t,O,x),e.$i=!0),x},x.locale=k,x.isDayjs=_,x.unix=function(e){return x(1e3*e)},x.en=w[b],x.Ls=w,x.p={},x}()},171:(e,t,n)=>{"use strict";function r(e){return r="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},r(e)}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){o(e,t,n[t])}))}return e}function a(e,t){if(n=e,!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return c(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}function d(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}n.r(t),n.d(t,{default:()=>V});var y={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},v=new(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,e),this.init(t,n)}return u(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||y,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,i({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),g=function(){function e(){a(this,e),this.observers={}}return u(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){var o=[].concat(this.observers[e]);o.forEach((function(e){e.apply(void 0,n)}))}if(this.observers["*"]){var i=[].concat(this.observers["*"]);i.forEach((function(t){t.apply(t,[e].concat(n))}))}}}]),e}();function m(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function b(e){return null==e?"":""+e}function w(e,t,n){e.forEach((function(e){t[e]&&(n[e]=t[e])}))}function _(e,t,n){for(var r=function(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e},o=function(){return!e||"string"==typeof e},i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=r(i.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:r(i.shift())}}function k(e,t,n){var r=_(e,t,Object);r.obj[r.k]=n}function x(e,t){var n=_(e,t),r=n.obj,o=n.k;if(r)return r[o]}function S(e,t,n){var r=x(e,n);return void 0!==r?r:x(t,n)}function O(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||d(e[r],String)||"string"==typeof t[r]||d(t[r],String)?n&&(e[r]=t[r]):O(e[r],t[r],n):e[r]=t[r]);return e}function P(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var E={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function j(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return E[e]})):e}var R="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,C=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return a(this,t),n=l(this,f(t).call(this)),R&&g.call(c(n)),n.data=e||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return p(t,e),u(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=[e,t];return n&&"string"!=typeof n&&(i=i.concat(n)),n&&"string"==typeof n&&(i=i.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(i=e.split(".")),x(this.data,i)}},{key:"addResource",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),k(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)"string"!=typeof n[o]&&"[object Array]"!==Object.prototype.toString.apply(n[o])||this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(s=e.split("."))[1]),this.addNamespaces(t);var u=x(this.data,s)||{};r?O(u,n,o):u=i({},u,n),k(this.data,s,u),a.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?i({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(g),T={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,o){var i=this;return e.forEach((function(e){i.processors[e]&&(t=i.processors[e].process(t,n,r,o))})),t}},A={},D=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return a(this,t),n=l(this,f(t).call(this)),R&&g.call(c(n)),w(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,c(n)),n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=v.create("translator"),n}return p(t,e),u(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var i=e.match(this.interpolator.nestingRegexp);if(i&&i.length>0)return{key:e,namespaces:o};var a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(o=a.shift()),e=a.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,n,o){var a=this;if("object"!==r(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var s=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,u=this.extractFromKey(e[e.length-1],n),c=u.key,l=u.namespaces,f=l[l.length-1],h=n.lng||this.language,p=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h&&"cimode"===h.toLowerCase()){if(p){var d=n.nsSeparator||this.options.nsSeparator;return f+d+c}return c}var y=this.resolve(e,n),v=y&&y.res,g=y&&y.usedKey||c,m=y&&y.exactUsedKey||c,b=Object.prototype.toString.apply(v),w=["[object Number]","[object Function]","[object RegExp]"],_=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,k=!this.i18nFormat||this.i18nFormat.handleAsObject,x="string"!=typeof v&&"boolean"!=typeof v&&"number"!=typeof v;if(k&&v&&x&&w.indexOf(b)<0&&("string"!=typeof _||"[object Array]"!==b)){if(!n.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,v,n):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");if(s){var S="[object Array]"===b,O=S?[]:{},P=S?m:g;for(var E in v)if(Object.prototype.hasOwnProperty.call(v,E)){var j="".concat(P).concat(s).concat(E);O[E]=this.translate(j,i({},n,{joinArrays:!1,ns:l})),O[E]===j&&(O[E]=v[E])}v=O}}else if(k&&"string"==typeof _&&"[object Array]"===b)(v=v.join(_))&&(v=this.extendTranslation(v,e,n,o));else{var R=!1,C=!1,T=void 0!==n.count&&"string"!=typeof n.count,A=t.hasDefaultValue(n),D=T?this.pluralResolver.getSuffix(h,n.count):"",L=n["defaultValue".concat(D)]||n.defaultValue;!this.isValidLookup(v)&&A&&(R=!0,v=L),this.isValidLookup(v)||(C=!0,v=c);var K=A&&L!==v&&this.options.updateMissing;if(C||R||K){if(this.logger.log(K?"updateKey":"missingKey",h,f,c,K?L:v),s){var I=this.resolve(c,i({},n,{keySeparator:!1}));I&&I.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var M=[],N=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&N&&N[0])for(var F=0;F<N.length;F++)M.push(N[F]);else"all"===this.options.saveMissingTo?M=this.languageUtils.toResolveHierarchy(n.lng||this.language):M.push(n.lng||this.language);var $=function(e,t,r){a.options.missingKeyHandler?a.options.missingKeyHandler(e,f,t,K?r:v,K,n):a.backendConnector&&a.backendConnector.saveMissing&&a.backendConnector.saveMissing(e,f,t,K?r:v,K,n),a.emit("missingKey",e,f,t,v)};this.options.saveMissing&&(this.options.saveMissingPlurals&&T?M.forEach((function(e){a.pluralResolver.getSuffixes(e).forEach((function(t){$([e],c+t,n["defaultValue".concat(t)]||L)}))})):$(M,c,L))}v=this.extendTranslation(v,e,n,y,o),C&&v===c&&this.options.appendNamespaceToMissingKey&&(v="".concat(f,":").concat(c)),C&&this.options.parseMissingKeyHandler&&(v=this.options.parseMissingKeyHandler(v))}return v}},{key:"extendTranslation",value:function(e,t,n,r,o){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,n,r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(i({},n,{interpolation:i({},this.options.interpolation,n.interpolation)}));var s,u=n.interpolation&&n.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(u){var c=e.match(this.interpolator.nestingRegexp);s=c&&c.length}var l=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(l=i({},this.options.interpolation.defaultVariables,l)),e=this.interpolator.interpolate(e,l,n.lng||this.language,n),u){var f=e.match(this.interpolator.nestingRegexp);s<(f&&f.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return o&&o[0]===r[0]&&!n.context?(a.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):a.translate.apply(a,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var h=n.postProcess||this.options.postProcess,p="string"==typeof h?[h]:h;return null!=e&&p&&p.length&&!1!==n.applyPostProcessor&&(e=T.handle(p,e,t,this.options&&this.options.postProcessPassResolved?i({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var u=a.extractFromKey(e,s),c=u.key;n=c;var l=u.namespaces;a.options.fallbackNS&&(l=l.concat(a.options.fallbackNS));var f=void 0!==s.count&&"string"!=typeof s.count,h=void 0!==s.context&&"string"==typeof s.context&&""!==s.context,p=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);l.forEach((function(e){a.isValidLookup(t)||(i=e,!A["".concat(p[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(A["".concat(p[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(p.join(", "),'" won\'t get resolved as namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach((function(n){if(!a.isValidLookup(t)){o=n;var i,u,l=c,p=[l];for(a.i18nFormat&&a.i18nFormat.addLookupKeys?a.i18nFormat.addLookupKeys(p,c,n,e,s):(f&&(i=a.pluralResolver.getSuffix(n,s.count)),f&&h&&p.push(l+i),h&&p.push(l+="".concat(a.options.contextSeparator).concat(s.context)),f&&p.push(l+=i));u=p.pop();)a.isValidLookup(t)||(r=u,t=a.getResource(n,e,u,s))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}]),t}(g);function L(e){return e.charAt(0).toUpperCase()+e.slice(1)}var K=function(){function e(t){a(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=v.create("languageUtils")}return u(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=L(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=L(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=L(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(e)}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(r))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(n.isSupportedCode(e)?o.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),r.forEach((function(e){o.indexOf(e)<0&&i(n.formatLanguageCode(e))})),o}}]),e}(),I=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],M={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}};function N(){var e={};return I.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:M[t.fc]}}))})),e}var F=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,e),this.languageUtils=t,this.options=n,this.logger=v.create("pluralResolver"),this.rules=N()}return u(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){return this.getSuffixes(e).map((function(e){return t+e}))}},{key:"getSuffixes",value:function(e){var t=this,n=this.getRule(e);return n?n.numbers.map((function(n){return t.getSuffix(e,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=this,r=this.getRule(e);if(r){var o=r.noAbs?r.plurals(t):r.plurals(Math.abs(t)),i=r.numbers[o];this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var a=function(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),$=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,e),this.logger=v.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return u(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:j,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?P(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?P(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?P(t.nestingPrefix):t.nestingPrefixEscaped||P("$t("),this.nestingSuffix=t.nestingSuffix?P(t.nestingSuffix):t.nestingSuffixEscaped||P(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var o,i,a,s=function(e){return e.replace(/\$/g,"$$$$")},u=this,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=function(e){if(e.indexOf(u.formatSeparator)<0){var o=S(t,c,e);return u.alwaysFormat?u.format(o,void 0,n):o}var i=e.split(u.formatSeparator),a=i.shift().trim(),s=i.join(u.formatSeparator).trim();return u.format(S(t,c,a),s,n,r)};this.resetRegExp();var f=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,h=r&&r.interpolation&&r.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return s(e)}},{regex:this.regexp,safeValue:function(e){return u.escapeValue?s(u.escape(e)):s(e)}}].forEach((function(t){for(a=0;o=t.regex.exec(e);){if(void 0===(i=l(o[1].trim())))if("function"==typeof f){var n=f(e,o,r);i="string"==typeof n?n:""}else{if(h){i=o[0];continue}u.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(e)),i=""}else"string"==typeof i||u.useRawValueToEscape||(i=b(i));if(e=e.replace(o[0],t.safeValue(i)),t.regex.lastIndex=0,++a>=u.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,o=function(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0],o=(o=this.interpolate(o,u)).replace(/'/g,'"');try{u=JSON.parse(o),t&&(u=i({},t,u))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(o)}return delete u.defaultValue,e},a=this,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=i({},s);for(u.applyPostProcessor=!1,delete u.defaultValue;n=this.nestingRegexp.exec(e);){var c=[],l=!1;if(n[0].includes(this.formatSeparator)&&!/{.*}/.test(n[1])){var f=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=f.shift(),c=f,l=!0}if((r=t(o.call(this,n[1].trim(),u),u))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=b(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),l&&(r=c.reduce((function(e,t){return a.format(e,t,s.lng,s)}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}(),B=function(e){function t(e,n,r){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return a(this,t),o=l(this,f(t).call(this)),R&&g.call(c(o)),o.backend=e,o.store=n,o.services=r,o.languageUtils=r.languageUtils,o.options=i,o.logger=v.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(r,i.backend,i),o}return p(t,e),u(t,[{key:"queueLoad",value:function(e,t,n,r){var o=this,i=[],a=[],s=[],u=[];return e.forEach((function(e){var r=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!n.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?a.indexOf(s)<0&&a.push(s):(o.state[s]=1,r=!1,a.indexOf(s)<0&&a.push(s),i.indexOf(s)<0&&i.push(s),u.indexOf(t)<0&&u.push(t)))})),r||s.push(e)})),(i.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:r}),{toLoad:i,pending:a,toLoadLanguages:s,toLoadNamespaces:u}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),n&&this.store.addResourceBundle(o,i,n),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(n){var r,s,u,c,l;r=n.loaded,s=i,(c=(u=_(r,[o],Object)).obj)[l=u.k]=c[l]||[],c[l].push(s),function(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}(n.pending,e),t&&n.errors.push(t),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]=[]),n.loaded[e].length&&n.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,(function(s,u){s&&u&&o<5?setTimeout((function(){r.read.call(r,e,t,n,o+1,2*i,a)}),i):a(s,u)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(i," for language ").concat(o," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,r,a)}))}},{key:"saveMissing",value:function(e,t,n,r,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,i({},a,{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),t}(g);function q(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===r(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===r(e[2])||"object"===r(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function U(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function W(){}const V=new(function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(a(this,t),e=l(this,f(t).call(this)),R&&g.call(c(e)),e.options=U(n),e.services={},e.logger=v,e.modules={external:[]},r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),l(e,c(e));setTimeout((function(){e.init(n,r)}),0)}return e}return p(t,e),u(t,[{key:"init",value:function(){var e=function(e){return e?"function"==typeof e?new e:e:null},t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if("function"==typeof n&&(r=n,n={}),n.whitelist&&!n.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),n.nonExplicitWhitelist&&!n.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=i({},q(),this.options,U(n)),this.format=this.options.interpolation.format,r||(r=W),!this.options.isClone){this.modules.logger?v.init(e(this.modules.logger),this.options):v.init(null,this.options);var o=new K(this.options);this.store=new C(this.options.resources,this.options);var a=this.services;a.logger=v,a.resourceStore=this.store,a.languageUtils=o,a.pluralResolver=new F(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),a.interpolator=new $(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new B(e(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];t.emit.apply(t,[e].concat(r))})),this.modules.languageDetector&&(a.languageDetector=e(this.modules.languageDetector),a.languageDetector.init(a,this.options.detection,this.options)),this.modules.i18nFormat&&(a.i18nFormat=e(this.modules.i18nFormat),a.i18nFormat.init&&a.i18nFormat.init(this)),this.translator=new D(this.services,this.options),this.translator.on("*",(function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];t.emit.apply(t,[e].concat(r))})),this.modules.external.forEach((function(e){e.init&&e.init(t)}))}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.length>0&&"dev"!==s[0]&&(this.options.lng=s[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var u=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];u.forEach((function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments)}}));var c=["addResource","addResources","addResourceBundle","removeResourceBundle"];c.forEach((function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments),t}}));var l=m(),f=function(){var e=function(e,n){t.isInitialized&&t.logger.warn("init: i18next is already initialized. You should call init just once!"),t.isInitialized=!0,t.options.isClone||t.logger.log("initialized",t.options),t.emit("initialized",t.options),l.resolve(n),r(e,n)};if(t.languages&&"v1"!==t.options.compatibilityAPI&&!t.isInitialized)return e(null,t.t.bind(t));t.changeLanguage(t.options.lng,e)};return this.options.resources||!this.options.initImmediate?f():setTimeout(f,0),l}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:W,r=n,o="string"==typeof e?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return r();var i=[],a=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){i.indexOf(e)<0&&i.push(e)}))};if(o)a(o);else{var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.forEach((function(e){return a(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(i,this.options.ns,r)}else r(null)}},{key:"reloadResources",value:function(e,t,n){var r=m();return e||(e=this.languages),t||(t=this.options.ns),n||(n=W),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&T.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=m();this.emit("languageChanging",e);var o=function(e){var o="string"==typeof e?e:n.services.languageUtils.getBestMatchFromCodes(e);o&&(n.language||(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o)),n.translator.language||n.translator.changeLanguage(o),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(o)),n.loadResources(o,(function(e){!function(e,o){o?(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,o)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t){var n=this,o=function e(t,o){var a;if("object"!==r(o)){for(var s=arguments.length,u=new Array(s>2?s-2:0),c=2;c<s;c++)u[c-2]=arguments[c];a=n.options.overloadTranslationOptionHandler([t,o].concat(u))}else a=i({},o);return a.lng=a.lng||e.lng,a.lngs=a.lngs||e.lngs,a.ns=a.ns||e.ns,n.t(t,a)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var s=n.precheck(this,a);if(void 0!==s)return s}return!!this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||!(!a(r,e)||o&&!a(i,e))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=m();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=m();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],o=e.filter((function(e){return r.indexOf(e)<0}));return o.length?(this.options.preload=r.concat(o),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),e?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr":"rtl"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new t(e,n)}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:W,o=i({},this.options,n,{isClone:!0}),a=new t(o),s=["store","services","language"];return s.forEach((function(t){a[t]=e[t]})),a.services=i({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new D(a.services,a.options),a.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];a.emit.apply(a,[e].concat(n))})),a.init(o,r),a.translator.options=a.options,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}}]),t}(g))},401:()=>{"use strict";try{self["workbox:core:6.5.3"]&&_()}catch(e){}},658:()=>{"use strict";try{self["workbox:routing:6.5.3"]&&_()}catch(e){}},142:()=>{"use strict";try{self["workbox:strategies:6.5.3"]&&_()}catch(e){}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{n.S={};var e={},t={};n.I=(r,o)=>{o||(o=[]);var i=t[r];if(i||(i=t[r]={}),!(o.indexOf(i)>=0)){if(o.push(i),e[r])return e[r];n.o(n.S,r)||(n.S[r]={});var a=n.S[r],s="@openmrs/esm-app-shell",u=(e,t,n,r)=>{var o=a[e]=a[e]||{},i=o[t];(!i||!i.loaded&&(!r!=!i.eager?r:s>i.from))&&(o[t]={get:n,from:s,eager:!!r})},c=[];return"default"===r&&(u("dayjs","1.11.5",(()=>()=>n(364)),1),u("i18next","19.9.2",(()=>()=>n(171)),1)),e[r]=c.length?Promise.all(c).then((()=>e[r]=1)):1}}})(),(()=>{"use strict";n(401);function e(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function t(n,r,o){return t=e()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&i(o,n.prototype),o},t.apply(null,arguments)}function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}function o(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function i(e,t){return i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},i(e,t)}var a=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function s(e){var n="function"==typeof Map?new Map:void 0;return s=function(e){if(null===e||!function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,o)}function o(){return t(e,arguments,r(this).constructor)}return o.prototype=Object.create(e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),i(o,e)},s(e)}var u=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(s,e);var t,n,a=(t=s,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,i=r(t);if(n){var a=r(this).constructor;e=Reflect.construct(i,arguments,a)}else e=i.apply(this,arguments);return o(this,e)});function s(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var r=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=e;return n.length>0&&(o+=" :: ".concat(JSON.stringify(n))),o}(e,t);return(n=a.call(this,r)).name=e,n.details=t,n}return s}(s(Error)),c=new Set,l={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},f=function(e){return e||(t=l.runtime,[l.prefix,t,l.suffix].filter((function(e){return e&&e.length>0})).join("-"));var t};function h(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function p(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){h(i,r,o,a,s,"next",e)}function s(e){h(i,r,o,a,s,"throw",e)}a(void 0)}))}}var d=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};function y(e,t){var n=new URL(e),r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value;n.searchParams.delete(u)}}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n.href}function v(e,t,n,r){return g.apply(this,arguments)}function g(){return(g=p((function(e,t,n,r){var o,i,a,s,u,c,l,f,h,p;return d(this,(function(d){switch(d.label){case 0:return o=y(t.url,n),t.url===o?[2,e.match(t,r)]:(i=Object.assign(Object.assign({},r),{ignoreSearch:!0}),[4,e.keys(t,i)]);case 1:a=d.sent(),s=!0,u=!1,c=void 0;try{for(l=a[Symbol.iterator]();!(s=(f=l.next()).done);s=!0)if(h=f.value,p=y(h.url,n),o===p)return[2,e.match(h,r)]}catch(e){u=!0,c=e}finally{try{s||null==l.return||l.return()}finally{if(u)throw c}}return[2]}}))}))).apply(this,arguments)}var m=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))};function b(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function w(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){b(i,r,o,a,s,"next",e)}function s(e){b(i,r,o,a,s,"throw",e)}a(void 0)}))}}var _=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};function k(){return x.apply(this,arguments)}function x(){return(x=w((function(){var e,t,n,r,o,i;return _(this,(function(a){switch(a.label){case 0:e=!0,t=!1,n=void 0,a.label=1;case 1:a.trys.push([1,6,7,8]),r=c[Symbol.iterator](),a.label=2;case 2:return(e=(o=r.next()).done)?[3,5]:[4,(0,o.value)()];case 3:a.sent(),a.label=4;case 4:return e=!0,[3,2];case 5:return[3,8];case 6:return i=a.sent(),t=!0,n=i,[3,8];case 7:try{e||null==r.return||r.return()}finally{if(t)throw n}return[7];case 8:return[2]}}))}))).apply(this,arguments)}function S(e){return new Promise((function(t){return setTimeout(t,e)}))}const O="object"==typeof global&&global&&global.Object===Object&&global;var P="object"==typeof self&&self&&self.Object===Object&&self;const E=O||P||Function("return this")(),j=E.Symbol,R=Array.isArray;var C=Object.prototype,T=C.hasOwnProperty,A=C.toString,D=j?j.toStringTag:void 0;var L=Object.prototype.toString;var K=j?j.toStringTag:void 0;const I=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":K&&K in Object(e)?function(e){var t=T.call(e,D),n=e[D];try{e[D]=void 0;var r=!0}catch(e){}var o=A.call(e);return r&&(t?e[D]=n:delete e[D]),o}(e):function(e){return L.call(e)}(e)},M=function(e){return null!=e&&"object"==typeof e};var N=j?j.prototype:void 0,F=N?N.toString:void 0;const $=function e(t){if("string"==typeof t)return t;if(R(t))return function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}(t,e)+"";if(function(e){return"symbol"==(void 0===e?"undefined":(t=e)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)||M(e)&&"[object Symbol]"==I(e);var t}(t))return F?F.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n};var B=/[\\^$.*+?()[\]{}|]/g,q=RegExp(B.source);const U=function(e){return(e=null==(t=e)?"":$(t))&&q.test(e)?e.replace(B,"\\$&"):e;var t};function W(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function V(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){W(i,r,o,a,s,"next",e)}function s(e){W(i,r,o,a,s,"throw",e)}a(void 0)}))}}var H=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};function z(e){return Y.apply(this,arguments)}function Y(){return Y=V((function(e){var t,n,r,o,i,a,s,u=arguments;return H(this,(function(c){switch(c.label){case 0:t=u.length>1&&void 0!==u[1]?u[1]:{},n=t.shouldRetry,r=t.getDelay,o=t.onError,n=null!=n?n:function(e){return G(e,5)},r=null!=r?r:function(e){return J(e,1e3)},i=0,a=void 0,c.label=1;case 1:return c.trys.push([1,4,,5]),[4,Q(r(i))];case 2:return c.sent(),[4,e()];case 3:return[2,c.sent()];case 4:return s=c.sent(),null==o||o(s,i),a=s,[3,5];case 5:if(n(i++))return[3,1];c.label=6;case 6:throw a}}))})),Y.apply(this,arguments)}function G(e,t){return e<=t}function J(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=n?e+1:e;return t*Math.pow(2,r)}function Q(e){return X.apply(this,arguments)}function X(){return(X=V((function(e){return H(this,(function(t){return e<=0?[2]:[2,new Promise((function(t){return setTimeout(t,e)}))]}))}))).apply(this,arguments)}const Z=function(e){var t,n=void 0===e?"undefined":(t=e)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t;return null!=e&&("object"==n||"function"==n)},ee=E["__core-js_shared__"];var te,ne=(te=/[^.]+$/.exec(ee&&ee.keys&&ee.keys.IE_PROTO||""))?"Symbol(src)_1."+te:"";var re=Function.prototype.toString;var oe=/^\[object .+?Constructor\]$/,ie=Function.prototype,ae=Object.prototype,se=ie.toString,ue=ae.hasOwnProperty,ce=RegExp("^"+se.call(ue).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const le=function(e){return!(!Z(e)||(t=e,ne&&ne in t))&&(function(e){if(!Z(e))return!1;var t=I(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}(e)?ce:oe).test(function(e){if(null!=e){try{return re.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e));var t},fe=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return le(n)?n:void 0},he=fe(Object,"create");var pe=Object.prototype.hasOwnProperty;var de=Object.prototype.hasOwnProperty;function ye(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ye.prototype.clear=function(){this.__data__=he?he(null):{},this.size=0},ye.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ye.prototype.get=function(e){var t=this.__data__;if(he){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return pe.call(t,e)?t[e]:void 0},ye.prototype.has=function(e){var t=this.__data__;return he?void 0!==t[e]:de.call(t,e)},ye.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=he&&void 0===t?"__lodash_hash_undefined__":t,this};const ve=ye,ge=function(e,t){for(var n=e.length;n--;)if((r=e[n][0])===(o=t)||r!=r&&o!=o)return n;var r,o;return-1};var me=Array.prototype.splice;function be(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}be.prototype.clear=function(){this.__data__=[],this.size=0},be.prototype.delete=function(e){var t=this.__data__,n=ge(t,e);return!(n<0||(n==t.length-1?t.pop():me.call(t,n,1),--this.size,0))},be.prototype.get=function(e){var t=this.__data__,n=ge(t,e);return n<0?void 0:t[n][1]},be.prototype.has=function(e){return ge(this.__data__,e)>-1},be.prototype.set=function(e,t){var n=this.__data__,r=ge(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const we=be,_e=fe(E,"Map"),ke=function(e,t){var n,r,o,i=e.__data__;return("string"==(o=void 0===(n=t)?"undefined":(r=n)&&"undefined"!=typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"number"==o||"symbol"==o||"boolean"==o?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map};function xe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}xe.prototype.clear=function(){this.size=0,this.__data__={hash:new ve,map:new(_e||we),string:new ve}},xe.prototype.delete=function(e){var t=ke(this,e).delete(e);return this.size-=t?1:0,t},xe.prototype.get=function(e){return ke(this,e).get(e)},xe.prototype.has=function(e){return ke(this,e).has(e)},xe.prototype.set=function(e,t){var n=ke(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};const Se=xe;function Oe(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Se;++t<n;)this.add(e[t])}Oe.prototype.add=Oe.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Oe.prototype.has=function(e){return this.__data__.has(e)};const Pe=Oe,Ee=function(e){return e!=e},je=function(e,t){return!(null==e||!e.length)&&function(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}(e,Ee,n)}(e,t,0)>-1},Re=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1},Ce=function(e,t){return e.has(t)},Te=fe(E,"Set"),Ae=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},De=Te&&1/Ae(new Te([,-0]))[1]==1/0?function(e){return new Te(e)}:function(){},Le=function(e){return e&&e.length?function(e,t,n){var r=-1,o=je,i=e.length,a=!0,s=[],u=s;if(n)a=!1,o=Re;else if(i>=200){var c=t?null:De(e);if(c)return Ae(c);a=!1,o=Ce,u=new Pe}else u=t?[]:s;e:for(;++r<i;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var h=u.length;h--;)if(u[h]===f)continue e;t&&u.push(f),s.push(l)}else o(u,f,n)||(u!==s&&u.push(f),s.push(l))}return s}(e):[]};var Ke="omrs",Ie="".concat(Ke,"-spa-cache-v1"),Me=[{'revision':null,'url':'023bd53d342b7463.woff'},{'revision':null,'url':'02acc4469a2fe2e4.woff2'},{'revision':null,'url':'033e03f8663ab9b1.woff'},{'revision':null,'url':'052607e67da262ec.woff'},{'revision':null,'url':'081587ca0db8e63f.woff2'},{'revision':null,'url':'08cf53c4e5e71cf1.woff2'},{'revision':null,'url':'090b2bc014d24ea4.woff2'},{'revision':null,'url':'0a28cd0b47497b71.woff'},{'revision':null,'url':'0a9765a89ff0437d.woff'},{'revision':null,'url':'0ae92bcea615e948.woff2'},{'revision':null,'url':'0be8520d8945b3b7.woff2'},{'revision':null,'url':'0bf6b66a8b86b014.woff'},{'revision':null,'url':'0e7dd073cd8bb0ad.woff2'},{'revision':null,'url':'14869ac5d1830304.woff2'},{'revision':null,'url':'14aaceff85fc8b28.woff2'},{'revision':null,'url':'1590052e1cf8f28d.woff'},{'revision':null,'url':'16f443eed01776ca.woff2'},{'revision':null,'url':'183bae0e53a22182.woff2'},{'revision':null,'url':'19b239a0bb74b27e.woff'},{'revision':null,'url':'19c8f94ccd6289f5.woff2'},{'revision':null,'url':'1ae86565eab7451c.woff2'},{'revision':null,'url':'1c7bf8797e0a9be6.woff2'},{'revision':null,'url':'1d9aff9a93a3bb66.woff'},{'revision':null,'url':'1f266d3619b30f16.woff2'},{'revision':null,'url':'1f8c5a4087a524fd.woff2'},{'revision':null,'url':'20ba2b23c5c0cd0b.woff2'},{'revision':null,'url':'2269d45733c5cf8f.woff'},{'revision':null,'url':'258ecbd235953099.woff'},{'revision':null,'url':'295dd01a1fbfee6d.woff2'},{'revision':null,'url':'2d7f835ab7c7c764.woff'},{'revision':null,'url':'2f66cca99eeead63.woff'},{'revision':null,'url':'2f686985e26e7107.woff2'},{'revision':null,'url':'315eff729e4ccbd9.woff2'},{'revision':null,'url':'32f1e5aadf845e08.woff'},{'revision':null,'url':'338484e1c850669c.woff'},{'revision':null,'url':'33b7a82f1e295190.woff'},{'revision':null,'url':'3674d98ec4a9173d.woff'},{'revision':null,'url':'368d16e3259bf207.woff2'},{'revision':null,'url':'36c49aa341a7079a.woff2'},{'revision':null,'url':'36e1e0430475edee.woff2'},{'revision':null,'url':'3bc19662b8630ee9.woff2'},{'revision':null,'url':'3f645f473b3f8fba.woff2'},{'revision':null,'url':'4095df88acae9e98.woff'},{'revision':null,'url':'4218ac9901b9d36d.woff2'},{'revision':null,'url':'4680ba68412e4da9.woff2'},{'revision':null,'url':'47d7a8698d562a0e.woff'},{'revision':null,'url':'47ec6c9dffe776a0.woff'},{'revision':null,'url':'48e37bd7ebf85a1f.woff2'},{'revision':null,'url':'48edfdf51dfb3160.woff'},{'revision':null,'url':'4a35a2746c8ad7a5.woff'},{'revision':null,'url':'4e11b8a7c445255f.woff2'},{'revision':null,'url':'4ea1f5c3baf89fe3.woff'},{'revision':null,'url':'4ea99f41c896bf9d.woff'},{'revision':null,'url':'5005db1d1caf70c7.woff'},{'revision':null,'url':'528a8e7c1c141a31.woff'},{'revision':null,'url':'52ca12f5b516d4ea.woff'},{'revision':null,'url':'537ddd61c5c1fce2.woff2'},{'revision':null,'url':'5432f7541ec25c34.woff'},{'revision':null,'url':'54a95d73a9454ba3.woff'},{'revision':null,'url':'56c4118c0907f151.woff2'},{'revision':null,'url':'5938bc2ae7ec60c0.woff2'},{'revision':null,'url':'594306657c4e44e8.woff'},{'revision':null,'url':'5a538aa477a66067.woff'},{'revision':null,'url':'5c6586155f0d278a.woff2'},{'revision':null,'url':'60ec587649ba812a.woff2'},{'revision':null,'url':'616567cd947eb9dd.woff'},{'revision':null,'url':'65168b59f44caab4.woff'},{'revision':null,'url':'65c0982f98374864.woff'},{'revision':null,'url':'65e6511e035870e1.woff2'},{'revision':null,'url':'661425f6798cd16a.woff2'},{'revision':null,'url':'66b864fe213caf46.woff2'},{'revision':null,'url':'6775fee945132ef9.woff'},{'revision':null,'url':'68bbd362c8e4983b.woff'},{'revision':null,'url':'68d6deec87b6b604.woff'},{'revision':null,'url':'69a7e6d31d390296.woff'},{'revision':null,'url':'69d087d970ee9455.woff2'},{'revision':null,'url':'69fa3fc7363bbc04.woff'},{'revision':null,'url':'6a1f0178b45b2e9e.woff'},{'revision':null,'url':'6c6c45e66ff54281.woff2'},{'revision':null,'url':'6ffb9ed97b21fdc0.woff'},{'revision':null,'url':'7073a7323e92bd11.woff2'},{'revision':null,'url':'718c6cc31274ab1a.woff2'},{'revision':null,'url':'72cdbedfe04be9f9.woff2'},{'revision':null,'url':'7509c9f56fe9e532.woff2'},{'revision':null,'url':'75dc5c5b04adc8bf.woff2'},{'revision':null,'url':'76a7c256fc8b3490.woff'},{'revision':null,'url':'77b48bc05299ecca.woff2'},{'revision':null,'url':'787f56efa306ddbc.woff'},{'revision':null,'url':'7a0a0215c248c73d.woff2'},{'revision':null,'url':'7c4463d9c84f263a.woff'},{'revision':null,'url':'7d112a556b7670d2.woff'},{'revision':null,'url':'7d52d6014b5f2bbc.woff'},{'revision':null,'url':'7f00bebb24e40167.woff2'},{'revision':null,'url':'7f2c6ea3e740417e.woff'},{'revision':null,'url':'802c6176541eeed7.woff2'},{'revision':null,'url':'8080081b3379c637.woff2'},{'revision':null,'url':'8274cc1afc7619f1.woff'},{'revision':null,'url':'84759747c5ec9b83.js'},{'revision':null,'url':'8605507b7a8487c4.woff2'},{'revision':null,'url':'8a83d654702f6534.woff2'},{'revision':null,'url':'8ccee65f6cf254ee.woff'},{'revision':null,'url':'8d82a082a4aba439.woff'},{'revision':null,'url':'8de04ae985937b56.woff'},{'revision':null,'url':'8fe71173a13fe571.woff2'},{'revision':null,'url':'90edccb224a51cee.woff'},{'revision':null,'url':'94b292fe87831a8b.woff'},{'revision':null,'url':'95dc66c1b88745f8.woff'},{'revision':null,'url':'95fb698be77c85ef.woff'},{'revision':null,'url':'9624cec0f9bdd81e.woff2'},{'revision':null,'url':'9662331fa31e3f20.woff'},{'revision':null,'url':'98a3af55a1698171.woff2'},{'revision':null,'url':'9ba85996af74c5ce.woff2'},{'revision':null,'url':'9bc133b1df25cb74.woff'},{'revision':null,'url':'9ddb22faa35006e7.woff2'},{'revision':null,'url':'9e97352380611b95.woff'},{'revision':null,'url':'a167fb2799dd741b.woff2'},{'revision':null,'url':'a2045a5cc4fdf94f.woff2'},{'revision':null,'url':'a246c73905a31c93.woff2'},{'revision':null,'url':'a401aa7939cb6e6f.woff2'},{'revision':null,'url':'a41a71258c38684d.woff'},{'revision':null,'url':'a60d94a72d615a8e.woff'},{'revision':null,'url':'a66764dd0c1fa213.woff'},{'revision':null,'url':'a6ed036f17a1ea29.woff2'},{'revision':null,'url':'a8f635129d660202.woff'},{'revision':null,'url':'a9f25ca430709a1a.woff2'},{'revision':null,'url':'ae14d98ad8a1212c.woff'},{'revision':null,'url':'aeec4f78084adf7f.woff'},{'revision':null,'url':'af11e94b0644eba5.woff'},{'revision':null,'url':'afa9121a49e95351.woff2'},{'revision':null,'url':'afcda12d9f805543.woff2'},{'revision':null,'url':'b09ded85a7da77f1.woff2'},{'revision':null,'url':'b2f4e9d1e821b71c.woff2'},{'revision':null,'url':'b30b06698dc369b2.woff'},{'revision':null,'url':'b4a074bf828bb757.woff2'},{'revision':null,'url':'b7f447da43f6e596.woff2'},{'revision':null,'url':'b7f633b871b84820.woff'},{'revision':null,'url':'bcca84a524572d10.woff2'},{'revision':null,'url':'be4d1f97b11d087c.woff2'},{'revision':null,'url':'be91def2232f6776.woff'},{'revision':null,'url':'bec14780d81164de.woff2'},{'revision':null,'url':'c285f4b15d11f172.woff'},{'revision':null,'url':'c4673617b80801f3.woff'},{'revision':null,'url':'c553f7e0199c5084.woff2'},{'revision':null,'url':'c8470ed2c145ace7.woff'},{'revision':null,'url':'c9d9ce9f465df4fe.woff2'},{'revision':null,'url':'ccb2870475da9fe8.woff'},{'revision':null,'url':'d04134fa33c2606d.woff'},{'revision':null,'url':'d11f9c5cd7d9ea16.woff'},{'revision':null,'url':'d188f7f036ac5779.woff2'},{'revision':null,'url':'d265d81c58525ae4.woff2'},{'revision':null,'url':'d5942cd81663e136.woff2'},{'revision':null,'url':'d6097a5c452acf6d.woff'},{'revision':null,'url':'d66b8ff73d95cabb.woff2'},{'revision':null,'url':'d77f5bf95de8edaa.woff'},{'revision':null,'url':'d8829a685af4f372.woff'},{'revision':null,'url':'d88899ef0fd16719.woff2'},{'revision':null,'url':'d9a5d958e69e058d.woff2'},{'revision':null,'url':'da65d9a514c628c8.woff'},{'revision':null,'url':'dac90d495be353a0.woff2'},{'revision':null,'url':'dd7071bc6306585c.woff'},{'revision':null,'url':'dd8ce598529c3fab.woff2'},{'revision':null,'url':'ddef6f2dd566c2b9.woff'},{'revision':null,'url':'de013f1be25103fa.woff2'},{'revision':null,'url':'dee2ff599db31e5b.woff'},{'revision':null,'url':'dee7c6b5dd954d9b.woff'},{'revision':null,'url':'df222fceeffca849.woff2'},{'revision':null,'url':'e0d2e5b12f028b5d.woff'},{'revision':null,'url':'e33e3db8e4f7559f.woff'},{'revision':null,'url':'e62b00b9199c1ac9.woff2'},{'revision':null,'url':'e696cef1407b2610.woff2'},{'revision':null,'url':'e89ca83b24959664.woff'},{'revision':null,'url':'eb8c0ae77ad55249.woff'},{'revision':null,'url':'ed0997bd7d221b8e.woff'},{'revision':null,'url':'eed48feba743e21c.woff2'},{'revision':null,'url':'f280bda8a6e535a6.woff'},{'revision':null,'url':'f543c88feb236d11.woff2'},{'revision':null,'url':'f591b0079faa93fe.woff2'},{'revision':null,'url':'f6ed27923769ad1d.woff2'},{'revision':null,'url':'f8803bebe640d99a.woff'},{'revision':'30de494bd9e73ae96c18fd0c06fa422b','url':'favicon.ico'},{'revision':null,'url':'fbebeb4336e67012.woff2'},{'revision':null,'url':'fd522cd7a5c646fe.woff'},{'revision':null,'url':'https://dev3.openmrs.org/openmrs/spa/importmap.json'},{'revision':'85cc5a1602ad1bddfd490be2551f3f80','url':'index.html'},{'revision':'6b758b31ea00150986994edcfb033a94','url':'logo-512.png'},{'revision':'b860db243392596e3b875bad9794b4e5','url':'logo.svg'},{'revision':null,'url':'openmrs.4d216ca793e8e302.js'},{'revision':'10230be33ff15c31af5f9a8587ee6ac8','url':'openmrs.4d216ca793e8e302.js.LICENSE.txt'},{'revision':null,'url':'openmrs.a88c696b0c32abb9.css'}],Ne=$e("index.html"),Fe=Le(Me.map((function(e){return $e(e.url)})));function $e(e){return new URL(e,self.location.href).href}const Be=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e},qe=function(e){return M(e)&&"[object Arguments]"==I(e)};var Ue=Object.prototype,We=Ue.hasOwnProperty,Ve=Ue.propertyIsEnumerable;const He=qe(function(){return arguments}())?qe:function(e){return M(e)&&We.call(e,"callee")&&!Ve.call(e,"callee")};var ze=j?j.isConcatSpreadable:void 0;const Ye=function(e){return R(e)||He(e)||!!(ze&&e&&e[ze])},Ge=function e(t,n,r,o,i){var a=-1,s=t.length;for(r||(r=Ye),i||(i=[]);++a<s;){var u=t[a];n>0&&r(u)?n>1?e(u,n-1,r,o,i):Be(i,u):o||(i[i.length]=u)}return i},Je=function(e){return null!=e&&e.length?Ge(e,1):[]};function Qe(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Xe(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Qe(i,r,o,a,s,"next",e)}function s(e){Qe(i,r,o,a,s,"throw",e)}a(void 0)}))}}var Ze=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};function et(e){return tt.apply(this,arguments)}function tt(){return tt=Xe((function(e){var t,n,r,o;return Ze(this,(function(i){switch(i.label){case 0:return t=e.imports,n=void 0===t?{}:t,r=Object.values(n),[4,Promise.all(r.map((a=Xe((function(e){var t;return Ze(this,(function(n){switch(n.label){case 0:return[4,rt(nt(e))];case 1:return[2,(t=n.sent())?ot(e,t):[]]}}))})),function(e){return a.apply(this,arguments)})))];case 1:return o=i.sent(),[2,Je(o)]}var a}))})),tt.apply(this,arguments)}function nt(e){return e+".buildmanifest.json"}function rt(e){return fetch(e).then((function(e){return e.json()})).catch((function(){return null}))}function ot(e,t){try{var n,r=[],o=((b=((m=new URL(e,self.location.href)).origin+m.pathname).split("/"))[b.length-1]="",b.join("/")),i=!0,a=!1,s=void 0;try{for(var u,c=(null!==(n=t.chunks)&&void 0!==n?n:[])[Symbol.iterator]();!(i=(u=c.next()).done);i=!0){var l,f=u.value,h=!0,p=!1,d=void 0;try{for(var y,v=(null!==(l=f.files)&&void 0!==l?l:[])[Symbol.iterator]();!(h=(y=v.next()).done);h=!0){var g=y.value;r.push(new URL(g,o).toString())}}catch(e){p=!0,d=e}finally{try{h||null==v.return||v.return()}finally{if(p)throw d}}}}catch(e){a=!0,s=e}finally{try{i||null==c.return||c.return()}finally{if(a)throw s}}return r}catch(t){return console.error("[SW] Failed to determine the dependencies of the module with the URL %s. Not precaching any of the module's assets. Error: ",e,t),[]}var m,b}const it="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,at=Object.keys,st=Array.isArray;function ut(e,t){return"object"!=typeof t||at(t).forEach((function(n){e[n]=t[n]})),e}"undefined"==typeof Promise||it.Promise||(it.Promise=Promise);const ct=Object.getPrototypeOf,lt={}.hasOwnProperty;function ft(e,t){return lt.call(e,t)}function ht(e,t){"function"==typeof t&&(t=t(ct(e))),("undefined"==typeof Reflect?at:Reflect.ownKeys)(t).forEach((n=>{dt(e,n,t[n])}))}const pt=Object.defineProperty;function dt(e,t,n,r){pt(e,t,ut(n&&ft(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function yt(e){return{from:function(t){return e.prototype=Object.create(t.prototype),dt(e.prototype,"constructor",e),{extend:ht.bind(null,e.prototype)}}}}const vt=Object.getOwnPropertyDescriptor;function gt(e,t){let n;return vt(e,t)||(n=ct(e))&>(n,t)}const mt=[].slice;function bt(e,t,n){return mt.call(e,t,n)}function wt(e,t){return t(e)}function _t(e){if(!e)throw new Error("Assertion Failed")}function kt(e){it.setImmediate?setImmediate(e):setTimeout(e,0)}function xt(e,t){return e.reduce(((e,n,r)=>{var o=t(n,r);return o&&(e[o[0]]=o[1]),e}),{})}function St(e,t){if(ft(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var n=[],r=0,o=t.length;r<o;++r){var i=St(e,t[r]);n.push(i)}return n}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return void 0===s?void 0:St(s,t.substr(a+1))}}function Ot(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){_t("string"!=typeof n&&"length"in n);for(var r=0,o=t.length;r<o;++r)Ot(e,t[r],n[r])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),s=t.substr(i+1);if(""===s)void 0===n?st(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=n;else{var u=e[a];u&&ft(e,a)||(u=e[a]={}),Ot(u,s,n)}}else void 0===n?st(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}function Pt(e){var t={};for(var n in e)ft(e,n)&&(t[n]=e[n]);return t}const Et=[].concat;function jt(e){return Et.apply([],e)}const Rt="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(jt([8,16,32,64].map((e=>["Int","Uint","Float"].map((t=>t+e+"Array")))))).filter((e=>it[e])),Ct=Rt.map((e=>it[e]));xt(Rt,(e=>[e,!0]));let Tt=null;function At(e){Tt="undefined"!=typeof WeakMap&&new WeakMap;const t=Dt(e);return Tt=null,t}function Dt(e){if(!e||"object"!=typeof e)return e;let t=Tt&&Tt.get(e);if(t)return t;if(st(e)){t=[],Tt&&Tt.set(e,t);for(var n=0,r=e.length;n<r;++n)t.push(Dt(e[n]))}else if(Ct.indexOf(e.constructor)>=0)t=e;else{const n=ct(e);for(var o in t=n===Object.prototype?{}:Object.create(n),Tt&&Tt.set(e,t),e)ft(e,o)&&(t[o]=Dt(e[o]))}return t}const{toString:Lt}={};function Kt(e){return Lt.call(e).slice(8,-1)}const It="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",Mt="symbol"==typeof It?function(e){var t;return null!=e&&(t=e[It])&&t.apply(e)}:function(){return null},Nt={};function Ft(e){var t,n,r,o;if(1===arguments.length){if(st(e))return e.slice();if(this===Nt&&"string"==typeof e)return[e];if(o=Mt(e)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==e)return[e];if("number"==typeof(t=e.length)){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}const $t="undefined"!=typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var Bt="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function qt(e,t){Bt=e,Ut=t}var Ut=()=>!0;const Wt=!new Error("").stack;function Vt(){if(Wt)try{throw Vt.arguments,new Error}catch(e){return e}return new Error}function Ht(e,t){var n=e.stack;return n?(t=t||0,0===n.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),n.split("\n").slice(t).filter(Ut).map((e=>"\n"+e)).join("")):""}var zt=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Yt=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(zt),Gt={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function Jt(e,t){this._e=Vt(),this.name=e,this.message=t}function Qt(e,t){return e+". Errors: "+Object.keys(t).map((e=>t[e].toString())).filter(((e,t,n)=>n.indexOf(e)===t)).join("\n")}function Xt(e,t,n,r){this._e=Vt(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=Qt(e,t)}function Zt(e,t){this._e=Vt(),this.name="BulkError",this.failures=Object.keys(t).map((e=>t[e])),this.failuresByPos=t,this.message=Qt(e,t)}yt(Jt).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+Ht(this._e,2))}},toString:function(){return this.name+": "+this.message}}),yt(Xt).from(Jt),yt(Zt).from(Jt);var en=Yt.reduce(((e,t)=>(e[t]=t+"Error",e)),{});const tn=Jt;var nn=Yt.reduce(((e,t)=>{var n=t+"Error";function r(e,r){this._e=Vt(),this.name=n,e?"string"==typeof e?(this.message=`${e}${r?"\n "+r:""}`,this.inner=r||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=Gt[t]||n,this.inner=null)}return yt(r).from(tn),e[t]=r,e}),{});nn.Syntax=SyntaxError,nn.Type=TypeError,nn.Range=RangeError;var rn=zt.reduce(((e,t)=>(e[t+"Error"]=nn[t],e)),{}),on=Yt.reduce(((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=nn[t]),e)),{});function an(){}function sn(e){return e}function un(e,t){return null==e||e===sn?t:function(n){return t(e(n))}}function cn(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function ln(e,t){return e===an?t:function(){var n=e.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?cn(r,this.onsuccess):r),o&&(this.onerror=this.onerror?cn(o,this.onerror):o),void 0!==i?i:n}}function fn(e,t){return e===an?t:function(){e.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?cn(n,this.onsuccess):n),r&&(this.onerror=this.onerror?cn(r,this.onerror):r)}}function hn(e,t){return e===an?t:function(n){var r=e.apply(this,arguments);ut(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?cn(o,this.onsuccess):o),i&&(this.onerror=this.onerror?cn(i,this.onerror):i),void 0===r?void 0===a?void 0:a:ut(r,a)}}function pn(e,t){return e===an?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function dn(e,t){return e===an?t:function(){var n=e.apply(this,arguments);if(n&&"function"==typeof n.then){for(var r=this,o=arguments.length,i=new Array(o);o--;)i[o]=arguments[o];return n.then((function(){return t.apply(r,i)}))}return t.apply(this,arguments)}}on.ModifyError=Xt,on.DexieError=Jt,on.BulkError=Zt;var yn={};const[vn,gn,mn]="undefined"==typeof Promise?[]:(()=>{let e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,ct(e),e];const t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,ct(t),e]})(),bn=gn&&gn.then,wn=vn&&vn.constructor,_n=!!mn;var kn=!1,xn=mn?()=>{mn.then(Hn)}:it.setImmediate?setImmediate.bind(null,Hn):it.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver((()=>{Hn(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(Hn,0)},Sn=function(e,t){Dn.push([e,t]),Pn&&(xn(),Pn=!1)},On=!0,Pn=!0,En=[],jn=[],Rn=null,Cn=sn,Tn={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:vr,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((e=>{try{vr(e[0],e[1])}catch(e){}}))}},An=Tn,Dn=[],Ln=0,Kn=[];function In(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=an,this._lib=!1;var t=this._PSD=An;if(Bt&&(this._stackHolder=Vt(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==yn)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&$n(this,this._value))}this._state=null,this._value=null,++t.ref,Fn(this,e)}const Mn={get:function(){var e=An,t=nr;function n(n,r){var o=!e.global&&(e!==An||t!==nr);const i=o&&!ar();var a=new In(((t,a)=>{qn(this,new Nn(dr(n,e,o,i),dr(r,e,o,i),t,a,e))}));return Bt&&Vn(a,this),a}return n.prototype=yn,n},set:function(e){dt(this,"then",e&&e.prototype===yn?Mn:{get:function(){return e},set:Mn.set})}};function Nn(e,t,n,r,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r,this.psd=o}function Fn(e,t){try{t((t=>{if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var n=e._lib&&zn();t&&"function"==typeof t.then?Fn(e,((e,n)=>{t instanceof In?t._then(e,n):t.then(e,n)})):(e._state=!0,e._value=t,Bn(e)),n&&Yn()}}),$n.bind(null,e))}catch(t){$n(e,t)}}function $n(e,t){if(jn.push(t),null===e._state){var n=e._lib&&zn();t=Cn(t),e._state=!1,e._value=t,Bt&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,n){try{e.apply(null,void 0)}catch(e){}}((()=>{var n=gt(t,"stack");t._promise=e,dt(t,"stack",{get:()=>kn?n&&(n.get?n.get.apply(t):n.value):e.stack})})),function(e){En.some((t=>t._value===e._value))||En.push(e)}(e),Bn(e),n&&Yn()}}function Bn(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)qn(e,t[n]);var o=e._PSD;--o.ref||o.finalize(),0===Ln&&(++Ln,Sn((()=>{0==--Ln&&Gn()}),[]))}function qn(e,t){if(null!==e._state){var n=e._state?t.onFulfilled:t.onRejected;if(null===n)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++Ln,Sn(Un,[n,e,t])}else e._listeners.push(t)}function Un(e,t,n){try{Rn=t;var r,o=t._value;t._state?r=e(o):(jn.length&&(jn=[]),r=e(o),-1===jn.indexOf(o)&&function(e){for(var t=En.length;t;)if(En[--t]._value===e._value)return void En.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{Rn=null,0==--Ln&&Gn(),--n.psd.ref||n.psd.finalize()}}function Wn(e,t,n){if(t.length===n)return t;var r="";if(!1===e._state){var o,i,a=e._value;null!=a?(o=a.name||"Error",i=a.message||a,r=Ht(a,0)):(o=a,i=""),t.push(o+(i?": "+i:"")+r)}return Bt&&((r=Ht(e._stackHolder,2))&&-1===t.indexOf(r)&&t.push(r),e._prev&&Wn(e._prev,t,n)),t}function Vn(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)}function Hn(){zn()&&Yn()}function zn(){var e=On;return On=!1,Pn=!1,e}function Yn(){var e,t,n;do{for(;Dn.length>0;)for(e=Dn,Dn=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}}while(Dn.length>0);On=!0,Pn=!0}function Gn(){var e=En;En=[],e.forEach((e=>{e._PSD.onunhandled.call(null,e._value,e)}));for(var t=Kn.slice(0),n=t.length;n;)t[--n]()}function Jn(e){return new In(yn,!1,e)}function Qn(e,t){var n=An;return function(){var r=zn(),o=An;try{return lr(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{lr(o,!1),r&&Yn()}}}ht(In.prototype,{then:Mn,_then:function(e,t){qn(this,new Nn(null,null,e,t,An))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],n=arguments[1];return"function"==typeof t?this.then(null,(e=>e instanceof t?n(e):Jn(e))):this.then(null,(e=>e&&e.name===t?n(e):Jn(e)))},finally:function(e){return this.then((t=>(e(),t)),(t=>(e(),Jn(t))))},stack:{get:function(){if(this._stack)return this._stack;try{kn=!0;var e=Wn(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{kn=!1}}},timeout:function(e,t){return e<1/0?new In(((n,r)=>{var o=setTimeout((()=>r(new nn.Timeout(t))),e);this.then(n,r).finally(clearTimeout.bind(null,o))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&dt(In.prototype,Symbol.toStringTag,"Dexie.Promise"),Tn.env=fr(),ht(In,{all:function(){var e=Ft.apply(null,arguments).map(sr);return new In((function(t,n){0===e.length&&t([]);var r=e.length;e.forEach(((o,i)=>In.resolve(o).then((n=>{e[i]=n,--r||t(e)}),n)))}))},resolve:e=>{if(e instanceof In)return e;if(e&&"function"==typeof e.then)return new In(((t,n)=>{e.then(t,n)}));var t=new In(yn,!0,e);return Vn(t,Rn),t},reject:Jn,race:function(){var e=Ft.apply(null,arguments).map(sr);return new In(((t,n)=>{e.map((e=>In.resolve(e).then(t,n)))}))},PSD:{get:()=>An,set:e=>An=e},totalEchoes:{get:()=>nr},newPSD:or,usePSD:hr,scheduler:{get:()=>Sn,set:e=>{Sn=e}},rejectionMapper:{get:()=>Cn,set:e=>{Cn=e}},follow:(e,t)=>new In(((n,r)=>or(((t,n)=>{var r=An;r.unhandleds=[],r.onunhandled=n,r.finalize=cn((function(){!function(e){Kn.push((function t(){e(),Kn.splice(Kn.indexOf(t),1)})),++Ln,Sn((()=>{0==--Ln&&Gn()}),[])}((()=>{0===this.unhandleds.length?t():n(this.unhandleds[0])}))}),r.finalize),e()}),t,n,r)))}),wn&&(wn.allSettled&&dt(In,"allSettled",(function(){const e=Ft.apply(null,arguments).map(sr);return new In((t=>{0===e.length&&t([]);let n=e.length;const r=new Array(n);e.forEach(((e,o)=>In.resolve(e).then((e=>r[o]={status:"fulfilled",value:e}),(e=>r[o]={status:"rejected",reason:e})).then((()=>--n||t(r)))))}))})),wn.any&&"undefined"!=typeof AggregateError&&dt(In,"any",(function(){const e=Ft.apply(null,arguments).map(sr);return new In(((t,n)=>{0===e.length&&n(new AggregateError([]));let r=e.length;const o=new Array(r);e.forEach(((e,i)=>In.resolve(e).then((e=>t(e)),(e=>{o[i]=e,--r||n(new AggregateError(o))}))))}))})));const Xn={awaits:0,echoes:0,id:0};var Zn=0,er=[],tr=0,nr=0,rr=0;function or(e,t,n,r){var o=An,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++rr;var a=Tn.env;i.env=_n?{Promise:In,PromiseProp:{value:In,configurable:!0,writable:!0},all:In.all,race:In.race,allSettled:In.allSettled,any:In.any,resolve:In.resolve,reject:In.reject,nthen:yr(a.nthen,i),gthen:yr(a.gthen,i)}:{},t&&ut(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=hr(i,e,n,r);return 0===i.ref&&i.finalize(),s}function ir(){return Xn.id||(Xn.id=++Zn),++Xn.awaits,Xn.echoes+=100,Xn.id}function ar(){return!!Xn.awaits&&(0==--Xn.awaits&&(Xn.id=0),Xn.echoes=100*Xn.awaits,!0)}function sr(e){return Xn.echoes&&e&&e.constructor===wn?(ir(),e.then((e=>(ar(),e)),(e=>(ar(),gr(e))))):e}function ur(e){++nr,Xn.echoes&&0!=--Xn.echoes||(Xn.echoes=Xn.id=0),er.push(An),lr(e,!0)}function cr(){var e=er[er.length-1];er.pop(),lr(e,!1)}function lr(e,t){var n=An;if((t?!Xn.echoes||tr++&&e===An:!tr||--tr&&e===An)||pr(t?ur.bind(null,e):cr),e!==An&&(An=e,n===Tn&&(Tn.env=fr()),_n)){var r=Tn.env.Promise,o=e.env;gn.then=o.nthen,r.prototype.then=o.gthen,(n.global||e.global)&&(Object.defineProperty(it,"Promise",o.PromiseProp),r.all=o.all,r.race=o.race,r.resolve=o.resolve,r.reject=o.reject,o.allSettled&&(r.allSettled=o.allSettled),o.any&&(r.any=o.any))}}function fr(){var e=it.Promise;return _n?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(it,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:gn.then,gthen:e.prototype.then}:{}}function hr(e,t,n,r,o){var i=An;try{return lr(e,!0),t(n,r,o)}finally{lr(i,!1)}}function pr(e){bn.call(vn,e)}function dr(e,t,n,r){return"function"!=typeof e?e:function(){var o=An;n&&ir(),lr(t,!0);try{return e.apply(this,arguments)}finally{lr(o,!1),r&&pr(ar)}}}function yr(e,t){return function(n,r){return e.call(this,dr(n,t),dr(r,t))}}function vr(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var r,o={promise:t,reason:e};if(it.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),ut(r,o)):it.CustomEvent&&ut(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&it.dispatchEvent&&(dispatchEvent(r),!it.PromiseRejectionEvent&&it.onunhandledrejection))try{it.onunhandledrejection(r)}catch(e){}Bt&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}-1===(""+bn).indexOf("[native code]")&&(ir=ar=an);var gr=In.reject;function mr(e,t,n,r){if(e.idbdb&&(e._state.openComplete||An.letThrough||e._vip)){var o=e._createTransaction(t,n,e._dbSchema);try{o.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===en.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>mr(e,t,n,r)))):gr(o)}return o._promise(t,((e,t)=>or((()=>(An.trans=o,r(e,t,o)))))).then((e=>o._completion.then((()=>e))))}if(e._state.openComplete)return gr(new nn.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return gr(new nn.DatabaseClosed);e.open().catch(an)}return e._state.dbReadyPromise.then((()=>mr(e,t,n,r)))}const br=String.fromCharCode(65535),wr="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",_r=[],kr="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),xr=kr,Sr=kr,Or=e=>!/(dexie\.js|dexie\.min\.js)/.test(e);function Pr(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}const Er={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function jr(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=At(t))[e],t)}class Rr{_trans(e,t,n){const r=this._tx||An.trans,o=this.name;function i(e,n,r){if(!r.schema[o])throw new nn.NotFound("Table "+o+" not part of transaction");return t(r.idbtrans,r)}const a=zn();try{return r&&r.db===this.db?r===An.trans?r._promise(e,i,n):or((()=>r._promise(e,i,n)),{trans:r,transless:An.transless||An}):mr(this.db,e,[this.name],i)}finally{a&&Yn()}}get(e,t){return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",(t=>this.core.get({trans:t,key:e}).then((e=>this.hook.reading.fire(e))))).then(t)}where(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(st(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);const t=at(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);const n=this.schema.indexes.concat(this.schema.primKey).filter((e=>e.compound&&t.every((t=>e.keyPath.indexOf(t)>=0))&&e.keyPath.every((e=>t.indexOf(e)>=0))))[0];if(n&&this.db._maxKey!==br)return this.where(n.name).equals(n.keyPath.map((t=>e[t])));!n&&Bt&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);const{idxByName:r}=this.schema,o=this.db._deps.indexedDB;function i(e,t){try{return 0===o.cmp(e,t)}catch(e){return!1}}const[a,s]=t.reduce((([t,n],o)=>{const a=r[o],s=e[o];return[t||a,t||!a?Pr(n,a&&a.multi?e=>{const t=St(e,o);return st(t)&&t.some((e=>i(s,e)))}:e=>i(s,St(e,o))):n]}),[null,null]);return a?this.where(a.name).equals(e[a.keyPath]).filter(s):n?this.filter(s):this.where(t).equals("")}filter(e){return this.toCollection().and(e)}count(e){return this.toCollection().count(e)}offset(e){return this.toCollection().offset(e)}limit(e){return this.toCollection().limit(e)}each(e){return this.toCollection().each(e)}toArray(e){return this.toCollection().toArray(e)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(e){return new this.db.Collection(new this.db.WhereClause(this,st(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;const t=t=>{if(!t)return t;const n=Object.create(e.prototype);for(var r in t)if(ft(t,r))try{n[r]=t[r]}catch(e){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}defineClass(){return this.mapToClass((function(e){ut(this,e)}))}add(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=jr(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[o]}))).then((e=>e.numFailures?In.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{Ot(e,r,t)}catch(e){}return t}))}update(e,t){if("object"!=typeof e||st(e))return this.where(":id").equals(e).modify(t);{const n=St(e,this.schema.primKey.keyPath);if(void 0===n)return gr(new nn.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?at(t).forEach((n=>{Ot(e,n,t[n])})):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}}put(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=jr(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=t?[t]:null}))).then((e=>e.numFailures?In.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{Ot(e,r,t)}catch(e){}return t}))}delete(e){return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"delete",keys:[e]}))).then((e=>e.numFailures?In.reject(e.failures[0]):void 0))}clear(){return this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"deleteRange",range:Er}))).then((e=>e.numFailures?In.reject(e.failures[0]):void 0))}bulkGet(e){return this._trans("readonly",(t=>this.core.getMany({keys:e,trans:t}).then((e=>e.map((e=>this.hook.reading.fire(e)))))))}bulkAdd(e,t,n){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new nn.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new nn.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=i&&n?e.map(jr(i)):e;return this.core.mutate({trans:t,type:"add",keys:r,values:s,wantResults:o}).then((({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new Zt(`${this.name}.bulkAdd(): ${e} of ${a} operations failed`,r)}))}))}bulkPut(e,t,n){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new nn.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new nn.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=i&&n?e.map(jr(i)):e;return this.core.mutate({trans:t,type:"put",keys:r,values:s,wantResults:o}).then((({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new Zt(`${this.name}.bulkPut(): ${e} of ${a} operations failed`,r)}))}))}bulkDelete(e){const t=e.length;return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"delete",keys:e}))).then((({numFailures:e,lastResult:n,failures:r})=>{if(0===e)return n;throw new Zt(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,r)}))}}function Cr(e){var t={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return t[n].subscribe.apply(null,i),e}if("string"==typeof n)return t[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(e,r,o){if("object"==typeof e)return a(e);r||(r=pn),o||(o=an);var i={subscribers:[],fire:o,subscribe:function(e){-1===i.subscribers.indexOf(e)&&(i.subscribers.push(e),i.fire=r(i.fire,e))},unsubscribe:function(e){i.subscribers=i.subscribers.filter((function(t){return t!==e})),i.fire=i.subscribers.reduce(r,o)}};return t[e]=n[e]=i,i}function a(e){at(e).forEach((function(t){var n=e[t];if(st(n))i(t,e[t][0],e[t][1]);else{if("asap"!==n)throw new nn.InvalidArgument("Invalid event config");var r=i(t,sn,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){kt((function(){e.apply(null,t)}))}))}))}}))}}function Tr(e,t){return yt(t).from({prototype:e}),t}function Ar(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function Dr(e,t){e.filter=Pr(e.filter,t)}function Lr(e,t,n){var r=e.replayFilter;e.replayFilter=r?()=>Pr(r(),t()):t,e.justLimit=n&&!r}function Kr(e,t){if(e.isPrimKey)return t.primaryKey;const n=t.getIndexByKeyPath(e.index);if(!n)throw new nn.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function Ir(e,t,n){const r=Kr(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})}function Mr(e,t,n,r){const o=e.replayFilter?Pr(e.filter,e.replayFilter()):e.filter;if(e.or){const i={},a=(e,n,r)=>{if(!o||o(n,r,(e=>n.stop(e)),(e=>n.fail(e)))){var a=n.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),ft(i,s)||(i[s]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(a,n),Nr(Ir(e,r,n),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return Nr(Ir(e,r,n),Pr(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)}function Nr(e,t,n,r){var o=Qn(r?(e,t,o)=>n(r(e),t,o):n);return e.then((e=>{if(e)return e.start((()=>{var n=()=>e.continue();t&&!t(e,(e=>n=e),(t=>{e.stop(t),n=an}),(t=>{e.fail(t),n=an}))||o(e.value,e,(e=>n=e)),n()}))}))}function Fr(e,t){try{const n=$r(e),r=$r(t);if(n!==r)return"Array"===n?1:"Array"===r?-1:"binary"===n?1:"binary"===r?-1:"string"===n?1:"string"===r?-1:"Date"===n?1:"Date"!==r?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){const n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n)if(e[n]!==t[n])return e[n]<t[n]?-1:1;return n===r?0:n<r?-1:1}(Br(e),Br(t));case"Array":return function(e,t){const n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n){const r=Fr(e[n],t[n]);if(0!==r)return r}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}function $r(e){const t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";const n=Kt(e);return"ArrayBuffer"===n?"binary":n}function Br(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class qr{_read(e,t){var n=this._ctx;return n.error?n.table._trans(null,gr.bind(null,n.error)):n.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,gr.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=Pr(t.algorithm,e)}_iterate(e,t){return Mr(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&ut(n,e),t._ctx=n,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read((n=>Mr(t,e,n,t.table.core)))}count(e){return this._read((e=>{const t=this._ctx,n=t.table.core;if(Ar(t,!0))return n.count({trans:e,query:{index:Kr(t,n.schema),range:t.range}}).then((e=>Math.min(e,t.limit)));var r=0;return Mr(t,(()=>(++r,!1)),e,n).then((()=>r))})).then(e)}sortBy(e,t){const n=e.split(".").reverse(),r=n[0],o=n.length-1;function i(e,t){return t?i(e[n[t]],t-1):e[r]}var a="next"===this._ctx.dir?1:-1;function s(e,t){var n=i(e,o),r=i(t,o);return n<r?-a:n>r?a:0}return this.toArray((function(e){return e.sort(s)})).then(t)}toArray(e){return this._read((e=>{var t=this._ctx;if("next"===t.dir&&Ar(t,!0)&&t.limit>0){const{valueMapper:n}=t,r=Kr(t,t.table.core.schema);return t.table.core.query({trans:e,limit:t.limit,values:!0,query:{index:r,range:t.range}}).then((({result:e})=>n?e.map(n):e))}{const n=[];return Mr(t,(e=>n.push(e)),e,t.table.core).then((()=>n))}}),e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,Ar(t)?Lr(t,(()=>{var t=e;return(e,n)=>0===t||(1===t?(--t,!1):(n((()=>{e.advance(t),t=0})),!1))})):Lr(t,(()=>{var t=e;return()=>--t<0}))),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Lr(this._ctx,(()=>{var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}}),!0),this}until(e,t){return Dr(this._ctx,(function(n,r,o){return!e(n.value)||(r(o),t)})),this}first(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)}last(e){return this.reverse().first(e)}filter(e){var t,n;return Dr(this._ctx,(function(t){return e(t.value)})),t=this._ctx,n=e,t.isMatch=Pr(t.isMatch,n),this}and(e){return this.filter(e)}or(e){return new this.db.WhereClause(this._ctx.table,e,this)}reverse(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.key,n)}))}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.primaryKey,n)}))}keys(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.key)})).then((function(){return n})).then(e)}primaryKeys(e){var t=this._ctx;if("next"===t.dir&&Ar(t,!0)&&t.limit>0)return this._read((e=>{var n=Kr(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})})).then((({result:e})=>e)).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.primaryKey)})).then((function(){return n})).then(e)}uniqueKeys(e){return this._ctx.unique="unique",this.keys(e)}firstKey(e){return this.limit(1).keys((function(e){return e[0]})).then(e)}lastKey(e){return this.reverse().firstKey(e)}distinct(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return Dr(this._ctx,(function(e){var t=e.primaryKey.toString(),r=ft(n,t);return n[t]=!0,!r})),this}modify(e){var t=this._ctx;return this._write((n=>{var r;if("function"==typeof e)r=e;else{var o=at(e),i=o.length;r=function(t){for(var n=!1,r=0;r<i;++r){var a=o[r],s=e[a];St(t,a)!==s&&(Ot(t,a,s),n=!0)}return n}}const a=t.table.core,{outbound:s,extractKey:u}=a.schema.primaryKey,c=this.db._options.modifyChunkSize||200,l=[];let f=0;const h=[],p=(e,t)=>{const{failures:n,numFailures:r}=t;f+=e-r;for(let e of at(n))l.push(n[e])};return this.clone().primaryKeys().then((o=>{const i=l=>{const f=Math.min(c,o.length-l);return a.getMany({trans:n,keys:o.slice(l,l+f),cache:"immutable"}).then((h=>{const d=[],y=[],v=s?[]:null,g=[];for(let e=0;e<f;++e){const t=h[e],n={value:At(t),primKey:o[l+e]};!1!==r.call(n,n.value,n)&&(null==n.value?g.push(o[l+e]):s||0===Fr(u(t),u(n.value))?(y.push(n.value),s&&v.push(o[l+e])):(g.push(o[l+e]),d.push(n.value)))}const m=Ar(t)&&t.limit===1/0&&("function"!=typeof e||e===Ur)&&{index:t.index,range:t.range};return Promise.resolve(d.length>0&&a.mutate({trans:n,type:"add",values:d}).then((e=>{for(let t in e.failures)g.splice(parseInt(t),1);p(d.length,e)}))).then((()=>(y.length>0||m&&"object"==typeof e)&&a.mutate({trans:n,type:"put",keys:v,values:y,criteria:m,changeSpec:"function"!=typeof e&&e}).then((e=>p(y.length,e))))).then((()=>(g.length>0||m&&e===Ur)&&a.mutate({trans:n,type:"delete",keys:g,criteria:m}).then((e=>p(g.length,e))))).then((()=>o.length>l+f&&i(l+c)))}))};return i(0).then((()=>{if(l.length>0)throw new Xt("Error modifying one or more objects",l,f,h);return o.length}))}))}))}delete(){var e=this._ctx,t=e.range;return Ar(e)&&(e.isPrimKey&&!Sr||3===t.type)?this._write((n=>{const{primaryKey:r}=e.table.core.schema,o=t;return e.table.core.count({trans:n,query:{index:r,range:o}}).then((t=>e.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((({failures:e,lastResult:n,results:r,numFailures:o})=>{if(o)throw new Xt("Could not delete some values",Object.keys(e).map((t=>e[t])),t-o);return t-o}))))})):this.modify(Ur)}}const Ur=(e,t)=>t.value=null;function Wr(e,t){return e<t?-1:e===t?0:1}function Vr(e,t){return e>t?-1:e===t?0:1}function Hr(e,t,n){var r=e instanceof Xr?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r}function zr(e){return new e.Collection(e,(()=>Qr(""))).limit(0)}function Yr(e,t,n,r,o,i){for(var a=Math.min(e.length,r.length),s=-1,u=0;u<a;++u){var c=t[u];if(c!==r[u])return o(e[u],n[u])<0?e.substr(0,u)+n[u]+n.substr(u+1):o(e[u],r[u])<0?e.substr(0,u)+r[u]+n.substr(u+1):s>=0?e.substr(0,s)+t[s]+n.substr(s+1):null;o(e[u],c)<0&&(s=u)}return a<r.length&&"next"===i?e+n.substr(e.length):a<e.length&&"prev"===i?e.substr(0,n.length):s<0?null:e.substr(0,s)+r[s]+n.substr(s+1)}function Gr(e,t,n,r){var o,i,a,s,u,c,l,f=n.length;if(!n.every((e=>"string"==typeof e)))return Hr(e,"String expected.");function h(e){o=function(e){return"next"===e?e=>e.toUpperCase():e=>e.toLowerCase()}(e),i=function(e){return"next"===e?e=>e.toLowerCase():e=>e.toUpperCase()}(e),a="next"===e?Wr:Vr;var t=n.map((function(e){return{lower:i(e),upper:o(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));s=t.map((function(e){return e.upper})),u=t.map((function(e){return e.lower})),c=e,l="next"===e?"":r}h("next");var p=new e.Collection(e,(()=>Jr(s[0],u[f-1]+r)));p._ondirectionchange=function(e){h(e)};var d=0;return p._addAlgorithm((function(e,n,r){var o=e.key;if("string"!=typeof o)return!1;var h=i(o);if(t(h,u,d))return!0;for(var p=null,y=d;y<f;++y){var v=Yr(o,h,s[y],u[y],a,c);null===v&&null===p?d=y+1:(null===p||a(p,v)>0)&&(p=v)}return n(null!==p?function(){e.continue(p+l)}:r),!1})),p}function Jr(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function Qr(e){return{type:1,lower:e,upper:e}}class Xr{get Collection(){return this._ctx.table.db.Collection}between(e,t,n,r){n=!1!==n,r=!0===r;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(n||r)&&(!n||!r)?zr(this):new this.Collection(this,(()=>Jr(e,t,!n,!r)))}catch(e){return Hr(this,wr)}}equals(e){return null==e?Hr(this,wr):new this.Collection(this,(()=>Qr(e)))}above(e){return null==e?Hr(this,wr):new this.Collection(this,(()=>Jr(e,void 0,!0)))}aboveOrEqual(e){return null==e?Hr(this,wr):new this.Collection(this,(()=>Jr(e,void 0,!1)))}below(e){return null==e?Hr(this,wr):new this.Collection(this,(()=>Jr(void 0,e,!1,!0)))}belowOrEqual(e){return null==e?Hr(this,wr):new this.Collection(this,(()=>Jr(void 0,e)))}startsWith(e){return"string"!=typeof e?Hr(this,"String expected."):this.between(e,e+br,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):Gr(this,((e,t)=>0===e.indexOf(t[0])),[e],br)}equalsIgnoreCase(e){return Gr(this,((e,t)=>e===t[0]),[e],"")}anyOfIgnoreCase(){var e=Ft.apply(Nt,arguments);return 0===e.length?zr(this):Gr(this,((e,t)=>-1!==t.indexOf(e)),e,"")}startsWithAnyOfIgnoreCase(){var e=Ft.apply(Nt,arguments);return 0===e.length?zr(this):Gr(this,((e,t)=>t.some((t=>0===e.indexOf(t)))),e,br)}anyOf(){const e=Ft.apply(Nt,arguments);let t=this._cmp;try{e.sort(t)}catch(e){return Hr(this,wr)}if(0===e.length)return zr(this);const n=new this.Collection(this,(()=>Jr(e[0],e[e.length-1])));n._ondirectionchange=n=>{t="next"===n?this._ascending:this._descending,e.sort(t)};let r=0;return n._addAlgorithm(((n,o,i)=>{const a=n.key;for(;t(a,e[r])>0;)if(++r,r===e.length)return o(i),!1;return 0===t(a,e[r])||(o((()=>{n.continue(e[r])})),!1)})),n}notEqual(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){const e=Ft.apply(Nt,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return Hr(this,wr)}const t=e.reduce(((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]]),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,t){const n=this._cmp,r=this._ascending,o=this._descending,i=this._min,a=this._max;if(0===e.length)return zr(this);if(!e.every((e=>void 0!==e[0]&&void 0!==e[1]&&r(e[0],e[1])<=0)))return Hr(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",nn.InvalidArgument);const s=!t||!1!==t.includeLowers,u=t&&!0===t.includeUppers;let c,l=r;function f(e,t){return l(e[0],t[0])}try{c=e.reduce((function(e,t){let r=0,o=e.length;for(;r<o;++r){const o=e[r];if(n(t[0],o[1])<0&&n(t[1],o[0])>0){o[0]=i(o[0],t[0]),o[1]=a(o[1],t[1]);break}}return r===o&&e.push(t),e}),[]),c.sort(f)}catch(e){return Hr(this,wr)}let h=0;const p=u?e=>r(e,c[h][1])>0:e=>r(e,c[h][1])>=0,d=s?e=>o(e,c[h][0])>0:e=>o(e,c[h][0])>=0;let y=p;const v=new this.Collection(this,(()=>Jr(c[0][0],c[c.length-1][1],!s,!u)));return v._ondirectionchange=e=>{"next"===e?(y=p,l=r):(y=d,l=o),c.sort(f)},v._addAlgorithm(((e,t,n)=>{for(var o=e.key;y(o);)if(++h,h===c.length)return t(n),!1;return!!function(e){return!p(e)&&!d(e)}(o)||(0===this._cmp(o,c[h][1])||0===this._cmp(o,c[h][0])||t((()=>{l===r?e.continue(c[h][0]):e.continue(c[h][1])})),!1)})),v}startsWithAnyOf(){const e=Ft.apply(Nt,arguments);return e.every((e=>"string"==typeof e))?0===e.length?zr(this):this.inAnyRange(e.map((e=>[e,e+br]))):Hr(this,"startsWithAnyOf() only works with strings")}}function Zr(e){return Qn((function(t){return eo(t),e(t.target.error),!1}))}function eo(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}const to=Cr(null,"storagemutated");class no{_lock(){return _t(!An.global),++this._reculock,1!==this._reculock||An.global||(An.lockOwnerFor=this),this}_unlock(){if(_t(!An.global),0==--this._reculock)for(An.global||(An.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{hr(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&An.lockOwnerFor!==this}create(e){if(!this.mode)return this;const t=this.db.idbdb,n=this.db._state.dbOpenError;if(_t(!this.idbtrans),!e&&!t)switch(n&&n.name){case"DatabaseClosedError":throw new nn.DatabaseClosed(n);case"MissingAPIError":throw new nn.MissingAPI(n.message,n);default:throw new nn.OpenFailed(n)}if(!this.active)throw new nn.TransactionInactive;return _t(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):t.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=Qn((t=>{eo(t),this._reject(e.error)})),e.onabort=Qn((t=>{eo(t),this.active&&this._reject(new nn.Abort(e.error)),this.active=!1,this.on("abort").fire(t)})),e.oncomplete=Qn((()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&to.storagemutated.fire(e.mutatedParts)})),this}_promise(e,t,n){if("readwrite"===e&&"readwrite"!==this.mode)return gr(new nn.ReadOnly("Transaction is readonly"));if(!this.active)return gr(new nn.TransactionInactive);if(this._locked())return new In(((r,o)=>{this._blockedFuncs.push([()=>{this._promise(e,t,n).then(r,o)},An])}));if(n)return or((()=>{var e=new In(((e,n)=>{this._lock();const r=t(e,n,this);r&&r.then&&r.then(e,n)}));return e.finally((()=>this._unlock())),e._lib=!0,e}));var r=new In(((e,n)=>{var r=t(e,n,this);r&&r.then&&r.then(e,n)}));return r._lib=!0,r}_root(){return this.parent?this.parent._root():this}waitFor(e){var t=this._root();const n=In.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((()=>n));else{t._waitingFor=n,t._waitingQueue=[];var r=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(r.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new In(((e,r)=>{n.then((n=>t._waitingQueue.push(Qn(e.bind(null,n)))),(e=>t._waitingQueue.push(Qn(r.bind(null,e))))).finally((()=>{t._waitingFor===o&&(t._waitingFor=null)}))}))}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new nn.Abort))}table(e){const t=this._memoizedTables||(this._memoizedTables={});if(ft(t,e))return t[e];const n=this.schema[e];if(!n)throw new nn.NotFound("Table "+e+" not part of transaction");const r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r}}function ro(e,t,n,r,o,i,a){return{name:e,keyPath:t,unique:n,multi:r,auto:o,compound:i,src:(n&&!a?"&":"")+(r?"*":"")+(o?"++":"")+oo(t)}}function oo(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function io(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:xt(n,(e=>[e.name,e]))}}let ao=e=>{try{return e.only([[]]),ao=()=>[[]],[[]]}catch(e){return ao=()=>br,br}};function so(e){return null==e?()=>{}:"string"==typeof e?function(e){return 1===e.split(".").length?t=>t[e]:t=>St(t,e)}(e):t=>St(t,e)}function uo(e){return[].slice.call(e)}let co=0;function lo(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function fo(e,t,n){function r(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");const{lower:n,upper:r,lowerOpen:o,upperOpen:i}=e;return void 0===n?void 0===r?null:t.upperBound(r,!!i):void 0===r?t.lowerBound(n,!!o):t.bound(n,r,!!o,!!i)}const{schema:o,hasGetAll:i}=function(e,t){const n=uo(e.objectStoreNames);return{schema:{name:e.name,tables:n.map((e=>t.objectStore(e))).map((e=>{const{keyPath:t,autoIncrement:n}=e,r=st(t),o=null==t,i={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:t,autoIncrement:n,unique:!0,extractKey:so(t)},indexes:uo(e.indexNames).map((t=>e.index(t))).map((e=>{const{name:t,unique:n,multiEntry:r,keyPath:o}=e,a={name:t,compound:st(o),keyPath:o,unique:n,multiEntry:r,extractKey:so(o)};return i[lo(o)]=a,a})),getIndexByKeyPath:e=>i[lo(e)]};return i[":id"]=a.primaryKey,null!=t&&(i[lo(t)]=a.primaryKey),a}))},hasGetAll:n.length>0&&"getAll"in t.objectStore(n[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,n),a=o.tables.map((e=>function(e){const t=e.name;return{name:t,schema:e,mutate:function({trans:e,type:n,keys:o,values:i,range:a}){return new Promise(((s,u)=>{s=Qn(s);const c=e.objectStore(t),l=null==c.keyPath,f="put"===n||"add"===n;if(!f&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);const{length:h}=o||i||{length:1};if(o&&i&&o.length!==i.length)throw new Error("Given keys array must have same length as given values array.");if(0===h)return s({numFailures:0,failures:{},results:[],lastResult:void 0});let p;const d=[],y=[];let v=0;const g=e=>{++v,eo(e)};if("deleteRange"===n){if(4===a.type)return s({numFailures:v,failures:y,results:[],lastResult:void 0});3===a.type?d.push(p=c.clear()):d.push(p=c.delete(r(a)))}else{const[e,t]=f?l?[i,o]:[i,null]:[o,null];if(f)for(let r=0;r<h;++r)d.push(p=t&&void 0!==t[r]?c[n](e[r],t[r]):c[n](e[r])),p.onerror=g;else for(let t=0;t<h;++t)d.push(p=c[n](e[t])),p.onerror=g}const m=e=>{const t=e.target.result;d.forEach(((e,t)=>null!=e.error&&(y[t]=e.error))),s({numFailures:v,failures:y,results:"delete"===n?o:d.map((e=>e.result)),lastResult:t})};p.onerror=e=>{g(e),m(e)},p.onsuccess=m}))},getMany:({trans:e,keys:n})=>new Promise(((r,o)=>{r=Qn(r);const i=e.objectStore(t),a=n.length,s=new Array(a);let u,c=0,l=0;const f=e=>{const t=e.target;s[t._pos]=t.result,++l===c&&r(s)},h=Zr(o);for(let e=0;e<a;++e)null!=n[e]&&(u=i.get(n[e]),u._pos=e,u.onsuccess=f,u.onerror=h,++c);0===c&&r(s)})),get:({trans:e,key:n})=>new Promise(((r,o)=>{r=Qn(r);const i=e.objectStore(t).get(n);i.onsuccess=e=>r(e.target.result),i.onerror=Zr(o)})),query:function(e){return n=>new Promise(((o,i)=>{o=Qn(o);const{trans:a,values:s,limit:u,query:c}=n,l=u===1/0?void 0:u,{index:f,range:h}=c,p=a.objectStore(t),d=f.isPrimaryKey?p:p.index(f.name),y=r(h);if(0===u)return o({result:[]});if(e){const e=s?d.getAll(y,l):d.getAllKeys(y,l);e.onsuccess=e=>o({result:e.target.result}),e.onerror=Zr(i)}else{let e=0;const t=s||!("openKeyCursor"in d)?d.openCursor(y):d.openKeyCursor(y),n=[];t.onsuccess=r=>{const i=t.result;return i?(n.push(s?i.value:i.primaryKey),++e===u?o({result:n}):void i.continue()):o({result:n})},t.onerror=Zr(i)}}))}(i),openCursor:function({trans:e,values:n,query:o,reverse:i,unique:a}){return new Promise(((s,u)=>{s=Qn(s);const{index:c,range:l}=o,f=e.objectStore(t),h=c.isPrimaryKey?f:f.index(c.name),p=i?a?"prevunique":"prev":a?"nextunique":"next",d=n||!("openKeyCursor"in h)?h.openCursor(r(l),p):h.openKeyCursor(r(l),p);d.onerror=Zr(u),d.onsuccess=Qn((t=>{const n=d.result;if(!n)return void s(null);n.___id=++co,n.done=!1;const r=n.continue.bind(n);let o=n.continuePrimaryKey;o&&(o=o.bind(n));const i=n.advance.bind(n),a=()=>{throw new Error("Cursor not stopped")};n.trans=e,n.stop=n.continue=n.continuePrimaryKey=n.advance=()=>{throw new Error("Cursor not started")},n.fail=Qn(u),n.next=function(){let e=1;return this.start((()=>e--?this.continue():this.stop())).then((()=>this))},n.start=e=>{const t=new Promise(((e,t)=>{e=Qn(e),d.onerror=Zr(t),n.fail=t,n.stop=t=>{n.stop=n.continue=n.continuePrimaryKey=n.advance=a,e(t)}})),s=()=>{if(d.result)try{e()}catch(e){n.fail(e)}else n.done=!0,n.start=()=>{throw new Error("Cursor behind last entry")},n.stop()};return d.onsuccess=Qn((e=>{d.onsuccess=s,s()})),n.continue=r,n.continuePrimaryKey=o,n.advance=i,s(),t},s(n)}),u)}))},count({query:e,trans:n}){const{index:o,range:i}=e;return new Promise(((e,a)=>{const s=n.objectStore(t),u=o.isPrimaryKey?s:s.index(o.name),c=r(i),l=c?u.count(c):u.count();l.onsuccess=Qn((t=>e(t.target.result))),l.onerror=Zr(a)}))}}}(e))),s={};return a.forEach((e=>s[e.name]=e)),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!s[e])throw new Error(`Table '${e}' not found`);return s[e]},MIN_KEY:-1/0,MAX_KEY:ao(t),schema:o}}function ho({_novip:e},t){const n=t.db,r=function(e,t,{IDBKeyRange:n,indexedDB:r},o){const i=function(e,t){return t.reduce(((e,{create:t})=>({...e,...t(e)})),e)}(fo(t,n,o),e.dbcore);return{dbcore:i}}(e._middlewares,n,e._deps,t);e.core=r.dbcore,e.tables.forEach((t=>{const n=t.name;e.core.schema.tables.some((e=>e.name===n))&&(t.core=e.core.table(n),e[n]instanceof e.Table&&(e[n].core=t.core))}))}function po({_novip:e},t,n,r){n.forEach((n=>{const o=r[n];t.forEach((t=>{const r=gt(t,n);(!r||"value"in r&&void 0===r.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?dt(t,n,{get(){return this.table(n)},set(e){pt(this,n,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[n]=new e.Table(n,o))}))}))}function yo({_novip:e},t){t.forEach((t=>{for(let n in t)t[n]instanceof e.Table&&delete t[n]}))}function vo(e,t){return e._cfg.version-t._cfg.version}function go(e,t,n,r){const o=e._dbSchema,i=e._createTransaction("readwrite",e._storeNames,o);i.create(n),i._completion.catch(r);const a=i._reject.bind(i),s=An.transless||An;or((()=>{An.trans=i,An.transless=s,0===t?(at(o).forEach((e=>{bo(n,e,o[e].primKey,o[e].indexes)})),ho(e,n),In.follow((()=>e.on.populate.fire(i))).catch(a)):function({_novip:e},t,n,r){const o=[],i=e._versions;let a=e._dbSchema=_o(0,e.idbdb,r),s=!1;return i.filter((e=>e._cfg.version>=t)).forEach((i=>{o.push((()=>{const o=a,u=i._cfg.dbschema;ko(e,o,r),ko(e,u,r),a=e._dbSchema=u;const c=mo(o,u);c.add.forEach((e=>{bo(r,e[0],e[1].primKey,e[1].indexes)})),c.change.forEach((e=>{if(e.recreate)throw new nn.Upgrade("Not yet support for changing primary key");{const t=r.objectStore(e.name);e.add.forEach((e=>wo(t,e))),e.change.forEach((e=>{t.deleteIndex(e.name),wo(t,e)})),e.del.forEach((e=>t.deleteIndex(e)))}}));const l=i._cfg.contentUpgrade;if(l&&i._cfg.version>t){ho(e,r),n._memoizedTables={},s=!0;let t=Pt(u);c.del.forEach((e=>{t[e]=o[e]})),yo(e,[e.Transaction.prototype]),po(e,[e.Transaction.prototype],at(t),t),n.schema=t;const i=$t(l);let a;i&&ir();const f=In.follow((()=>{if(a=l(n),a&&i){var e=ar.bind(null,null);a.then(e,e)}}));return a&&"function"==typeof a.then?In.resolve(a):f.then((()=>a))}})),o.push((t=>{s&&xr||function(e,t){[].slice.call(t.db.objectStoreNames).forEach((n=>null==e[n]&&t.db.deleteObjectStore(n)))}(i._cfg.dbschema,t),yo(e,[e.Transaction.prototype]),po(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),n.schema=e._dbSchema}))})),function e(){return o.length?In.resolve(o.shift()(n.idbtrans)).then(e):In.resolve()}().then((()=>{var e,t;t=r,at(e=a).forEach((n=>{t.db.objectStoreNames.contains(n)||bo(t,n,e[n].primKey,e[n].indexes)}))}))}(e,t,i,n).catch(a)}))}function mo(e,t){const n={del:[],add:[],change:[]};let r;for(r in e)t[r]||n.del.push(r);for(r in t){const o=e[r],i=t[r];if(o){const e={name:r,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!kr)e.recreate=!0,n.change.push(e);else{const t=o.idxByName,r=i.idxByName;let a;for(a in t)r[a]||e.del.push(a);for(a in r){const n=t[a],o=r[a];n?n.src!==o.src&&e.change.push(o):e.add.push(o)}(e.del.length>0||e.add.length>0||e.change.length>0)&&n.change.push(e)}}else n.add.push([r,i])}return n}function bo(e,t,n,r){const o=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((e=>wo(o,e))),o}function wo(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function _o(e,t,n){const r={};return bt(t.objectStoreNames,0).forEach((e=>{const t=n.objectStore(e);let o=t.keyPath;const i=ro(oo(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[];for(let e=0;e<t.indexNames.length;++e){const n=t.index(t.indexNames[e]);o=n.keyPath;var s=ro(n.name,o,!!n.unique,!!n.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}r[e]=io(e,i,a)})),r}function ko({_novip:e},t,n){const r=n.db.objectStoreNames;for(let o=0;o<r.length;++o){const i=r[o],a=n.objectStore(i);e._hasGetAll="getAll"in a;for(let e=0;e<a.indexNames.length;++e){const n=a.indexNames[e],r=a.index(n).keyPath,o="string"==typeof r?r:"["+bt(r).join("+")+"]";if(t[i]){const e=t[i].idxByName[o];e&&(e.name=n,delete t[i].idxByName[o],t[i].idxByName[n]=e)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&it.WorkerGlobalScope&&it instanceof it.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class xo{_parseStoresSpec(e,t){at(e).forEach((n=>{if(null!==e[n]){var r=e[n].split(",").map(((e,t)=>{const n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return ro(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),st(r),0===t)})),o=r.shift();if(o.multi)throw new nn.Schema("Primary key cannot be multi-valued");r.forEach((e=>{if(e.auto)throw new nn.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new nn.Schema("Index must have a name and cannot be an empty string")})),t[n]=io(n,o,r)}}))}stores(e){const t=this.db;this._cfg.storesSource=this._cfg.storesSource?ut(this._cfg.storesSource,e):e;const n=t._versions,r={};let o={};return n.forEach((e=>{ut(r,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(r,o)})),t._dbSchema=o,yo(t,[t._allTables,t,t.Transaction.prototype]),po(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],at(o),o),t._storeNames=at(o),this}upgrade(e){return this._cfg.contentUpgrade=dn(this._cfg.contentUpgrade||an,e),this}}function So(e,t){let n=e._dbNamesDB;return n||(n=e._dbNamesDB=new Vo("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t}),n.version(1).stores({dbnames:"name"})),n.table("dbnames")}function Oo(e){return e&&"function"==typeof e.databases}function Po(e){return or((function(){return An.letThrough=!0,e()}))}function Eo(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(t){var n=function(){return indexedDB.databases().finally(t)};e=setInterval(n,100),n()})).finally((function(){return clearInterval(e)})):Promise.resolve()}function jo(e){var t=t=>e.next(t),n=o(t),r=o((t=>e.throw(t)));function o(e){return t=>{var o=e(t),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):st(i)?Promise.all(i).then(n,r):n(i)}}return o(t)()}function Ro(e,t,n){var r=arguments.length;if(r<2)throw new nn.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];n=o.pop();var i=jt(o);return[e,i,n]}function Co(e,t,n,r,o){return In.resolve().then((()=>{const i=An.transless||An,a=e._createTransaction(t,n,e._dbSchema,r),s={trans:a,transless:i};if(r)a.idbtrans=r.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(r){return r.name===en.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>Co(e,t,n,null,o)))):gr(r)}const u=$t(o);let c;u&&ir();const l=In.follow((()=>{if(c=o.call(a,a),c)if(u){var e=ar.bind(null,null);c.then(e,e)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=jo(c))}),s);return(c&&"function"==typeof c.then?In.resolve(c).then((e=>a.active?e:gr(new nn.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn")))):l.then((()=>c))).then((e=>(r&&a._resolve(),a._completion.then((()=>e))))).catch((e=>(a._reject(e),gr(e))))}))}function To(e,t,n){const r=st(e)?e.slice():[e];for(let e=0;e<n;++e)r.push(t);return r}const Ao={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){const n=e.table(t),{schema:r}=n,o={},i=[];function a(e,t,n){const r=lo(e),s=o[r]=o[r]||[],u=null==e?0:"string"==typeof e?1:e.length,c=t>0,l={...n,isVirtual:c,keyTail:t,keyLength:u,extractKey:so(e),unique:!c&&n.unique};return s.push(l),l.isPrimaryKey||i.push(l),u>1&&a(2===u?e[0]:e.slice(0,u-1),t+1,n),s.sort(((e,t)=>e.keyTail-t.keyTail)),l}const s=a(r.primaryKey.keyPath,0,r.primaryKey);o[":id"]=[s];for(const e of r.indexes)a(e.keyPath,0,e);function u(t){const n=t.query.index;return n.isVirtual?{...t,query:{index:n,range:(r=t.query.range,o=n.keyTail,{type:1===r.type?2:r.type,lower:To(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,o),lowerOpen:!0,upper:To(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,o),upperOpen:!0})}}:t;var r,o}const c={...n,schema:{...r,primaryKey:s,indexes:i,getIndexByKeyPath:function(e){const t=o[lo(e)];return t&&t[0]}},count:e=>n.count(u(e)),query:e=>n.query(u(e)),openCursor(t){const{keyTail:r,isVirtual:o,keyLength:i}=t.query.index;return o?n.openCursor(u(t)).then((n=>n&&function(n){const o=Object.create(n,{continue:{value:function(o){null!=o?n.continue(To(o,t.reverse?e.MAX_KEY:e.MIN_KEY,r)):t.unique?n.continue(n.key.slice(0,i).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,r)):n.continue()}},continuePrimaryKey:{value(t,o){n.continuePrimaryKey(To(t,e.MAX_KEY,r),o)}},primaryKey:{get:()=>n.primaryKey},key:{get(){const e=n.key;return 1===i?e[0]:e.slice(0,i)}},value:{get:()=>n.value}});return o}(n))):n.openCursor(t)}};return c}}}};function Do(e,t,n,r){return n=n||{},r=r||"",at(e).forEach((o=>{if(ft(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){const e=Kt(i);e!==Kt(a)?n[r+o]=t[o]:"Object"===e?Do(i,a,n,r+o+"."):i!==a&&(n[r+o]=t[o])}else i!==a&&(n[r+o]=t[o])}else n[r+o]=void 0})),at(t).forEach((o=>{ft(e,o)||(n[r+o]=t[o])})),n}const Lo={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){const n=e.table(t),{primaryKey:r}=n.schema,o={...n,mutate(e){const o=An.trans,{deleting:i,creating:a,updating:s}=o.table(t).hook;switch(e.type){case"add":if(a.fire===an)break;return o._promise("readwrite",(()=>u(e)),!0);case"put":if(a.fire===an&&s.fire===an)break;return o._promise("readwrite",(()=>u(e)),!0);case"delete":if(i.fire===an)break;return o._promise("readwrite",(()=>u(e)),!0);case"deleteRange":if(i.fire===an)break;return o._promise("readwrite",(()=>function(e){return c(e.trans,e.range,1e4)}(e)),!0)}return n.mutate(e);function u(e){const t=An.trans,o=e.keys||function(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}(r,e);if(!o)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:o}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),function(e,t,n){return"add"===t.type?Promise.resolve([]):e.getMany({trans:t.trans,keys:n,cache:"immutable"})}(n,e,o).then((u=>{const c=o.map(((n,o)=>{const c=u[o],l={onerror:null,onsuccess:null};if("delete"===e.type)i.fire.call(l,n,c,t);else if("add"===e.type||void 0===c){const i=a.fire.call(l,n,e.values[o],t);null==n&&null!=i&&(n=i,e.keys[o]=n,r.outbound||Ot(e.values[o],r.keyPath,n))}else{const r=Do(c,e.values[o]),i=s.fire.call(l,r,n,c,t);if(i){const t=e.values[o];Object.keys(i).forEach((e=>{ft(t,e)?t[e]=i[e]:Ot(t,e,i[e])}))}}return l}));return n.mutate(e).then((({failures:t,results:n,numFailures:r,lastResult:i})=>{for(let r=0;r<o.length;++r){const i=n?n[r]:o[r],a=c[r];null==i?a.onerror&&a.onerror(t[r]):a.onsuccess&&a.onsuccess("put"===e.type&&u[r]?e.values[r]:i)}return{failures:t,results:n,numFailures:r,lastResult:i}})).catch((e=>(c.forEach((t=>t.onerror&&t.onerror(e))),Promise.reject(e))))}))}function c(e,t,o){return n.query({trans:e,values:!1,query:{index:r,range:t},limit:o}).then((({result:n})=>u({type:"delete",keys:n,trans:e}).then((r=>r.numFailures>0?Promise.reject(r.failures[0]):n.length<o?{failures:[],numFailures:0,lastResult:void 0}:c(e,{...t,lower:n[n.length-1],lowerOpen:!0},o)))))}}};return o}})};function Ko(e,t,n){try{if(!t)return null;if(t.keys.length<e.length)return null;const r=[];for(let o=0,i=0;o<t.keys.length&&i<e.length;++o)0===Fr(t.keys[o],e[i])&&(r.push(n?At(t.values[o]):t.values[o]),++i);return r.length===e.length?r:null}catch(e){return null}}const Io={stack:"dbcore",level:-1,create:e=>({table:t=>{const n=e.table(t);return{...n,getMany:e=>{if(!e.cache)return n.getMany(e);const t=Ko(e.keys,e.trans._cache,"clone"===e.cache);return t?In.resolve(t):n.getMany(e).then((t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?At(t):t},t)))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),n.mutate(e))}}})};function Mo(e){return!("from"in e)}const No=function(e,t){if(!this){const t=new No;return e&&"d"in e&&ut(t,e),t}ut(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function Fo(e,t,n){const r=Fr(t,n);if(isNaN(r))return;if(r>0)throw RangeError();if(Mo(e))return ut(e,{from:t,to:n,d:1});const o=e.l,i=e.r;if(Fr(n,e.from)<0)return o?Fo(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},qo(e);if(Fr(t,e.to)>0)return i?Fo(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},qo(e);Fr(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),Fr(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);const a=!e.r;o&&!e.l&&$o(e,o),i&&a&&$o(e,i)}function $o(e,t){Mo(t)||function e(t,{from:n,to:r,l:o,r:i}){Fo(t,n,r),o&&e(t,o),i&&e(t,i)}(e,t)}function Bo(e){let t=Mo(e)?null:{s:0,n:e};return{next(e){const n=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&Fr(e,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!n||Fr(e,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function qo(e){var t,n;const r=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(n=e.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){const t="r"===o?"l":"r",n={...e},r=e[o];e.from=r.from,e.to=r.to,e[o]=r[o],n[o]=r[t],e[t]=n,n.d=Uo(n)}e.d=Uo(e)}function Uo({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}ht(No.prototype,{add(e){return $o(this,e),this},addKey(e){return Fo(this,e,e),this},addKeys(e){return e.forEach((e=>Fo(this,e,e))),this},[It](){return Bo(this)}});const Wo={stack:"dbcore",level:0,create:e=>{const t=e.schema.name,n=new No(e.MIN_KEY,e.MAX_KEY);return{...e,table:r=>{const o=e.table(r),{schema:i}=o,{primaryKey:a}=i,{extractKey:s,outbound:u}=a,c={...o,mutate:e=>{const a=e.trans,s=a.mutatedParts||(a.mutatedParts={}),u=e=>{const n=`idb://${t}/${r}/${e}`;return s[n]||(s[n]=new No)},c=u(""),l=u(":dels"),{type:f}=e;let[h,p]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[];const d=e.trans._cache;return o.mutate(e).then((e=>{if(st(h)){"delete"!==f&&(h=e.results),c.addKeys(h);const t=Ko(h,d);t||"add"===f||l.addKeys(h),(t||p)&&function(e,t,n,r){t.indexes.forEach((function(t){const o=e(t.name||"");function i(e){return null!=e?t.extractKey(e):null}const a=e=>t.multiEntry&&st(e)?e.forEach((e=>o.addKey(e))):o.addKey(e);(n||r).forEach(((e,t)=>{const o=n&&i(n[t]),s=r&&i(r[t]);0!==Fr(o,s)&&(null!=o&&a(o),null!=s&&a(s))}))}))}(u,i,t,p)}else if(h){const e={from:h.lower,to:h.upper};l.add(e),c.add(e)}else c.add(n),l.add(n),i.indexes.forEach((e=>u(e.name).add(n)));return e}))}},l=({query:{index:t,range:n}})=>{var r,o;return[t,new No(null!==(r=n.lower)&&void 0!==r?r:e.MIN_KEY,null!==(o=n.upper)&&void 0!==o?o:e.MAX_KEY)]},f={get:e=>[a,new No(e.key)],getMany:e=>[a,(new No).addKeys(e.keys)],count:l,query:l,openCursor:l};return at(f).forEach((e=>{c[e]=function(i){const{subscr:a}=An;if(a){const c=e=>{const n=`idb://${t}/${r}/${e}`;return a[n]||(a[n]=new No)},l=c(""),h=c(":dels"),[p,d]=f[e](i);if(c(p.name||"").add(d),!p.isPrimaryKey){if("count"!==e){const t="query"===e&&u&&i.values&&o.query({...i,values:!1});return o[e].apply(this,arguments).then((n=>{if("query"===e){if(u&&i.values)return t.then((({result:e})=>(l.addKeys(e),n)));const e=i.values?n.result.map(s):n.result;i.values?l.addKeys(e):h.addKeys(e)}else if("openCursor"===e){const e=n,t=i.values;return e&&Object.create(e,{key:{get:()=>(h.addKey(e.primaryKey),e.key)},primaryKey:{get(){const t=e.primaryKey;return h.addKey(t),t}},value:{get:()=>(t&&l.addKey(e.primaryKey),e.value)}})}return n}))}h.add(n)}}return o[e].apply(this,arguments)}})),c}}}};class Vo{constructor(e,t){this._middlewares={},this.verno=0;const n=Vo.dependencies;this._options=t={addons:Vo.addons,autoOpen:!0,indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange,...t},this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange};const{addons:r}=t;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const o={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:an,dbReadyPromise:null,cancelOpen:an,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var i;o.dbReadyPromise=new In((e=>{o.dbReadyResolve=e})),o.openCanceller=new In(((e,t)=>{o.cancelOpen=t})),this._state=o,this.name=e,this.on=Cr(this,"populate","blocked","versionchange","close",{ready:[dn,an]}),this.on.ready.subscribe=wt(this.on.ready.subscribe,(e=>(t,n)=>{Vo.vip((()=>{const r=this._state;if(r.openComplete)r.dbOpenError||In.resolve().then(t),n&&e(t);else if(r.onReadyBeingFired)r.onReadyBeingFired.push(t),n&&e(t);else{e(t);const r=this;n||e((function e(){r.on.ready.unsubscribe(t),r.on.ready.unsubscribe(e)}))}}))})),this.Collection=(i=this,Tr(qr.prototype,(function(e,t){this.db=i;let n=Er,r=null;if(t)try{n=t()}catch(e){r=e}const o=e._ctx,a=o.table,s=a.hook.reading.fire;this._ctx={table:a,index:o.index,isPrimKey:!o.index||a.schema.primKey.keyPath&&o.index===a.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:r,or:o.or,valueMapper:s!==sn?s:null}}))),this.Table=function(e){return Tr(Rr.prototype,(function(t,n,r){this.db=e,this._tx=r,this.name=t,this.schema=n,this.hook=e._allTables[t]?e._allTables[t].hook:Cr(null,{creating:[ln,an],reading:[un,sn],updating:[hn,an],deleting:[fn,an]})}))}(this),this.Transaction=function(e){return Tr(no.prototype,(function(t,n,r,o,i){this.db=e,this.mode=t,this.storeNames=n,this.schema=r,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=Cr(this,"complete","error","abort"),this.parent=i||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new In(((e,t)=>{this._resolve=e,this._reject=t})),this._completion.then((()=>{this.active=!1,this.on.complete.fire()}),(e=>{var t=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):t&&this.idbtrans&&this.idbtrans.abort(),gr(e)}))}))}(this),this.Version=function(e){return Tr(xo.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(e){return Tr(Xr.prototype,(function(t,n,r){this.db=e,this._ctx={table:t,index:":id"===n?null:n,or:r};const o=e._deps.indexedDB;if(!o)throw new nn.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=(e,t)=>o.cmp(t,e),this._max=(e,t)=>o.cmp(e,t)>0?e:t,this._min=(e,t)=>o.cmp(e,t)<0?e:t,this._IDBKeyRange=e._deps.IDBKeyRange}))}(this),this.on("versionchange",(e=>{e.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()})),this.on("blocked",(e=>{!e.newVersion||e.newVersion<e.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${e.oldVersion/10}`)})),this._maxKey=ao(t.IDBKeyRange),this._createTransaction=(e,t,n,r)=>new this.Transaction(e,t,n,this._options.chromeTransactionDurability,r),this._fireOnBlocked=e=>{this.on("blocked").fire(e),_r.filter((e=>e.name===this.name&&e!==this&&!e._state.vcFired)).map((t=>t.on("versionchange").fire(e)))},this.use(Ao),this.use(Lo),this.use(Wo),this.use(Io),this.vip=Object.create(this,{_vip:{value:!0}}),r.forEach((e=>e(this)))}version(e){if(isNaN(e)||e<.1)throw new nn.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new nn.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);const t=this._versions;var n=t.filter((t=>t._cfg.version===e))[0];return n||(n=new this.Version(e),t.push(n),t.sort(vo),n.stores({}),this._state.autoSchema=!1,n)}_whenReady(e){return this.idbdb&&(this._state.openComplete||An.letThrough||this._vip)?e():new In(((e,t)=>{if(this._state.openComplete)return t(new nn.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new nn.DatabaseClosed);this.open().catch(an)}this._state.dbReadyPromise.then(e,t)})).then(e)}use({stack:e,create:t,level:n,name:r}){r&&this.unuse({stack:e,name:r});const o=this._middlewares[e]||(this._middlewares[e]=[]);return o.push({stack:e,create:t,level:null==n?10:n,name:r}),o.sort(((e,t)=>e.level-t.level)),this}unuse({stack:e,name:t,create:n}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter((e=>n?e.create!==n:!!t&&e.name!==t))),this}open(){return function(e){const t=e._state,{indexedDB:n}=e._deps;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then((()=>t.dbOpenError?gr(t.dbOpenError):e));Bt&&(t.openCanceller._stackHolder=Vt()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;const r=t.openCanceller;function o(){if(t.openCanceller!==r)throw new nn.DatabaseClosed("db.open() was cancelled")}let i=t.dbReadyResolve,a=null,s=!1;return In.race([r,("undefined"==typeof navigator?In.resolve():Eo()).then((()=>new In(((r,i)=>{if(o(),!n)throw new nn.MissingAPI;const u=e.name,c=t.autoSchema?n.open(u):n.open(u,Math.round(10*e.verno));if(!c)throw new nn.MissingAPI;c.onerror=Zr(i),c.onblocked=Qn(e._fireOnBlocked),c.onupgradeneeded=Qn((r=>{if(a=c.transaction,t.autoSchema&&!e._options.allowEmptyDB){c.onerror=eo,a.abort(),c.result.close();const e=n.deleteDatabase(u);e.onsuccess=e.onerror=Qn((()=>{i(new nn.NoSuchDatabase(`Database ${u} doesnt exist`))}))}else{a.onerror=Zr(i);var o=r.oldVersion>Math.pow(2,62)?0:r.oldVersion;s=o<1,e._novip.idbdb=c.result,go(e,o/10,a,i)}}),i),c.onsuccess=Qn((()=>{a=null;const n=e._novip.idbdb=c.result,o=bt(n.objectStoreNames);if(o.length>0)try{const r=n.transaction(1===(i=o).length?i[0]:i,"readonly");t.autoSchema?function({_novip:e},t,n){e.verno=t.version/10;const r=e._dbSchema=_o(0,t,n);e._storeNames=bt(t.objectStoreNames,0),po(e,[e._allTables],at(r),r)}(e,n,r):(ko(e,e._dbSchema,r),function(e,t){const n=mo(_o(0,e.idbdb,t),e._dbSchema);return!(n.add.length||n.change.some((e=>e.add.length||e.change.length)))}(e,r)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),ho(e,r)}catch(e){}var i;_r.push(e),n.onversionchange=Qn((n=>{t.vcFired=!0,e.on("versionchange").fire(n)})),n.onclose=Qn((t=>{e.on("close").fire(t)})),s&&function({indexedDB:e,IDBKeyRange:t},n){!Oo(e)&&"__dbnames"!==n&&So(e,t).put({name:n}).catch(an)}(e._deps,u),r()}),i)}))))]).then((()=>(o(),t.onReadyBeingFired=[],In.resolve(Po((()=>e.on.ready.fire(e.vip)))).then((function n(){if(t.onReadyBeingFired.length>0){let r=t.onReadyBeingFired.reduce(dn,an);return t.onReadyBeingFired=[],In.resolve(Po((()=>r(e.vip)))).then(n)}}))))).finally((()=>{t.onReadyBeingFired=null,t.isBeingOpened=!1})).then((()=>e)).catch((n=>{t.dbOpenError=n;try{a&&a.abort()}catch(e){}return r===t.openCanceller&&e._close(),gr(n)})).finally((()=>{t.openComplete=!0,i()}))}(this)}_close(){const e=this._state,t=_r.indexOf(this);if(t>=0&&_r.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new In((t=>{e.dbReadyResolve=t})),e.openCanceller=new In(((t,n)=>{e.cancelOpen=n}))}close(){this._close();const e=this._state;this._options.autoOpen=!1,e.dbOpenError=new nn.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){const e=arguments.length>0,t=this._state;return new In(((n,r)=>{const o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=Qn((()=>{!function({indexedDB:e,IDBKeyRange:t},n){!Oo(e)&&"__dbnames"!==n&&So(e,t).delete(n).catch(an)}(this._deps,this.name),n()})),e.onerror=Zr(r),e.onblocked=this._fireOnBlocked};if(e)throw new nn.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(o):o()}))}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){const e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return at(this._allTables).map((e=>this._allTables[e]))}transaction(){const e=Ro.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,n){let r=An.trans;r&&r.db===this&&-1===e.indexOf("!")||(r=null);const o=-1!==e.indexOf("?");let i,a;e=e.replace("!","").replace("?","");try{if(a=t.map((e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||"readonly"===e)i="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new nn.InvalidArgument("Invalid transaction mode: "+e);i="readwrite"}if(r){if("readonly"===r.mode&&"readwrite"===i){if(!o)throw new nn.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");r=null}r&&a.forEach((e=>{if(r&&-1===r.storeNames.indexOf(e)){if(!o)throw new nn.SubTransaction("Table "+e+" not included in parent transaction.");r=null}})),o&&r&&!r.active&&(r=null)}}catch(e){return r?r._promise(null,((t,n)=>{n(e)})):gr(e)}const s=Co.bind(null,this,i,a,r,n);return r?r._promise(i,s,"lock"):An.trans?hr(An.transless,(()=>this._whenReady(s))):this._whenReady(s)}table(e){if(!ft(this._allTables,e))throw new nn.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}const Ho="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class zo{constructor(e){this._subscribe=e}subscribe(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}[Ho](){return this}}function Yo(e,t){return at(t).forEach((n=>{$o(e[n]||(e[n]=new No),t[n])})),e}let Go;try{Go={indexedDB:it.indexedDB||it.mozIndexedDB||it.webkitIndexedDB||it.msIndexedDB,IDBKeyRange:it.IDBKeyRange||it.webkitIDBKeyRange}}catch(it){Go={indexedDB:null,IDBKeyRange:null}}const Jo=Vo;function Qo(e){let t=Xo;try{Xo=!0,to.storagemutated.fire(e)}finally{Xo=t}}ht(Jo,{...on,delete:e=>new Jo(e,{addons:[]}).delete(),exists:e=>new Jo(e,{addons:[]}).open().then((e=>(e.close(),!0))).catch("NoSuchDatabaseError",(()=>!1)),getDatabaseNames(e){try{return function({indexedDB:e,IDBKeyRange:t}){return Oo(e)?Promise.resolve(e.databases()).then((e=>e.map((e=>e.name)).filter((e=>"__dbnames"!==e)))):So(e,t).toCollection().primaryKeys()}(Jo.dependencies).then(e)}catch(e){return gr(new nn.MissingAPI)}},defineClass:()=>function(e){ut(this,e)},ignoreTransaction:e=>An.trans?hr(An.transless,e):e(),vip:Po,async:function(e){return function(){try{var t=jo(e.apply(this,arguments));return t&&"function"==typeof t.then?t:In.resolve(t)}catch(e){return gr(e)}}},spawn:function(e,t,n){try{var r=jo(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:In.resolve(r)}catch(e){return gr(e)}},currentTransaction:{get:()=>An.trans||null},waitFor:function(e,t){const n=In.resolve("function"==typeof e?Jo.ignoreTransaction(e):e).timeout(t||6e4);return An.trans?An.trans.waitFor(n):n},Promise:In,debug:{get:()=>Bt,set:e=>{qt(e,"dexie"===e?()=>!0:Or)}},derive:yt,extend:ut,props:ht,override:wt,Events:Cr,on:to,liveQuery:function(e){return new zo((t=>{const n=$t(e);let r=!1,o={},i={};const a={get closed(){return r},unsubscribe:()=>{r=!0,to.storagemutated.unsubscribe(l)}};t.start&&t.start(a);let s=!1,u=!1;function c(){return at(i).some((e=>o[e]&&function(e,t){const n=Bo(t);let r=n.next();if(r.done)return!1;let o=r.value;const i=Bo(e);let a=i.next(o.from),s=a.value;for(;!r.done&&!a.done;){if(Fr(s.from,o.to)<=0&&Fr(s.to,o.from)>=0)return!0;Fr(o.from,s.from)<0?o=(r=n.next(s.from)).value:s=(a=i.next(o.from)).value}return!1}(o[e],i[e])))}const l=e=>{Yo(o,e),c()&&f()},f=()=>{if(s||r)return;o={};const h={},p=function(t){n&&ir();const r=()=>or(e,{subscr:t,trans:null}),o=An.trans?hr(An.transless,r):r();return n&&o.then(ar,ar),o}(h);u||(to("storagemutated",l),u=!0),s=!0,Promise.resolve(p).then((e=>{s=!1,r||(c()?f():(o={},i=h,t.next&&t.next(e)))}),(e=>{s=!1,t.error&&t.error(e),a.unsubscribe()}))};return f(),a}))},extendObservabilitySet:Yo,getByKeyPath:St,setByKeyPath:Ot,delByKeyPath:function(e,t){"string"==typeof t?Ot(e,t,void 0):"length"in t&&[].map.call(t,(function(t){Ot(e,t,void 0)}))},shallowClone:Pt,deepClone:At,getObjectDiff:Do,cmp:Fr,asap:kt,minKey:-1/0,addons:[],connections:_r,errnames:en,dependencies:Go,semVer:"3.2.3",version:"3.2.3".split(".").map((e=>parseInt(e))).reduce(((e,t,n)=>e+t/Math.pow(10,2*n)))}),Jo.maxKey=ao(Jo.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(to("storagemutated",(e=>{if(!Xo){let t;kr?(t=document.createEvent("CustomEvent"),t.initCustomEvent("x-storagemutated-1",!0,!0,e)):t=new CustomEvent("x-storagemutated-1",{detail:e}),Xo=!0,dispatchEvent(t),Xo=!1}})),addEventListener("x-storagemutated-1",(({detail:e})=>{Xo||Qo(e)})));let Xo=!1;if("undefined"!=typeof BroadcastChannel){const e=new BroadcastChannel("x-storagemutated-1");"function"==typeof e.unref&&e.unref(),to("storagemutated",(t=>{Xo||e.postMessage(t)})),e.onmessage=e=>{e.data&&Qo(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){to("storagemutated",(e=>{try{Xo||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach((t=>t.postMessage({type:"x-storagemutated-1",changedParts:e}))))}catch(e){}})),"undefined"!=typeof addEventListener&&addEventListener("storage",(e=>{if("x-storagemutated-1"===e.key){const t=JSON.parse(e.newValue);t&&Qo(t.changedParts)}}));const e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",(function({data:e}){e&&"x-storagemutated-1"===e.type&&Qo(e.changedParts)}))}function Zo(e){return Zo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Zo(e)}function ei(e,t){return!t||"object"!==ni(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ti(e,t){return ti=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ti(e,t)}In.rejectionMapper=function(e,t){if(!e||e instanceof Jt||e instanceof TypeError||e instanceof SyntaxError||!e.name||!rn[e.name])return e;var n=new rn[e.name](t||e.message,e);return"stack"in e&&dt(n,"stack",{get:function(){return this.inner.stack}}),n},qt(Bt,Or);var ni=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};var ri=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ti(e,t)}(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Zo(t);if(n){var o=Zo(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return ei(this,e)});function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=r.call(this,"ServiceWorker")).version(1).stores({dynamicRouteRegistrations:"++,&pattern"}),e.dynamicRouteRegistrations=e.table("dynamicRouteRegistrations"),e}return o}(Vo);function oi(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function ii(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){oi(i,r,o,a,s,"next",e)}function s(e){oi(i,r,o,a,s,"throw",e)}a(void 0)}))}}var ai=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};function si(e){return ui.apply(this,arguments)}function ui(){return(ui=ii((function(e){var t;return ai(this,(function(n){switch(n.label){case 0:return[4,et(e)];case 1:return[4,fi(t=n.sent())];case 2:return n.sent(),[4,ci(t)];case 3:return n.sent(),[2]}}))}))).apply(this,arguments)}function ci(e){return li.apply(this,arguments)}function li(){return li=ii((function(e){var t,n,r,o;return ai(this,(function(i){switch(i.label){case 0:return 0===e.length?[2]:[4,caches.open(Ie)];case 1:return t=i.sent(),[4,Promise.all(e.map((a=ii((function(e){return ai(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,z((function(){return t.add(e)}),{onError:function(t,n){return console.debug("[SW] Failure attempt ".concat(n,' at caching "').concat(e,'". Error: '),t)}})];case 1:return n.sent(),[2,{url:e,success:!0}];case 2:return n.sent(),[2,{url:e,success:!1}];case 3:return[2]}}))})),function(e){return a.apply(this,arguments)})))];case 2:return n=i.sent(),r=n.filter((function(e){return e.success})),o=n.filter((function(e){return!e.success})),r.length>0&&console.debug("[SW] Successfully added ".concat(r.length," URLs to the OMRS cache. URLs: "),r.map((function(e){return e.url}))),o.length>0&&console.error("[SW] Failed to cache ".concat(o.length," URLs. URLs: "),o.map((function(e){return e.url}))),[2]}var a}))})),li.apply(this,arguments)}function fi(e){return hi.apply(this,arguments)}function hi(){return hi=ii((function(e){var t,n,r,o;return ai(this,(function(i){switch(i.label){case 0:return[4,caches.open(Ie)];case 1:return[4,(t=i.sent()).keys()];case 2:return n=i.sent().map((function(e){return e.url})),[4,(new ri).dynamicRouteRegistrations.toArray()];case 3:return r=i.sent(),o=n.filter((function(t){return!Fe.includes(t)&&!e.includes(t)&&!r.some((function(e){return new RegExp(e.pattern).test(t)}))})),console.info("[SW] Removing the following expired URLs from the cache: ",o),console.debug("[SW] The following URLs were known and not invalidated: ",Fe,e,r),[4,Promise.all(o.map((function(e){return t.delete(e)})))];case 4:return i.sent(),[2]}}))})),hi.apply(this,arguments)}function pi(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function di(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){pi(i,r,o,a,s,"next",e)}function s(e){pi(i,r,o,a,s,"throw",e)}a(void 0)}))}}var yi=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},vi={onImportMapChanged:function(e){return gi.apply(this,arguments)},clearDynamicRoutes:function(){return mi.apply(this,arguments)},registerDynamicRoute:function(e){return bi.apply(this,arguments)}};function gi(){return(gi=di((function(e){return yi(this,(function(t){switch(t.label){case 0:return[4,si(e.importMap)];case 1:return t.sent(),[2]}}))}))).apply(this,arguments)}function mi(){return(mi=di((function(){return yi(this,(function(e){switch(e.label){case 0:return[4,(new ri).dynamicRouteRegistrations.clear()];case 1:return e.sent(),[2]}}))}))).apply(this,arguments)}function bi(){return(bi=di((function(e){var t,n,r,o,i;return yi(this,(function(a){switch(a.label){case 0:return t=e.pattern,n=e.url,r=e.strategy,!(o=t)&&n&&(o="^".concat(U(n),"$")),o?(i={pattern:o,strategy:r},[4,(new ri).dynamicRouteRegistrations.put(i)]):[3,2];case 1:a.sent(),a.label=2;case 2:return[2]}}))}))).apply(this,arguments)}function wi(){return wi=di((function(e){var t,n,r,o,i,a,s,u;function c(e){console.warn("[SW] Handling a message resulted in an error.",e),l({success:!1,error:e})}function l(t){e.ports[0].postMessage(null!=t?t:{})}return yi(this,(function(f){switch(f.label){case 0:if(!(o=vi[null!==(r=null===(t=e.data)||void 0===t||null===(n=t.type)||void 0===n?void 0:n.toString())&&void 0!==r?r:""]))return c('Received an unknown message of type "'.concat(null===(i=e.data)||void 0===i?void 0:i.type," which cannot be handled.")),[2];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,o(e.data)];case 2:return l({success:!0,result:f.sent()}),[3,4];case 3:return a=f.sent(),c(null!==(u=null!==(s=null==a?void 0:a.message)&&void 0!==s?s:null==a?void 0:a.toString())&&void 0!==u?u:"Unknown error."),[3,4];case 4:return[2]}}))})),wi.apply(this,arguments)}n(658);var _i="GET",ki=["DELETE","GET","HEAD","PATCH","POST","PUT"],xi=function(e){return e&&"object"==typeof e?e:{handle:e}};function Si(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Oi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Pi=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_i;Si(this,e),this.handler=xi(n),this.match=t,this.method=r}var t,n;return t=e,(n=[{key:"setCatchHandler",value:function(e){this.catchHandler=xi(e)}}])&&Oi(t.prototype,n),e}();function Ei(e){return Ei=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ei(e)}function ji(e,t){return!t||"object"!==Ci(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ri(e,t){return Ri=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ri(e,t)}var Ci=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};var Ti=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ri(e,t)}(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Ei(t);if(n){var o=Ei(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return ji(this,e)});function o(e,t,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),r.call(this,(function(t){var n=t.url,r=e.exec(n.href);if(r&&(n.origin===location.origin||0===r.index))return r.slice(1)}),t,n)}return o}(Pi);function Ai(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Di(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Li(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function Ki(e,t,n){return Ki=Li()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&Ni(o,n.prototype),o},Ki.apply(null,arguments)}function Ii(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Mi(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Ni(e,t){return Ni=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ni(e,t)}var Fi,$i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._routes=new Map,this._defaultHandlerMap=new Map}var t,n;return t=e,n=[{key:"routes",get:function(){return this._routes}},{key:"addFetchListener",value:function(){var e=this;self.addEventListener("fetch",(function(t){var n=t.request,r=e.handleRequest({request:n,event:t});r&&t.respondWith(r)}))}},{key:"addCacheListener",value:function(){var e=this;self.addEventListener("message",(function(t){if(t.data&&"CACHE_URLS"===t.data.type){var n=t.data.payload,r=Promise.all(n.urlsToCache.map((function(n){"string"==typeof n&&(n=[n]);var r,o=Ki(Request,function(e){if(Array.isArray(e))return Ai(e)}(r=n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return Ai(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ai(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());return e.handleRequest({request:o,event:t})})));t.waitUntil(r),t.ports&&t.ports[0]&&r.then((function(){return t.ports[0].postMessage(!0)}))}}))}},{key:"handleRequest",value:function(e){var t=e.request,n=e.event,r=new URL(t.url,location.href);if(r.protocol.startsWith("http")){var o=r.origin===location.origin,i=this.findMatchingRoute({event:n,request:t,sameOrigin:o,url:r}),a=i.params,s=i.route,u=s&&s.handler,c=t.method;if(!u&&this._defaultHandlerMap.has(c)&&(u=this._defaultHandlerMap.get(c)),u){var l;try{l=u.handle({url:r,request:t,event:n,params:a})}catch(e){l=Promise.reject(e)}var f,h=s&&s.catchHandler;if(Mi(l,Promise)&&(this._catchHandler||h)){var p=this;l=l.catch((f=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Di(i,r,o,a,s,"next",e)}function s(e){Di(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function(e){var o;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(i){switch(i.label){case 0:if(!h)return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,h.handle({url:r,request:t,event:n,params:a})];case 2:return[2,i.sent()];case 3:return Mi(o=i.sent(),Error)&&(e=o),[3,4];case 4:if(p._catchHandler)return[2,p._catchHandler.handle({url:r,request:t,event:n})];throw e}}))})),function(e){return f.apply(this,arguments)}))}return l}}}},{key:"findMatchingRoute",value:function(e){var t=e.url,n=e.sameOrigin,r=e.request,o=e.event,i=this._routes.get(r.method)||[],a=!0,s=!1,u=void 0;try{for(var c,l=i[Symbol.iterator]();!(a=(c=l.next()).done);a=!0){var f=c.value,h=void 0,p=f.match({url:t,sameOrigin:n,request:r,event:o});if(p)return h=p,(Array.isArray(h)&&0===h.length||p.constructor===Object&&0===Object.keys(p).length||"boolean"==typeof p)&&(h=void 0),{route:f,params:h}}}catch(e){s=!0,u=e}finally{try{a||null==l.return||l.return()}finally{if(s)throw u}}return{}}},{key:"setDefaultHandler",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_i;this._defaultHandlerMap.set(t,xi(e))}},{key:"setCatchHandler",value:function(e){this._catchHandler=xi(e)}},{key:"registerRoute",value:function(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}},{key:"unregisterRoute",value:function(e){if(!this._routes.has(e.method))throw new u("unregister-route-but-not-found-with-method",{method:e.method});var t=this._routes.get(e.method).indexOf(e);if(!(t>-1))throw new u("unregister-route-route-not-registered");this._routes.get(e.method).splice(t,1)}}],n&&Ii(t.prototype,n),e}(),Bi=function(){return Fi||((Fi=new $i).addFetchListener(),Fi.addCacheListener()),Fi};function qi(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Ui(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wi(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Vi(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Wi(i,r,o,a,s,"next",e)}function s(e){Wi(i,r,o,a,s,"throw",e)}a(void 0)}))}}function Hi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zi(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}n(142);var Yi=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Gi=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function Ji(e){return"string"==typeof e?new Request(e):e}var Qi=function(){function e(t,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._cacheKeys={},Object.assign(this,n),this.event=n.event,this._strategy=t,this._handlerDeferred=new m,this._extendLifetimePromises=[],this._plugins=function(e){if(Array.isArray(e))return Ui(e)}(r=t.plugins)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return Ui(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ui(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),this._pluginStateMap=new Map;var o=!0,i=!1,a=void 0;try{for(var s,u=this._plugins[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=s.value;this._pluginStateMap.set(c,{})}}catch(e){i=!0,a=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw a}}this.event.waitUntil(this._handlerDeferred.promise)}var t,n;return t=e,(n=[{key:"fetch",value:function(e){var t=this;return Vi((function(){var n,r,o,i,a,s,c,l,f,h,p,d,y,v,g,m,b,w,_;return Yi(this,(function(k){switch(k.label){case 0:return n=t.event,"navigate"===(r=Ji(e)).mode&&zi(n,FetchEvent)&&n.preloadResponse?[4,n.preloadResponse]:[3,2];case 1:if(o=k.sent())return[2,o];k.label=2;case 2:i=t.hasCallback("fetchDidFail")?r.clone():null,k.label=3;case 3:k.trys.push([3,12,,13]),a=!0,s=!1,c=void 0,k.label=4;case 4:k.trys.push([4,9,10,11]),l=t.iterateCallbacks("requestWillFetch")[Symbol.iterator](),k.label=5;case 5:return(a=(f=l.next()).done)?[3,8]:[4,(0,f.value)({request:r.clone(),event:n})];case 6:r=k.sent(),k.label=7;case 7:return a=!0,[3,5];case 8:return[3,11];case 9:return w=k.sent(),s=!0,c=w,[3,11];case 10:try{a||null==l.return||l.return()}finally{if(s)throw c}return[7];case 11:return[3,13];case 12:if(zi(h=k.sent(),Error))throw new u("plugin-error-request-will-fetch",{thrownErrorMessage:h.message});return[3,13];case 13:p=r.clone(),k.label=14;case 14:return k.trys.push([14,24,,27]),[4,fetch(r,"navigate"===r.mode?void 0:t._strategy.fetchOptions)];case 15:d=k.sent(),y=!0,v=!1,g=void 0,k.label=16;case 16:k.trys.push([16,21,22,23]),m=t.iterateCallbacks("fetchDidSucceed")[Symbol.iterator](),k.label=17;case 17:return(y=(b=m.next()).done)?[3,20]:[4,(0,b.value)({event:n,request:p,response:d})];case 18:d=k.sent(),k.label=19;case 19:return y=!0,[3,17];case 20:return[3,23];case 21:return w=k.sent(),v=!0,g=w,[3,23];case 22:try{y||null==m.return||m.return()}finally{if(v)throw g}return[7];case 23:return[2,d];case 24:return _=k.sent(),i?[4,t.runCallbacks("fetchDidFail",{error:_,event:n,originalRequest:i.clone(),request:p.clone()})]:[3,26];case 25:k.sent(),k.label=26;case 26:throw _;case 27:return[2]}}))}))()}},{key:"fetchAndCachePut",value:function(e){var t=this;return Vi((function(){var n,r;return Yi(this,(function(o){switch(o.label){case 0:return[4,t.fetch(e)];case 1:return n=o.sent(),r=n.clone(),t.waitUntil(t.cachePut(e,r)),[2,n]}}))}))()}},{key:"cacheMatch",value:function(e){var t=this;return Vi((function(){var n,r,o,i,a,s,u,c,l,f,h,p,d;return Yi(this,(function(y){switch(y.label){case 0:return n=Ji(e),o=t._strategy,i=o.cacheName,a=o.matchOptions,[4,t.getCacheKey(n,"read")];case 1:return s=y.sent(),u=Object.assign(Object.assign({},a),{cacheName:i}),[4,caches.match(s,u)];case 2:r=y.sent(),c=!0,l=!1,f=void 0,y.label=3;case 3:y.trys.push([3,8,9,10]),h=t.iterateCallbacks("cachedResponseWillBeUsed")[Symbol.iterator](),y.label=4;case 4:return(c=(p=h.next()).done)?[3,7]:[4,(0,p.value)({cacheName:i,matchOptions:a,cachedResponse:r,request:s,event:t.event})];case 5:r=y.sent()||void 0,y.label=6;case 6:return c=!0,[3,4];case 7:return[3,10];case 8:return d=y.sent(),l=!0,f=d,[3,10];case 9:try{c||null==h.return||h.return()}finally{if(l)throw f}return[7];case 10:return[2,r]}}))}))()}},{key:"cachePut",value:function(e,t){var n=this;return Vi((function(){var r,o,i,a,s,c,l,f,h,p,d,y,g,m,b,w,_;return Yi(this,(function(x){switch(x.label){case 0:return r=Ji(e),[4,S(0)];case 1:return x.sent(),[4,n.getCacheKey(r,"write")];case 2:if(o=x.sent(),!t)throw new u("cache-put-with-no-response",{url:(O=o.url,new URL(String(O),location.href).href.replace(new RegExp("^".concat(location.origin)),""))});return[4,n._ensureResponseSafeToCache(t)];case 3:return(i=x.sent())?(a=n._strategy,s=a.cacheName,c=a.matchOptions,[4,self.caches.open(s)]):[2,!1];case 4:return l=x.sent(),(f=n.hasCallback("cacheDidUpdate"))?[4,v(l,o.clone(),["__WB_REVISION__"],c)]:[3,6];case 5:return p=x.sent(),[3,7];case 6:p=null,x.label=7;case 7:h=p,x.label=8;case 8:return x.trys.push([8,10,,14]),[4,l.put(o,f?i.clone():i)];case 9:return x.sent(),[3,14];case 10:return zi(d=x.sent(),Error)?"QuotaExceededError"!==d.name?[3,12]:[4,k()]:[3,13];case 11:x.sent(),x.label=12;case 12:throw d;case 13:return[3,14];case 14:y=!0,g=!1,m=void 0,x.label=15;case 15:x.trys.push([15,20,21,22]),b=n.iterateCallbacks("cacheDidUpdate")[Symbol.iterator](),x.label=16;case 16:return(y=(w=b.next()).done)?[3,19]:[4,(0,w.value)({cacheName:s,oldResponse:h,newResponse:i.clone(),request:o,event:n.event})];case 17:x.sent(),x.label=18;case 18:return y=!0,[3,16];case 19:return[3,22];case 20:return _=x.sent(),g=!0,m=_,[3,22];case 21:try{y||null==b.return||b.return()}finally{if(g)throw m}return[7];case 22:return[2,!0]}var O}))}))()}},{key:"getCacheKey",value:function(e,t){var n=this;return Vi((function(){var r,o,i,a,s,u,c,l;return Yi(this,(function(f){switch(f.label){case 0:if(r="".concat(e.url," | ").concat(t),n._cacheKeys[r])return[3,9];o=e,i=!0,a=!1,s=void 0,f.label=1;case 1:f.trys.push([1,6,7,8]),u=n.iterateCallbacks("cacheKeyWillBeUsed")[Symbol.iterator](),f.label=2;case 2:return(i=(c=u.next()).done)?[3,5]:[4,(0,c.value)({mode:t,request:o,event:n.event,params:n.params})];case 3:o=Ji.apply(void 0,[f.sent()]),f.label=4;case 4:return i=!0,[3,2];case 5:return[3,8];case 6:return l=f.sent(),a=!0,s=l,[3,8];case 7:try{i||null==u.return||u.return()}finally{if(a)throw s}return[7];case 8:n._cacheKeys[r]=o,f.label=9;case 9:return[2,n._cacheKeys[r]]}}))}))()}},{key:"hasCallback",value:function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=this._strategy.plugins[Symbol.iterator]();!(t=(o=i.next()).done);t=!0)if(e in o.value)return!0}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return!1}},{key:"runCallbacks",value:function(e,t){var n=this;return Vi((function(){var r,o,i,a,s,u;return Yi(this,(function(c){switch(c.label){case 0:r=!0,o=!1,i=void 0,c.label=1;case 1:c.trys.push([1,6,7,8]),a=n.iterateCallbacks(e)[Symbol.iterator](),c.label=2;case 2:return(r=(s=a.next()).done)?[3,5]:[4,(0,s.value)(t)];case 3:c.sent(),c.label=4;case 4:return r=!0,[3,2];case 5:return[3,8];case 6:return u=c.sent(),o=!0,i=u,[3,8];case 7:try{r||null==a.return||a.return()}finally{if(o)throw i}return[7];case 8:return[2]}}))}))()}},{key:"iterateCallbacks",value:function(e){var t,n,r,o,i,a,s,u;return Yi(this,(function(c){switch(c.label){case 0:t=!0,n=!1,r=void 0,c.label=1;case 1:c.trys.push([1,6,7,8]),o=this,i=function(){var t,n;return Yi(this,(function(r){switch(r.label){case 0:return"function"!=typeof(t=s.value)[e]?[3,2]:(n=o._pluginStateMap.get(t),[4,function(r){var o=Object.assign(Object.assign({},r),{state:n});return t[e](o)}]);case 1:r.sent(),r.label=2;case 2:return[2]}}))},a=this._strategy.plugins[Symbol.iterator](),c.label=2;case 2:return(t=(s=a.next()).done)?[3,5]:[5,Gi(i())];case 3:c.sent(),c.label=4;case 4:return t=!0,[3,2];case 5:return[3,8];case 6:return u=c.sent(),n=!0,r=u,[3,8];case 7:try{t||null==a.return||a.return()}finally{if(n)throw r}return[7];case 8:return[2]}}))}},{key:"waitUntil",value:function(e){return this._extendLifetimePromises.push(e),e}},{key:"doneWaiting",value:function(){var e=this;return Vi((function(){var t;return Yi(this,(function(n){switch(n.label){case 0:return(t=e._extendLifetimePromises.shift())?[4,t]:[3,2];case 1:return n.sent(),[3,0];case 2:return[2]}}))}))()}},{key:"destroy",value:function(){this._handlerDeferred.resolve(null)}},{key:"_ensureResponseSafeToCache",value:function(e){var t=this;return Vi((function(){var n,r,o,i,a,s,u,c;return Yi(this,(function(l){switch(l.label){case 0:n=e,r=!1,o=!0,i=!1,a=void 0,l.label=1;case 1:l.trys.push([1,6,7,8]),s=t.iterateCallbacks("cacheWillUpdate")[Symbol.iterator](),l.label=2;case 2:return(o=(u=s.next()).done)?[3,5]:[4,(0,u.value)({request:t.request,response:n,event:t.event})];case 3:if(n=l.sent()||void 0,r=!0,!n)return[3,5];l.label=4;case 4:return o=!0,[3,2];case 5:return[3,8];case 6:return c=l.sent(),i=!0,a=c,[3,8];case 7:try{o||null==s.return||s.return()}finally{if(i)throw a}return[7];case 8:return r||n&&200!==n.status&&(n=void 0),[2,n]}}))}))()}}])&&Hi(t.prototype,n),e}();function Xi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Zi(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function ea(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Zi(i,r,o,a,s,"next",e)}function s(e){Zi(i,r,o,a,s,"throw",e)}a(void 0)}))}}function ta(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function na(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ra(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}var oa=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},ia=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ta(this,e),this.cacheName=f(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}var t,n;return t=e,(n=[{key:"handle",value:function(e){return function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Xi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xi(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(this.handleAll(e),1)[0]}},{key:"handleAll",value:function(e){ra(e,FetchEvent)&&(e={event:e,request:e.request});var t=e.event,n="string"==typeof e.request?new Request(e.request):e.request,r="params"in e?e.params:void 0,o=new Qi(this,{event:t,request:n,params:r}),i=this._getResponse(o,n,t);return[i,this._awaitComplete(i,o,n,t)]}},{key:"_getResponse",value:function(e,t,n){var r=this;return ea((function(){var o,i,a,s,c,l,f,h,p,d,y,v,g;return oa(this,(function(m){switch(m.label){case 0:return[4,e.runCallbacks("handlerWillStart",{event:n,request:t})];case 1:m.sent(),o=void 0,m.label=2;case 2:return m.trys.push([2,4,,13]),[4,r._handle(t,e)];case 3:if(!(o=m.sent())||"error"===o.type)throw new u("no-response",{url:t.url});return[3,13];case 4:if(!ra(i=m.sent(),Error))return[3,12];a=!0,s=!1,c=void 0,m.label=5;case 5:m.trys.push([5,10,11,12]),l=e.iterateCallbacks("handlerDidError")[Symbol.iterator](),m.label=6;case 6:return(a=(f=l.next()).done)?[3,9]:[4,(0,f.value)({error:i,event:n,request:t})];case 7:if(o=m.sent())return[3,9];m.label=8;case 8:return a=!0,[3,6];case 9:return[3,12];case 10:return g=m.sent(),s=!0,c=g,[3,12];case 11:try{a||null==l.return||l.return()}finally{if(s)throw c}return[7];case 12:if(!o)throw i;return[3,13];case 13:h=!0,p=!1,d=void 0,m.label=14;case 14:m.trys.push([14,19,20,21]),y=e.iterateCallbacks("handlerWillRespond")[Symbol.iterator](),m.label=15;case 15:return(h=(v=y.next()).done)?[3,18]:[4,(0,v.value)({event:n,request:t,response:o})];case 16:o=m.sent(),m.label=17;case 17:return h=!0,[3,15];case 18:return[3,21];case 19:return g=m.sent(),p=!0,d=g,[3,21];case 20:try{h||null==y.return||y.return()}finally{if(p)throw d}return[7];case 21:return[2,o]}}))}))()}},{key:"_awaitComplete",value:function(e,t,n,r){return ea((function(){var o,i,a;return oa(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,e];case 1:return o=s.sent(),[3,3];case 2:return s.sent(),[3,3];case 3:return s.trys.push([3,6,,7]),[4,t.runCallbacks("handlerDidRespond",{event:r,request:n,response:o})];case 4:return s.sent(),[4,t.doneWaiting()];case 5:return s.sent(),[3,7];case 6:return ra(a=s.sent(),Error)&&(i=a),[3,7];case 7:return[4,t.runCallbacks("handlerDidComplete",{event:r,request:n,response:o,error:i})];case 8:if(s.sent(),t.destroy(),i)throw i;return[2]}}))}))()}}])&&na(t.prototype,n),e}();function aa(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function sa(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ua(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ca(e){return ca=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ca(e)}function la(e,t){return!t||"object"!==ha(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fa(e,t){return fa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},fa(e,t)}var ha=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};var pa=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fa(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ca(r);if(o){var n=ca(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return la(this,e)});function a(){return sa(this,a),i.apply(this,arguments)}return t=a,n=[{key:"_handle",value:function(e,t){return function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){aa(i,r,o,a,s,"next",e)}function s(e){aa(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function(){var n;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(r){switch(r.label){case 0:return[4,t.cacheMatch(e)];case 1:if(!(n=r.sent()))throw new u("no-response",{url:e.url});return[2,n]}}))}))()}}],n&&ua(t.prototype,n),a}(ia);function da(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}var ya,va={cacheWillUpdate:(ya=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){da(i,r,o,a,s,"next",e)}function s(e){da(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function(e){var t;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(n){return 200===(t=e.response).status||0===t.status?[2,t]:[2,null]}))})),function(e){return ya.apply(this,arguments)})};function ga(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function ma(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ga(i,r,o,a,s,"next",e)}function s(e){ga(i,r,o,a,s,"throw",e)}a(void 0)}))}}function ba(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _a(e){return _a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},_a(e)}function ka(e,t){return!t||"object"!==Sa(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function xa(e,t){return xa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},xa(e,t)}var Sa=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};var Oa=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Pa=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xa(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=_a(r);if(o){var n=_a(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ka(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ba(this,a),(e=i.call(this,t)).plugins.some((function(e){return"cacheWillUpdate"in e}))||e.plugins.unshift(va),e._networkTimeoutSeconds=t.networkTimeoutSeconds||0,e}return t=a,n=[{key:"_handle",value:function(e,t){var n=this;return ma((function(){var r,o,i,a,s,c,l,f;return Oa(this,(function(h){switch(h.label){case 0:return r=[],o=[],n._networkTimeoutSeconds&&(a=n._getTimeoutPromise({request:e,logs:r,handler:t}),s=a.id,c=a.promise,i=s,o.push(c)),l=n._getNetworkPromise({timeoutId:i,request:e,logs:r,handler:t}),o.push(l),[4,t.waitUntil(ma((function(){var e;return Oa(this,(function(n){switch(n.label){case 0:return[4,t.waitUntil(Promise.race(o))];case 1:return(e=n.sent())?[3,3]:[4,l];case 2:e=n.sent(),n.label=3;case 3:return[2,e]}}))}))())];case 1:if(!(f=h.sent()))throw new u("no-response",{url:e.url});return[2,f]}}))}))()}},{key:"_getTimeoutPromise",value:function(e){var t,n=e.request,r=(e.logs,e.handler),o=this,i=new Promise((function(e){var i=function(){var t=ma((function(){return Oa(this,(function(t){switch(t.label){case 0:return[4,r.cacheMatch(n)];case 1:return e.apply(void 0,[t.sent()]),[2]}}))}));return function(){return t.apply(this,arguments)}}();t=setTimeout(i,1e3*o._networkTimeoutSeconds)}));return{promise:i,id:t}}},{key:"_getNetworkPromise",value:function(e){var t=e.timeoutId,n=e.request,r=(e.logs,e.handler);return ma((function(){var e,o,i;return Oa(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,r.fetchAndCachePut(n)];case 1:return o=a.sent(),[3,3];case 2:return s=i=a.sent(),(null!=(u=Error)&&"undefined"!=typeof Symbol&&u[Symbol.hasInstance]?u[Symbol.hasInstance](s):s instanceof u)&&(e=i),[3,3];case 3:return t&&clearTimeout(t),!e&&o?[3,5]:[4,r.cacheMatch(n)];case 4:o=a.sent(),a.label=5;case 5:return[2,o]}var s,u}))}))()}}],n&&wa(t.prototype,n),a}(ia);function Ea(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function ja(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ra(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ca(e){return Ca=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ca(e)}function Ta(e,t){return!t||"object"!==Da(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Aa(e,t){return Aa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Aa(e,t)}var Da=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};var La=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Aa(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ca(r);if(o){var n=Ca(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Ta(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ja(this,a),(e=i.call(this,t))._networkTimeoutSeconds=t.networkTimeoutSeconds||0,e}return t=a,n=[{key:"_handle",value:function(e,t){var n=this;return function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ea(i,r,o,a,s,"next",e)}function s(e){Ea(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function(){var r,o,i,a,s;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(c){switch(c.label){case 0:r=void 0,c.label=1;case 1:return c.trys.push([1,3,,4]),i=[t.fetch(e)],n._networkTimeoutSeconds&&(a=S(1e3*n._networkTimeoutSeconds),i.push(a)),[4,Promise.race(i)];case 2:if(!(o=c.sent()))throw new Error("Timed out the network response after "+"".concat(n._networkTimeoutSeconds," seconds."));return[3,4];case 3:return l=s=c.sent(),(null!=(f=Error)&&"undefined"!=typeof Symbol&&f[Symbol.hasInstance]?f[Symbol.hasInstance](l):l instanceof f)&&(r=s),[3,4];case 4:if(!o)throw new u("no-response",{url:e.url,error:r});return[2,o]}var l,f}))}))()}}],n&&Ra(t.prototype,n),a}(ia);function Ka(e){var t;return null!==(t=Ma(e,"x-omrs-offline-response-body"))&&void 0!==t?t:void 0}function Ia(e){var t,n=+(null!==(t=Ma(e,"x-omrs-offline-response-status"))&&void 0!==t?t:"");return isNaN(n)||n<200||n>599?503:n}function Ma(e,t){return e.get(t)}function Na(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Fa(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Na(i,r,o,a,s,"next",e)}function s(e){Na(i,r,o,a,s,"throw",e)}a(void 0)}))}}function $a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ba,qa,Ua=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Wa=new La,Va=new pa({cacheName:Ie}),Ha=new Pa({cacheName:Ie}),za="network-only-or-cache-only",Ya=($a(Ba={},"network-first",(function(e){return Ha.handle(e)})),$a(Ba,"network-only-or-cache-only",function(){var e=Fa((function(e){return Ua(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,4]),[4,Wa.handle(e)];case 1:case 3:return[2,t.sent()];case 2:return t.sent(),[4,Va.handle(e)];case 4:return[2]}}))}));return function(t){return e.apply(this,arguments)}}()),Ba);function Ga(e){return Ja.apply(this,arguments)}function Ja(){return(Ja=Fa((function(e){var t;return Ua(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,5]),[4,Wa.handle(e)];case 1:return[2,n.sent()];case 2:return n.sent(),[4,caches.open(Ie)];case 3:return[4,n.sent().match(Ne)];case 4:return[2,null!=(t=n.sent())?t:Response.error()];case 5:return[2]}}))}))).apply(this,arguments)}function Qa(e){return Xa.apply(this,arguments)}function Xa(){return Xa=Fa((function(e){var t,n,r,o,i,a;return Ua(this,(function(s){switch(s.label){case 0:return t=e.request,"GET"!==e.request.method?[3,2]:[4,Za(e)];case 1:return r=s.sent(),[3,3];case 2:r=za,s.label=3;case 3:i=null!==(o=Ya[n=r])&&void 0!==o?o:Ya[za],s.label=4;case 4:return s.trys.push([4,6,,7]),[4,i(e)];case 5:return[2,s.sent()];case 6:return a=s.sent(),console.warn("[SW] Could not handle the request to %s (using handler %s).",t.url,n,a),[2,new Response(Ka(t.headers),{status:Ia(t.headers)})];case 7:return[2]}}))})),Xa.apply(this,arguments)}function Za(e){return es.apply(this,arguments)}function es(){return(es=Fa((function(e){var t,n,r;return Ua(this,(function(o){switch(o.label){case 0:return t=e.request,null===(n=ts(t.headers))||void 0===n?[3,1]:(r=n,[3,3]);case 1:return[4,ns(t.url)];case 2:r=o.sent(),o.label=3;case 3:return[2,r]}}))}))).apply(this,arguments)}function ts(e){return Ma(e,"x-omrs-offline-caching-strategy")}function ns(e){return rs.apply(this,arguments)}function rs(){return(rs=Fa((function(e){var t,n,r,o;return Ua(this,(function(i){switch(i.label){case 0:return[4,(new ri).dynamicRouteRegistrations.toArray()];case 1:return t=i.sent(),(r=Le(t.filter((function(t){return new RegExp(t.pattern).test(e)})).map((function(e){return null!==(n=e.strategy)&&void 0!==n?n:"network-first"})))).length<=1?[2,r[0]]:[2,null!==(o=["network-first","network-only-or-cache-only"].find((function(e){return r.some((function(t){return t===e}))})))&&void 0!==o?o:za]}}))}))).apply(this,arguments)}self.__WB_DISABLE_DEV_LOGS=!0,qa={prefix:Ke},function(e){var t,n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(l)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0)t=i.value,"string"==typeof qa[t]&&(l[t]=qa[t])}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}}(),function(){!function(e,t,n){var r;r=qi(e,RegExp)?new Ti(e,t,n):new Pi(e,t,n),Bi().registerRoute(r)}((function(e){return"navigate"===e.request.mode}),Ga);var e=Bi(),t=!0,n=!1,r=void 0;try{for(var o,i=ki[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;e.setDefaultHandler(Qa,a)}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}(),self.addEventListener("message",(function(e){return wi.apply(this,arguments)})),self.addEventListener("install",(function(e){self.skipWaiting(),e.waitUntil(ci(Fe))})),self.addEventListener("activate",(function(e){e.waitUntil(self.clients.claim())}))})()})();
|
|
1
|
+
(()=>{var e={364:function(e){function t(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}e.exports=function(){"use strict";var e=6e4,n=36e5,r="millisecond",o="second",i="minute",a="hour",s="day",u="week",c="month",l="quarter",f="year",h="date",p="Invalid Date",d=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},m={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),o=t.clone().add(r,c),i=n-o<0,a=t.clone().add(r+(i?-1:1),c);return+(-(r+(n-o)/(i?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:f,w:u,d:s,D:h,h:a,m:i,s:o,ms:r,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",w={};w[b]=v;var _=function(e){return t(e,O)},k=function e(t,n,r){var o;if(!t)return b;if("string"==typeof t){var i=t.toLowerCase();w[i]&&(o=i),n&&(w[i]=n,o=i);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var s=t.name;w[s]=t,o=s}return!r&&o&&(b=o),o||!r&&b},x=function(e,t){if(_(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new O(n)},S=m;S.l=k,S.i=_,S.w=function(e,t){return x(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var O=function(){var v=function(e){this.$L=k(e.locale,null,!0),this.parse(e)},g=v.prototype;return g.parse=function(e){this.$d=function(e){var n=e.date,r=e.utc;if(null===n)return new Date(NaN);if(S.u(n))return new Date;if(t(n,Date))return new Date(n);if("string"==typeof n&&!/Z$/i.test(n)){var o=n.match(d);if(o){var i=o[2]-1||0,a=(o[7]||"0").substring(0,3);return r?new Date(Date.UTC(o[1],i,o[3]||1,o[4]||0,o[5]||0,o[6]||0,a)):new Date(o[1],i,o[3]||1,o[4]||0,o[5]||0,o[6]||0,a)}}return new Date(n)}(e),this.$x=e.x||{},this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return S},g.isValid=function(){return!(this.$d.toString()===p)},g.isSame=function(e,t){var n=x(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return x(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<x(e)},g.$g=function(e,t,n){return S.u(e)?this[t]:this.set(n,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var n=this,r=!!S.u(t)||t,l=S.p(e),p=function(e,t){var o=S.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?o:o.endOf(s)},d=function(e,t){return S.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},y=this.$W,v=this.$M,g=this.$D,m="set"+(this.$u?"UTC":"");switch(l){case f:return r?p(1,0):p(31,11);case c:return r?p(1,v):p(0,v+1);case u:var b=this.$locale().weekStart||0,w=(y<b?y+7:y)-b;return p(r?g-w:g+(6-w),v);case s:case h:return d(m+"Hours",0);case a:return d(m+"Minutes",1);case i:return d(m+"Seconds",2);case o:return d(m+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var n,u=S.p(e),l="set"+(this.$u?"UTC":""),p=(n={},n[s]=l+"Date",n[h]=l+"Date",n[c]=l+"Month",n[f]=l+"FullYear",n[a]=l+"Hours",n[i]=l+"Minutes",n[o]=l+"Seconds",n[r]=l+"Milliseconds",n)[u],d=u===s?this.$D+(t-this.$W):t;if(u===c||u===f){var y=this.clone().set(h,1);y.$d[p](d),y.init(),this.$d=y.set(h,Math.min(this.$D,y.daysInMonth())).$d}else p&&this.$d[p](d);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[S.p(e)]()},g.add=function(t,r){var l,h=this;t=Number(t);var p=S.p(r),d=function(e){var n=x(h);return S.w(n.date(n.date()+Math.round(e*t)),h)};if(p===c)return this.set(c,this.$M+t);if(p===f)return this.set(f,this.$y+t);if(p===s)return d(1);if(p===u)return d(7);var y=(l={},l[i]=e,l[a]=n,l[o]=1e3,l)[p]||1,v=this.$d.getTime()+t*y;return S.w(v,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||"YYYY-MM-DDTHH:mm:ssZ",o=S.z(this),i=this.$H,a=this.$m,s=this.$M,u=n.weekdays,c=n.months,l=function(e,n,o,i){return e&&(e[n]||e(t,r))||o[n].slice(0,i)},f=function(e){return S.s(i%12||12,e,"0")},h=n.meridiem||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r},d={YY:String(this.$y).slice(-2),YYYY:this.$y,M:s+1,MM:S.s(s+1,2,"0"),MMM:l(n.monthsShort,s,c,3),MMMM:l(c,s),D:this.$D,DD:S.s(this.$D,2,"0"),d:String(this.$W),dd:l(n.weekdaysMin,this.$W,u,2),ddd:l(n.weekdaysShort,this.$W,u,3),dddd:u[this.$W],H:String(i),HH:S.s(i,2,"0"),h:f(1),hh:f(2),a:h(i,a,!0),A:h(i,a,!1),m:String(a),mm:S.s(a,2,"0"),s:String(this.$s),ss:S.s(this.$s,2,"0"),SSS:S.s(this.$ms,3,"0"),Z:o};return r.replace(y,(function(e,t){return t||d[e]||o.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(t,r,h){var p,d=S.p(r),y=x(t),v=(y.utcOffset()-this.utcOffset())*e,g=this-y,m=S.m(this,y);return m=(p={},p[f]=m/12,p[c]=m,p[l]=m/3,p[u]=(g-v)/6048e5,p[s]=(g-v)/864e5,p[a]=g/n,p[i]=g/e,p[o]=g/1e3,p)[d]||g,h?m:S.a(m)},g.daysInMonth=function(){return this.endOf(c).$D},g.$locale=function(){return w[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=k(e,t,!0);return r&&(n.$L=r),n},g.clone=function(){return S.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},v}(),P=O.prototype;return x.prototype=P,[["$ms",r],["$s",o],["$m",i],["$H",a],["$W",s],["$M",c],["$y",f],["$D",h]].forEach((function(e){P[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),x.extend=function(e,t){return e.$i||(e(t,O,x),e.$i=!0),x},x.locale=k,x.isDayjs=_,x.unix=function(e){return x(1e3*e)},x.en=w[b],x.Ls=w,x.p={},x}()},171:(e,t,n)=>{"use strict";function r(e){return r="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},r(e)}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){o(e,t,n[t])}))}return e}function a(e,t){if(n=e,!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return c(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}function d(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}n.r(t),n.d(t,{default:()=>V});var y={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},v=new(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,e),this.init(t,n)}return u(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||y,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,i({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),g=function(){function e(){a(this,e),this.observers={}}return u(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){var o=[].concat(this.observers[e]);o.forEach((function(e){e.apply(void 0,n)}))}if(this.observers["*"]){var i=[].concat(this.observers["*"]);i.forEach((function(t){t.apply(t,[e].concat(n))}))}}}]),e}();function m(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function b(e){return null==e?"":""+e}function w(e,t,n){e.forEach((function(e){t[e]&&(n[e]=t[e])}))}function _(e,t,n){for(var r=function(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e},o=function(){return!e||"string"==typeof e},i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=r(i.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:r(i.shift())}}function k(e,t,n){var r=_(e,t,Object);r.obj[r.k]=n}function x(e,t){var n=_(e,t),r=n.obj,o=n.k;if(r)return r[o]}function S(e,t,n){var r=x(e,n);return void 0!==r?r:x(t,n)}function O(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||d(e[r],String)||"string"==typeof t[r]||d(t[r],String)?n&&(e[r]=t[r]):O(e[r],t[r],n):e[r]=t[r]);return e}function P(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var E={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function j(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return E[e]})):e}var R="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,C=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return a(this,t),n=l(this,f(t).call(this)),R&&g.call(c(n)),n.data=e||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return p(t,e),u(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=[e,t];return n&&"string"!=typeof n&&(i=i.concat(n)),n&&"string"==typeof n&&(i=i.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(i=e.split(".")),x(this.data,i)}},{key:"addResource",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),k(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)"string"!=typeof n[o]&&"[object Array]"!==Object.prototype.toString.apply(n[o])||this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(s=e.split("."))[1]),this.addNamespaces(t);var u=x(this.data,s)||{};r?O(u,n,o):u=i({},u,n),k(this.data,s,u),a.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?i({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(g),T={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,o){var i=this;return e.forEach((function(e){i.processors[e]&&(t=i.processors[e].process(t,n,r,o))})),t}},A={},D=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return a(this,t),n=l(this,f(t).call(this)),R&&g.call(c(n)),w(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,c(n)),n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=v.create("translator"),n}return p(t,e),u(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var i=e.match(this.interpolator.nestingRegexp);if(i&&i.length>0)return{key:e,namespaces:o};var a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(o=a.shift()),e=a.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,n,o){var a=this;if("object"!==r(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var s=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,u=this.extractFromKey(e[e.length-1],n),c=u.key,l=u.namespaces,f=l[l.length-1],h=n.lng||this.language,p=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h&&"cimode"===h.toLowerCase()){if(p){var d=n.nsSeparator||this.options.nsSeparator;return f+d+c}return c}var y=this.resolve(e,n),v=y&&y.res,g=y&&y.usedKey||c,m=y&&y.exactUsedKey||c,b=Object.prototype.toString.apply(v),w=["[object Number]","[object Function]","[object RegExp]"],_=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,k=!this.i18nFormat||this.i18nFormat.handleAsObject,x="string"!=typeof v&&"boolean"!=typeof v&&"number"!=typeof v;if(k&&v&&x&&w.indexOf(b)<0&&("string"!=typeof _||"[object Array]"!==b)){if(!n.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,v,n):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");if(s){var S="[object Array]"===b,O=S?[]:{},P=S?m:g;for(var E in v)if(Object.prototype.hasOwnProperty.call(v,E)){var j="".concat(P).concat(s).concat(E);O[E]=this.translate(j,i({},n,{joinArrays:!1,ns:l})),O[E]===j&&(O[E]=v[E])}v=O}}else if(k&&"string"==typeof _&&"[object Array]"===b)(v=v.join(_))&&(v=this.extendTranslation(v,e,n,o));else{var R=!1,C=!1,T=void 0!==n.count&&"string"!=typeof n.count,A=t.hasDefaultValue(n),D=T?this.pluralResolver.getSuffix(h,n.count):"",L=n["defaultValue".concat(D)]||n.defaultValue;!this.isValidLookup(v)&&A&&(R=!0,v=L),this.isValidLookup(v)||(C=!0,v=c);var K=A&&L!==v&&this.options.updateMissing;if(C||R||K){if(this.logger.log(K?"updateKey":"missingKey",h,f,c,K?L:v),s){var I=this.resolve(c,i({},n,{keySeparator:!1}));I&&I.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var M=[],N=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&N&&N[0])for(var F=0;F<N.length;F++)M.push(N[F]);else"all"===this.options.saveMissingTo?M=this.languageUtils.toResolveHierarchy(n.lng||this.language):M.push(n.lng||this.language);var $=function(e,t,r){a.options.missingKeyHandler?a.options.missingKeyHandler(e,f,t,K?r:v,K,n):a.backendConnector&&a.backendConnector.saveMissing&&a.backendConnector.saveMissing(e,f,t,K?r:v,K,n),a.emit("missingKey",e,f,t,v)};this.options.saveMissing&&(this.options.saveMissingPlurals&&T?M.forEach((function(e){a.pluralResolver.getSuffixes(e).forEach((function(t){$([e],c+t,n["defaultValue".concat(t)]||L)}))})):$(M,c,L))}v=this.extendTranslation(v,e,n,y,o),C&&v===c&&this.options.appendNamespaceToMissingKey&&(v="".concat(f,":").concat(c)),C&&this.options.parseMissingKeyHandler&&(v=this.options.parseMissingKeyHandler(v))}return v}},{key:"extendTranslation",value:function(e,t,n,r,o){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,n,r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(i({},n,{interpolation:i({},this.options.interpolation,n.interpolation)}));var s,u=n.interpolation&&n.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(u){var c=e.match(this.interpolator.nestingRegexp);s=c&&c.length}var l=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(l=i({},this.options.interpolation.defaultVariables,l)),e=this.interpolator.interpolate(e,l,n.lng||this.language,n),u){var f=e.match(this.interpolator.nestingRegexp);s<(f&&f.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return o&&o[0]===r[0]&&!n.context?(a.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):a.translate.apply(a,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var h=n.postProcess||this.options.postProcess,p="string"==typeof h?[h]:h;return null!=e&&p&&p.length&&!1!==n.applyPostProcessor&&(e=T.handle(p,e,t,this.options&&this.options.postProcessPassResolved?i({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var u=a.extractFromKey(e,s),c=u.key;n=c;var l=u.namespaces;a.options.fallbackNS&&(l=l.concat(a.options.fallbackNS));var f=void 0!==s.count&&"string"!=typeof s.count,h=void 0!==s.context&&"string"==typeof s.context&&""!==s.context,p=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);l.forEach((function(e){a.isValidLookup(t)||(i=e,!A["".concat(p[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(A["".concat(p[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(p.join(", "),'" won\'t get resolved as namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach((function(n){if(!a.isValidLookup(t)){o=n;var i,u,l=c,p=[l];for(a.i18nFormat&&a.i18nFormat.addLookupKeys?a.i18nFormat.addLookupKeys(p,c,n,e,s):(f&&(i=a.pluralResolver.getSuffix(n,s.count)),f&&h&&p.push(l+i),h&&p.push(l+="".concat(a.options.contextSeparator).concat(s.context)),f&&p.push(l+=i));u=p.pop();)a.isValidLookup(t)||(r=u,t=a.getResource(n,e,u,s))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}]),t}(g);function L(e){return e.charAt(0).toUpperCase()+e.slice(1)}var K=function(){function e(t){a(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=v.create("languageUtils")}return u(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=L(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=L(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=L(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(e)}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(r))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(n.isSupportedCode(e)?o.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),r.forEach((function(e){o.indexOf(e)<0&&i(n.formatLanguageCode(e))})),o}}]),e}(),I=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],M={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}};function N(){var e={};return I.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:M[t.fc]}}))})),e}var F=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,e),this.languageUtils=t,this.options=n,this.logger=v.create("pluralResolver"),this.rules=N()}return u(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){return this.getSuffixes(e).map((function(e){return t+e}))}},{key:"getSuffixes",value:function(e){var t=this,n=this.getRule(e);return n?n.numbers.map((function(n){return t.getSuffix(e,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=this,r=this.getRule(e);if(r){var o=r.noAbs?r.plurals(t):r.plurals(Math.abs(t)),i=r.numbers[o];this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var a=function(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),$=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,e),this.logger=v.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return u(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:j,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?P(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?P(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?P(t.nestingPrefix):t.nestingPrefixEscaped||P("$t("),this.nestingSuffix=t.nestingSuffix?P(t.nestingSuffix):t.nestingSuffixEscaped||P(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var o,i,a,s=function(e){return e.replace(/\$/g,"$$$$")},u=this,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=function(e){if(e.indexOf(u.formatSeparator)<0){var o=S(t,c,e);return u.alwaysFormat?u.format(o,void 0,n):o}var i=e.split(u.formatSeparator),a=i.shift().trim(),s=i.join(u.formatSeparator).trim();return u.format(S(t,c,a),s,n,r)};this.resetRegExp();var f=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,h=r&&r.interpolation&&r.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return s(e)}},{regex:this.regexp,safeValue:function(e){return u.escapeValue?s(u.escape(e)):s(e)}}].forEach((function(t){for(a=0;o=t.regex.exec(e);){if(void 0===(i=l(o[1].trim())))if("function"==typeof f){var n=f(e,o,r);i="string"==typeof n?n:""}else{if(h){i=o[0];continue}u.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(e)),i=""}else"string"==typeof i||u.useRawValueToEscape||(i=b(i));if(e=e.replace(o[0],t.safeValue(i)),t.regex.lastIndex=0,++a>=u.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,o=function(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0],o=(o=this.interpolate(o,u)).replace(/'/g,'"');try{u=JSON.parse(o),t&&(u=i({},t,u))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(o)}return delete u.defaultValue,e},a=this,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=i({},s);for(u.applyPostProcessor=!1,delete u.defaultValue;n=this.nestingRegexp.exec(e);){var c=[],l=!1;if(n[0].includes(this.formatSeparator)&&!/{.*}/.test(n[1])){var f=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=f.shift(),c=f,l=!0}if((r=t(o.call(this,n[1].trim(),u),u))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=b(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),l&&(r=c.reduce((function(e,t){return a.format(e,t,s.lng,s)}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}(),B=function(e){function t(e,n,r){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return a(this,t),o=l(this,f(t).call(this)),R&&g.call(c(o)),o.backend=e,o.store=n,o.services=r,o.languageUtils=r.languageUtils,o.options=i,o.logger=v.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(r,i.backend,i),o}return p(t,e),u(t,[{key:"queueLoad",value:function(e,t,n,r){var o=this,i=[],a=[],s=[],u=[];return e.forEach((function(e){var r=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!n.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?a.indexOf(s)<0&&a.push(s):(o.state[s]=1,r=!1,a.indexOf(s)<0&&a.push(s),i.indexOf(s)<0&&i.push(s),u.indexOf(t)<0&&u.push(t)))})),r||s.push(e)})),(i.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:r}),{toLoad:i,pending:a,toLoadLanguages:s,toLoadNamespaces:u}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),n&&this.store.addResourceBundle(o,i,n),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(n){var r,s,u,c,l;r=n.loaded,s=i,(c=(u=_(r,[o],Object)).obj)[l=u.k]=c[l]||[],c[l].push(s),function(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}(n.pending,e),t&&n.errors.push(t),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]=[]),n.loaded[e].length&&n.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,(function(s,u){s&&u&&o<5?setTimeout((function(){r.read.call(r,e,t,n,o+1,2*i,a)}),i):a(s,u)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(i," for language ").concat(o," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,r,a)}))}},{key:"saveMissing",value:function(e,t,n,r,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,i({},a,{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),t}(g);function q(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===r(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===r(e[2])||"object"===r(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function U(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function W(){}const V=new(function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(a(this,t),e=l(this,f(t).call(this)),R&&g.call(c(e)),e.options=U(n),e.services={},e.logger=v,e.modules={external:[]},r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),l(e,c(e));setTimeout((function(){e.init(n,r)}),0)}return e}return p(t,e),u(t,[{key:"init",value:function(){var e=function(e){return e?"function"==typeof e?new e:e:null},t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if("function"==typeof n&&(r=n,n={}),n.whitelist&&!n.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),n.nonExplicitWhitelist&&!n.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=i({},q(),this.options,U(n)),this.format=this.options.interpolation.format,r||(r=W),!this.options.isClone){this.modules.logger?v.init(e(this.modules.logger),this.options):v.init(null,this.options);var o=new K(this.options);this.store=new C(this.options.resources,this.options);var a=this.services;a.logger=v,a.resourceStore=this.store,a.languageUtils=o,a.pluralResolver=new F(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),a.interpolator=new $(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new B(e(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];t.emit.apply(t,[e].concat(r))})),this.modules.languageDetector&&(a.languageDetector=e(this.modules.languageDetector),a.languageDetector.init(a,this.options.detection,this.options)),this.modules.i18nFormat&&(a.i18nFormat=e(this.modules.i18nFormat),a.i18nFormat.init&&a.i18nFormat.init(this)),this.translator=new D(this.services,this.options),this.translator.on("*",(function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];t.emit.apply(t,[e].concat(r))})),this.modules.external.forEach((function(e){e.init&&e.init(t)}))}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.length>0&&"dev"!==s[0]&&(this.options.lng=s[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var u=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];u.forEach((function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments)}}));var c=["addResource","addResources","addResourceBundle","removeResourceBundle"];c.forEach((function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments),t}}));var l=m(),f=function(){var e=function(e,n){t.isInitialized&&t.logger.warn("init: i18next is already initialized. You should call init just once!"),t.isInitialized=!0,t.options.isClone||t.logger.log("initialized",t.options),t.emit("initialized",t.options),l.resolve(n),r(e,n)};if(t.languages&&"v1"!==t.options.compatibilityAPI&&!t.isInitialized)return e(null,t.t.bind(t));t.changeLanguage(t.options.lng,e)};return this.options.resources||!this.options.initImmediate?f():setTimeout(f,0),l}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:W,r=n,o="string"==typeof e?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return r();var i=[],a=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){i.indexOf(e)<0&&i.push(e)}))};if(o)a(o);else{var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.forEach((function(e){return a(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(i,this.options.ns,r)}else r(null)}},{key:"reloadResources",value:function(e,t,n){var r=m();return e||(e=this.languages),t||(t=this.options.ns),n||(n=W),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&T.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=m();this.emit("languageChanging",e);var o=function(e){var o="string"==typeof e?e:n.services.languageUtils.getBestMatchFromCodes(e);o&&(n.language||(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o)),n.translator.language||n.translator.changeLanguage(o),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(o)),n.loadResources(o,(function(e){!function(e,o){o?(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,o)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t){var n=this,o=function e(t,o){var a;if("object"!==r(o)){for(var s=arguments.length,u=new Array(s>2?s-2:0),c=2;c<s;c++)u[c-2]=arguments[c];a=n.options.overloadTranslationOptionHandler([t,o].concat(u))}else a=i({},o);return a.lng=a.lng||e.lng,a.lngs=a.lngs||e.lngs,a.ns=a.ns||e.ns,n.t(t,a)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var s=n.precheck(this,a);if(void 0!==s)return s}return!!this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||!(!a(r,e)||o&&!a(i,e))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=m();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=m();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],o=e.filter((function(e){return r.indexOf(e)<0}));return o.length?(this.options.preload=r.concat(o),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),e?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr":"rtl"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new t(e,n)}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:W,o=i({},this.options,n,{isClone:!0}),a=new t(o),s=["store","services","language"];return s.forEach((function(t){a[t]=e[t]})),a.services=i({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new D(a.services,a.options),a.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];a.emit.apply(a,[e].concat(n))})),a.init(o,r),a.translator.options=a.options,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}}]),t}(g))},401:()=>{"use strict";try{self["workbox:core:6.5.3"]&&_()}catch(e){}},658:()=>{"use strict";try{self["workbox:routing:6.5.3"]&&_()}catch(e){}},142:()=>{"use strict";try{self["workbox:strategies:6.5.3"]&&_()}catch(e){}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{n.S={};var e={},t={};n.I=(r,o)=>{o||(o=[]);var i=t[r];if(i||(i=t[r]={}),!(o.indexOf(i)>=0)){if(o.push(i),e[r])return e[r];n.o(n.S,r)||(n.S[r]={});var a=n.S[r],s="@openmrs/esm-app-shell",u=(e,t,n,r)=>{var o=a[e]=a[e]||{},i=o[t];(!i||!i.loaded&&(!r!=!i.eager?r:s>i.from))&&(o[t]={get:n,from:s,eager:!!r})},c=[];return"default"===r&&(u("dayjs","1.11.5",(()=>()=>n(364)),1),u("i18next","19.9.2",(()=>()=>n(171)),1)),e[r]=c.length?Promise.all(c).then((()=>e[r]=1)):1}}})(),(()=>{"use strict";n(401);function e(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function t(n,r,o){return t=e()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&i(o,n.prototype),o},t.apply(null,arguments)}function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}function o(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function i(e,t){return i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},i(e,t)}var a=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function s(e){var n="function"==typeof Map?new Map:void 0;return s=function(e){if(null===e||!function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,o)}function o(){return t(e,arguments,r(this).constructor)}return o.prototype=Object.create(e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),i(o,e)},s(e)}var u=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(s,e);var t,n,a=(t=s,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,i=r(t);if(n){var a=r(this).constructor;e=Reflect.construct(i,arguments,a)}else e=i.apply(this,arguments);return o(this,e)});function s(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var r=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=e;return n.length>0&&(o+=" :: ".concat(JSON.stringify(n))),o}(e,t);return(n=a.call(this,r)).name=e,n.details=t,n}return s}(s(Error)),c=new Set,l={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},f=function(e){return e||(t=l.runtime,[l.prefix,t,l.suffix].filter((function(e){return e&&e.length>0})).join("-"));var t};function h(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function p(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){h(i,r,o,a,s,"next",e)}function s(e){h(i,r,o,a,s,"throw",e)}a(void 0)}))}}var d=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};function y(e,t){var n=new URL(e),r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value;n.searchParams.delete(u)}}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n.href}function v(e,t,n,r){return g.apply(this,arguments)}function g(){return(g=p((function(e,t,n,r){var o,i,a,s,u,c,l,f,h,p;return d(this,(function(d){switch(d.label){case 0:return o=y(t.url,n),t.url===o?[2,e.match(t,r)]:(i=Object.assign(Object.assign({},r),{ignoreSearch:!0}),[4,e.keys(t,i)]);case 1:a=d.sent(),s=!0,u=!1,c=void 0;try{for(l=a[Symbol.iterator]();!(s=(f=l.next()).done);s=!0)if(h=f.value,p=y(h.url,n),o===p)return[2,e.match(h,r)]}catch(e){u=!0,c=e}finally{try{s||null==l.return||l.return()}finally{if(u)throw c}}return[2]}}))}))).apply(this,arguments)}var m=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))};function b(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function w(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){b(i,r,o,a,s,"next",e)}function s(e){b(i,r,o,a,s,"throw",e)}a(void 0)}))}}var _=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};function k(){return x.apply(this,arguments)}function x(){return(x=w((function(){var e,t,n,r,o,i;return _(this,(function(a){switch(a.label){case 0:e=!0,t=!1,n=void 0,a.label=1;case 1:a.trys.push([1,6,7,8]),r=c[Symbol.iterator](),a.label=2;case 2:return(e=(o=r.next()).done)?[3,5]:[4,(0,o.value)()];case 3:a.sent(),a.label=4;case 4:return e=!0,[3,2];case 5:return[3,8];case 6:return i=a.sent(),t=!0,n=i,[3,8];case 7:try{e||null==r.return||r.return()}finally{if(t)throw n}return[7];case 8:return[2]}}))}))).apply(this,arguments)}function S(e){return new Promise((function(t){return setTimeout(t,e)}))}const O="object"==typeof global&&global&&global.Object===Object&&global;var P="object"==typeof self&&self&&self.Object===Object&&self;const E=O||P||Function("return this")(),j=E.Symbol,R=Array.isArray;var C=Object.prototype,T=C.hasOwnProperty,A=C.toString,D=j?j.toStringTag:void 0;var L=Object.prototype.toString;var K=j?j.toStringTag:void 0;const I=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":K&&K in Object(e)?function(e){var t=T.call(e,D),n=e[D];try{e[D]=void 0;var r=!0}catch(e){}var o=A.call(e);return r&&(t?e[D]=n:delete e[D]),o}(e):function(e){return L.call(e)}(e)},M=function(e){return null!=e&&"object"==typeof e};var N=j?j.prototype:void 0,F=N?N.toString:void 0;const $=function e(t){if("string"==typeof t)return t;if(R(t))return function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}(t,e)+"";if(function(e){return"symbol"==(void 0===e?"undefined":(t=e)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)||M(e)&&"[object Symbol]"==I(e);var t}(t))return F?F.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n};var B=/[\\^$.*+?()[\]{}|]/g,q=RegExp(B.source);const U=function(e){return(e=null==(t=e)?"":$(t))&&q.test(e)?e.replace(B,"\\$&"):e;var t};function W(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function V(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){W(i,r,o,a,s,"next",e)}function s(e){W(i,r,o,a,s,"throw",e)}a(void 0)}))}}var H=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};function z(e){return Y.apply(this,arguments)}function Y(){return Y=V((function(e){var t,n,r,o,i,a,s,u=arguments;return H(this,(function(c){switch(c.label){case 0:t=u.length>1&&void 0!==u[1]?u[1]:{},n=t.shouldRetry,r=t.getDelay,o=t.onError,n=null!=n?n:function(e){return G(e,5)},r=null!=r?r:function(e){return J(e,1e3)},i=0,a=void 0,c.label=1;case 1:return c.trys.push([1,4,,5]),[4,Q(r(i))];case 2:return c.sent(),[4,e()];case 3:return[2,c.sent()];case 4:return s=c.sent(),null==o||o(s,i),a=s,[3,5];case 5:if(n(i++))return[3,1];c.label=6;case 6:throw a}}))})),Y.apply(this,arguments)}function G(e,t){return e<=t}function J(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=n?e+1:e;return t*Math.pow(2,r)}function Q(e){return X.apply(this,arguments)}function X(){return(X=V((function(e){return H(this,(function(t){return e<=0?[2]:[2,new Promise((function(t){return setTimeout(t,e)}))]}))}))).apply(this,arguments)}const Z=function(e){var t,n=void 0===e?"undefined":(t=e)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t;return null!=e&&("object"==n||"function"==n)},ee=E["__core-js_shared__"];var te,ne=(te=/[^.]+$/.exec(ee&&ee.keys&&ee.keys.IE_PROTO||""))?"Symbol(src)_1."+te:"";var re=Function.prototype.toString;var oe=/^\[object .+?Constructor\]$/,ie=Function.prototype,ae=Object.prototype,se=ie.toString,ue=ae.hasOwnProperty,ce=RegExp("^"+se.call(ue).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const le=function(e){return!(!Z(e)||(t=e,ne&&ne in t))&&(function(e){if(!Z(e))return!1;var t=I(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}(e)?ce:oe).test(function(e){if(null!=e){try{return re.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e));var t},fe=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return le(n)?n:void 0},he=fe(Object,"create");var pe=Object.prototype.hasOwnProperty;var de=Object.prototype.hasOwnProperty;function ye(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ye.prototype.clear=function(){this.__data__=he?he(null):{},this.size=0},ye.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ye.prototype.get=function(e){var t=this.__data__;if(he){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return pe.call(t,e)?t[e]:void 0},ye.prototype.has=function(e){var t=this.__data__;return he?void 0!==t[e]:de.call(t,e)},ye.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=he&&void 0===t?"__lodash_hash_undefined__":t,this};const ve=ye,ge=function(e,t){for(var n=e.length;n--;)if((r=e[n][0])===(o=t)||r!=r&&o!=o)return n;var r,o;return-1};var me=Array.prototype.splice;function be(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}be.prototype.clear=function(){this.__data__=[],this.size=0},be.prototype.delete=function(e){var t=this.__data__,n=ge(t,e);return!(n<0||(n==t.length-1?t.pop():me.call(t,n,1),--this.size,0))},be.prototype.get=function(e){var t=this.__data__,n=ge(t,e);return n<0?void 0:t[n][1]},be.prototype.has=function(e){return ge(this.__data__,e)>-1},be.prototype.set=function(e,t){var n=this.__data__,r=ge(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const we=be,_e=fe(E,"Map"),ke=function(e,t){var n,r,o,i=e.__data__;return("string"==(o=void 0===(n=t)?"undefined":(r=n)&&"undefined"!=typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"number"==o||"symbol"==o||"boolean"==o?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map};function xe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}xe.prototype.clear=function(){this.size=0,this.__data__={hash:new ve,map:new(_e||we),string:new ve}},xe.prototype.delete=function(e){var t=ke(this,e).delete(e);return this.size-=t?1:0,t},xe.prototype.get=function(e){return ke(this,e).get(e)},xe.prototype.has=function(e){return ke(this,e).has(e)},xe.prototype.set=function(e,t){var n=ke(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};const Se=xe;function Oe(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Se;++t<n;)this.add(e[t])}Oe.prototype.add=Oe.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Oe.prototype.has=function(e){return this.__data__.has(e)};const Pe=Oe,Ee=function(e){return e!=e},je=function(e,t){return!(null==e||!e.length)&&function(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}(e,Ee,n)}(e,t,0)>-1},Re=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1},Ce=function(e,t){return e.has(t)},Te=fe(E,"Set"),Ae=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},De=Te&&1/Ae(new Te([,-0]))[1]==1/0?function(e){return new Te(e)}:function(){},Le=function(e){return e&&e.length?function(e,t,n){var r=-1,o=je,i=e.length,a=!0,s=[],u=s;if(n)a=!1,o=Re;else if(i>=200){var c=t?null:De(e);if(c)return Ae(c);a=!1,o=Ce,u=new Pe}else u=t?[]:s;e:for(;++r<i;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var h=u.length;h--;)if(u[h]===f)continue e;t&&u.push(f),s.push(l)}else o(u,f,n)||(u!==s&&u.push(f),s.push(l))}return s}(e):[]};var Ke="omrs",Ie="".concat(Ke,"-spa-cache-v1"),Me=[{'revision':null,'url':'023bd53d342b7463.woff'},{'revision':null,'url':'02acc4469a2fe2e4.woff2'},{'revision':null,'url':'033e03f8663ab9b1.woff'},{'revision':null,'url':'052607e67da262ec.woff'},{'revision':null,'url':'081587ca0db8e63f.woff2'},{'revision':null,'url':'08cf53c4e5e71cf1.woff2'},{'revision':null,'url':'090b2bc014d24ea4.woff2'},{'revision':null,'url':'0a28cd0b47497b71.woff'},{'revision':null,'url':'0a9765a89ff0437d.woff'},{'revision':null,'url':'0ae92bcea615e948.woff2'},{'revision':null,'url':'0be8520d8945b3b7.woff2'},{'revision':null,'url':'0bf6b66a8b86b014.woff'},{'revision':null,'url':'0e7dd073cd8bb0ad.woff2'},{'revision':null,'url':'14869ac5d1830304.woff2'},{'revision':null,'url':'14aaceff85fc8b28.woff2'},{'revision':null,'url':'1590052e1cf8f28d.woff'},{'revision':null,'url':'16f443eed01776ca.woff2'},{'revision':null,'url':'183bae0e53a22182.woff2'},{'revision':null,'url':'19b239a0bb74b27e.woff'},{'revision':null,'url':'19c8f94ccd6289f5.woff2'},{'revision':null,'url':'1ae86565eab7451c.woff2'},{'revision':null,'url':'1c7bf8797e0a9be6.woff2'},{'revision':null,'url':'1d9aff9a93a3bb66.woff'},{'revision':null,'url':'1f266d3619b30f16.woff2'},{'revision':null,'url':'1f8c5a4087a524fd.woff2'},{'revision':null,'url':'20ba2b23c5c0cd0b.woff2'},{'revision':null,'url':'2269d45733c5cf8f.woff'},{'revision':null,'url':'258ecbd235953099.woff'},{'revision':null,'url':'295dd01a1fbfee6d.woff2'},{'revision':null,'url':'2d7f835ab7c7c764.woff'},{'revision':null,'url':'2f66cca99eeead63.woff'},{'revision':null,'url':'2f686985e26e7107.woff2'},{'revision':null,'url':'315eff729e4ccbd9.woff2'},{'revision':null,'url':'32f1e5aadf845e08.woff'},{'revision':null,'url':'338484e1c850669c.woff'},{'revision':null,'url':'33b7a82f1e295190.woff'},{'revision':null,'url':'3674d98ec4a9173d.woff'},{'revision':null,'url':'368d16e3259bf207.woff2'},{'revision':null,'url':'36c49aa341a7079a.woff2'},{'revision':null,'url':'36e1e0430475edee.woff2'},{'revision':null,'url':'3bc19662b8630ee9.woff2'},{'revision':null,'url':'3f645f473b3f8fba.woff2'},{'revision':null,'url':'4095df88acae9e98.woff'},{'revision':null,'url':'4218ac9901b9d36d.woff2'},{'revision':null,'url':'4680ba68412e4da9.woff2'},{'revision':null,'url':'47d7a8698d562a0e.woff'},{'revision':null,'url':'47ec6c9dffe776a0.woff'},{'revision':null,'url':'48e37bd7ebf85a1f.woff2'},{'revision':null,'url':'48edfdf51dfb3160.woff'},{'revision':null,'url':'4a35a2746c8ad7a5.woff'},{'revision':null,'url':'4e11b8a7c445255f.woff2'},{'revision':null,'url':'4ea1f5c3baf89fe3.woff'},{'revision':null,'url':'4ea99f41c896bf9d.woff'},{'revision':null,'url':'5005db1d1caf70c7.woff'},{'revision':null,'url':'528a8e7c1c141a31.woff'},{'revision':null,'url':'52ca12f5b516d4ea.woff'},{'revision':null,'url':'537ddd61c5c1fce2.woff2'},{'revision':null,'url':'5432f7541ec25c34.woff'},{'revision':null,'url':'54a95d73a9454ba3.woff'},{'revision':null,'url':'56c4118c0907f151.woff2'},{'revision':null,'url':'5938bc2ae7ec60c0.woff2'},{'revision':null,'url':'594306657c4e44e8.woff'},{'revision':null,'url':'5a538aa477a66067.woff'},{'revision':null,'url':'5c6586155f0d278a.woff2'},{'revision':null,'url':'60ec587649ba812a.woff2'},{'revision':null,'url':'616567cd947eb9dd.woff'},{'revision':null,'url':'65168b59f44caab4.woff'},{'revision':null,'url':'65c0982f98374864.woff'},{'revision':null,'url':'65e6511e035870e1.woff2'},{'revision':null,'url':'661425f6798cd16a.woff2'},{'revision':null,'url':'66b864fe213caf46.woff2'},{'revision':null,'url':'6775fee945132ef9.woff'},{'revision':null,'url':'68bbd362c8e4983b.woff'},{'revision':null,'url':'68d6deec87b6b604.woff'},{'revision':null,'url':'69a7e6d31d390296.woff'},{'revision':null,'url':'69d087d970ee9455.woff2'},{'revision':null,'url':'69fa3fc7363bbc04.woff'},{'revision':null,'url':'6a1f0178b45b2e9e.woff'},{'revision':null,'url':'6c6c45e66ff54281.woff2'},{'revision':null,'url':'6ffb9ed97b21fdc0.woff'},{'revision':null,'url':'7073a7323e92bd11.woff2'},{'revision':null,'url':'718c6cc31274ab1a.woff2'},{'revision':null,'url':'72cdbedfe04be9f9.woff2'},{'revision':null,'url':'7509c9f56fe9e532.woff2'},{'revision':null,'url':'75dc5c5b04adc8bf.woff2'},{'revision':null,'url':'76a7c256fc8b3490.woff'},{'revision':null,'url':'77b48bc05299ecca.woff2'},{'revision':null,'url':'787f56efa306ddbc.woff'},{'revision':null,'url':'7a0a0215c248c73d.woff2'},{'revision':null,'url':'7c4463d9c84f263a.woff'},{'revision':null,'url':'7d112a556b7670d2.woff'},{'revision':null,'url':'7d52d6014b5f2bbc.woff'},{'revision':null,'url':'7f00bebb24e40167.woff2'},{'revision':null,'url':'7f2c6ea3e740417e.woff'},{'revision':null,'url':'802c6176541eeed7.woff2'},{'revision':null,'url':'8080081b3379c637.woff2'},{'revision':null,'url':'8274cc1afc7619f1.woff'},{'revision':null,'url':'8605507b7a8487c4.woff2'},{'revision':null,'url':'8a83d654702f6534.woff2'},{'revision':null,'url':'8ccee65f6cf254ee.woff'},{'revision':null,'url':'8d82a082a4aba439.woff'},{'revision':null,'url':'8de04ae985937b56.woff'},{'revision':null,'url':'8f8d23f5e4ad92b8.js'},{'revision':null,'url':'8fe71173a13fe571.woff2'},{'revision':null,'url':'90edccb224a51cee.woff'},{'revision':null,'url':'94b292fe87831a8b.woff'},{'revision':null,'url':'95dc66c1b88745f8.woff'},{'revision':null,'url':'95fb698be77c85ef.woff'},{'revision':null,'url':'9624cec0f9bdd81e.woff2'},{'revision':null,'url':'9662331fa31e3f20.woff'},{'revision':null,'url':'98a3af55a1698171.woff2'},{'revision':null,'url':'9ba85996af74c5ce.woff2'},{'revision':null,'url':'9bc133b1df25cb74.woff'},{'revision':null,'url':'9ddb22faa35006e7.woff2'},{'revision':null,'url':'9e97352380611b95.woff'},{'revision':null,'url':'a167fb2799dd741b.woff2'},{'revision':null,'url':'a2045a5cc4fdf94f.woff2'},{'revision':null,'url':'a246c73905a31c93.woff2'},{'revision':null,'url':'a401aa7939cb6e6f.woff2'},{'revision':null,'url':'a41a71258c38684d.woff'},{'revision':null,'url':'a60d94a72d615a8e.woff'},{'revision':null,'url':'a66764dd0c1fa213.woff'},{'revision':null,'url':'a6ed036f17a1ea29.woff2'},{'revision':null,'url':'a8f635129d660202.woff'},{'revision':null,'url':'a9f25ca430709a1a.woff2'},{'revision':null,'url':'ae14d98ad8a1212c.woff'},{'revision':null,'url':'aeec4f78084adf7f.woff'},{'revision':null,'url':'af11e94b0644eba5.woff'},{'revision':null,'url':'afa9121a49e95351.woff2'},{'revision':null,'url':'afcda12d9f805543.woff2'},{'revision':null,'url':'b09ded85a7da77f1.woff2'},{'revision':null,'url':'b2f4e9d1e821b71c.woff2'},{'revision':null,'url':'b30b06698dc369b2.woff'},{'revision':null,'url':'b4a074bf828bb757.woff2'},{'revision':null,'url':'b7f447da43f6e596.woff2'},{'revision':null,'url':'b7f633b871b84820.woff'},{'revision':null,'url':'bcca84a524572d10.woff2'},{'revision':null,'url':'be4d1f97b11d087c.woff2'},{'revision':null,'url':'be91def2232f6776.woff'},{'revision':null,'url':'bec14780d81164de.woff2'},{'revision':null,'url':'c285f4b15d11f172.woff'},{'revision':null,'url':'c4673617b80801f3.woff'},{'revision':null,'url':'c553f7e0199c5084.woff2'},{'revision':null,'url':'c8470ed2c145ace7.woff'},{'revision':null,'url':'c9d9ce9f465df4fe.woff2'},{'revision':null,'url':'ccb2870475da9fe8.woff'},{'revision':null,'url':'d04134fa33c2606d.woff'},{'revision':null,'url':'d11f9c5cd7d9ea16.woff'},{'revision':null,'url':'d188f7f036ac5779.woff2'},{'revision':null,'url':'d265d81c58525ae4.woff2'},{'revision':null,'url':'d5942cd81663e136.woff2'},{'revision':null,'url':'d6097a5c452acf6d.woff'},{'revision':null,'url':'d66b8ff73d95cabb.woff2'},{'revision':null,'url':'d77f5bf95de8edaa.woff'},{'revision':null,'url':'d8829a685af4f372.woff'},{'revision':null,'url':'d88899ef0fd16719.woff2'},{'revision':null,'url':'d9a5d958e69e058d.woff2'},{'revision':null,'url':'da65d9a514c628c8.woff'},{'revision':null,'url':'dac90d495be353a0.woff2'},{'revision':null,'url':'dd7071bc6306585c.woff'},{'revision':null,'url':'dd8ce598529c3fab.woff2'},{'revision':null,'url':'ddef6f2dd566c2b9.woff'},{'revision':null,'url':'de013f1be25103fa.woff2'},{'revision':null,'url':'dee2ff599db31e5b.woff'},{'revision':null,'url':'dee7c6b5dd954d9b.woff'},{'revision':null,'url':'df222fceeffca849.woff2'},{'revision':null,'url':'e0d2e5b12f028b5d.woff'},{'revision':null,'url':'e33e3db8e4f7559f.woff'},{'revision':null,'url':'e62b00b9199c1ac9.woff2'},{'revision':null,'url':'e696cef1407b2610.woff2'},{'revision':null,'url':'e89ca83b24959664.woff'},{'revision':null,'url':'eb8c0ae77ad55249.woff'},{'revision':null,'url':'ed0997bd7d221b8e.woff'},{'revision':null,'url':'eed48feba743e21c.woff2'},{'revision':null,'url':'f280bda8a6e535a6.woff'},{'revision':null,'url':'f543c88feb236d11.woff2'},{'revision':null,'url':'f591b0079faa93fe.woff2'},{'revision':null,'url':'f6ed27923769ad1d.woff2'},{'revision':null,'url':'f8803bebe640d99a.woff'},{'revision':'30de494bd9e73ae96c18fd0c06fa422b','url':'favicon.ico'},{'revision':null,'url':'fbebeb4336e67012.woff2'},{'revision':null,'url':'fd522cd7a5c646fe.woff'},{'revision':null,'url':'https://dev3.openmrs.org/openmrs/spa/importmap.json'},{'revision':'92c98869580aa3522be1181195eccb21','url':'index.html'},{'revision':'6b758b31ea00150986994edcfb033a94','url':'logo-512.png'},{'revision':'b860db243392596e3b875bad9794b4e5','url':'logo.svg'},{'revision':null,'url':'openmrs.7f67a01dda216963.js'},{'revision':'10230be33ff15c31af5f9a8587ee6ac8','url':'openmrs.7f67a01dda216963.js.LICENSE.txt'},{'revision':null,'url':'openmrs.a88c696b0c32abb9.css'}],Ne=$e("index.html"),Fe=Le(Me.map((function(e){return $e(e.url)})));function $e(e){return new URL(e,self.location.href).href}const Be=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e},qe=function(e){return M(e)&&"[object Arguments]"==I(e)};var Ue=Object.prototype,We=Ue.hasOwnProperty,Ve=Ue.propertyIsEnumerable;const He=qe(function(){return arguments}())?qe:function(e){return M(e)&&We.call(e,"callee")&&!Ve.call(e,"callee")};var ze=j?j.isConcatSpreadable:void 0;const Ye=function(e){return R(e)||He(e)||!!(ze&&e&&e[ze])},Ge=function e(t,n,r,o,i){var a=-1,s=t.length;for(r||(r=Ye),i||(i=[]);++a<s;){var u=t[a];n>0&&r(u)?n>1?e(u,n-1,r,o,i):Be(i,u):o||(i[i.length]=u)}return i},Je=function(e){return null!=e&&e.length?Ge(e,1):[]};function Qe(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Xe(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Qe(i,r,o,a,s,"next",e)}function s(e){Qe(i,r,o,a,s,"throw",e)}a(void 0)}))}}var Ze=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};function et(e){return tt.apply(this,arguments)}function tt(){return tt=Xe((function(e){var t,n,r,o;return Ze(this,(function(i){switch(i.label){case 0:return t=e.imports,n=void 0===t?{}:t,r=Object.values(n),[4,Promise.all(r.map((a=Xe((function(e){var t;return Ze(this,(function(n){switch(n.label){case 0:return[4,rt(nt(e))];case 1:return[2,(t=n.sent())?ot(e,t):[]]}}))})),function(e){return a.apply(this,arguments)})))];case 1:return o=i.sent(),[2,Je(o)]}var a}))})),tt.apply(this,arguments)}function nt(e){return e+".buildmanifest.json"}function rt(e){return fetch(e).then((function(e){return e.json()})).catch((function(){return null}))}function ot(e,t){try{var n,r=[],o=((b=((m=new URL(e,self.location.href)).origin+m.pathname).split("/"))[b.length-1]="",b.join("/")),i=!0,a=!1,s=void 0;try{for(var u,c=(null!==(n=t.chunks)&&void 0!==n?n:[])[Symbol.iterator]();!(i=(u=c.next()).done);i=!0){var l,f=u.value,h=!0,p=!1,d=void 0;try{for(var y,v=(null!==(l=f.files)&&void 0!==l?l:[])[Symbol.iterator]();!(h=(y=v.next()).done);h=!0){var g=y.value;r.push(new URL(g,o).toString())}}catch(e){p=!0,d=e}finally{try{h||null==v.return||v.return()}finally{if(p)throw d}}}}catch(e){a=!0,s=e}finally{try{i||null==c.return||c.return()}finally{if(a)throw s}}return r}catch(t){return console.error("[SW] Failed to determine the dependencies of the module with the URL %s. Not precaching any of the module's assets. Error: ",e,t),[]}var m,b}const it="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,at=Object.keys,st=Array.isArray;function ut(e,t){return"object"!=typeof t||at(t).forEach((function(n){e[n]=t[n]})),e}"undefined"==typeof Promise||it.Promise||(it.Promise=Promise);const ct=Object.getPrototypeOf,lt={}.hasOwnProperty;function ft(e,t){return lt.call(e,t)}function ht(e,t){"function"==typeof t&&(t=t(ct(e))),("undefined"==typeof Reflect?at:Reflect.ownKeys)(t).forEach((n=>{dt(e,n,t[n])}))}const pt=Object.defineProperty;function dt(e,t,n,r){pt(e,t,ut(n&&ft(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function yt(e){return{from:function(t){return e.prototype=Object.create(t.prototype),dt(e.prototype,"constructor",e),{extend:ht.bind(null,e.prototype)}}}}const vt=Object.getOwnPropertyDescriptor;function gt(e,t){let n;return vt(e,t)||(n=ct(e))&>(n,t)}const mt=[].slice;function bt(e,t,n){return mt.call(e,t,n)}function wt(e,t){return t(e)}function _t(e){if(!e)throw new Error("Assertion Failed")}function kt(e){it.setImmediate?setImmediate(e):setTimeout(e,0)}function xt(e,t){return e.reduce(((e,n,r)=>{var o=t(n,r);return o&&(e[o[0]]=o[1]),e}),{})}function St(e,t){if(ft(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var n=[],r=0,o=t.length;r<o;++r){var i=St(e,t[r]);n.push(i)}return n}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return void 0===s?void 0:St(s,t.substr(a+1))}}function Ot(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){_t("string"!=typeof n&&"length"in n);for(var r=0,o=t.length;r<o;++r)Ot(e,t[r],n[r])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),s=t.substr(i+1);if(""===s)void 0===n?st(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=n;else{var u=e[a];u&&ft(e,a)||(u=e[a]={}),Ot(u,s,n)}}else void 0===n?st(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}function Pt(e){var t={};for(var n in e)ft(e,n)&&(t[n]=e[n]);return t}const Et=[].concat;function jt(e){return Et.apply([],e)}const Rt="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(jt([8,16,32,64].map((e=>["Int","Uint","Float"].map((t=>t+e+"Array")))))).filter((e=>it[e])),Ct=Rt.map((e=>it[e]));xt(Rt,(e=>[e,!0]));let Tt=null;function At(e){Tt="undefined"!=typeof WeakMap&&new WeakMap;const t=Dt(e);return Tt=null,t}function Dt(e){if(!e||"object"!=typeof e)return e;let t=Tt&&Tt.get(e);if(t)return t;if(st(e)){t=[],Tt&&Tt.set(e,t);for(var n=0,r=e.length;n<r;++n)t.push(Dt(e[n]))}else if(Ct.indexOf(e.constructor)>=0)t=e;else{const n=ct(e);for(var o in t=n===Object.prototype?{}:Object.create(n),Tt&&Tt.set(e,t),e)ft(e,o)&&(t[o]=Dt(e[o]))}return t}const{toString:Lt}={};function Kt(e){return Lt.call(e).slice(8,-1)}const It="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",Mt="symbol"==typeof It?function(e){var t;return null!=e&&(t=e[It])&&t.apply(e)}:function(){return null},Nt={};function Ft(e){var t,n,r,o;if(1===arguments.length){if(st(e))return e.slice();if(this===Nt&&"string"==typeof e)return[e];if(o=Mt(e)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==e)return[e];if("number"==typeof(t=e.length)){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}const $t="undefined"!=typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var Bt="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function qt(e,t){Bt=e,Ut=t}var Ut=()=>!0;const Wt=!new Error("").stack;function Vt(){if(Wt)try{throw Vt.arguments,new Error}catch(e){return e}return new Error}function Ht(e,t){var n=e.stack;return n?(t=t||0,0===n.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),n.split("\n").slice(t).filter(Ut).map((e=>"\n"+e)).join("")):""}var zt=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Yt=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(zt),Gt={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function Jt(e,t){this._e=Vt(),this.name=e,this.message=t}function Qt(e,t){return e+". Errors: "+Object.keys(t).map((e=>t[e].toString())).filter(((e,t,n)=>n.indexOf(e)===t)).join("\n")}function Xt(e,t,n,r){this._e=Vt(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=Qt(e,t)}function Zt(e,t){this._e=Vt(),this.name="BulkError",this.failures=Object.keys(t).map((e=>t[e])),this.failuresByPos=t,this.message=Qt(e,t)}yt(Jt).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+Ht(this._e,2))}},toString:function(){return this.name+": "+this.message}}),yt(Xt).from(Jt),yt(Zt).from(Jt);var en=Yt.reduce(((e,t)=>(e[t]=t+"Error",e)),{});const tn=Jt;var nn=Yt.reduce(((e,t)=>{var n=t+"Error";function r(e,r){this._e=Vt(),this.name=n,e?"string"==typeof e?(this.message=`${e}${r?"\n "+r:""}`,this.inner=r||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=Gt[t]||n,this.inner=null)}return yt(r).from(tn),e[t]=r,e}),{});nn.Syntax=SyntaxError,nn.Type=TypeError,nn.Range=RangeError;var rn=zt.reduce(((e,t)=>(e[t+"Error"]=nn[t],e)),{}),on=Yt.reduce(((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=nn[t]),e)),{});function an(){}function sn(e){return e}function un(e,t){return null==e||e===sn?t:function(n){return t(e(n))}}function cn(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function ln(e,t){return e===an?t:function(){var n=e.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?cn(r,this.onsuccess):r),o&&(this.onerror=this.onerror?cn(o,this.onerror):o),void 0!==i?i:n}}function fn(e,t){return e===an?t:function(){e.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?cn(n,this.onsuccess):n),r&&(this.onerror=this.onerror?cn(r,this.onerror):r)}}function hn(e,t){return e===an?t:function(n){var r=e.apply(this,arguments);ut(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?cn(o,this.onsuccess):o),i&&(this.onerror=this.onerror?cn(i,this.onerror):i),void 0===r?void 0===a?void 0:a:ut(r,a)}}function pn(e,t){return e===an?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function dn(e,t){return e===an?t:function(){var n=e.apply(this,arguments);if(n&&"function"==typeof n.then){for(var r=this,o=arguments.length,i=new Array(o);o--;)i[o]=arguments[o];return n.then((function(){return t.apply(r,i)}))}return t.apply(this,arguments)}}on.ModifyError=Xt,on.DexieError=Jt,on.BulkError=Zt;var yn={};const[vn,gn,mn]="undefined"==typeof Promise?[]:(()=>{let e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,ct(e),e];const t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,ct(t),e]})(),bn=gn&&gn.then,wn=vn&&vn.constructor,_n=!!mn;var kn=!1,xn=mn?()=>{mn.then(Hn)}:it.setImmediate?setImmediate.bind(null,Hn):it.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver((()=>{Hn(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(Hn,0)},Sn=function(e,t){Dn.push([e,t]),Pn&&(xn(),Pn=!1)},On=!0,Pn=!0,En=[],jn=[],Rn=null,Cn=sn,Tn={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:vr,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((e=>{try{vr(e[0],e[1])}catch(e){}}))}},An=Tn,Dn=[],Ln=0,Kn=[];function In(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=an,this._lib=!1;var t=this._PSD=An;if(Bt&&(this._stackHolder=Vt(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==yn)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&$n(this,this._value))}this._state=null,this._value=null,++t.ref,Fn(this,e)}const Mn={get:function(){var e=An,t=nr;function n(n,r){var o=!e.global&&(e!==An||t!==nr);const i=o&&!ar();var a=new In(((t,a)=>{qn(this,new Nn(dr(n,e,o,i),dr(r,e,o,i),t,a,e))}));return Bt&&Vn(a,this),a}return n.prototype=yn,n},set:function(e){dt(this,"then",e&&e.prototype===yn?Mn:{get:function(){return e},set:Mn.set})}};function Nn(e,t,n,r,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r,this.psd=o}function Fn(e,t){try{t((t=>{if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var n=e._lib&&zn();t&&"function"==typeof t.then?Fn(e,((e,n)=>{t instanceof In?t._then(e,n):t.then(e,n)})):(e._state=!0,e._value=t,Bn(e)),n&&Yn()}}),$n.bind(null,e))}catch(t){$n(e,t)}}function $n(e,t){if(jn.push(t),null===e._state){var n=e._lib&&zn();t=Cn(t),e._state=!1,e._value=t,Bt&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,n){try{e.apply(null,void 0)}catch(e){}}((()=>{var n=gt(t,"stack");t._promise=e,dt(t,"stack",{get:()=>kn?n&&(n.get?n.get.apply(t):n.value):e.stack})})),function(e){En.some((t=>t._value===e._value))||En.push(e)}(e),Bn(e),n&&Yn()}}function Bn(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)qn(e,t[n]);var o=e._PSD;--o.ref||o.finalize(),0===Ln&&(++Ln,Sn((()=>{0==--Ln&&Gn()}),[]))}function qn(e,t){if(null!==e._state){var n=e._state?t.onFulfilled:t.onRejected;if(null===n)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++Ln,Sn(Un,[n,e,t])}else e._listeners.push(t)}function Un(e,t,n){try{Rn=t;var r,o=t._value;t._state?r=e(o):(jn.length&&(jn=[]),r=e(o),-1===jn.indexOf(o)&&function(e){for(var t=En.length;t;)if(En[--t]._value===e._value)return void En.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{Rn=null,0==--Ln&&Gn(),--n.psd.ref||n.psd.finalize()}}function Wn(e,t,n){if(t.length===n)return t;var r="";if(!1===e._state){var o,i,a=e._value;null!=a?(o=a.name||"Error",i=a.message||a,r=Ht(a,0)):(o=a,i=""),t.push(o+(i?": "+i:"")+r)}return Bt&&((r=Ht(e._stackHolder,2))&&-1===t.indexOf(r)&&t.push(r),e._prev&&Wn(e._prev,t,n)),t}function Vn(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)}function Hn(){zn()&&Yn()}function zn(){var e=On;return On=!1,Pn=!1,e}function Yn(){var e,t,n;do{for(;Dn.length>0;)for(e=Dn,Dn=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}}while(Dn.length>0);On=!0,Pn=!0}function Gn(){var e=En;En=[],e.forEach((e=>{e._PSD.onunhandled.call(null,e._value,e)}));for(var t=Kn.slice(0),n=t.length;n;)t[--n]()}function Jn(e){return new In(yn,!1,e)}function Qn(e,t){var n=An;return function(){var r=zn(),o=An;try{return lr(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{lr(o,!1),r&&Yn()}}}ht(In.prototype,{then:Mn,_then:function(e,t){qn(this,new Nn(null,null,e,t,An))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],n=arguments[1];return"function"==typeof t?this.then(null,(e=>e instanceof t?n(e):Jn(e))):this.then(null,(e=>e&&e.name===t?n(e):Jn(e)))},finally:function(e){return this.then((t=>(e(),t)),(t=>(e(),Jn(t))))},stack:{get:function(){if(this._stack)return this._stack;try{kn=!0;var e=Wn(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{kn=!1}}},timeout:function(e,t){return e<1/0?new In(((n,r)=>{var o=setTimeout((()=>r(new nn.Timeout(t))),e);this.then(n,r).finally(clearTimeout.bind(null,o))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&dt(In.prototype,Symbol.toStringTag,"Dexie.Promise"),Tn.env=fr(),ht(In,{all:function(){var e=Ft.apply(null,arguments).map(sr);return new In((function(t,n){0===e.length&&t([]);var r=e.length;e.forEach(((o,i)=>In.resolve(o).then((n=>{e[i]=n,--r||t(e)}),n)))}))},resolve:e=>{if(e instanceof In)return e;if(e&&"function"==typeof e.then)return new In(((t,n)=>{e.then(t,n)}));var t=new In(yn,!0,e);return Vn(t,Rn),t},reject:Jn,race:function(){var e=Ft.apply(null,arguments).map(sr);return new In(((t,n)=>{e.map((e=>In.resolve(e).then(t,n)))}))},PSD:{get:()=>An,set:e=>An=e},totalEchoes:{get:()=>nr},newPSD:or,usePSD:hr,scheduler:{get:()=>Sn,set:e=>{Sn=e}},rejectionMapper:{get:()=>Cn,set:e=>{Cn=e}},follow:(e,t)=>new In(((n,r)=>or(((t,n)=>{var r=An;r.unhandleds=[],r.onunhandled=n,r.finalize=cn((function(){!function(e){Kn.push((function t(){e(),Kn.splice(Kn.indexOf(t),1)})),++Ln,Sn((()=>{0==--Ln&&Gn()}),[])}((()=>{0===this.unhandleds.length?t():n(this.unhandleds[0])}))}),r.finalize),e()}),t,n,r)))}),wn&&(wn.allSettled&&dt(In,"allSettled",(function(){const e=Ft.apply(null,arguments).map(sr);return new In((t=>{0===e.length&&t([]);let n=e.length;const r=new Array(n);e.forEach(((e,o)=>In.resolve(e).then((e=>r[o]={status:"fulfilled",value:e}),(e=>r[o]={status:"rejected",reason:e})).then((()=>--n||t(r)))))}))})),wn.any&&"undefined"!=typeof AggregateError&&dt(In,"any",(function(){const e=Ft.apply(null,arguments).map(sr);return new In(((t,n)=>{0===e.length&&n(new AggregateError([]));let r=e.length;const o=new Array(r);e.forEach(((e,i)=>In.resolve(e).then((e=>t(e)),(e=>{o[i]=e,--r||n(new AggregateError(o))}))))}))})));const Xn={awaits:0,echoes:0,id:0};var Zn=0,er=[],tr=0,nr=0,rr=0;function or(e,t,n,r){var o=An,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++rr;var a=Tn.env;i.env=_n?{Promise:In,PromiseProp:{value:In,configurable:!0,writable:!0},all:In.all,race:In.race,allSettled:In.allSettled,any:In.any,resolve:In.resolve,reject:In.reject,nthen:yr(a.nthen,i),gthen:yr(a.gthen,i)}:{},t&&ut(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=hr(i,e,n,r);return 0===i.ref&&i.finalize(),s}function ir(){return Xn.id||(Xn.id=++Zn),++Xn.awaits,Xn.echoes+=100,Xn.id}function ar(){return!!Xn.awaits&&(0==--Xn.awaits&&(Xn.id=0),Xn.echoes=100*Xn.awaits,!0)}function sr(e){return Xn.echoes&&e&&e.constructor===wn?(ir(),e.then((e=>(ar(),e)),(e=>(ar(),gr(e))))):e}function ur(e){++nr,Xn.echoes&&0!=--Xn.echoes||(Xn.echoes=Xn.id=0),er.push(An),lr(e,!0)}function cr(){var e=er[er.length-1];er.pop(),lr(e,!1)}function lr(e,t){var n=An;if((t?!Xn.echoes||tr++&&e===An:!tr||--tr&&e===An)||pr(t?ur.bind(null,e):cr),e!==An&&(An=e,n===Tn&&(Tn.env=fr()),_n)){var r=Tn.env.Promise,o=e.env;gn.then=o.nthen,r.prototype.then=o.gthen,(n.global||e.global)&&(Object.defineProperty(it,"Promise",o.PromiseProp),r.all=o.all,r.race=o.race,r.resolve=o.resolve,r.reject=o.reject,o.allSettled&&(r.allSettled=o.allSettled),o.any&&(r.any=o.any))}}function fr(){var e=it.Promise;return _n?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(it,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:gn.then,gthen:e.prototype.then}:{}}function hr(e,t,n,r,o){var i=An;try{return lr(e,!0),t(n,r,o)}finally{lr(i,!1)}}function pr(e){bn.call(vn,e)}function dr(e,t,n,r){return"function"!=typeof e?e:function(){var o=An;n&&ir(),lr(t,!0);try{return e.apply(this,arguments)}finally{lr(o,!1),r&&pr(ar)}}}function yr(e,t){return function(n,r){return e.call(this,dr(n,t),dr(r,t))}}function vr(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var r,o={promise:t,reason:e};if(it.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),ut(r,o)):it.CustomEvent&&ut(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&it.dispatchEvent&&(dispatchEvent(r),!it.PromiseRejectionEvent&&it.onunhandledrejection))try{it.onunhandledrejection(r)}catch(e){}Bt&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}-1===(""+bn).indexOf("[native code]")&&(ir=ar=an);var gr=In.reject;function mr(e,t,n,r){if(e.idbdb&&(e._state.openComplete||An.letThrough||e._vip)){var o=e._createTransaction(t,n,e._dbSchema);try{o.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===en.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>mr(e,t,n,r)))):gr(o)}return o._promise(t,((e,t)=>or((()=>(An.trans=o,r(e,t,o)))))).then((e=>o._completion.then((()=>e))))}if(e._state.openComplete)return gr(new nn.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return gr(new nn.DatabaseClosed);e.open().catch(an)}return e._state.dbReadyPromise.then((()=>mr(e,t,n,r)))}const br=String.fromCharCode(65535),wr="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",_r=[],kr="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),xr=kr,Sr=kr,Or=e=>!/(dexie\.js|dexie\.min\.js)/.test(e);function Pr(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}const Er={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function jr(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=At(t))[e],t)}class Rr{_trans(e,t,n){const r=this._tx||An.trans,o=this.name;function i(e,n,r){if(!r.schema[o])throw new nn.NotFound("Table "+o+" not part of transaction");return t(r.idbtrans,r)}const a=zn();try{return r&&r.db===this.db?r===An.trans?r._promise(e,i,n):or((()=>r._promise(e,i,n)),{trans:r,transless:An.transless||An}):mr(this.db,e,[this.name],i)}finally{a&&Yn()}}get(e,t){return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",(t=>this.core.get({trans:t,key:e}).then((e=>this.hook.reading.fire(e))))).then(t)}where(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(st(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);const t=at(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);const n=this.schema.indexes.concat(this.schema.primKey).filter((e=>e.compound&&t.every((t=>e.keyPath.indexOf(t)>=0))&&e.keyPath.every((e=>t.indexOf(e)>=0))))[0];if(n&&this.db._maxKey!==br)return this.where(n.name).equals(n.keyPath.map((t=>e[t])));!n&&Bt&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);const{idxByName:r}=this.schema,o=this.db._deps.indexedDB;function i(e,t){try{return 0===o.cmp(e,t)}catch(e){return!1}}const[a,s]=t.reduce((([t,n],o)=>{const a=r[o],s=e[o];return[t||a,t||!a?Pr(n,a&&a.multi?e=>{const t=St(e,o);return st(t)&&t.some((e=>i(s,e)))}:e=>i(s,St(e,o))):n]}),[null,null]);return a?this.where(a.name).equals(e[a.keyPath]).filter(s):n?this.filter(s):this.where(t).equals("")}filter(e){return this.toCollection().and(e)}count(e){return this.toCollection().count(e)}offset(e){return this.toCollection().offset(e)}limit(e){return this.toCollection().limit(e)}each(e){return this.toCollection().each(e)}toArray(e){return this.toCollection().toArray(e)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(e){return new this.db.Collection(new this.db.WhereClause(this,st(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;const t=t=>{if(!t)return t;const n=Object.create(e.prototype);for(var r in t)if(ft(t,r))try{n[r]=t[r]}catch(e){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}defineClass(){return this.mapToClass((function(e){ut(this,e)}))}add(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=jr(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[o]}))).then((e=>e.numFailures?In.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{Ot(e,r,t)}catch(e){}return t}))}update(e,t){if("object"!=typeof e||st(e))return this.where(":id").equals(e).modify(t);{const n=St(e,this.schema.primKey.keyPath);if(void 0===n)return gr(new nn.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?at(t).forEach((n=>{Ot(e,n,t[n])})):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}}put(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=jr(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=t?[t]:null}))).then((e=>e.numFailures?In.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{Ot(e,r,t)}catch(e){}return t}))}delete(e){return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"delete",keys:[e]}))).then((e=>e.numFailures?In.reject(e.failures[0]):void 0))}clear(){return this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"deleteRange",range:Er}))).then((e=>e.numFailures?In.reject(e.failures[0]):void 0))}bulkGet(e){return this._trans("readonly",(t=>this.core.getMany({keys:e,trans:t}).then((e=>e.map((e=>this.hook.reading.fire(e)))))))}bulkAdd(e,t,n){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new nn.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new nn.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=i&&n?e.map(jr(i)):e;return this.core.mutate({trans:t,type:"add",keys:r,values:s,wantResults:o}).then((({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new Zt(`${this.name}.bulkAdd(): ${e} of ${a} operations failed`,r)}))}))}bulkPut(e,t,n){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new nn.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new nn.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=i&&n?e.map(jr(i)):e;return this.core.mutate({trans:t,type:"put",keys:r,values:s,wantResults:o}).then((({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new Zt(`${this.name}.bulkPut(): ${e} of ${a} operations failed`,r)}))}))}bulkDelete(e){const t=e.length;return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"delete",keys:e}))).then((({numFailures:e,lastResult:n,failures:r})=>{if(0===e)return n;throw new Zt(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,r)}))}}function Cr(e){var t={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return t[n].subscribe.apply(null,i),e}if("string"==typeof n)return t[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(e,r,o){if("object"==typeof e)return a(e);r||(r=pn),o||(o=an);var i={subscribers:[],fire:o,subscribe:function(e){-1===i.subscribers.indexOf(e)&&(i.subscribers.push(e),i.fire=r(i.fire,e))},unsubscribe:function(e){i.subscribers=i.subscribers.filter((function(t){return t!==e})),i.fire=i.subscribers.reduce(r,o)}};return t[e]=n[e]=i,i}function a(e){at(e).forEach((function(t){var n=e[t];if(st(n))i(t,e[t][0],e[t][1]);else{if("asap"!==n)throw new nn.InvalidArgument("Invalid event config");var r=i(t,sn,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){kt((function(){e.apply(null,t)}))}))}))}}))}}function Tr(e,t){return yt(t).from({prototype:e}),t}function Ar(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function Dr(e,t){e.filter=Pr(e.filter,t)}function Lr(e,t,n){var r=e.replayFilter;e.replayFilter=r?()=>Pr(r(),t()):t,e.justLimit=n&&!r}function Kr(e,t){if(e.isPrimKey)return t.primaryKey;const n=t.getIndexByKeyPath(e.index);if(!n)throw new nn.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function Ir(e,t,n){const r=Kr(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})}function Mr(e,t,n,r){const o=e.replayFilter?Pr(e.filter,e.replayFilter()):e.filter;if(e.or){const i={},a=(e,n,r)=>{if(!o||o(n,r,(e=>n.stop(e)),(e=>n.fail(e)))){var a=n.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),ft(i,s)||(i[s]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(a,n),Nr(Ir(e,r,n),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return Nr(Ir(e,r,n),Pr(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)}function Nr(e,t,n,r){var o=Qn(r?(e,t,o)=>n(r(e),t,o):n);return e.then((e=>{if(e)return e.start((()=>{var n=()=>e.continue();t&&!t(e,(e=>n=e),(t=>{e.stop(t),n=an}),(t=>{e.fail(t),n=an}))||o(e.value,e,(e=>n=e)),n()}))}))}function Fr(e,t){try{const n=$r(e),r=$r(t);if(n!==r)return"Array"===n?1:"Array"===r?-1:"binary"===n?1:"binary"===r?-1:"string"===n?1:"string"===r?-1:"Date"===n?1:"Date"!==r?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){const n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n)if(e[n]!==t[n])return e[n]<t[n]?-1:1;return n===r?0:n<r?-1:1}(Br(e),Br(t));case"Array":return function(e,t){const n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n){const r=Fr(e[n],t[n]);if(0!==r)return r}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}function $r(e){const t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";const n=Kt(e);return"ArrayBuffer"===n?"binary":n}function Br(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class qr{_read(e,t){var n=this._ctx;return n.error?n.table._trans(null,gr.bind(null,n.error)):n.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,gr.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=Pr(t.algorithm,e)}_iterate(e,t){return Mr(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&ut(n,e),t._ctx=n,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read((n=>Mr(t,e,n,t.table.core)))}count(e){return this._read((e=>{const t=this._ctx,n=t.table.core;if(Ar(t,!0))return n.count({trans:e,query:{index:Kr(t,n.schema),range:t.range}}).then((e=>Math.min(e,t.limit)));var r=0;return Mr(t,(()=>(++r,!1)),e,n).then((()=>r))})).then(e)}sortBy(e,t){const n=e.split(".").reverse(),r=n[0],o=n.length-1;function i(e,t){return t?i(e[n[t]],t-1):e[r]}var a="next"===this._ctx.dir?1:-1;function s(e,t){var n=i(e,o),r=i(t,o);return n<r?-a:n>r?a:0}return this.toArray((function(e){return e.sort(s)})).then(t)}toArray(e){return this._read((e=>{var t=this._ctx;if("next"===t.dir&&Ar(t,!0)&&t.limit>0){const{valueMapper:n}=t,r=Kr(t,t.table.core.schema);return t.table.core.query({trans:e,limit:t.limit,values:!0,query:{index:r,range:t.range}}).then((({result:e})=>n?e.map(n):e))}{const n=[];return Mr(t,(e=>n.push(e)),e,t.table.core).then((()=>n))}}),e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,Ar(t)?Lr(t,(()=>{var t=e;return(e,n)=>0===t||(1===t?(--t,!1):(n((()=>{e.advance(t),t=0})),!1))})):Lr(t,(()=>{var t=e;return()=>--t<0}))),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Lr(this._ctx,(()=>{var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}}),!0),this}until(e,t){return Dr(this._ctx,(function(n,r,o){return!e(n.value)||(r(o),t)})),this}first(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)}last(e){return this.reverse().first(e)}filter(e){var t,n;return Dr(this._ctx,(function(t){return e(t.value)})),t=this._ctx,n=e,t.isMatch=Pr(t.isMatch,n),this}and(e){return this.filter(e)}or(e){return new this.db.WhereClause(this._ctx.table,e,this)}reverse(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.key,n)}))}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.primaryKey,n)}))}keys(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.key)})).then((function(){return n})).then(e)}primaryKeys(e){var t=this._ctx;if("next"===t.dir&&Ar(t,!0)&&t.limit>0)return this._read((e=>{var n=Kr(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})})).then((({result:e})=>e)).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.primaryKey)})).then((function(){return n})).then(e)}uniqueKeys(e){return this._ctx.unique="unique",this.keys(e)}firstKey(e){return this.limit(1).keys((function(e){return e[0]})).then(e)}lastKey(e){return this.reverse().firstKey(e)}distinct(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return Dr(this._ctx,(function(e){var t=e.primaryKey.toString(),r=ft(n,t);return n[t]=!0,!r})),this}modify(e){var t=this._ctx;return this._write((n=>{var r;if("function"==typeof e)r=e;else{var o=at(e),i=o.length;r=function(t){for(var n=!1,r=0;r<i;++r){var a=o[r],s=e[a];St(t,a)!==s&&(Ot(t,a,s),n=!0)}return n}}const a=t.table.core,{outbound:s,extractKey:u}=a.schema.primaryKey,c=this.db._options.modifyChunkSize||200,l=[];let f=0;const h=[],p=(e,t)=>{const{failures:n,numFailures:r}=t;f+=e-r;for(let e of at(n))l.push(n[e])};return this.clone().primaryKeys().then((o=>{const i=l=>{const f=Math.min(c,o.length-l);return a.getMany({trans:n,keys:o.slice(l,l+f),cache:"immutable"}).then((h=>{const d=[],y=[],v=s?[]:null,g=[];for(let e=0;e<f;++e){const t=h[e],n={value:At(t),primKey:o[l+e]};!1!==r.call(n,n.value,n)&&(null==n.value?g.push(o[l+e]):s||0===Fr(u(t),u(n.value))?(y.push(n.value),s&&v.push(o[l+e])):(g.push(o[l+e]),d.push(n.value)))}const m=Ar(t)&&t.limit===1/0&&("function"!=typeof e||e===Ur)&&{index:t.index,range:t.range};return Promise.resolve(d.length>0&&a.mutate({trans:n,type:"add",values:d}).then((e=>{for(let t in e.failures)g.splice(parseInt(t),1);p(d.length,e)}))).then((()=>(y.length>0||m&&"object"==typeof e)&&a.mutate({trans:n,type:"put",keys:v,values:y,criteria:m,changeSpec:"function"!=typeof e&&e}).then((e=>p(y.length,e))))).then((()=>(g.length>0||m&&e===Ur)&&a.mutate({trans:n,type:"delete",keys:g,criteria:m}).then((e=>p(g.length,e))))).then((()=>o.length>l+f&&i(l+c)))}))};return i(0).then((()=>{if(l.length>0)throw new Xt("Error modifying one or more objects",l,f,h);return o.length}))}))}))}delete(){var e=this._ctx,t=e.range;return Ar(e)&&(e.isPrimKey&&!Sr||3===t.type)?this._write((n=>{const{primaryKey:r}=e.table.core.schema,o=t;return e.table.core.count({trans:n,query:{index:r,range:o}}).then((t=>e.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((({failures:e,lastResult:n,results:r,numFailures:o})=>{if(o)throw new Xt("Could not delete some values",Object.keys(e).map((t=>e[t])),t-o);return t-o}))))})):this.modify(Ur)}}const Ur=(e,t)=>t.value=null;function Wr(e,t){return e<t?-1:e===t?0:1}function Vr(e,t){return e>t?-1:e===t?0:1}function Hr(e,t,n){var r=e instanceof Xr?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r}function zr(e){return new e.Collection(e,(()=>Qr(""))).limit(0)}function Yr(e,t,n,r,o,i){for(var a=Math.min(e.length,r.length),s=-1,u=0;u<a;++u){var c=t[u];if(c!==r[u])return o(e[u],n[u])<0?e.substr(0,u)+n[u]+n.substr(u+1):o(e[u],r[u])<0?e.substr(0,u)+r[u]+n.substr(u+1):s>=0?e.substr(0,s)+t[s]+n.substr(s+1):null;o(e[u],c)<0&&(s=u)}return a<r.length&&"next"===i?e+n.substr(e.length):a<e.length&&"prev"===i?e.substr(0,n.length):s<0?null:e.substr(0,s)+r[s]+n.substr(s+1)}function Gr(e,t,n,r){var o,i,a,s,u,c,l,f=n.length;if(!n.every((e=>"string"==typeof e)))return Hr(e,"String expected.");function h(e){o=function(e){return"next"===e?e=>e.toUpperCase():e=>e.toLowerCase()}(e),i=function(e){return"next"===e?e=>e.toLowerCase():e=>e.toUpperCase()}(e),a="next"===e?Wr:Vr;var t=n.map((function(e){return{lower:i(e),upper:o(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));s=t.map((function(e){return e.upper})),u=t.map((function(e){return e.lower})),c=e,l="next"===e?"":r}h("next");var p=new e.Collection(e,(()=>Jr(s[0],u[f-1]+r)));p._ondirectionchange=function(e){h(e)};var d=0;return p._addAlgorithm((function(e,n,r){var o=e.key;if("string"!=typeof o)return!1;var h=i(o);if(t(h,u,d))return!0;for(var p=null,y=d;y<f;++y){var v=Yr(o,h,s[y],u[y],a,c);null===v&&null===p?d=y+1:(null===p||a(p,v)>0)&&(p=v)}return n(null!==p?function(){e.continue(p+l)}:r),!1})),p}function Jr(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function Qr(e){return{type:1,lower:e,upper:e}}class Xr{get Collection(){return this._ctx.table.db.Collection}between(e,t,n,r){n=!1!==n,r=!0===r;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(n||r)&&(!n||!r)?zr(this):new this.Collection(this,(()=>Jr(e,t,!n,!r)))}catch(e){return Hr(this,wr)}}equals(e){return null==e?Hr(this,wr):new this.Collection(this,(()=>Qr(e)))}above(e){return null==e?Hr(this,wr):new this.Collection(this,(()=>Jr(e,void 0,!0)))}aboveOrEqual(e){return null==e?Hr(this,wr):new this.Collection(this,(()=>Jr(e,void 0,!1)))}below(e){return null==e?Hr(this,wr):new this.Collection(this,(()=>Jr(void 0,e,!1,!0)))}belowOrEqual(e){return null==e?Hr(this,wr):new this.Collection(this,(()=>Jr(void 0,e)))}startsWith(e){return"string"!=typeof e?Hr(this,"String expected."):this.between(e,e+br,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):Gr(this,((e,t)=>0===e.indexOf(t[0])),[e],br)}equalsIgnoreCase(e){return Gr(this,((e,t)=>e===t[0]),[e],"")}anyOfIgnoreCase(){var e=Ft.apply(Nt,arguments);return 0===e.length?zr(this):Gr(this,((e,t)=>-1!==t.indexOf(e)),e,"")}startsWithAnyOfIgnoreCase(){var e=Ft.apply(Nt,arguments);return 0===e.length?zr(this):Gr(this,((e,t)=>t.some((t=>0===e.indexOf(t)))),e,br)}anyOf(){const e=Ft.apply(Nt,arguments);let t=this._cmp;try{e.sort(t)}catch(e){return Hr(this,wr)}if(0===e.length)return zr(this);const n=new this.Collection(this,(()=>Jr(e[0],e[e.length-1])));n._ondirectionchange=n=>{t="next"===n?this._ascending:this._descending,e.sort(t)};let r=0;return n._addAlgorithm(((n,o,i)=>{const a=n.key;for(;t(a,e[r])>0;)if(++r,r===e.length)return o(i),!1;return 0===t(a,e[r])||(o((()=>{n.continue(e[r])})),!1)})),n}notEqual(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){const e=Ft.apply(Nt,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return Hr(this,wr)}const t=e.reduce(((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]]),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,t){const n=this._cmp,r=this._ascending,o=this._descending,i=this._min,a=this._max;if(0===e.length)return zr(this);if(!e.every((e=>void 0!==e[0]&&void 0!==e[1]&&r(e[0],e[1])<=0)))return Hr(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",nn.InvalidArgument);const s=!t||!1!==t.includeLowers,u=t&&!0===t.includeUppers;let c,l=r;function f(e,t){return l(e[0],t[0])}try{c=e.reduce((function(e,t){let r=0,o=e.length;for(;r<o;++r){const o=e[r];if(n(t[0],o[1])<0&&n(t[1],o[0])>0){o[0]=i(o[0],t[0]),o[1]=a(o[1],t[1]);break}}return r===o&&e.push(t),e}),[]),c.sort(f)}catch(e){return Hr(this,wr)}let h=0;const p=u?e=>r(e,c[h][1])>0:e=>r(e,c[h][1])>=0,d=s?e=>o(e,c[h][0])>0:e=>o(e,c[h][0])>=0;let y=p;const v=new this.Collection(this,(()=>Jr(c[0][0],c[c.length-1][1],!s,!u)));return v._ondirectionchange=e=>{"next"===e?(y=p,l=r):(y=d,l=o),c.sort(f)},v._addAlgorithm(((e,t,n)=>{for(var o=e.key;y(o);)if(++h,h===c.length)return t(n),!1;return!!function(e){return!p(e)&&!d(e)}(o)||(0===this._cmp(o,c[h][1])||0===this._cmp(o,c[h][0])||t((()=>{l===r?e.continue(c[h][0]):e.continue(c[h][1])})),!1)})),v}startsWithAnyOf(){const e=Ft.apply(Nt,arguments);return e.every((e=>"string"==typeof e))?0===e.length?zr(this):this.inAnyRange(e.map((e=>[e,e+br]))):Hr(this,"startsWithAnyOf() only works with strings")}}function Zr(e){return Qn((function(t){return eo(t),e(t.target.error),!1}))}function eo(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}const to=Cr(null,"storagemutated");class no{_lock(){return _t(!An.global),++this._reculock,1!==this._reculock||An.global||(An.lockOwnerFor=this),this}_unlock(){if(_t(!An.global),0==--this._reculock)for(An.global||(An.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{hr(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&An.lockOwnerFor!==this}create(e){if(!this.mode)return this;const t=this.db.idbdb,n=this.db._state.dbOpenError;if(_t(!this.idbtrans),!e&&!t)switch(n&&n.name){case"DatabaseClosedError":throw new nn.DatabaseClosed(n);case"MissingAPIError":throw new nn.MissingAPI(n.message,n);default:throw new nn.OpenFailed(n)}if(!this.active)throw new nn.TransactionInactive;return _t(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):t.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=Qn((t=>{eo(t),this._reject(e.error)})),e.onabort=Qn((t=>{eo(t),this.active&&this._reject(new nn.Abort(e.error)),this.active=!1,this.on("abort").fire(t)})),e.oncomplete=Qn((()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&to.storagemutated.fire(e.mutatedParts)})),this}_promise(e,t,n){if("readwrite"===e&&"readwrite"!==this.mode)return gr(new nn.ReadOnly("Transaction is readonly"));if(!this.active)return gr(new nn.TransactionInactive);if(this._locked())return new In(((r,o)=>{this._blockedFuncs.push([()=>{this._promise(e,t,n).then(r,o)},An])}));if(n)return or((()=>{var e=new In(((e,n)=>{this._lock();const r=t(e,n,this);r&&r.then&&r.then(e,n)}));return e.finally((()=>this._unlock())),e._lib=!0,e}));var r=new In(((e,n)=>{var r=t(e,n,this);r&&r.then&&r.then(e,n)}));return r._lib=!0,r}_root(){return this.parent?this.parent._root():this}waitFor(e){var t=this._root();const n=In.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((()=>n));else{t._waitingFor=n,t._waitingQueue=[];var r=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(r.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new In(((e,r)=>{n.then((n=>t._waitingQueue.push(Qn(e.bind(null,n)))),(e=>t._waitingQueue.push(Qn(r.bind(null,e))))).finally((()=>{t._waitingFor===o&&(t._waitingFor=null)}))}))}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new nn.Abort))}table(e){const t=this._memoizedTables||(this._memoizedTables={});if(ft(t,e))return t[e];const n=this.schema[e];if(!n)throw new nn.NotFound("Table "+e+" not part of transaction");const r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r}}function ro(e,t,n,r,o,i,a){return{name:e,keyPath:t,unique:n,multi:r,auto:o,compound:i,src:(n&&!a?"&":"")+(r?"*":"")+(o?"++":"")+oo(t)}}function oo(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function io(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:xt(n,(e=>[e.name,e]))}}let ao=e=>{try{return e.only([[]]),ao=()=>[[]],[[]]}catch(e){return ao=()=>br,br}};function so(e){return null==e?()=>{}:"string"==typeof e?function(e){return 1===e.split(".").length?t=>t[e]:t=>St(t,e)}(e):t=>St(t,e)}function uo(e){return[].slice.call(e)}let co=0;function lo(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function fo(e,t,n){function r(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");const{lower:n,upper:r,lowerOpen:o,upperOpen:i}=e;return void 0===n?void 0===r?null:t.upperBound(r,!!i):void 0===r?t.lowerBound(n,!!o):t.bound(n,r,!!o,!!i)}const{schema:o,hasGetAll:i}=function(e,t){const n=uo(e.objectStoreNames);return{schema:{name:e.name,tables:n.map((e=>t.objectStore(e))).map((e=>{const{keyPath:t,autoIncrement:n}=e,r=st(t),o=null==t,i={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:t,autoIncrement:n,unique:!0,extractKey:so(t)},indexes:uo(e.indexNames).map((t=>e.index(t))).map((e=>{const{name:t,unique:n,multiEntry:r,keyPath:o}=e,a={name:t,compound:st(o),keyPath:o,unique:n,multiEntry:r,extractKey:so(o)};return i[lo(o)]=a,a})),getIndexByKeyPath:e=>i[lo(e)]};return i[":id"]=a.primaryKey,null!=t&&(i[lo(t)]=a.primaryKey),a}))},hasGetAll:n.length>0&&"getAll"in t.objectStore(n[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,n),a=o.tables.map((e=>function(e){const t=e.name;return{name:t,schema:e,mutate:function({trans:e,type:n,keys:o,values:i,range:a}){return new Promise(((s,u)=>{s=Qn(s);const c=e.objectStore(t),l=null==c.keyPath,f="put"===n||"add"===n;if(!f&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);const{length:h}=o||i||{length:1};if(o&&i&&o.length!==i.length)throw new Error("Given keys array must have same length as given values array.");if(0===h)return s({numFailures:0,failures:{},results:[],lastResult:void 0});let p;const d=[],y=[];let v=0;const g=e=>{++v,eo(e)};if("deleteRange"===n){if(4===a.type)return s({numFailures:v,failures:y,results:[],lastResult:void 0});3===a.type?d.push(p=c.clear()):d.push(p=c.delete(r(a)))}else{const[e,t]=f?l?[i,o]:[i,null]:[o,null];if(f)for(let r=0;r<h;++r)d.push(p=t&&void 0!==t[r]?c[n](e[r],t[r]):c[n](e[r])),p.onerror=g;else for(let t=0;t<h;++t)d.push(p=c[n](e[t])),p.onerror=g}const m=e=>{const t=e.target.result;d.forEach(((e,t)=>null!=e.error&&(y[t]=e.error))),s({numFailures:v,failures:y,results:"delete"===n?o:d.map((e=>e.result)),lastResult:t})};p.onerror=e=>{g(e),m(e)},p.onsuccess=m}))},getMany:({trans:e,keys:n})=>new Promise(((r,o)=>{r=Qn(r);const i=e.objectStore(t),a=n.length,s=new Array(a);let u,c=0,l=0;const f=e=>{const t=e.target;s[t._pos]=t.result,++l===c&&r(s)},h=Zr(o);for(let e=0;e<a;++e)null!=n[e]&&(u=i.get(n[e]),u._pos=e,u.onsuccess=f,u.onerror=h,++c);0===c&&r(s)})),get:({trans:e,key:n})=>new Promise(((r,o)=>{r=Qn(r);const i=e.objectStore(t).get(n);i.onsuccess=e=>r(e.target.result),i.onerror=Zr(o)})),query:function(e){return n=>new Promise(((o,i)=>{o=Qn(o);const{trans:a,values:s,limit:u,query:c}=n,l=u===1/0?void 0:u,{index:f,range:h}=c,p=a.objectStore(t),d=f.isPrimaryKey?p:p.index(f.name),y=r(h);if(0===u)return o({result:[]});if(e){const e=s?d.getAll(y,l):d.getAllKeys(y,l);e.onsuccess=e=>o({result:e.target.result}),e.onerror=Zr(i)}else{let e=0;const t=s||!("openKeyCursor"in d)?d.openCursor(y):d.openKeyCursor(y),n=[];t.onsuccess=r=>{const i=t.result;return i?(n.push(s?i.value:i.primaryKey),++e===u?o({result:n}):void i.continue()):o({result:n})},t.onerror=Zr(i)}}))}(i),openCursor:function({trans:e,values:n,query:o,reverse:i,unique:a}){return new Promise(((s,u)=>{s=Qn(s);const{index:c,range:l}=o,f=e.objectStore(t),h=c.isPrimaryKey?f:f.index(c.name),p=i?a?"prevunique":"prev":a?"nextunique":"next",d=n||!("openKeyCursor"in h)?h.openCursor(r(l),p):h.openKeyCursor(r(l),p);d.onerror=Zr(u),d.onsuccess=Qn((t=>{const n=d.result;if(!n)return void s(null);n.___id=++co,n.done=!1;const r=n.continue.bind(n);let o=n.continuePrimaryKey;o&&(o=o.bind(n));const i=n.advance.bind(n),a=()=>{throw new Error("Cursor not stopped")};n.trans=e,n.stop=n.continue=n.continuePrimaryKey=n.advance=()=>{throw new Error("Cursor not started")},n.fail=Qn(u),n.next=function(){let e=1;return this.start((()=>e--?this.continue():this.stop())).then((()=>this))},n.start=e=>{const t=new Promise(((e,t)=>{e=Qn(e),d.onerror=Zr(t),n.fail=t,n.stop=t=>{n.stop=n.continue=n.continuePrimaryKey=n.advance=a,e(t)}})),s=()=>{if(d.result)try{e()}catch(e){n.fail(e)}else n.done=!0,n.start=()=>{throw new Error("Cursor behind last entry")},n.stop()};return d.onsuccess=Qn((e=>{d.onsuccess=s,s()})),n.continue=r,n.continuePrimaryKey=o,n.advance=i,s(),t},s(n)}),u)}))},count({query:e,trans:n}){const{index:o,range:i}=e;return new Promise(((e,a)=>{const s=n.objectStore(t),u=o.isPrimaryKey?s:s.index(o.name),c=r(i),l=c?u.count(c):u.count();l.onsuccess=Qn((t=>e(t.target.result))),l.onerror=Zr(a)}))}}}(e))),s={};return a.forEach((e=>s[e.name]=e)),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!s[e])throw new Error(`Table '${e}' not found`);return s[e]},MIN_KEY:-1/0,MAX_KEY:ao(t),schema:o}}function ho({_novip:e},t){const n=t.db,r=function(e,t,{IDBKeyRange:n,indexedDB:r},o){const i=function(e,t){return t.reduce(((e,{create:t})=>({...e,...t(e)})),e)}(fo(t,n,o),e.dbcore);return{dbcore:i}}(e._middlewares,n,e._deps,t);e.core=r.dbcore,e.tables.forEach((t=>{const n=t.name;e.core.schema.tables.some((e=>e.name===n))&&(t.core=e.core.table(n),e[n]instanceof e.Table&&(e[n].core=t.core))}))}function po({_novip:e},t,n,r){n.forEach((n=>{const o=r[n];t.forEach((t=>{const r=gt(t,n);(!r||"value"in r&&void 0===r.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?dt(t,n,{get(){return this.table(n)},set(e){pt(this,n,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[n]=new e.Table(n,o))}))}))}function yo({_novip:e},t){t.forEach((t=>{for(let n in t)t[n]instanceof e.Table&&delete t[n]}))}function vo(e,t){return e._cfg.version-t._cfg.version}function go(e,t,n,r){const o=e._dbSchema,i=e._createTransaction("readwrite",e._storeNames,o);i.create(n),i._completion.catch(r);const a=i._reject.bind(i),s=An.transless||An;or((()=>{An.trans=i,An.transless=s,0===t?(at(o).forEach((e=>{bo(n,e,o[e].primKey,o[e].indexes)})),ho(e,n),In.follow((()=>e.on.populate.fire(i))).catch(a)):function({_novip:e},t,n,r){const o=[],i=e._versions;let a=e._dbSchema=_o(0,e.idbdb,r),s=!1;return i.filter((e=>e._cfg.version>=t)).forEach((i=>{o.push((()=>{const o=a,u=i._cfg.dbschema;ko(e,o,r),ko(e,u,r),a=e._dbSchema=u;const c=mo(o,u);c.add.forEach((e=>{bo(r,e[0],e[1].primKey,e[1].indexes)})),c.change.forEach((e=>{if(e.recreate)throw new nn.Upgrade("Not yet support for changing primary key");{const t=r.objectStore(e.name);e.add.forEach((e=>wo(t,e))),e.change.forEach((e=>{t.deleteIndex(e.name),wo(t,e)})),e.del.forEach((e=>t.deleteIndex(e)))}}));const l=i._cfg.contentUpgrade;if(l&&i._cfg.version>t){ho(e,r),n._memoizedTables={},s=!0;let t=Pt(u);c.del.forEach((e=>{t[e]=o[e]})),yo(e,[e.Transaction.prototype]),po(e,[e.Transaction.prototype],at(t),t),n.schema=t;const i=$t(l);let a;i&&ir();const f=In.follow((()=>{if(a=l(n),a&&i){var e=ar.bind(null,null);a.then(e,e)}}));return a&&"function"==typeof a.then?In.resolve(a):f.then((()=>a))}})),o.push((t=>{s&&xr||function(e,t){[].slice.call(t.db.objectStoreNames).forEach((n=>null==e[n]&&t.db.deleteObjectStore(n)))}(i._cfg.dbschema,t),yo(e,[e.Transaction.prototype]),po(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),n.schema=e._dbSchema}))})),function e(){return o.length?In.resolve(o.shift()(n.idbtrans)).then(e):In.resolve()}().then((()=>{var e,t;t=r,at(e=a).forEach((n=>{t.db.objectStoreNames.contains(n)||bo(t,n,e[n].primKey,e[n].indexes)}))}))}(e,t,i,n).catch(a)}))}function mo(e,t){const n={del:[],add:[],change:[]};let r;for(r in e)t[r]||n.del.push(r);for(r in t){const o=e[r],i=t[r];if(o){const e={name:r,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!kr)e.recreate=!0,n.change.push(e);else{const t=o.idxByName,r=i.idxByName;let a;for(a in t)r[a]||e.del.push(a);for(a in r){const n=t[a],o=r[a];n?n.src!==o.src&&e.change.push(o):e.add.push(o)}(e.del.length>0||e.add.length>0||e.change.length>0)&&n.change.push(e)}}else n.add.push([r,i])}return n}function bo(e,t,n,r){const o=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((e=>wo(o,e))),o}function wo(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function _o(e,t,n){const r={};return bt(t.objectStoreNames,0).forEach((e=>{const t=n.objectStore(e);let o=t.keyPath;const i=ro(oo(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[];for(let e=0;e<t.indexNames.length;++e){const n=t.index(t.indexNames[e]);o=n.keyPath;var s=ro(n.name,o,!!n.unique,!!n.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}r[e]=io(e,i,a)})),r}function ko({_novip:e},t,n){const r=n.db.objectStoreNames;for(let o=0;o<r.length;++o){const i=r[o],a=n.objectStore(i);e._hasGetAll="getAll"in a;for(let e=0;e<a.indexNames.length;++e){const n=a.indexNames[e],r=a.index(n).keyPath,o="string"==typeof r?r:"["+bt(r).join("+")+"]";if(t[i]){const e=t[i].idxByName[o];e&&(e.name=n,delete t[i].idxByName[o],t[i].idxByName[n]=e)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&it.WorkerGlobalScope&&it instanceof it.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class xo{_parseStoresSpec(e,t){at(e).forEach((n=>{if(null!==e[n]){var r=e[n].split(",").map(((e,t)=>{const n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return ro(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),st(r),0===t)})),o=r.shift();if(o.multi)throw new nn.Schema("Primary key cannot be multi-valued");r.forEach((e=>{if(e.auto)throw new nn.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new nn.Schema("Index must have a name and cannot be an empty string")})),t[n]=io(n,o,r)}}))}stores(e){const t=this.db;this._cfg.storesSource=this._cfg.storesSource?ut(this._cfg.storesSource,e):e;const n=t._versions,r={};let o={};return n.forEach((e=>{ut(r,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(r,o)})),t._dbSchema=o,yo(t,[t._allTables,t,t.Transaction.prototype]),po(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],at(o),o),t._storeNames=at(o),this}upgrade(e){return this._cfg.contentUpgrade=dn(this._cfg.contentUpgrade||an,e),this}}function So(e,t){let n=e._dbNamesDB;return n||(n=e._dbNamesDB=new Vo("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t}),n.version(1).stores({dbnames:"name"})),n.table("dbnames")}function Oo(e){return e&&"function"==typeof e.databases}function Po(e){return or((function(){return An.letThrough=!0,e()}))}function Eo(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(t){var n=function(){return indexedDB.databases().finally(t)};e=setInterval(n,100),n()})).finally((function(){return clearInterval(e)})):Promise.resolve()}function jo(e){var t=t=>e.next(t),n=o(t),r=o((t=>e.throw(t)));function o(e){return t=>{var o=e(t),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):st(i)?Promise.all(i).then(n,r):n(i)}}return o(t)()}function Ro(e,t,n){var r=arguments.length;if(r<2)throw new nn.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];n=o.pop();var i=jt(o);return[e,i,n]}function Co(e,t,n,r,o){return In.resolve().then((()=>{const i=An.transless||An,a=e._createTransaction(t,n,e._dbSchema,r),s={trans:a,transless:i};if(r)a.idbtrans=r.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(r){return r.name===en.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>Co(e,t,n,null,o)))):gr(r)}const u=$t(o);let c;u&&ir();const l=In.follow((()=>{if(c=o.call(a,a),c)if(u){var e=ar.bind(null,null);c.then(e,e)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=jo(c))}),s);return(c&&"function"==typeof c.then?In.resolve(c).then((e=>a.active?e:gr(new nn.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn")))):l.then((()=>c))).then((e=>(r&&a._resolve(),a._completion.then((()=>e))))).catch((e=>(a._reject(e),gr(e))))}))}function To(e,t,n){const r=st(e)?e.slice():[e];for(let e=0;e<n;++e)r.push(t);return r}const Ao={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){const n=e.table(t),{schema:r}=n,o={},i=[];function a(e,t,n){const r=lo(e),s=o[r]=o[r]||[],u=null==e?0:"string"==typeof e?1:e.length,c=t>0,l={...n,isVirtual:c,keyTail:t,keyLength:u,extractKey:so(e),unique:!c&&n.unique};return s.push(l),l.isPrimaryKey||i.push(l),u>1&&a(2===u?e[0]:e.slice(0,u-1),t+1,n),s.sort(((e,t)=>e.keyTail-t.keyTail)),l}const s=a(r.primaryKey.keyPath,0,r.primaryKey);o[":id"]=[s];for(const e of r.indexes)a(e.keyPath,0,e);function u(t){const n=t.query.index;return n.isVirtual?{...t,query:{index:n,range:(r=t.query.range,o=n.keyTail,{type:1===r.type?2:r.type,lower:To(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,o),lowerOpen:!0,upper:To(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,o),upperOpen:!0})}}:t;var r,o}const c={...n,schema:{...r,primaryKey:s,indexes:i,getIndexByKeyPath:function(e){const t=o[lo(e)];return t&&t[0]}},count:e=>n.count(u(e)),query:e=>n.query(u(e)),openCursor(t){const{keyTail:r,isVirtual:o,keyLength:i}=t.query.index;return o?n.openCursor(u(t)).then((n=>n&&function(n){const o=Object.create(n,{continue:{value:function(o){null!=o?n.continue(To(o,t.reverse?e.MAX_KEY:e.MIN_KEY,r)):t.unique?n.continue(n.key.slice(0,i).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,r)):n.continue()}},continuePrimaryKey:{value(t,o){n.continuePrimaryKey(To(t,e.MAX_KEY,r),o)}},primaryKey:{get:()=>n.primaryKey},key:{get(){const e=n.key;return 1===i?e[0]:e.slice(0,i)}},value:{get:()=>n.value}});return o}(n))):n.openCursor(t)}};return c}}}};function Do(e,t,n,r){return n=n||{},r=r||"",at(e).forEach((o=>{if(ft(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){const e=Kt(i);e!==Kt(a)?n[r+o]=t[o]:"Object"===e?Do(i,a,n,r+o+"."):i!==a&&(n[r+o]=t[o])}else i!==a&&(n[r+o]=t[o])}else n[r+o]=void 0})),at(t).forEach((o=>{ft(e,o)||(n[r+o]=t[o])})),n}const Lo={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){const n=e.table(t),{primaryKey:r}=n.schema,o={...n,mutate(e){const o=An.trans,{deleting:i,creating:a,updating:s}=o.table(t).hook;switch(e.type){case"add":if(a.fire===an)break;return o._promise("readwrite",(()=>u(e)),!0);case"put":if(a.fire===an&&s.fire===an)break;return o._promise("readwrite",(()=>u(e)),!0);case"delete":if(i.fire===an)break;return o._promise("readwrite",(()=>u(e)),!0);case"deleteRange":if(i.fire===an)break;return o._promise("readwrite",(()=>function(e){return c(e.trans,e.range,1e4)}(e)),!0)}return n.mutate(e);function u(e){const t=An.trans,o=e.keys||function(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}(r,e);if(!o)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:o}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),function(e,t,n){return"add"===t.type?Promise.resolve([]):e.getMany({trans:t.trans,keys:n,cache:"immutable"})}(n,e,o).then((u=>{const c=o.map(((n,o)=>{const c=u[o],l={onerror:null,onsuccess:null};if("delete"===e.type)i.fire.call(l,n,c,t);else if("add"===e.type||void 0===c){const i=a.fire.call(l,n,e.values[o],t);null==n&&null!=i&&(n=i,e.keys[o]=n,r.outbound||Ot(e.values[o],r.keyPath,n))}else{const r=Do(c,e.values[o]),i=s.fire.call(l,r,n,c,t);if(i){const t=e.values[o];Object.keys(i).forEach((e=>{ft(t,e)?t[e]=i[e]:Ot(t,e,i[e])}))}}return l}));return n.mutate(e).then((({failures:t,results:n,numFailures:r,lastResult:i})=>{for(let r=0;r<o.length;++r){const i=n?n[r]:o[r],a=c[r];null==i?a.onerror&&a.onerror(t[r]):a.onsuccess&&a.onsuccess("put"===e.type&&u[r]?e.values[r]:i)}return{failures:t,results:n,numFailures:r,lastResult:i}})).catch((e=>(c.forEach((t=>t.onerror&&t.onerror(e))),Promise.reject(e))))}))}function c(e,t,o){return n.query({trans:e,values:!1,query:{index:r,range:t},limit:o}).then((({result:n})=>u({type:"delete",keys:n,trans:e}).then((r=>r.numFailures>0?Promise.reject(r.failures[0]):n.length<o?{failures:[],numFailures:0,lastResult:void 0}:c(e,{...t,lower:n[n.length-1],lowerOpen:!0},o)))))}}};return o}})};function Ko(e,t,n){try{if(!t)return null;if(t.keys.length<e.length)return null;const r=[];for(let o=0,i=0;o<t.keys.length&&i<e.length;++o)0===Fr(t.keys[o],e[i])&&(r.push(n?At(t.values[o]):t.values[o]),++i);return r.length===e.length?r:null}catch(e){return null}}const Io={stack:"dbcore",level:-1,create:e=>({table:t=>{const n=e.table(t);return{...n,getMany:e=>{if(!e.cache)return n.getMany(e);const t=Ko(e.keys,e.trans._cache,"clone"===e.cache);return t?In.resolve(t):n.getMany(e).then((t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?At(t):t},t)))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),n.mutate(e))}}})};function Mo(e){return!("from"in e)}const No=function(e,t){if(!this){const t=new No;return e&&"d"in e&&ut(t,e),t}ut(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function Fo(e,t,n){const r=Fr(t,n);if(isNaN(r))return;if(r>0)throw RangeError();if(Mo(e))return ut(e,{from:t,to:n,d:1});const o=e.l,i=e.r;if(Fr(n,e.from)<0)return o?Fo(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},qo(e);if(Fr(t,e.to)>0)return i?Fo(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},qo(e);Fr(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),Fr(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);const a=!e.r;o&&!e.l&&$o(e,o),i&&a&&$o(e,i)}function $o(e,t){Mo(t)||function e(t,{from:n,to:r,l:o,r:i}){Fo(t,n,r),o&&e(t,o),i&&e(t,i)}(e,t)}function Bo(e){let t=Mo(e)?null:{s:0,n:e};return{next(e){const n=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&Fr(e,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!n||Fr(e,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function qo(e){var t,n;const r=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(n=e.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){const t="r"===o?"l":"r",n={...e},r=e[o];e.from=r.from,e.to=r.to,e[o]=r[o],n[o]=r[t],e[t]=n,n.d=Uo(n)}e.d=Uo(e)}function Uo({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}ht(No.prototype,{add(e){return $o(this,e),this},addKey(e){return Fo(this,e,e),this},addKeys(e){return e.forEach((e=>Fo(this,e,e))),this},[It](){return Bo(this)}});const Wo={stack:"dbcore",level:0,create:e=>{const t=e.schema.name,n=new No(e.MIN_KEY,e.MAX_KEY);return{...e,table:r=>{const o=e.table(r),{schema:i}=o,{primaryKey:a}=i,{extractKey:s,outbound:u}=a,c={...o,mutate:e=>{const a=e.trans,s=a.mutatedParts||(a.mutatedParts={}),u=e=>{const n=`idb://${t}/${r}/${e}`;return s[n]||(s[n]=new No)},c=u(""),l=u(":dels"),{type:f}=e;let[h,p]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[];const d=e.trans._cache;return o.mutate(e).then((e=>{if(st(h)){"delete"!==f&&(h=e.results),c.addKeys(h);const t=Ko(h,d);t||"add"===f||l.addKeys(h),(t||p)&&function(e,t,n,r){t.indexes.forEach((function(t){const o=e(t.name||"");function i(e){return null!=e?t.extractKey(e):null}const a=e=>t.multiEntry&&st(e)?e.forEach((e=>o.addKey(e))):o.addKey(e);(n||r).forEach(((e,t)=>{const o=n&&i(n[t]),s=r&&i(r[t]);0!==Fr(o,s)&&(null!=o&&a(o),null!=s&&a(s))}))}))}(u,i,t,p)}else if(h){const e={from:h.lower,to:h.upper};l.add(e),c.add(e)}else c.add(n),l.add(n),i.indexes.forEach((e=>u(e.name).add(n)));return e}))}},l=({query:{index:t,range:n}})=>{var r,o;return[t,new No(null!==(r=n.lower)&&void 0!==r?r:e.MIN_KEY,null!==(o=n.upper)&&void 0!==o?o:e.MAX_KEY)]},f={get:e=>[a,new No(e.key)],getMany:e=>[a,(new No).addKeys(e.keys)],count:l,query:l,openCursor:l};return at(f).forEach((e=>{c[e]=function(i){const{subscr:a}=An;if(a){const c=e=>{const n=`idb://${t}/${r}/${e}`;return a[n]||(a[n]=new No)},l=c(""),h=c(":dels"),[p,d]=f[e](i);if(c(p.name||"").add(d),!p.isPrimaryKey){if("count"!==e){const t="query"===e&&u&&i.values&&o.query({...i,values:!1});return o[e].apply(this,arguments).then((n=>{if("query"===e){if(u&&i.values)return t.then((({result:e})=>(l.addKeys(e),n)));const e=i.values?n.result.map(s):n.result;i.values?l.addKeys(e):h.addKeys(e)}else if("openCursor"===e){const e=n,t=i.values;return e&&Object.create(e,{key:{get:()=>(h.addKey(e.primaryKey),e.key)},primaryKey:{get(){const t=e.primaryKey;return h.addKey(t),t}},value:{get:()=>(t&&l.addKey(e.primaryKey),e.value)}})}return n}))}h.add(n)}}return o[e].apply(this,arguments)}})),c}}}};class Vo{constructor(e,t){this._middlewares={},this.verno=0;const n=Vo.dependencies;this._options=t={addons:Vo.addons,autoOpen:!0,indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange,...t},this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange};const{addons:r}=t;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const o={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:an,dbReadyPromise:null,cancelOpen:an,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var i;o.dbReadyPromise=new In((e=>{o.dbReadyResolve=e})),o.openCanceller=new In(((e,t)=>{o.cancelOpen=t})),this._state=o,this.name=e,this.on=Cr(this,"populate","blocked","versionchange","close",{ready:[dn,an]}),this.on.ready.subscribe=wt(this.on.ready.subscribe,(e=>(t,n)=>{Vo.vip((()=>{const r=this._state;if(r.openComplete)r.dbOpenError||In.resolve().then(t),n&&e(t);else if(r.onReadyBeingFired)r.onReadyBeingFired.push(t),n&&e(t);else{e(t);const r=this;n||e((function e(){r.on.ready.unsubscribe(t),r.on.ready.unsubscribe(e)}))}}))})),this.Collection=(i=this,Tr(qr.prototype,(function(e,t){this.db=i;let n=Er,r=null;if(t)try{n=t()}catch(e){r=e}const o=e._ctx,a=o.table,s=a.hook.reading.fire;this._ctx={table:a,index:o.index,isPrimKey:!o.index||a.schema.primKey.keyPath&&o.index===a.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:r,or:o.or,valueMapper:s!==sn?s:null}}))),this.Table=function(e){return Tr(Rr.prototype,(function(t,n,r){this.db=e,this._tx=r,this.name=t,this.schema=n,this.hook=e._allTables[t]?e._allTables[t].hook:Cr(null,{creating:[ln,an],reading:[un,sn],updating:[hn,an],deleting:[fn,an]})}))}(this),this.Transaction=function(e){return Tr(no.prototype,(function(t,n,r,o,i){this.db=e,this.mode=t,this.storeNames=n,this.schema=r,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=Cr(this,"complete","error","abort"),this.parent=i||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new In(((e,t)=>{this._resolve=e,this._reject=t})),this._completion.then((()=>{this.active=!1,this.on.complete.fire()}),(e=>{var t=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):t&&this.idbtrans&&this.idbtrans.abort(),gr(e)}))}))}(this),this.Version=function(e){return Tr(xo.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(e){return Tr(Xr.prototype,(function(t,n,r){this.db=e,this._ctx={table:t,index:":id"===n?null:n,or:r};const o=e._deps.indexedDB;if(!o)throw new nn.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=(e,t)=>o.cmp(t,e),this._max=(e,t)=>o.cmp(e,t)>0?e:t,this._min=(e,t)=>o.cmp(e,t)<0?e:t,this._IDBKeyRange=e._deps.IDBKeyRange}))}(this),this.on("versionchange",(e=>{e.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()})),this.on("blocked",(e=>{!e.newVersion||e.newVersion<e.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${e.oldVersion/10}`)})),this._maxKey=ao(t.IDBKeyRange),this._createTransaction=(e,t,n,r)=>new this.Transaction(e,t,n,this._options.chromeTransactionDurability,r),this._fireOnBlocked=e=>{this.on("blocked").fire(e),_r.filter((e=>e.name===this.name&&e!==this&&!e._state.vcFired)).map((t=>t.on("versionchange").fire(e)))},this.use(Ao),this.use(Lo),this.use(Wo),this.use(Io),this.vip=Object.create(this,{_vip:{value:!0}}),r.forEach((e=>e(this)))}version(e){if(isNaN(e)||e<.1)throw new nn.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new nn.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);const t=this._versions;var n=t.filter((t=>t._cfg.version===e))[0];return n||(n=new this.Version(e),t.push(n),t.sort(vo),n.stores({}),this._state.autoSchema=!1,n)}_whenReady(e){return this.idbdb&&(this._state.openComplete||An.letThrough||this._vip)?e():new In(((e,t)=>{if(this._state.openComplete)return t(new nn.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new nn.DatabaseClosed);this.open().catch(an)}this._state.dbReadyPromise.then(e,t)})).then(e)}use({stack:e,create:t,level:n,name:r}){r&&this.unuse({stack:e,name:r});const o=this._middlewares[e]||(this._middlewares[e]=[]);return o.push({stack:e,create:t,level:null==n?10:n,name:r}),o.sort(((e,t)=>e.level-t.level)),this}unuse({stack:e,name:t,create:n}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter((e=>n?e.create!==n:!!t&&e.name!==t))),this}open(){return function(e){const t=e._state,{indexedDB:n}=e._deps;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then((()=>t.dbOpenError?gr(t.dbOpenError):e));Bt&&(t.openCanceller._stackHolder=Vt()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;const r=t.openCanceller;function o(){if(t.openCanceller!==r)throw new nn.DatabaseClosed("db.open() was cancelled")}let i=t.dbReadyResolve,a=null,s=!1;return In.race([r,("undefined"==typeof navigator?In.resolve():Eo()).then((()=>new In(((r,i)=>{if(o(),!n)throw new nn.MissingAPI;const u=e.name,c=t.autoSchema?n.open(u):n.open(u,Math.round(10*e.verno));if(!c)throw new nn.MissingAPI;c.onerror=Zr(i),c.onblocked=Qn(e._fireOnBlocked),c.onupgradeneeded=Qn((r=>{if(a=c.transaction,t.autoSchema&&!e._options.allowEmptyDB){c.onerror=eo,a.abort(),c.result.close();const e=n.deleteDatabase(u);e.onsuccess=e.onerror=Qn((()=>{i(new nn.NoSuchDatabase(`Database ${u} doesnt exist`))}))}else{a.onerror=Zr(i);var o=r.oldVersion>Math.pow(2,62)?0:r.oldVersion;s=o<1,e._novip.idbdb=c.result,go(e,o/10,a,i)}}),i),c.onsuccess=Qn((()=>{a=null;const n=e._novip.idbdb=c.result,o=bt(n.objectStoreNames);if(o.length>0)try{const r=n.transaction(1===(i=o).length?i[0]:i,"readonly");t.autoSchema?function({_novip:e},t,n){e.verno=t.version/10;const r=e._dbSchema=_o(0,t,n);e._storeNames=bt(t.objectStoreNames,0),po(e,[e._allTables],at(r),r)}(e,n,r):(ko(e,e._dbSchema,r),function(e,t){const n=mo(_o(0,e.idbdb,t),e._dbSchema);return!(n.add.length||n.change.some((e=>e.add.length||e.change.length)))}(e,r)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),ho(e,r)}catch(e){}var i;_r.push(e),n.onversionchange=Qn((n=>{t.vcFired=!0,e.on("versionchange").fire(n)})),n.onclose=Qn((t=>{e.on("close").fire(t)})),s&&function({indexedDB:e,IDBKeyRange:t},n){!Oo(e)&&"__dbnames"!==n&&So(e,t).put({name:n}).catch(an)}(e._deps,u),r()}),i)}))))]).then((()=>(o(),t.onReadyBeingFired=[],In.resolve(Po((()=>e.on.ready.fire(e.vip)))).then((function n(){if(t.onReadyBeingFired.length>0){let r=t.onReadyBeingFired.reduce(dn,an);return t.onReadyBeingFired=[],In.resolve(Po((()=>r(e.vip)))).then(n)}}))))).finally((()=>{t.onReadyBeingFired=null,t.isBeingOpened=!1})).then((()=>e)).catch((n=>{t.dbOpenError=n;try{a&&a.abort()}catch(e){}return r===t.openCanceller&&e._close(),gr(n)})).finally((()=>{t.openComplete=!0,i()}))}(this)}_close(){const e=this._state,t=_r.indexOf(this);if(t>=0&&_r.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new In((t=>{e.dbReadyResolve=t})),e.openCanceller=new In(((t,n)=>{e.cancelOpen=n}))}close(){this._close();const e=this._state;this._options.autoOpen=!1,e.dbOpenError=new nn.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){const e=arguments.length>0,t=this._state;return new In(((n,r)=>{const o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=Qn((()=>{!function({indexedDB:e,IDBKeyRange:t},n){!Oo(e)&&"__dbnames"!==n&&So(e,t).delete(n).catch(an)}(this._deps,this.name),n()})),e.onerror=Zr(r),e.onblocked=this._fireOnBlocked};if(e)throw new nn.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(o):o()}))}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){const e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return at(this._allTables).map((e=>this._allTables[e]))}transaction(){const e=Ro.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,n){let r=An.trans;r&&r.db===this&&-1===e.indexOf("!")||(r=null);const o=-1!==e.indexOf("?");let i,a;e=e.replace("!","").replace("?","");try{if(a=t.map((e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||"readonly"===e)i="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new nn.InvalidArgument("Invalid transaction mode: "+e);i="readwrite"}if(r){if("readonly"===r.mode&&"readwrite"===i){if(!o)throw new nn.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");r=null}r&&a.forEach((e=>{if(r&&-1===r.storeNames.indexOf(e)){if(!o)throw new nn.SubTransaction("Table "+e+" not included in parent transaction.");r=null}})),o&&r&&!r.active&&(r=null)}}catch(e){return r?r._promise(null,((t,n)=>{n(e)})):gr(e)}const s=Co.bind(null,this,i,a,r,n);return r?r._promise(i,s,"lock"):An.trans?hr(An.transless,(()=>this._whenReady(s))):this._whenReady(s)}table(e){if(!ft(this._allTables,e))throw new nn.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}const Ho="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class zo{constructor(e){this._subscribe=e}subscribe(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}[Ho](){return this}}function Yo(e,t){return at(t).forEach((n=>{$o(e[n]||(e[n]=new No),t[n])})),e}let Go;try{Go={indexedDB:it.indexedDB||it.mozIndexedDB||it.webkitIndexedDB||it.msIndexedDB,IDBKeyRange:it.IDBKeyRange||it.webkitIDBKeyRange}}catch(it){Go={indexedDB:null,IDBKeyRange:null}}const Jo=Vo;function Qo(e){let t=Xo;try{Xo=!0,to.storagemutated.fire(e)}finally{Xo=t}}ht(Jo,{...on,delete:e=>new Jo(e,{addons:[]}).delete(),exists:e=>new Jo(e,{addons:[]}).open().then((e=>(e.close(),!0))).catch("NoSuchDatabaseError",(()=>!1)),getDatabaseNames(e){try{return function({indexedDB:e,IDBKeyRange:t}){return Oo(e)?Promise.resolve(e.databases()).then((e=>e.map((e=>e.name)).filter((e=>"__dbnames"!==e)))):So(e,t).toCollection().primaryKeys()}(Jo.dependencies).then(e)}catch(e){return gr(new nn.MissingAPI)}},defineClass:()=>function(e){ut(this,e)},ignoreTransaction:e=>An.trans?hr(An.transless,e):e(),vip:Po,async:function(e){return function(){try{var t=jo(e.apply(this,arguments));return t&&"function"==typeof t.then?t:In.resolve(t)}catch(e){return gr(e)}}},spawn:function(e,t,n){try{var r=jo(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:In.resolve(r)}catch(e){return gr(e)}},currentTransaction:{get:()=>An.trans||null},waitFor:function(e,t){const n=In.resolve("function"==typeof e?Jo.ignoreTransaction(e):e).timeout(t||6e4);return An.trans?An.trans.waitFor(n):n},Promise:In,debug:{get:()=>Bt,set:e=>{qt(e,"dexie"===e?()=>!0:Or)}},derive:yt,extend:ut,props:ht,override:wt,Events:Cr,on:to,liveQuery:function(e){return new zo((t=>{const n=$t(e);let r=!1,o={},i={};const a={get closed(){return r},unsubscribe:()=>{r=!0,to.storagemutated.unsubscribe(l)}};t.start&&t.start(a);let s=!1,u=!1;function c(){return at(i).some((e=>o[e]&&function(e,t){const n=Bo(t);let r=n.next();if(r.done)return!1;let o=r.value;const i=Bo(e);let a=i.next(o.from),s=a.value;for(;!r.done&&!a.done;){if(Fr(s.from,o.to)<=0&&Fr(s.to,o.from)>=0)return!0;Fr(o.from,s.from)<0?o=(r=n.next(s.from)).value:s=(a=i.next(o.from)).value}return!1}(o[e],i[e])))}const l=e=>{Yo(o,e),c()&&f()},f=()=>{if(s||r)return;o={};const h={},p=function(t){n&&ir();const r=()=>or(e,{subscr:t,trans:null}),o=An.trans?hr(An.transless,r):r();return n&&o.then(ar,ar),o}(h);u||(to("storagemutated",l),u=!0),s=!0,Promise.resolve(p).then((e=>{s=!1,r||(c()?f():(o={},i=h,t.next&&t.next(e)))}),(e=>{s=!1,t.error&&t.error(e),a.unsubscribe()}))};return f(),a}))},extendObservabilitySet:Yo,getByKeyPath:St,setByKeyPath:Ot,delByKeyPath:function(e,t){"string"==typeof t?Ot(e,t,void 0):"length"in t&&[].map.call(t,(function(t){Ot(e,t,void 0)}))},shallowClone:Pt,deepClone:At,getObjectDiff:Do,cmp:Fr,asap:kt,minKey:-1/0,addons:[],connections:_r,errnames:en,dependencies:Go,semVer:"3.2.3",version:"3.2.3".split(".").map((e=>parseInt(e))).reduce(((e,t,n)=>e+t/Math.pow(10,2*n)))}),Jo.maxKey=ao(Jo.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(to("storagemutated",(e=>{if(!Xo){let t;kr?(t=document.createEvent("CustomEvent"),t.initCustomEvent("x-storagemutated-1",!0,!0,e)):t=new CustomEvent("x-storagemutated-1",{detail:e}),Xo=!0,dispatchEvent(t),Xo=!1}})),addEventListener("x-storagemutated-1",(({detail:e})=>{Xo||Qo(e)})));let Xo=!1;if("undefined"!=typeof BroadcastChannel){const e=new BroadcastChannel("x-storagemutated-1");"function"==typeof e.unref&&e.unref(),to("storagemutated",(t=>{Xo||e.postMessage(t)})),e.onmessage=e=>{e.data&&Qo(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){to("storagemutated",(e=>{try{Xo||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach((t=>t.postMessage({type:"x-storagemutated-1",changedParts:e}))))}catch(e){}})),"undefined"!=typeof addEventListener&&addEventListener("storage",(e=>{if("x-storagemutated-1"===e.key){const t=JSON.parse(e.newValue);t&&Qo(t.changedParts)}}));const e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",(function({data:e}){e&&"x-storagemutated-1"===e.type&&Qo(e.changedParts)}))}function Zo(e){return Zo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Zo(e)}function ei(e,t){return!t||"object"!==ni(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ti(e,t){return ti=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ti(e,t)}In.rejectionMapper=function(e,t){if(!e||e instanceof Jt||e instanceof TypeError||e instanceof SyntaxError||!e.name||!rn[e.name])return e;var n=new rn[e.name](t||e.message,e);return"stack"in e&&dt(n,"stack",{get:function(){return this.inner.stack}}),n},qt(Bt,Or);var ni=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};var ri=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ti(e,t)}(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Zo(t);if(n){var o=Zo(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return ei(this,e)});function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=r.call(this,"ServiceWorker")).version(1).stores({dynamicRouteRegistrations:"++,&pattern"}),e.dynamicRouteRegistrations=e.table("dynamicRouteRegistrations"),e}return o}(Vo);function oi(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function ii(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){oi(i,r,o,a,s,"next",e)}function s(e){oi(i,r,o,a,s,"throw",e)}a(void 0)}))}}var ai=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};function si(e){return ui.apply(this,arguments)}function ui(){return(ui=ii((function(e){var t;return ai(this,(function(n){switch(n.label){case 0:return[4,et(e)];case 1:return[4,fi(t=n.sent())];case 2:return n.sent(),[4,ci(t)];case 3:return n.sent(),[2]}}))}))).apply(this,arguments)}function ci(e){return li.apply(this,arguments)}function li(){return li=ii((function(e){var t,n,r,o;return ai(this,(function(i){switch(i.label){case 0:return 0===e.length?[2]:[4,caches.open(Ie)];case 1:return t=i.sent(),[4,Promise.all(e.map((a=ii((function(e){return ai(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,z((function(){return t.add(e)}),{onError:function(t,n){return console.debug("[SW] Failure attempt ".concat(n,' at caching "').concat(e,'". Error: '),t)}})];case 1:return n.sent(),[2,{url:e,success:!0}];case 2:return n.sent(),[2,{url:e,success:!1}];case 3:return[2]}}))})),function(e){return a.apply(this,arguments)})))];case 2:return n=i.sent(),r=n.filter((function(e){return e.success})),o=n.filter((function(e){return!e.success})),r.length>0&&console.debug("[SW] Successfully added ".concat(r.length," URLs to the OMRS cache. URLs: "),r.map((function(e){return e.url}))),o.length>0&&console.error("[SW] Failed to cache ".concat(o.length," URLs. URLs: "),o.map((function(e){return e.url}))),[2]}var a}))})),li.apply(this,arguments)}function fi(e){return hi.apply(this,arguments)}function hi(){return hi=ii((function(e){var t,n,r,o;return ai(this,(function(i){switch(i.label){case 0:return[4,caches.open(Ie)];case 1:return[4,(t=i.sent()).keys()];case 2:return n=i.sent().map((function(e){return e.url})),[4,(new ri).dynamicRouteRegistrations.toArray()];case 3:return r=i.sent(),o=n.filter((function(t){return!Fe.includes(t)&&!e.includes(t)&&!r.some((function(e){return new RegExp(e.pattern).test(t)}))})),console.info("[SW] Removing the following expired URLs from the cache: ",o),console.debug("[SW] The following URLs were known and not invalidated: ",Fe,e,r),[4,Promise.all(o.map((function(e){return t.delete(e)})))];case 4:return i.sent(),[2]}}))})),hi.apply(this,arguments)}function pi(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function di(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){pi(i,r,o,a,s,"next",e)}function s(e){pi(i,r,o,a,s,"throw",e)}a(void 0)}))}}var yi=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},vi={onImportMapChanged:function(e){return gi.apply(this,arguments)},clearDynamicRoutes:function(){return mi.apply(this,arguments)},registerDynamicRoute:function(e){return bi.apply(this,arguments)}};function gi(){return(gi=di((function(e){return yi(this,(function(t){switch(t.label){case 0:return[4,si(e.importMap)];case 1:return t.sent(),[2]}}))}))).apply(this,arguments)}function mi(){return(mi=di((function(){return yi(this,(function(e){switch(e.label){case 0:return[4,(new ri).dynamicRouteRegistrations.clear()];case 1:return e.sent(),[2]}}))}))).apply(this,arguments)}function bi(){return(bi=di((function(e){var t,n,r,o,i;return yi(this,(function(a){switch(a.label){case 0:return t=e.pattern,n=e.url,r=e.strategy,!(o=t)&&n&&(o="^".concat(U(n),"$")),o?(i={pattern:o,strategy:r},[4,(new ri).dynamicRouteRegistrations.put(i)]):[3,2];case 1:a.sent(),a.label=2;case 2:return[2]}}))}))).apply(this,arguments)}function wi(){return wi=di((function(e){var t,n,r,o,i,a,s,u;function c(e){console.warn("[SW] Handling a message resulted in an error.",e),l({success:!1,error:e})}function l(t){e.ports[0].postMessage(null!=t?t:{})}return yi(this,(function(f){switch(f.label){case 0:if(!(o=vi[null!==(r=null===(t=e.data)||void 0===t||null===(n=t.type)||void 0===n?void 0:n.toString())&&void 0!==r?r:""]))return c('Received an unknown message of type "'.concat(null===(i=e.data)||void 0===i?void 0:i.type," which cannot be handled.")),[2];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,o(e.data)];case 2:return l({success:!0,result:f.sent()}),[3,4];case 3:return a=f.sent(),c(null!==(u=null!==(s=null==a?void 0:a.message)&&void 0!==s?s:null==a?void 0:a.toString())&&void 0!==u?u:"Unknown error."),[3,4];case 4:return[2]}}))})),wi.apply(this,arguments)}n(658);var _i="GET",ki=["DELETE","GET","HEAD","PATCH","POST","PUT"],xi=function(e){return e&&"object"==typeof e?e:{handle:e}};function Si(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Oi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Pi=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_i;Si(this,e),this.handler=xi(n),this.match=t,this.method=r}var t,n;return t=e,(n=[{key:"setCatchHandler",value:function(e){this.catchHandler=xi(e)}}])&&Oi(t.prototype,n),e}();function Ei(e){return Ei=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ei(e)}function ji(e,t){return!t||"object"!==Ci(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ri(e,t){return Ri=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ri(e,t)}var Ci=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};var Ti=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ri(e,t)}(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Ei(t);if(n){var o=Ei(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return ji(this,e)});function o(e,t,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),r.call(this,(function(t){var n=t.url,r=e.exec(n.href);if(r&&(n.origin===location.origin||0===r.index))return r.slice(1)}),t,n)}return o}(Pi);function Ai(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Di(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Li(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function Ki(e,t,n){return Ki=Li()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&Ni(o,n.prototype),o},Ki.apply(null,arguments)}function Ii(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Mi(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Ni(e,t){return Ni=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ni(e,t)}var Fi,$i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._routes=new Map,this._defaultHandlerMap=new Map}var t,n;return t=e,n=[{key:"routes",get:function(){return this._routes}},{key:"addFetchListener",value:function(){var e=this;self.addEventListener("fetch",(function(t){var n=t.request,r=e.handleRequest({request:n,event:t});r&&t.respondWith(r)}))}},{key:"addCacheListener",value:function(){var e=this;self.addEventListener("message",(function(t){if(t.data&&"CACHE_URLS"===t.data.type){var n=t.data.payload,r=Promise.all(n.urlsToCache.map((function(n){"string"==typeof n&&(n=[n]);var r,o=Ki(Request,function(e){if(Array.isArray(e))return Ai(e)}(r=n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return Ai(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ai(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());return e.handleRequest({request:o,event:t})})));t.waitUntil(r),t.ports&&t.ports[0]&&r.then((function(){return t.ports[0].postMessage(!0)}))}}))}},{key:"handleRequest",value:function(e){var t=e.request,n=e.event,r=new URL(t.url,location.href);if(r.protocol.startsWith("http")){var o=r.origin===location.origin,i=this.findMatchingRoute({event:n,request:t,sameOrigin:o,url:r}),a=i.params,s=i.route,u=s&&s.handler,c=t.method;if(!u&&this._defaultHandlerMap.has(c)&&(u=this._defaultHandlerMap.get(c)),u){var l;try{l=u.handle({url:r,request:t,event:n,params:a})}catch(e){l=Promise.reject(e)}var f,h=s&&s.catchHandler;if(Mi(l,Promise)&&(this._catchHandler||h)){var p=this;l=l.catch((f=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Di(i,r,o,a,s,"next",e)}function s(e){Di(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function(e){var o;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(i){switch(i.label){case 0:if(!h)return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,h.handle({url:r,request:t,event:n,params:a})];case 2:return[2,i.sent()];case 3:return Mi(o=i.sent(),Error)&&(e=o),[3,4];case 4:if(p._catchHandler)return[2,p._catchHandler.handle({url:r,request:t,event:n})];throw e}}))})),function(e){return f.apply(this,arguments)}))}return l}}}},{key:"findMatchingRoute",value:function(e){var t=e.url,n=e.sameOrigin,r=e.request,o=e.event,i=this._routes.get(r.method)||[],a=!0,s=!1,u=void 0;try{for(var c,l=i[Symbol.iterator]();!(a=(c=l.next()).done);a=!0){var f=c.value,h=void 0,p=f.match({url:t,sameOrigin:n,request:r,event:o});if(p)return h=p,(Array.isArray(h)&&0===h.length||p.constructor===Object&&0===Object.keys(p).length||"boolean"==typeof p)&&(h=void 0),{route:f,params:h}}}catch(e){s=!0,u=e}finally{try{a||null==l.return||l.return()}finally{if(s)throw u}}return{}}},{key:"setDefaultHandler",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_i;this._defaultHandlerMap.set(t,xi(e))}},{key:"setCatchHandler",value:function(e){this._catchHandler=xi(e)}},{key:"registerRoute",value:function(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}},{key:"unregisterRoute",value:function(e){if(!this._routes.has(e.method))throw new u("unregister-route-but-not-found-with-method",{method:e.method});var t=this._routes.get(e.method).indexOf(e);if(!(t>-1))throw new u("unregister-route-route-not-registered");this._routes.get(e.method).splice(t,1)}}],n&&Ii(t.prototype,n),e}(),Bi=function(){return Fi||((Fi=new $i).addFetchListener(),Fi.addCacheListener()),Fi};function qi(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Ui(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wi(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Vi(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Wi(i,r,o,a,s,"next",e)}function s(e){Wi(i,r,o,a,s,"throw",e)}a(void 0)}))}}function Hi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zi(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}n(142);var Yi=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Gi=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function Ji(e){return"string"==typeof e?new Request(e):e}var Qi=function(){function e(t,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._cacheKeys={},Object.assign(this,n),this.event=n.event,this._strategy=t,this._handlerDeferred=new m,this._extendLifetimePromises=[],this._plugins=function(e){if(Array.isArray(e))return Ui(e)}(r=t.plugins)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return Ui(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ui(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),this._pluginStateMap=new Map;var o=!0,i=!1,a=void 0;try{for(var s,u=this._plugins[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=s.value;this._pluginStateMap.set(c,{})}}catch(e){i=!0,a=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw a}}this.event.waitUntil(this._handlerDeferred.promise)}var t,n;return t=e,(n=[{key:"fetch",value:function(e){var t=this;return Vi((function(){var n,r,o,i,a,s,c,l,f,h,p,d,y,v,g,m,b,w,_;return Yi(this,(function(k){switch(k.label){case 0:return n=t.event,"navigate"===(r=Ji(e)).mode&&zi(n,FetchEvent)&&n.preloadResponse?[4,n.preloadResponse]:[3,2];case 1:if(o=k.sent())return[2,o];k.label=2;case 2:i=t.hasCallback("fetchDidFail")?r.clone():null,k.label=3;case 3:k.trys.push([3,12,,13]),a=!0,s=!1,c=void 0,k.label=4;case 4:k.trys.push([4,9,10,11]),l=t.iterateCallbacks("requestWillFetch")[Symbol.iterator](),k.label=5;case 5:return(a=(f=l.next()).done)?[3,8]:[4,(0,f.value)({request:r.clone(),event:n})];case 6:r=k.sent(),k.label=7;case 7:return a=!0,[3,5];case 8:return[3,11];case 9:return w=k.sent(),s=!0,c=w,[3,11];case 10:try{a||null==l.return||l.return()}finally{if(s)throw c}return[7];case 11:return[3,13];case 12:if(zi(h=k.sent(),Error))throw new u("plugin-error-request-will-fetch",{thrownErrorMessage:h.message});return[3,13];case 13:p=r.clone(),k.label=14;case 14:return k.trys.push([14,24,,27]),[4,fetch(r,"navigate"===r.mode?void 0:t._strategy.fetchOptions)];case 15:d=k.sent(),y=!0,v=!1,g=void 0,k.label=16;case 16:k.trys.push([16,21,22,23]),m=t.iterateCallbacks("fetchDidSucceed")[Symbol.iterator](),k.label=17;case 17:return(y=(b=m.next()).done)?[3,20]:[4,(0,b.value)({event:n,request:p,response:d})];case 18:d=k.sent(),k.label=19;case 19:return y=!0,[3,17];case 20:return[3,23];case 21:return w=k.sent(),v=!0,g=w,[3,23];case 22:try{y||null==m.return||m.return()}finally{if(v)throw g}return[7];case 23:return[2,d];case 24:return _=k.sent(),i?[4,t.runCallbacks("fetchDidFail",{error:_,event:n,originalRequest:i.clone(),request:p.clone()})]:[3,26];case 25:k.sent(),k.label=26;case 26:throw _;case 27:return[2]}}))}))()}},{key:"fetchAndCachePut",value:function(e){var t=this;return Vi((function(){var n,r;return Yi(this,(function(o){switch(o.label){case 0:return[4,t.fetch(e)];case 1:return n=o.sent(),r=n.clone(),t.waitUntil(t.cachePut(e,r)),[2,n]}}))}))()}},{key:"cacheMatch",value:function(e){var t=this;return Vi((function(){var n,r,o,i,a,s,u,c,l,f,h,p,d;return Yi(this,(function(y){switch(y.label){case 0:return n=Ji(e),o=t._strategy,i=o.cacheName,a=o.matchOptions,[4,t.getCacheKey(n,"read")];case 1:return s=y.sent(),u=Object.assign(Object.assign({},a),{cacheName:i}),[4,caches.match(s,u)];case 2:r=y.sent(),c=!0,l=!1,f=void 0,y.label=3;case 3:y.trys.push([3,8,9,10]),h=t.iterateCallbacks("cachedResponseWillBeUsed")[Symbol.iterator](),y.label=4;case 4:return(c=(p=h.next()).done)?[3,7]:[4,(0,p.value)({cacheName:i,matchOptions:a,cachedResponse:r,request:s,event:t.event})];case 5:r=y.sent()||void 0,y.label=6;case 6:return c=!0,[3,4];case 7:return[3,10];case 8:return d=y.sent(),l=!0,f=d,[3,10];case 9:try{c||null==h.return||h.return()}finally{if(l)throw f}return[7];case 10:return[2,r]}}))}))()}},{key:"cachePut",value:function(e,t){var n=this;return Vi((function(){var r,o,i,a,s,c,l,f,h,p,d,y,g,m,b,w,_;return Yi(this,(function(x){switch(x.label){case 0:return r=Ji(e),[4,S(0)];case 1:return x.sent(),[4,n.getCacheKey(r,"write")];case 2:if(o=x.sent(),!t)throw new u("cache-put-with-no-response",{url:(O=o.url,new URL(String(O),location.href).href.replace(new RegExp("^".concat(location.origin)),""))});return[4,n._ensureResponseSafeToCache(t)];case 3:return(i=x.sent())?(a=n._strategy,s=a.cacheName,c=a.matchOptions,[4,self.caches.open(s)]):[2,!1];case 4:return l=x.sent(),(f=n.hasCallback("cacheDidUpdate"))?[4,v(l,o.clone(),["__WB_REVISION__"],c)]:[3,6];case 5:return p=x.sent(),[3,7];case 6:p=null,x.label=7;case 7:h=p,x.label=8;case 8:return x.trys.push([8,10,,14]),[4,l.put(o,f?i.clone():i)];case 9:return x.sent(),[3,14];case 10:return zi(d=x.sent(),Error)?"QuotaExceededError"!==d.name?[3,12]:[4,k()]:[3,13];case 11:x.sent(),x.label=12;case 12:throw d;case 13:return[3,14];case 14:y=!0,g=!1,m=void 0,x.label=15;case 15:x.trys.push([15,20,21,22]),b=n.iterateCallbacks("cacheDidUpdate")[Symbol.iterator](),x.label=16;case 16:return(y=(w=b.next()).done)?[3,19]:[4,(0,w.value)({cacheName:s,oldResponse:h,newResponse:i.clone(),request:o,event:n.event})];case 17:x.sent(),x.label=18;case 18:return y=!0,[3,16];case 19:return[3,22];case 20:return _=x.sent(),g=!0,m=_,[3,22];case 21:try{y||null==b.return||b.return()}finally{if(g)throw m}return[7];case 22:return[2,!0]}var O}))}))()}},{key:"getCacheKey",value:function(e,t){var n=this;return Vi((function(){var r,o,i,a,s,u,c,l;return Yi(this,(function(f){switch(f.label){case 0:if(r="".concat(e.url," | ").concat(t),n._cacheKeys[r])return[3,9];o=e,i=!0,a=!1,s=void 0,f.label=1;case 1:f.trys.push([1,6,7,8]),u=n.iterateCallbacks("cacheKeyWillBeUsed")[Symbol.iterator](),f.label=2;case 2:return(i=(c=u.next()).done)?[3,5]:[4,(0,c.value)({mode:t,request:o,event:n.event,params:n.params})];case 3:o=Ji.apply(void 0,[f.sent()]),f.label=4;case 4:return i=!0,[3,2];case 5:return[3,8];case 6:return l=f.sent(),a=!0,s=l,[3,8];case 7:try{i||null==u.return||u.return()}finally{if(a)throw s}return[7];case 8:n._cacheKeys[r]=o,f.label=9;case 9:return[2,n._cacheKeys[r]]}}))}))()}},{key:"hasCallback",value:function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=this._strategy.plugins[Symbol.iterator]();!(t=(o=i.next()).done);t=!0)if(e in o.value)return!0}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return!1}},{key:"runCallbacks",value:function(e,t){var n=this;return Vi((function(){var r,o,i,a,s,u;return Yi(this,(function(c){switch(c.label){case 0:r=!0,o=!1,i=void 0,c.label=1;case 1:c.trys.push([1,6,7,8]),a=n.iterateCallbacks(e)[Symbol.iterator](),c.label=2;case 2:return(r=(s=a.next()).done)?[3,5]:[4,(0,s.value)(t)];case 3:c.sent(),c.label=4;case 4:return r=!0,[3,2];case 5:return[3,8];case 6:return u=c.sent(),o=!0,i=u,[3,8];case 7:try{r||null==a.return||a.return()}finally{if(o)throw i}return[7];case 8:return[2]}}))}))()}},{key:"iterateCallbacks",value:function(e){var t,n,r,o,i,a,s,u;return Yi(this,(function(c){switch(c.label){case 0:t=!0,n=!1,r=void 0,c.label=1;case 1:c.trys.push([1,6,7,8]),o=this,i=function(){var t,n;return Yi(this,(function(r){switch(r.label){case 0:return"function"!=typeof(t=s.value)[e]?[3,2]:(n=o._pluginStateMap.get(t),[4,function(r){var o=Object.assign(Object.assign({},r),{state:n});return t[e](o)}]);case 1:r.sent(),r.label=2;case 2:return[2]}}))},a=this._strategy.plugins[Symbol.iterator](),c.label=2;case 2:return(t=(s=a.next()).done)?[3,5]:[5,Gi(i())];case 3:c.sent(),c.label=4;case 4:return t=!0,[3,2];case 5:return[3,8];case 6:return u=c.sent(),n=!0,r=u,[3,8];case 7:try{t||null==a.return||a.return()}finally{if(n)throw r}return[7];case 8:return[2]}}))}},{key:"waitUntil",value:function(e){return this._extendLifetimePromises.push(e),e}},{key:"doneWaiting",value:function(){var e=this;return Vi((function(){var t;return Yi(this,(function(n){switch(n.label){case 0:return(t=e._extendLifetimePromises.shift())?[4,t]:[3,2];case 1:return n.sent(),[3,0];case 2:return[2]}}))}))()}},{key:"destroy",value:function(){this._handlerDeferred.resolve(null)}},{key:"_ensureResponseSafeToCache",value:function(e){var t=this;return Vi((function(){var n,r,o,i,a,s,u,c;return Yi(this,(function(l){switch(l.label){case 0:n=e,r=!1,o=!0,i=!1,a=void 0,l.label=1;case 1:l.trys.push([1,6,7,8]),s=t.iterateCallbacks("cacheWillUpdate")[Symbol.iterator](),l.label=2;case 2:return(o=(u=s.next()).done)?[3,5]:[4,(0,u.value)({request:t.request,response:n,event:t.event})];case 3:if(n=l.sent()||void 0,r=!0,!n)return[3,5];l.label=4;case 4:return o=!0,[3,2];case 5:return[3,8];case 6:return c=l.sent(),i=!0,a=c,[3,8];case 7:try{o||null==s.return||s.return()}finally{if(i)throw a}return[7];case 8:return r||n&&200!==n.status&&(n=void 0),[2,n]}}))}))()}}])&&Hi(t.prototype,n),e}();function Xi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Zi(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function ea(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Zi(i,r,o,a,s,"next",e)}function s(e){Zi(i,r,o,a,s,"throw",e)}a(void 0)}))}}function ta(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function na(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ra(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}var oa=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},ia=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ta(this,e),this.cacheName=f(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}var t,n;return t=e,(n=[{key:"handle",value:function(e){return function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Xi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xi(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(this.handleAll(e),1)[0]}},{key:"handleAll",value:function(e){ra(e,FetchEvent)&&(e={event:e,request:e.request});var t=e.event,n="string"==typeof e.request?new Request(e.request):e.request,r="params"in e?e.params:void 0,o=new Qi(this,{event:t,request:n,params:r}),i=this._getResponse(o,n,t);return[i,this._awaitComplete(i,o,n,t)]}},{key:"_getResponse",value:function(e,t,n){var r=this;return ea((function(){var o,i,a,s,c,l,f,h,p,d,y,v,g;return oa(this,(function(m){switch(m.label){case 0:return[4,e.runCallbacks("handlerWillStart",{event:n,request:t})];case 1:m.sent(),o=void 0,m.label=2;case 2:return m.trys.push([2,4,,13]),[4,r._handle(t,e)];case 3:if(!(o=m.sent())||"error"===o.type)throw new u("no-response",{url:t.url});return[3,13];case 4:if(!ra(i=m.sent(),Error))return[3,12];a=!0,s=!1,c=void 0,m.label=5;case 5:m.trys.push([5,10,11,12]),l=e.iterateCallbacks("handlerDidError")[Symbol.iterator](),m.label=6;case 6:return(a=(f=l.next()).done)?[3,9]:[4,(0,f.value)({error:i,event:n,request:t})];case 7:if(o=m.sent())return[3,9];m.label=8;case 8:return a=!0,[3,6];case 9:return[3,12];case 10:return g=m.sent(),s=!0,c=g,[3,12];case 11:try{a||null==l.return||l.return()}finally{if(s)throw c}return[7];case 12:if(!o)throw i;return[3,13];case 13:h=!0,p=!1,d=void 0,m.label=14;case 14:m.trys.push([14,19,20,21]),y=e.iterateCallbacks("handlerWillRespond")[Symbol.iterator](),m.label=15;case 15:return(h=(v=y.next()).done)?[3,18]:[4,(0,v.value)({event:n,request:t,response:o})];case 16:o=m.sent(),m.label=17;case 17:return h=!0,[3,15];case 18:return[3,21];case 19:return g=m.sent(),p=!0,d=g,[3,21];case 20:try{h||null==y.return||y.return()}finally{if(p)throw d}return[7];case 21:return[2,o]}}))}))()}},{key:"_awaitComplete",value:function(e,t,n,r){return ea((function(){var o,i,a;return oa(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,e];case 1:return o=s.sent(),[3,3];case 2:return s.sent(),[3,3];case 3:return s.trys.push([3,6,,7]),[4,t.runCallbacks("handlerDidRespond",{event:r,request:n,response:o})];case 4:return s.sent(),[4,t.doneWaiting()];case 5:return s.sent(),[3,7];case 6:return ra(a=s.sent(),Error)&&(i=a),[3,7];case 7:return[4,t.runCallbacks("handlerDidComplete",{event:r,request:n,response:o,error:i})];case 8:if(s.sent(),t.destroy(),i)throw i;return[2]}}))}))()}}])&&na(t.prototype,n),e}();function aa(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function sa(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ua(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ca(e){return ca=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ca(e)}function la(e,t){return!t||"object"!==ha(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fa(e,t){return fa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},fa(e,t)}var ha=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};var pa=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fa(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ca(r);if(o){var n=ca(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return la(this,e)});function a(){return sa(this,a),i.apply(this,arguments)}return t=a,n=[{key:"_handle",value:function(e,t){return function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){aa(i,r,o,a,s,"next",e)}function s(e){aa(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function(){var n;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(r){switch(r.label){case 0:return[4,t.cacheMatch(e)];case 1:if(!(n=r.sent()))throw new u("no-response",{url:e.url});return[2,n]}}))}))()}}],n&&ua(t.prototype,n),a}(ia);function da(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}var ya,va={cacheWillUpdate:(ya=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){da(i,r,o,a,s,"next",e)}function s(e){da(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function(e){var t;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(n){return 200===(t=e.response).status||0===t.status?[2,t]:[2,null]}))})),function(e){return ya.apply(this,arguments)})};function ga(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function ma(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ga(i,r,o,a,s,"next",e)}function s(e){ga(i,r,o,a,s,"throw",e)}a(void 0)}))}}function ba(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _a(e){return _a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},_a(e)}function ka(e,t){return!t||"object"!==Sa(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function xa(e,t){return xa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},xa(e,t)}var Sa=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};var Oa=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Pa=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xa(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=_a(r);if(o){var n=_a(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ka(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ba(this,a),(e=i.call(this,t)).plugins.some((function(e){return"cacheWillUpdate"in e}))||e.plugins.unshift(va),e._networkTimeoutSeconds=t.networkTimeoutSeconds||0,e}return t=a,n=[{key:"_handle",value:function(e,t){var n=this;return ma((function(){var r,o,i,a,s,c,l,f;return Oa(this,(function(h){switch(h.label){case 0:return r=[],o=[],n._networkTimeoutSeconds&&(a=n._getTimeoutPromise({request:e,logs:r,handler:t}),s=a.id,c=a.promise,i=s,o.push(c)),l=n._getNetworkPromise({timeoutId:i,request:e,logs:r,handler:t}),o.push(l),[4,t.waitUntil(ma((function(){var e;return Oa(this,(function(n){switch(n.label){case 0:return[4,t.waitUntil(Promise.race(o))];case 1:return(e=n.sent())?[3,3]:[4,l];case 2:e=n.sent(),n.label=3;case 3:return[2,e]}}))}))())];case 1:if(!(f=h.sent()))throw new u("no-response",{url:e.url});return[2,f]}}))}))()}},{key:"_getTimeoutPromise",value:function(e){var t,n=e.request,r=(e.logs,e.handler),o=this,i=new Promise((function(e){var i=function(){var t=ma((function(){return Oa(this,(function(t){switch(t.label){case 0:return[4,r.cacheMatch(n)];case 1:return e.apply(void 0,[t.sent()]),[2]}}))}));return function(){return t.apply(this,arguments)}}();t=setTimeout(i,1e3*o._networkTimeoutSeconds)}));return{promise:i,id:t}}},{key:"_getNetworkPromise",value:function(e){var t=e.timeoutId,n=e.request,r=(e.logs,e.handler);return ma((function(){var e,o,i;return Oa(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,r.fetchAndCachePut(n)];case 1:return o=a.sent(),[3,3];case 2:return s=i=a.sent(),(null!=(u=Error)&&"undefined"!=typeof Symbol&&u[Symbol.hasInstance]?u[Symbol.hasInstance](s):s instanceof u)&&(e=i),[3,3];case 3:return t&&clearTimeout(t),!e&&o?[3,5]:[4,r.cacheMatch(n)];case 4:o=a.sent(),a.label=5;case 5:return[2,o]}var s,u}))}))()}}],n&&wa(t.prototype,n),a}(ia);function Ea(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function ja(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ra(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ca(e){return Ca=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ca(e)}function Ta(e,t){return!t||"object"!==Da(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Aa(e,t){return Aa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Aa(e,t)}var Da=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};var La=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Aa(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ca(r);if(o){var n=Ca(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Ta(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ja(this,a),(e=i.call(this,t))._networkTimeoutSeconds=t.networkTimeoutSeconds||0,e}return t=a,n=[{key:"_handle",value:function(e,t){var n=this;return function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ea(i,r,o,a,s,"next",e)}function s(e){Ea(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function(){var r,o,i,a,s;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(c){switch(c.label){case 0:r=void 0,c.label=1;case 1:return c.trys.push([1,3,,4]),i=[t.fetch(e)],n._networkTimeoutSeconds&&(a=S(1e3*n._networkTimeoutSeconds),i.push(a)),[4,Promise.race(i)];case 2:if(!(o=c.sent()))throw new Error("Timed out the network response after "+"".concat(n._networkTimeoutSeconds," seconds."));return[3,4];case 3:return l=s=c.sent(),(null!=(f=Error)&&"undefined"!=typeof Symbol&&f[Symbol.hasInstance]?f[Symbol.hasInstance](l):l instanceof f)&&(r=s),[3,4];case 4:if(!o)throw new u("no-response",{url:e.url,error:r});return[2,o]}var l,f}))}))()}}],n&&Ra(t.prototype,n),a}(ia);function Ka(e){var t;return null!==(t=Ma(e,"x-omrs-offline-response-body"))&&void 0!==t?t:void 0}function Ia(e){var t,n=+(null!==(t=Ma(e,"x-omrs-offline-response-status"))&&void 0!==t?t:"");return isNaN(n)||n<200||n>599?503:n}function Ma(e,t){return e.get(t)}function Na(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Fa(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Na(i,r,o,a,s,"next",e)}function s(e){Na(i,r,o,a,s,"throw",e)}a(void 0)}))}}function $a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ba,qa,Ua=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Wa=new La,Va=new pa({cacheName:Ie}),Ha=new Pa({cacheName:Ie}),za="network-only-or-cache-only",Ya=($a(Ba={},"network-first",(function(e){return Ha.handle(e)})),$a(Ba,"network-only-or-cache-only",function(){var e=Fa((function(e){return Ua(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,4]),[4,Wa.handle(e)];case 1:case 3:return[2,t.sent()];case 2:return t.sent(),[4,Va.handle(e)];case 4:return[2]}}))}));return function(t){return e.apply(this,arguments)}}()),Ba);function Ga(e){return Ja.apply(this,arguments)}function Ja(){return(Ja=Fa((function(e){var t;return Ua(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,5]),[4,Wa.handle(e)];case 1:return[2,n.sent()];case 2:return n.sent(),[4,caches.open(Ie)];case 3:return[4,n.sent().match(Ne)];case 4:return[2,null!=(t=n.sent())?t:Response.error()];case 5:return[2]}}))}))).apply(this,arguments)}function Qa(e){return Xa.apply(this,arguments)}function Xa(){return Xa=Fa((function(e){var t,n,r,o,i,a;return Ua(this,(function(s){switch(s.label){case 0:return t=e.request,"GET"!==e.request.method?[3,2]:[4,Za(e)];case 1:return r=s.sent(),[3,3];case 2:r=za,s.label=3;case 3:i=null!==(o=Ya[n=r])&&void 0!==o?o:Ya[za],s.label=4;case 4:return s.trys.push([4,6,,7]),[4,i(e)];case 5:return[2,s.sent()];case 6:return a=s.sent(),console.warn("[SW] Could not handle the request to %s (using handler %s).",t.url,n,a),[2,new Response(Ka(t.headers),{status:Ia(t.headers)})];case 7:return[2]}}))})),Xa.apply(this,arguments)}function Za(e){return es.apply(this,arguments)}function es(){return(es=Fa((function(e){var t,n,r;return Ua(this,(function(o){switch(o.label){case 0:return t=e.request,null===(n=ts(t.headers))||void 0===n?[3,1]:(r=n,[3,3]);case 1:return[4,ns(t.url)];case 2:r=o.sent(),o.label=3;case 3:return[2,r]}}))}))).apply(this,arguments)}function ts(e){return Ma(e,"x-omrs-offline-caching-strategy")}function ns(e){return rs.apply(this,arguments)}function rs(){return(rs=Fa((function(e){var t,n,r,o;return Ua(this,(function(i){switch(i.label){case 0:return[4,(new ri).dynamicRouteRegistrations.toArray()];case 1:return t=i.sent(),(r=Le(t.filter((function(t){return new RegExp(t.pattern).test(e)})).map((function(e){return null!==(n=e.strategy)&&void 0!==n?n:"network-first"})))).length<=1?[2,r[0]]:[2,null!==(o=["network-first","network-only-or-cache-only"].find((function(e){return r.some((function(t){return t===e}))})))&&void 0!==o?o:za]}}))}))).apply(this,arguments)}self.__WB_DISABLE_DEV_LOGS=!0,qa={prefix:Ke},function(e){var t,n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(l)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0)t=i.value,"string"==typeof qa[t]&&(l[t]=qa[t])}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}}(),function(){!function(e,t,n){var r;r=qi(e,RegExp)?new Ti(e,t,n):new Pi(e,t,n),Bi().registerRoute(r)}((function(e){return"navigate"===e.request.mode}),Ga);var e=Bi(),t=!0,n=!1,r=void 0;try{for(var o,i=ki[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;e.setDefaultHandler(Qa,a)}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}(),self.addEventListener("message",(function(e){return wi.apply(this,arguments)})),self.addEventListener("install",(function(e){self.skipWaiting(),e.waitUntil(ci(Fe))})),self.addEventListener("activate",(function(e){e.waitUntil(self.clients.claim())}))})()})();
|